summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml (renamed from appveyor.yml)3
-rw-r--r--.cirrus.yml63
-rw-r--r--.document1
-rw-r--r--.github/CODEOWNERS9
-rw-r--r--.github/codeql/codeql-config.yml3
-rw-r--r--.github/workflows/baseruby.yml13
-rw-r--r--.github/workflows/bundled_gems.yml66
-rw-r--r--.github/workflows/check_dependencies.yml8
-rw-r--r--.github/workflows/codeql-analysis.yml9
-rw-r--r--.github/workflows/compilers.yml78
-rw-r--r--.github/workflows/macos.yml19
-rw-r--r--.github/workflows/mingw.yml24
-rw-r--r--.github/workflows/mjit.yml16
-rw-r--r--.github/workflows/spec_guards.yml2
-rw-r--r--.github/workflows/ubuntu.yml16
-rw-r--r--.github/workflows/windows.yml60
-rw-r--r--.github/workflows/yjit-macos.yml69
-rw-r--r--.github/workflows/yjit-ubuntu.yml94
-rw-r--r--.github/workflows/yjit_asm_tests.yml23
-rw-r--r--.travis.yml30
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--LEGAL34
-rw-r--r--NEWS.md249
-rw-r--r--README.md3
-rw-r--r--addr2line.c200
-rw-r--r--array.c115
-rw-r--r--array.rb2
-rw-r--r--ast.c51
-rw-r--r--ast.rb12
-rw-r--r--benchmark/attr_accessor.yml29
-rw-r--r--benchmark/hash_aref_array.rb5
-rw-r--r--benchmark/time_new.yml4
-rw-r--r--benchmark/time_parse.yml8
-rw-r--r--benchmark/vm_ivar_of_class.yml12
-rw-r--r--benchmark/vm_ivar_of_class_set.yml11
-rw-r--r--bignum.c73
-rw-r--r--bootstraptest/test_ractor.rb88
-rw-r--r--bootstraptest/test_yjit.rb2290
-rw-r--r--bootstraptest/test_yjit_30k_ifelse.rb241023
-rw-r--r--bootstraptest/test_yjit_30k_methods.rb121018
-rw-r--r--class.c358
-rw-r--r--common.mk988
-rw-r--r--compar.c15
-rw-r--r--compile.c2449
-rw-r--r--complex.c68
-rw-r--r--configure.ac110
-rw-r--r--cont.c186
-rw-r--r--cygwin/GNUmakefile.in3
-rw-r--r--darray.h198
-rw-r--r--debug.c5
-rw-r--r--defs/gmake.mk30
-rw-r--r--defs/id.def1
-rw-r--r--dir.c6
-rw-r--r--dir.rb12
-rw-r--r--dln.c1
-rw-r--r--doc/NEWS-3.0.0.md2
-rw-r--r--doc/bsearch.rdoc120
-rw-r--r--doc/contributing.rdoc28
-rw-r--r--doc/extension.ja.rdoc36
-rw-r--r--doc/extension.rdoc30
-rw-r--r--doc/irb/irb.rd.ja11
-rw-r--r--doc/maintainers.rdoc21
-rw-r--r--doc/make_cheatsheet.md6
-rw-r--r--doc/marshal.rdoc2
-rw-r--r--doc/memory_view.md2
-rw-r--r--doc/ractor.md43
-rw-r--r--doc/syntax/pattern_matching.rdoc8
-rw-r--r--doc/yjit/yjit.md225
-rw-r--r--doc/yjit/yjit_hacking.md75
-rw-r--r--enc/depend1745
-rw-r--r--encoding.c52
-rw-r--r--enum.c1752
-rw-r--r--enumerator.c10
-rw-r--r--error.c123
-rw-r--r--eval.c305
-rw-r--r--eval_error.c4
-rw-r--r--eval_intern.h32
-rw-r--r--ext/-test-/array/concat/depend321
-rw-r--r--ext/-test-/array/concat/extconf.rb2
-rw-r--r--ext/-test-/array/concat/to_ary_conact.c34
-rw-r--r--ext/-test-/auto_ext.rb1
-rw-r--r--ext/-test-/exception/depend115
-rw-r--r--ext/-test-/file/depend100
-rw-r--r--ext/-test-/memory_status/memory_status.c19
-rw-r--r--ext/-test-/printf/depend37
-rw-r--r--ext/-test-/string/capacity.c9
-rw-r--r--ext/-test-/string/cstr.c10
-rw-r--r--ext/-test-/string/depend81
-rw-r--r--ext/-test-/thread_fd/thread_fd.c16
-rw-r--r--ext/-test-/time/leap_second.c1
-rw-r--r--ext/-test-/wait/depend9
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec10
-rw-r--r--ext/cgi/escape/depend37
-rw-r--r--ext/coverage/coverage.c123
-rw-r--r--ext/coverage/depend1
-rw-r--r--ext/date/date.gemspec2
-rw-r--r--ext/date/date_core.c6
-rw-r--r--ext/date/date_strftime.c2
-rw-r--r--ext/date/depend137
-rw-r--r--ext/date/extconf.rb6
-rw-r--r--ext/date/prereq.mk7
-rw-r--r--ext/date/zonetab.h14
-rw-r--r--ext/digest/digest.gemspec40
-rw-r--r--ext/digest/lib/digest.rb21
-rw-r--r--ext/digest/lib/digest/loader.rb3
-rw-r--r--ext/digest/sha2/lib/sha2.rb2
-rw-r--r--ext/digest/sha2/lib/sha2/loader.rb3
-rw-r--r--ext/etc/depend9
-rw-r--r--ext/etc/etc.c15
-rw-r--r--ext/etc/extconf.rb5
-rw-r--r--ext/fcntl/fcntl.gemspec2
-rw-r--r--ext/fiddle/depend18
-rw-r--r--ext/fiddle/fiddle.gemspec4
-rw-r--r--ext/fiddle/lib/fiddle/struct.rb60
-rw-r--r--ext/io/console/depend9
-rw-r--r--ext/io/nonblock/depend37
-rw-r--r--ext/io/wait/depend37
-rw-r--r--ext/io/wait/io-wait.gemspec2
-rw-r--r--ext/json/VERSION2
-rw-r--r--ext/json/generator/depend37
-rw-r--r--ext/json/lib/json/version.rb2
-rw-r--r--ext/json/parser/depend37
-rw-r--r--ext/nkf/depend37
-rw-r--r--ext/nkf/nkf.gemspec2
-rw-r--r--ext/objspace/depend19
-rw-r--r--ext/objspace/objspace.c3
-rw-r--r--ext/openssl/History.md53
-rw-r--r--ext/openssl/depend353
-rw-r--r--ext/openssl/extconf.rb12
-rw-r--r--ext/openssl/lib/openssl/buffering.rb12
-rw-r--r--ext/openssl/lib/openssl/ssl.rb12
-rw-r--r--ext/openssl/lib/openssl/version.rb2
-rw-r--r--ext/openssl/openssl.gemspec4
-rw-r--r--ext/openssl/openssl_missing.h29
-rw-r--r--ext/openssl/ossl.c69
-rw-r--r--ext/openssl/ossl.h17
-rw-r--r--ext/openssl/ossl_asn1.c18
-rw-r--r--ext/openssl/ossl_bn.c186
-rw-r--r--ext/openssl/ossl_cipher.c8
-rw-r--r--ext/openssl/ossl_config.c2
-rw-r--r--ext/openssl/ossl_digest.c14
-rw-r--r--ext/openssl/ossl_hmac.c4
-rw-r--r--ext/openssl/ossl_pkcs12.c24
-rw-r--r--ext/openssl/ossl_pkey.c9
-rw-r--r--ext/openssl/ossl_pkey_ec.c12
-rw-r--r--ext/openssl/ossl_ssl.c132
-rw-r--r--ext/openssl/ossl_ts.c44
-rw-r--r--ext/openssl/ossl_x509store.c51
-rw-r--r--ext/openssl/ruby_missing.h24
-rw-r--r--ext/pathname/depend37
-rw-r--r--ext/pathname/lib/pathname.rb8
-rw-r--r--ext/pathname/pathname.gemspec2
-rw-r--r--ext/psych/depend45
-rw-r--r--ext/psych/lib/psych.rb34
-rw-r--r--ext/psych/lib/psych/class_loader.rb4
-rw-r--r--ext/psych/lib/psych/core_ext.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.rb4
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb17
-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.rb2
-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.rb6
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb8
-rw-r--r--ext/psych/psych.gemspec2
-rw-r--r--ext/pty/depend37
-rw-r--r--ext/readline/depend9
-rw-r--r--ext/readline/readline-ext.gemspec2
-rw-r--r--ext/ripper/depend9
-rw-r--r--ext/socket/ancdata.c12
-rw-r--r--ext/socket/basicsocket.c2
-rw-r--r--ext/socket/depend135
-rw-r--r--ext/socket/ifaddr.c1
-rw-r--r--ext/socket/mkconstants.rb33
-rw-r--r--ext/stringio/depend37
-rw-r--r--ext/stringio/stringio.c2
-rw-r--r--ext/strscan/depend37
-rw-r--r--ext/strscan/strscan.c2
-rw-r--r--ext/zlib/depend37
-rw-r--r--ext/zlib/zlib.c16
-rw-r--r--file.c126
-rw-r--r--gc.c1781
-rw-r--r--gc.h10
-rw-r--r--gc.rb96
-rw-r--r--gem_prelude.rb4
-rw-r--r--gems/bundled_gems11
-rw-r--r--hash.c162
-rw-r--r--id_table.c2
-rw-r--r--include/ruby.h1
-rw-r--r--include/ruby/assert.h2
-rw-r--r--include/ruby/atomic.h990
-rw-r--r--include/ruby/backward.h1
-rw-r--r--include/ruby/backward/2/assume.h25
-rw-r--r--include/ruby/backward/2/attributes.h3
-rw-r--r--include/ruby/backward/2/bool.h5
-rw-r--r--include/ruby/backward/2/gcc_version_since.h5
-rw-r--r--include/ruby/backward/2/inttypes.h3
-rw-r--r--include/ruby/backward/2/limits.h5
-rw-r--r--include/ruby/backward/2/long_long.h12
-rw-r--r--include/ruby/backward/2/r_cast.h5
-rw-r--r--include/ruby/backward/2/rmodule.h3
-rw-r--r--include/ruby/backward/2/stdalign.h6
-rw-r--r--include/ruby/backward/2/stdarg.h24
-rw-r--r--include/ruby/backward/cxxanyargs.hpp69
-rw-r--r--include/ruby/debug.h555
-rw-r--r--include/ruby/defines.h11
-rw-r--r--include/ruby/encoding.h410
-rw-r--r--include/ruby/fiber/scheduler.h185
-rw-r--r--include/ruby/internal/anyargs.h8
-rw-r--r--include/ruby/internal/arithmetic.h2
-rw-r--r--include/ruby/internal/arithmetic/char.h31
-rw-r--r--include/ruby/internal/arithmetic/double.h49
-rw-r--r--include/ruby/internal/arithmetic/fixnum.h32
-rw-r--r--include/ruby/internal/arithmetic/gid_t.h5
-rw-r--r--include/ruby/internal/arithmetic/int.h129
-rw-r--r--include/ruby/internal/arithmetic/intptr_t.h38
-rw-r--r--include/ruby/internal/arithmetic/long.h158
-rw-r--r--include/ruby/internal/arithmetic/long_long.h85
-rw-r--r--include/ruby/internal/arithmetic/mode_t.h5
-rw-r--r--include/ruby/internal/arithmetic/off_t.h5
-rw-r--r--include/ruby/internal/arithmetic/pid_t.h5
-rw-r--r--include/ruby/internal/arithmetic/short.h85
-rw-r--r--include/ruby/internal/arithmetic/size_t.h24
-rw-r--r--include/ruby/internal/arithmetic/st_data_t.h24
-rw-r--r--include/ruby/internal/arithmetic/uid_t.h5
-rw-r--r--include/ruby/internal/assume.h2
-rw-r--r--include/ruby/internal/attr/alloc_size.h2
-rw-r--r--include/ruby/internal/attr/artificial.h2
-rw-r--r--include/ruby/internal/attr/cold.h2
-rw-r--r--include/ruby/internal/attr/const.h2
-rw-r--r--include/ruby/internal/attr/constexpr.h2
-rw-r--r--include/ruby/internal/attr/deprecated.h12
-rw-r--r--include/ruby/internal/attr/diagnose_if.h2
-rw-r--r--include/ruby/internal/attr/enum_extensibility.h2
-rw-r--r--include/ruby/internal/attr/error.h2
-rw-r--r--include/ruby/internal/attr/flag_enum.h2
-rw-r--r--include/ruby/internal/attr/forceinline.h2
-rw-r--r--include/ruby/internal/attr/format.h2
-rw-r--r--include/ruby/internal/attr/maybe_unused.h2
-rw-r--r--include/ruby/internal/attr/noalias.h15
-rw-r--r--include/ruby/internal/attr/nodiscard.h2
-rw-r--r--include/ruby/internal/attr/noexcept.h2
-rw-r--r--include/ruby/internal/attr/noinline.h2
-rw-r--r--include/ruby/internal/attr/nonnull.h4
-rw-r--r--include/ruby/internal/attr/noreturn.h2
-rw-r--r--include/ruby/internal/attr/pure.h2
-rw-r--r--include/ruby/internal/attr/restrict.h2
-rw-r--r--include/ruby/internal/attr/returns_nonnull.h2
-rw-r--r--include/ruby/internal/attr/warning.h2
-rw-r--r--include/ruby/internal/attr/weakref.h2
-rw-r--r--include/ruby/internal/cast.h5
-rw-r--r--include/ruby/internal/compiler_is.h2
-rw-r--r--include/ruby/internal/compiler_is/apple.h5
-rw-r--r--include/ruby/internal/compiler_is/clang.h5
-rw-r--r--include/ruby/internal/compiler_is/gcc.h5
-rw-r--r--include/ruby/internal/compiler_is/intel.h5
-rw-r--r--include/ruby/internal/compiler_is/msvc.h5
-rw-r--r--include/ruby/internal/compiler_is/sunpro.h5
-rw-r--r--include/ruby/internal/compiler_since.h2
-rw-r--r--include/ruby/internal/config.h13
-rw-r--r--include/ruby/internal/constant_p.h3
-rw-r--r--include/ruby/internal/core.h2
-rw-r--r--include/ruby/internal/core/rarray.h342
-rw-r--r--include/ruby/internal/core/rbasic.h88
-rw-r--r--include/ruby/internal/core/rbignum.h33
-rw-r--r--include/ruby/internal/core/rclass.h99
-rw-r--r--include/ruby/internal/core/rdata.h231
-rw-r--r--include/ruby/internal/core/rfile.h17
-rw-r--r--include/ruby/internal/core/rhash.h112
-rw-r--r--include/ruby/internal/core/rmatch.h85
-rw-r--r--include/ruby/internal/core/robject.h99
-rw-r--r--include/ruby/internal/core/rregexp.h88
-rw-r--r--include/ruby/internal/core/rstring.h408
-rw-r--r--include/ruby/internal/core/rstruct.h58
-rw-r--r--include/ruby/internal/core/rtypeddata.h428
-rw-r--r--include/ruby/internal/ctype.h382
-rw-r--r--include/ruby/internal/dllexport.h28
-rw-r--r--include/ruby/internal/dosish.h28
-rw-r--r--include/ruby/internal/encoding/coderange.h202
-rw-r--r--include/ruby/internal/encoding/ctype.h243
-rw-r--r--include/ruby/internal/encoding/encoding.h1058
-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.h558
-rw-r--r--include/ruby/internal/error.h568
-rw-r--r--include/ruby/internal/eval.h355
-rw-r--r--include/ruby/internal/event.h157
-rw-r--r--include/ruby/internal/fl_type.h659
-rw-r--r--include/ruby/internal/gc.h2
-rw-r--r--include/ruby/internal/glob.h88
-rw-r--r--include/ruby/internal/globals.h226
-rw-r--r--include/ruby/internal/has/attribute.h2
-rw-r--r--include/ruby/internal/has/builtin.h2
-rw-r--r--include/ruby/internal/has/c_attribute.h2
-rw-r--r--include/ruby/internal/has/cpp_attribute.h2
-rw-r--r--include/ruby/internal/has/declspec_attribute.h2
-rw-r--r--include/ruby/internal/has/extension.h2
-rw-r--r--include/ruby/internal/has/feature.h2
-rw-r--r--include/ruby/internal/has/warning.h2
-rw-r--r--include/ruby/internal/intern/array.h659
-rw-r--r--include/ruby/internal/intern/bignum.h815
-rw-r--r--include/ruby/internal/intern/class.h360
-rw-r--r--include/ruby/internal/intern/compar.h34
-rw-r--r--include/ruby/internal/intern/complex.h203
-rw-r--r--include/ruby/internal/intern/cont.h222
-rw-r--r--include/ruby/internal/intern/dir.h11
-rw-r--r--include/ruby/internal/intern/enum.h44
-rw-r--r--include/ruby/internal/intern/enumerator.h201
-rw-r--r--include/ruby/internal/intern/error.h255
-rw-r--r--include/ruby/internal/intern/eval.h183
-rw-r--r--include/ruby/internal/intern/file.h170
-rw-r--r--include/ruby/internal/intern/gc.h373
-rw-r--r--include/ruby/internal/intern/hash.h300
-rw-r--r--include/ruby/internal/intern/io.h635
-rw-r--r--include/ruby/internal/intern/load.h194
-rw-r--r--include/ruby/internal/intern/marshal.h83
-rw-r--r--include/ruby/internal/intern/numeric.h188
-rw-r--r--include/ruby/internal/intern/object.h565
-rw-r--r--include/ruby/internal/intern/parse.h155
-rw-r--r--include/ruby/internal/intern/proc.h336
-rw-r--r--include/ruby/internal/intern/process.h239
-rw-r--r--include/ruby/internal/intern/random.h74
-rw-r--r--include/ruby/internal/intern/range.h60
-rw-r--r--include/ruby/internal/intern/rational.h138
-rw-r--r--include/ruby/internal/intern/re.h227
-rw-r--r--include/ruby/internal/intern/ruby.h46
-rw-r--r--include/ruby/internal/intern/select.h38
-rw-r--r--include/ruby/internal/intern/select/largesize.h138
-rw-r--r--include/ruby/internal/intern/select/posix.h67
-rw-r--r--include/ruby/internal/intern/select/win32.h153
-rw-r--r--include/ruby/internal/intern/signal.h121
-rw-r--r--include/ruby/internal/intern/sprintf.h132
-rw-r--r--include/ruby/internal/intern/string.h1697
-rw-r--r--include/ruby/internal/intern/struct.h184
-rw-r--r--include/ruby/internal/intern/thread.h452
-rw-r--r--include/ruby/internal/intern/time.h122
-rw-r--r--include/ruby/internal/intern/variable.h630
-rw-r--r--include/ruby/internal/intern/vm.h403
-rw-r--r--include/ruby/internal/interpreter.h235
-rw-r--r--include/ruby/internal/iterator.h481
-rw-r--r--include/ruby/internal/memory.h429
-rw-r--r--include/ruby/internal/method.h180
-rw-r--r--include/ruby/internal/module.h154
-rw-r--r--include/ruby/internal/newobj.h152
-rw-r--r--include/ruby/internal/rgengc.h286
-rw-r--r--include/ruby/internal/scan_args.h157
-rw-r--r--include/ruby/internal/special_consts.h141
-rw-r--r--include/ruby/internal/static_assert.h2
-rw-r--r--include/ruby/internal/stdalign.h8
-rw-r--r--include/ruby/internal/stdbool.h2
-rw-r--r--include/ruby/internal/symbol.h256
-rw-r--r--include/ruby/internal/value.h71
-rw-r--r--include/ruby/internal/value_type.h199
-rw-r--r--include/ruby/internal/variable.h301
-rw-r--r--include/ruby/internal/warning_push.h41
-rw-r--r--include/ruby/internal/xmalloc.h110
-rw-r--r--include/ruby/io.h837
-rw-r--r--include/ruby/memory_view.h196
-rw-r--r--include/ruby/missing.h43
-rw-r--r--include/ruby/ractor.h210
-rw-r--r--include/ruby/random.h226
-rw-r--r--include/ruby/re.h129
-rw-r--r--include/ruby/regex.h1
-rw-r--r--include/ruby/ruby.h177
-rw-r--r--include/ruby/subst.h1
-rw-r--r--include/ruby/thread.h157
-rw-r--r--include/ruby/thread_native.h141
-rw-r--r--include/ruby/util.h193
-rw-r--r--include/ruby/version.h106
-rw-r--r--include/ruby/vm.h19
-rw-r--r--include/ruby/win32.h10
-rw-r--r--inits.c2
-rw-r--r--insns.def12
-rw-r--r--internal.h8
-rw-r--r--internal/array.h6
-rw-r--r--internal/bignum.h1
-rw-r--r--internal/bits.h1
-rw-r--r--internal/class.h6
-rw-r--r--internal/compar.h1
-rw-r--r--internal/compile.h2
-rw-r--r--internal/compilers.h1
-rw-r--r--internal/complex.h1
-rw-r--r--internal/cont.h1
-rw-r--r--internal/dir.h1
-rw-r--r--internal/enc.h1
-rw-r--r--internal/encoding.h1
-rw-r--r--internal/enum.h1
-rw-r--r--internal/enumerator.h1
-rw-r--r--internal/error.h37
-rw-r--r--internal/eval.h1
-rw-r--r--internal/file.h1
-rw-r--r--internal/fixnum.h1
-rw-r--r--internal/gc.h33
-rw-r--r--internal/hash.h4
-rw-r--r--internal/imemo.h1
-rw-r--r--internal/inits.h1
-rw-r--r--internal/io.h5
-rw-r--r--internal/load.h1
-rw-r--r--internal/loadpath.h1
-rw-r--r--internal/math.h1
-rw-r--r--internal/missing.h1
-rw-r--r--internal/numeric.h21
-rw-r--r--internal/object.h1
-rw-r--r--internal/parse.h3
-rw-r--r--internal/proc.h1
-rw-r--r--internal/process.h5
-rw-r--r--internal/random.h1
-rw-r--r--internal/range.h1
-rw-r--r--internal/rational.h2
-rw-r--r--internal/re.h1
-rw-r--r--internal/sanitizers.h1
-rw-r--r--internal/serial.h1
-rw-r--r--internal/signal.h1
-rw-r--r--internal/static_assert.h1
-rw-r--r--internal/string.h3
-rw-r--r--internal/struct.h1
-rw-r--r--internal/symbol.h1
-rw-r--r--internal/thread.h1
-rw-r--r--internal/time.h1
-rw-r--r--internal/transcode.h1
-rw-r--r--internal/util.h4
-rw-r--r--internal/variable.h3
-rw-r--r--internal/vm.h3
-rw-r--r--internal/warnings.h1
-rw-r--r--io.c171
-rw-r--r--iseq.c132
-rw-r--r--iseq.h5
-rw-r--r--lib/base64.gemspec2
-rw-r--r--lib/base64.rb6
-rw-r--r--lib/benchmark/version.rb2
-rw-r--r--lib/bundler.rb33
-rw-r--r--lib/bundler/cli.rb15
-rw-r--r--lib/bundler/cli/exec.rb7
-rw-r--r--lib/bundler/cli/gem.rb36
-rw-r--r--lib/bundler/cli/info.rb15
-rw-r--r--lib/bundler/cli/install.rb12
-rw-r--r--lib/bundler/cli/issue.rb7
-rw-r--r--lib/bundler/cli/list.rb8
-rw-r--r--lib/bundler/cli/remove.rb3
-rw-r--r--lib/bundler/definition.rb66
-rw-r--r--lib/bundler/digest.rb71
-rw-r--r--lib/bundler/dsl.rb2
-rw-r--r--lib/bundler/endpoint_specification.rb8
-rw-r--r--lib/bundler/errors.rb22
-rw-r--r--lib/bundler/fetcher.rb3
-rw-r--r--lib/bundler/friendly_errors.rb35
-rw-r--r--lib/bundler/gem_helper.rb23
-rw-r--r--lib/bundler/gemdeps.rb29
-rw-r--r--lib/bundler/installer.rb4
-rw-r--r--lib/bundler/installer/gem_installer.rb7
-rw-r--r--lib/bundler/installer/standalone.rb21
-rw-r--r--lib/bundler/lockfile_parser.rb2
-rw-r--r--lib/bundler/man/bundle-add.12
-rw-r--r--lib/bundler/man/bundle-binstubs.12
-rw-r--r--lib/bundler/man/bundle-cache.12
-rw-r--r--lib/bundler/man/bundle-check.12
-rw-r--r--lib/bundler/man/bundle-clean.12
-rw-r--r--lib/bundler/man/bundle-config.14
-rw-r--r--lib/bundler/man/bundle-config.1.ronn4
-rw-r--r--lib/bundler/man/bundle-doctor.12
-rw-r--r--lib/bundler/man/bundle-exec.12
-rw-r--r--lib/bundler/man/bundle-gem.12
-rw-r--r--lib/bundler/man/bundle-info.12
-rw-r--r--lib/bundler/man/bundle-init.12
-rw-r--r--lib/bundler/man/bundle-inject.12
-rw-r--r--lib/bundler/man/bundle-install.14
-rw-r--r--lib/bundler/man/bundle-install.1.ronn4
-rw-r--r--lib/bundler/man/bundle-list.12
-rw-r--r--lib/bundler/man/bundle-lock.12
-rw-r--r--lib/bundler/man/bundle-open.12
-rw-r--r--lib/bundler/man/bundle-outdated.12
-rw-r--r--lib/bundler/man/bundle-platform.12
-rw-r--r--lib/bundler/man/bundle-pristine.12
-rw-r--r--lib/bundler/man/bundle-remove.12
-rw-r--r--lib/bundler/man/bundle-show.12
-rw-r--r--lib/bundler/man/bundle-update.14
-rw-r--r--lib/bundler/man/bundle-update.1.ronn3
-rw-r--r--lib/bundler/man/bundle-viz.12
-rw-r--r--lib/bundler/man/bundle.12
-rw-r--r--lib/bundler/man/gemfile.52
-rw-r--r--lib/bundler/plugin.rb29
-rw-r--r--lib/bundler/plugin/installer.rb2
-rw-r--r--lib/bundler/psyched_yaml.rb14
-rw-r--r--lib/bundler/resolver.rb27
-rw-r--r--lib/bundler/rubygems_ext.rb4
-rw-r--r--lib/bundler/rubygems_gem_installer.rb24
-rw-r--r--lib/bundler/rubygems_integration.rb63
-rw-r--r--lib/bundler/runtime.rb23
-rw-r--r--lib/bundler/settings.rb14
-rw-r--r--lib/bundler/setup.rb4
-rw-r--r--lib/bundler/source.rb4
-rw-r--r--lib/bundler/source/git.rb26
-rw-r--r--lib/bundler/source/rubygems.rb127
-rw-r--r--lib/bundler/source/rubygems_aggregate.rb4
-rw-r--r--lib/bundler/source_list.rb15
-rw-r--r--lib/bundler/spec_set.rb48
-rw-r--r--lib/bundler/templates/newgem/github/workflows/main.yml.tt15
-rw-r--r--lib/bundler/templates/newgem/newgem.gemspec.tt4
-rw-r--r--lib/bundler/templates/newgem/standard.yml.tt2
-rw-r--r--lib/cgi.rb2
-rw-r--r--lib/cgi/util.rb11
-rw-r--r--lib/csv.rb46
-rw-r--r--lib/csv/csv.gemspec2
-rw-r--r--lib/csv/fields_converter.rb8
-rw-r--r--lib/csv/input_record_separator.rb31
-rw-r--r--lib/csv/parser.rb22
-rw-r--r--lib/csv/version.rb2
-rw-r--r--lib/csv/writer.rb3
-rw-r--r--lib/debug.gemspec22
-rw-r--r--lib/debug.rb1106
-rw-r--r--lib/delegate/delegate.gemspec2
-rw-r--r--lib/did_you_mean.rb10
-rw-r--r--lib/did_you_mean/formatter.rb35
-rw-r--r--lib/did_you_mean/formatters/plain_formatter.rb35
-rw-r--r--lib/did_you_mean/formatters/verbose_formatter.rb52
-rw-r--r--lib/did_you_mean/spell_checker.rb18
-rw-r--r--lib/did_you_mean/spell_checkers/pattern_key_name_checker.rb20
-rw-r--r--lib/did_you_mean/verbose.rb6
-rw-r--r--lib/drb/drb.gemspec4
-rw-r--r--lib/drb/version.rb2
-rw-r--r--lib/error_highlight/base.rb20
-rw-r--r--lib/error_highlight/core_ext.rb2
-rw-r--r--lib/error_highlight/formatter.rb8
-rw-r--r--lib/fileutils.rb14
-rw-r--r--lib/find.gemspec2
-rw-r--r--lib/ipaddr.rb132
-rw-r--r--lib/irb.rb17
-rw-r--r--lib/irb/cmd/help.rb3
-rw-r--r--lib/irb/cmd/show_source.rb5
-rw-r--r--lib/irb/completion.rb74
-rw-r--r--lib/irb/context.rb46
-rw-r--r--lib/irb/init.rb9
-rw-r--r--lib/irb/input-method.rb99
-rw-r--r--lib/irb/irb.gemspec2
-rw-r--r--lib/irb/lc/help-message11
-rw-r--r--lib/irb/lc/ja/help-message2
-rw-r--r--lib/irb/ruby-lex.rb38
-rw-r--r--lib/irb/version.rb4
-rw-r--r--lib/irb/workspace.rb3
-rw-r--r--lib/logger/logger.gemspec2
-rw-r--r--lib/logger/version.rb2
-rw-r--r--lib/mkmf.rb29
-rw-r--r--lib/mutex_m.rb1
-rw-r--r--lib/net/http.rb2
-rw-r--r--lib/net/protocol.rb2
-rw-r--r--lib/open-uri.gemspec2
-rw-r--r--lib/optparse.rb2
-rw-r--r--lib/ostruct.rb14
-rw-r--r--lib/pp.gemspec2
-rw-r--r--lib/prettyprint.gemspec2
-rw-r--r--lib/racc/info.rb2
-rw-r--r--lib/racc/racc.gemspec2
-rw-r--r--lib/rdoc/any_method.rb5
-rw-r--r--lib/rdoc/cross_reference.rb2
-rw-r--r--lib/rdoc/generator/darkfish.rb4
-rw-r--r--lib/rdoc/generator/template/darkfish/_head.rhtml4
-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/markdown.rb79
-rw-r--r--lib/rdoc/markdown/literals.rb15
-rw-r--r--lib/rdoc/markup/pre_process.rb2
-rw-r--r--lib/rdoc/options.rb31
-rw-r--r--lib/rdoc/parser/c.rb30
-rw-r--r--lib/rdoc/rd/block_parser.rb2
-rw-r--r--lib/rdoc/rd/inline_parser.rb2
-rw-r--r--lib/rdoc/rdoc.gemspec1
-rw-r--r--lib/rdoc/rdoc.rb33
-rw-r--r--lib/rdoc/text.rb16
-rw-r--r--lib/reline.rb138
-rw-r--r--lib/reline/ansi.rb23
-rw-r--r--lib/reline/config.rb32
-rw-r--r--lib/reline/general_io.rb1
-rw-r--r--lib/reline/key_stroke.rb77
-rw-r--r--lib/reline/line_editor.rb640
-rw-r--r--lib/reline/terminfo.rb30
-rw-r--r--lib/reline/unicode.rb35
-rw-r--r--lib/reline/version.rb2
-rw-r--r--lib/reline/windows.rb88
-rw-r--r--lib/rinda/rinda.gemspec2
-rw-r--r--lib/rubygems.rb72
-rw-r--r--lib/rubygems/command_manager.rb6
-rw-r--r--lib/rubygems/commands/build_command.rb6
-rw-r--r--lib/rubygems/commands/cert_command.rb23
-rw-r--r--lib/rubygems/commands/check_command.rb8
-rw-r--r--lib/rubygems/commands/cleanup_command.rb6
-rw-r--r--lib/rubygems/commands/contents_command.rb4
-rw-r--r--lib/rubygems/commands/dependency_command.rb6
-rw-r--r--lib/rubygems/commands/environment_command.rb2
-rw-r--r--lib/rubygems/commands/fetch_command.rb6
-rw-r--r--lib/rubygems/commands/generate_index_command.rb4
-rw-r--r--lib/rubygems/commands/help_command.rb2
-rw-r--r--lib/rubygems/commands/info_command.rb4
-rw-r--r--lib/rubygems/commands/install_command.rb23
-rw-r--r--lib/rubygems/commands/list_command.rb4
-rw-r--r--lib/rubygems/commands/lock_command.rb2
-rw-r--r--lib/rubygems/commands/mirror_command.rb2
-rw-r--r--lib/rubygems/commands/open_command.rb4
-rw-r--r--lib/rubygems/commands/outdated_command.rb8
-rw-r--r--lib/rubygems/commands/owner_command.rb8
-rw-r--r--lib/rubygems/commands/pristine_command.rb10
-rw-r--r--lib/rubygems/commands/push_command.rb8
-rw-r--r--lib/rubygems/commands/query_command.rb6
-rw-r--r--lib/rubygems/commands/rdoc_command.rb6
-rw-r--r--lib/rubygems/commands/search_command.rb4
-rw-r--r--lib/rubygems/commands/server_command.rb6
-rw-r--r--lib/rubygems/commands/setup_command.rb28
-rw-r--r--lib/rubygems/commands/signin_command.rb4
-rw-r--r--lib/rubygems/commands/signout_command.rb2
-rw-r--r--lib/rubygems/commands/sources_command.rb8
-rw-r--r--lib/rubygems/commands/specification_command.rb8
-rw-r--r--lib/rubygems/commands/stale_command.rb2
-rw-r--r--lib/rubygems/commands/uninstall_command.rb6
-rw-r--r--lib/rubygems/commands/unpack_command.rb10
-rw-r--r--lib/rubygems/commands/update_command.rb18
-rw-r--r--lib/rubygems/commands/which_command.rb2
-rw-r--r--lib/rubygems/commands/yank_command.rb8
-rw-r--r--lib/rubygems/config_file.rb2
-rw-r--r--lib/rubygems/defaults.rb24
-rw-r--r--lib/rubygems/dependency_installer.rb16
-rw-r--r--lib/rubygems/dependency_list.rb2
-rw-r--r--lib/rubygems/doctor.rb4
-rw-r--r--lib/rubygems/errors.rb3
-rw-r--r--lib/rubygems/exceptions.rb4
-rw-r--r--lib/rubygems/gem_runner.rb6
-rw-r--r--lib/rubygems/gemcutter_utilities.rb4
-rw-r--r--lib/rubygems/indexer.rb4
-rw-r--r--lib/rubygems/install_default_message.rb4
-rw-r--r--lib/rubygems/install_message.rb4
-rw-r--r--lib/rubygems/install_update_options.rb4
-rw-r--r--lib/rubygems/installer.rb25
-rw-r--r--lib/rubygems/local_remote_options.rb2
-rw-r--r--lib/rubygems/mock_gem_ui.rb2
-rw-r--r--lib/rubygems/name_tuple.rb5
-rw-r--r--lib/rubygems/package.rb82
-rw-r--r--lib/rubygems/package/tar_reader.rb2
-rw-r--r--lib/rubygems/package_task.rb4
-rw-r--r--lib/rubygems/path_support.rb7
-rw-r--r--lib/rubygems/platform.rb7
-rw-r--r--lib/rubygems/query_utils.rb8
-rw-r--r--lib/rubygems/rdoc.rb2
-rw-r--r--lib/rubygems/remote_fetcher.rb33
-rw-r--r--lib/rubygems/request.rb12
-rw-r--r--lib/rubygems/request_set.rb8
-rw-r--r--lib/rubygems/request_set/lockfile.rb2
-rw-r--r--lib/rubygems/request_set/lockfile/tokenizer.rb2
-rw-r--r--lib/rubygems/requirement.rb2
-rw-r--r--lib/rubygems/resolver.rb62
-rw-r--r--lib/rubygems/resolver/git_specification.rb2
-rw-r--r--lib/rubygems/resolver/installer_set.rb8
-rw-r--r--lib/rubygems/resolver/molinillo.rb2
-rw-r--r--lib/rubygems/resolver/set.rb1
-rw-r--r--lib/rubygems/resolver/specification.rb2
-rw-r--r--lib/rubygems/s3_uri_signer.rb9
-rw-r--r--lib/rubygems/security.rb74
-rw-r--r--lib/rubygems/security/policy.rb10
-rw-r--r--lib/rubygems/security/signer.rb9
-rw-r--r--lib/rubygems/security_option.rb4
-rw-r--r--lib/rubygems/server.rb4
-rw-r--r--lib/rubygems/source.rb14
-rw-r--r--lib/rubygems/source/git.rb4
-rw-r--r--lib/rubygems/spec_fetcher.rb10
-rw-r--r--lib/rubygems/specification.rb26
-rw-r--r--lib/rubygems/specification_policy.rb4
-rw-r--r--lib/rubygems/uninstaller.rb12
-rw-r--r--lib/rubygems/uri.rb111
-rw-r--r--lib/rubygems/uri_parser.rb42
-rw-r--r--lib/rubygems/user_interaction.rb4
-rw-r--r--lib/rubygems/util.rb2
-rw-r--r--lib/rubygems/util/licenses.rb2
-rw-r--r--lib/rubygems/validator.rb4
-rw-r--r--lib/rubygems/version_option.rb2
-rw-r--r--lib/securerandom.gemspec2
-rw-r--r--lib/securerandom.rb2
-rw-r--r--lib/set.rb11
-rw-r--r--lib/tempfile.gemspec2
-rw-r--r--lib/tempfile.rb6
-rw-r--r--lib/time.gemspec2
-rw-r--r--lib/timeout.rb2
-rw-r--r--lib/un.gemspec5
-rw-r--r--lib/un.rb39
-rw-r--r--lib/uri/http.rb39
-rw-r--r--lib/uri/version.rb2
-rw-r--r--lib/yaml/yaml.gemspec2
-rw-r--r--load.c220
-rw-r--r--man/irb.124
-rw-r--r--marshal.c216
-rw-r--r--marshal.rb21
-rw-r--r--math.c14
-rw-r--r--memory_view.c4
-rwxr-xr-xmisc/lldb_cruby.py20
-rw-r--r--misc/lldb_yjit.py47
-rwxr-xr-xmisc/test_yjit_asm.sh10
-rw-r--r--misc/yjit_asm_tests.c437
-rw-r--r--missing/erf.c15
-rw-r--r--missing/finite.c9
-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/tgamma.c15
-rw-r--r--mjit.c15
-rw-r--r--mjit.h48
-rw-r--r--mjit_compile.c51
-rw-r--r--numeric.c885
-rw-r--r--numeric.rb20
-rw-r--r--object.c362
-rw-r--r--pack.c117
-rw-r--r--pack.rb41
-rw-r--r--parse.y180
-rw-r--r--proc.c44
-rw-r--r--process.c255
-rw-r--r--ractor.c33
-rw-r--r--ractor.rb6
-rw-r--r--ractor_core.h15
-rw-r--r--random.c60
-rw-r--r--range.c1204
-rw-r--r--rational.c33
-rw-r--r--re.c185
-rw-r--r--regcomp.c2
-rw-r--r--regerror.c4
-rw-r--r--regint.h8
-rw-r--r--regparse.c6
-rw-r--r--ruby.c157
-rw-r--r--ruby_assert.h1
-rw-r--r--sample/exyacc.rb2
-rw-r--r--scheduler.c21
-rw-r--r--signal.c12
-rw-r--r--spec/bundler/bundler/bundler_spec.rb30
-rw-r--r--spec/bundler/bundler/cli_spec.rb16
-rw-r--r--spec/bundler/bundler/definition_spec.rb3
-rw-r--r--spec/bundler/bundler/digest_spec.rb17
-rw-r--r--spec/bundler/bundler/dsl_spec.rb2
-rw-r--r--spec/bundler/bundler/endpoint_specification_spec.rb16
-rw-r--r--spec/bundler/bundler/env_spec.rb14
-rw-r--r--spec/bundler/bundler/gem_helper_spec.rb2
-rw-r--r--spec/bundler/bundler/plugin_spec.rb7
-rw-r--r--spec/bundler/bundler/psyched_yaml_spec.rb9
-rw-r--r--spec/bundler/bundler/rubygems_integration_spec.rb12
-rw-r--r--spec/bundler/bundler/source/git_spec.rb45
-rw-r--r--spec/bundler/cache/gems_spec.rb24
-rw-r--r--spec/bundler/commands/binstubs_spec.rb6
-rw-r--r--spec/bundler/commands/check_spec.rb52
-rw-r--r--spec/bundler/commands/clean_spec.rb14
-rw-r--r--spec/bundler/commands/config_spec.rb32
-rw-r--r--spec/bundler/commands/exec_spec.rb12
-rw-r--r--spec/bundler/commands/info_spec.rb10
-rw-r--r--spec/bundler/commands/install_spec.rb201
-rw-r--r--spec/bundler/commands/lock_spec.rb2
-rw-r--r--spec/bundler/commands/newgem_spec.rb52
-rw-r--r--spec/bundler/commands/post_bundle_message_spec.rb1
-rw-r--r--spec/bundler/commands/remove_spec.rb3
-rw-r--r--spec/bundler/install/gemfile/git_spec.rb4
-rw-r--r--spec/bundler/install/gemfile/sources_spec.rb18
-rw-r--r--spec/bundler/install/gems/standalone_spec.rb71
-rw-r--r--spec/bundler/install/gemspecs_spec.rb4
-rw-r--r--spec/bundler/install/global_cache_spec.rb16
-rw-r--r--spec/bundler/install/yanked_spec.rb31
-rw-r--r--spec/bundler/lock/lockfile_spec.rb111
-rw-r--r--spec/bundler/other/major_deprecation_spec.rb31
-rw-r--r--spec/bundler/plugins/command_spec.rb6
-rw-r--r--spec/bundler/plugins/install_spec.rb21
-rw-r--r--spec/bundler/runtime/platform_spec.rb3
-rw-r--r--spec/bundler/runtime/setup_spec.rb35
-rw-r--r--spec/bundler/spec_helper.rb1
-rw-r--r--spec/bundler/support/builders.rb19
-rw-r--r--spec/bundler/support/hax.rb5
-rw-r--r--spec/bundler/support/indexes.rb2
-rw-r--r--spec/bundler/support/path.rb18
-rw-r--r--spec/bundler/support/platforms.rb6
-rw-r--r--spec/bundler/update/git_spec.rb4
-rw-r--r--spec/default.mspec20
-rw-r--r--spec/mspec/lib/mspec/helpers/ruby_exe.rb10
-rw-r--r--spec/mspec/spec/helpers/ruby_exe_spec.rb2
-rw-r--r--spec/mspec/tool/sync/sync-rubyspec.rb9
-rwxr-xr-xspec/mspec/tool/tag_from_output.rb7
-rw-r--r--spec/ruby/README.md1
-rw-r--r--spec/ruby/command_line/backtrace_limit_spec.rb48
-rw-r--r--spec/ruby/command_line/dash_v_spec.rb2
-rw-r--r--spec/ruby/command_line/fixtures/backtrace.rb35
-rw-r--r--spec/ruby/core/array/intersect_spec.rb17
-rw-r--r--spec/ruby/core/array/shared/slice.rb217
-rw-r--r--spec/ruby/core/array/sum_spec.rb29
-rw-r--r--spec/ruby/core/binding/eval_spec.rb16
-rw-r--r--spec/ruby/core/class/descendants_spec.rb38
-rw-r--r--spec/ruby/core/conditionvariable/broadcast_spec.rb (renamed from spec/ruby/library/conditionvariable/broadcast_spec.rb)0
-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.rb (renamed from spec/ruby/library/conditionvariable/signal_spec.rb)0
-rw-r--r--spec/ruby/core/conditionvariable/wait_spec.rb (renamed from spec/ruby/library/conditionvariable/wait_spec.rb)0
-rw-r--r--spec/ruby/core/dir/fixtures/common.rb2
-rw-r--r--spec/ruby/core/dir/glob_spec.rb2
-rw-r--r--spec/ruby/core/dir/shared/glob.rb26
-rw-r--r--spec/ruby/core/encoding/default_external_spec.rb8
-rw-r--r--spec/ruby/core/enumerable/each_cons_spec.rb4
-rw-r--r--spec/ruby/core/enumerable/each_slice_spec.rb4
-rw-r--r--spec/ruby/core/enumerable/shared/collect.rb14
-rw-r--r--spec/ruby/core/enumerable/sum_spec.rb9
-rw-r--r--spec/ruby/core/enumerable/tally_spec.rb2
-rw-r--r--spec/ruby/core/env/shift_spec.rb37
-rw-r--r--spec/ruby/core/file/utime_spec.rb7
-rw-r--r--spec/ruby/core/float/comparison_spec.rb18
-rw-r--r--spec/ruby/core/gc/stat_spec.rb6
-rw-r--r--spec/ruby/core/hash/transform_keys_spec.rb27
-rw-r--r--spec/ruby/core/integer/zero_spec.rb21
-rw-r--r--spec/ruby/core/io/external_encoding_spec.rb8
-rw-r--r--spec/ruby/core/io/internal_encoding_spec.rb8
-rw-r--r--spec/ruby/core/io/open_spec.rb4
-rw-r--r--spec/ruby/core/kernel/clone_spec.rb92
-rw-r--r--spec/ruby/core/kernel/eval_spec.rb10
-rw-r--r--spec/ruby/core/kernel/fixtures/classes.rb8
-rw-r--r--spec/ruby/core/kernel/nil_spec.rb10
-rw-r--r--spec/ruby/core/kernel/shared/sprintf.rb26
-rw-r--r--spec/ruby/core/marshal/shared/load.rb221
-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/module/allocate_spec.rb14
-rw-r--r--spec/ruby/core/module/autoload_spec.rb100
-rw-r--r--spec/ruby/core/module/const_set_spec.rb3
-rw-r--r--spec/ruby/core/module/constants_spec.rb6
-rw-r--r--spec/ruby/core/module/define_method_spec.rb51
-rw-r--r--spec/ruby/core/module/refine_spec.rb412
-rw-r--r--spec/ruby/core/objectspace/garbage_collect_spec.rb4
-rw-r--r--spec/ruby/core/process/spawn_spec.rb20
-rw-r--r--spec/ruby/core/range/each_spec.rb24
-rw-r--r--spec/ruby/core/rational/rational_spec.rb4
-rw-r--r--spec/ruby/core/string/lstrip_spec.rb3
-rw-r--r--spec/ruby/core/string/partition_spec.rb3
-rw-r--r--spec/ruby/core/string/reverse_spec.rb17
-rw-r--r--spec/ruby/core/string/rpartition_spec.rb3
-rw-r--r--spec/ruby/core/string/rstrip_spec.rb3
-rw-r--r--spec/ruby/core/string/scrub_spec.rb32
-rw-r--r--spec/ruby/core/string/shared/partition.rb36
-rw-r--r--spec/ruby/core/string/shared/strip.rb20
-rw-r--r--spec/ruby/core/string/strip_spec.rb3
-rw-r--r--spec/ruby/core/string/unpack/shared/basic.rb20
-rw-r--r--spec/ruby/core/string/unpack1_spec.rb20
-rw-r--r--spec/ruby/core/thread/backtrace/location/absolute_path_spec.rb18
-rw-r--r--spec/ruby/core/tracepoint/inspect_spec.rb8
-rw-r--r--spec/ruby/fixtures/code/a/load_fixture.dylib1
-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/language/defined_spec.rb53
-rw-r--r--spec/ruby/language/hash_spec.rb39
-rw-r--r--spec/ruby/language/method_spec.rb157
-rw-r--r--spec/ruby/language/numbers_spec.rb4
-rw-r--r--spec/ruby/language/pattern_matching_spec.rb187
-rw-r--r--spec/ruby/language/predefined_spec.rb49
-rw-r--r--spec/ruby/language/proc_spec.rb26
-rw-r--r--spec/ruby/language/range_spec.rb6
-rw-r--r--spec/ruby/language/regexp/grouping_spec.rb28
-rw-r--r--spec/ruby/language/singleton_class_spec.rb17
-rw-r--r--spec/ruby/language/yield_spec.rb28
-rw-r--r--spec/ruby/library/base64/decode64_spec.rb4
-rw-r--r--spec/ruby/library/coverage/result_spec.rb23
-rw-r--r--spec/ruby/library/date/strftime_spec.rb15
-rw-r--r--spec/ruby/library/datetime/strftime_spec.rb15
-rw-r--r--spec/ruby/library/ipaddr/new_spec.rb41
-rw-r--r--spec/ruby/library/net/http/http/fixtures/http_server.rb149
-rw-r--r--spec/ruby/library/net/http/http/post_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/send_request_spec.rb2
-rw-r--r--spec/ruby/library/objectspace/memsize_of_all_spec.rb7
-rw-r--r--spec/ruby/library/rbconfig/rbconfig_spec.rb13
-rw-r--r--spec/ruby/library/set/comparison_spec.rb29
-rw-r--r--spec/ruby/library/set/initialize_clone_spec.rb18
-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/sortedset_spec.rb22
-rw-r--r--spec/ruby/library/socket/basicsocket/local_address_spec.rb10
-rw-r--r--spec/ruby/library/socket/basicsocket/remote_address_spec.rb10
-rw-r--r--spec/ruby/library/socket/shared/address.rb249
-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/shared/new.rb15
-rw-r--r--spec/ruby/library/stringio/ungetbyte_spec.rb38
-rw-r--r--spec/ruby/library/stringscanner/check_spec.rb11
-rw-r--r--spec/ruby/optional/capi/ext/fiber_spec.c11
-rw-r--r--spec/ruby/optional/capi/ext/integer_spec.c2
-rw-r--r--spec/ruby/optional/capi/ext/object_spec.c18
-rw-r--r--spec/ruby/optional/capi/ext/rbasic_spec.c28
-rw-r--r--spec/ruby/optional/capi/ext/string_spec.c81
-rw-r--r--spec/ruby/optional/capi/fiber_spec.rb38
-rw-r--r--spec/ruby/optional/capi/fixtures/read.txt2
-rw-r--r--spec/ruby/optional/capi/rbasic_spec.rb20
-rw-r--r--spec/ruby/optional/capi/shared/rbasic.rb20
-rw-r--r--spec/ruby/optional/capi/spec_helper.rb7
-rw-r--r--spec/ruby/optional/capi/string_spec.rb73
-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.rb1
-rw-r--r--spec/ruby/security/cve_2017_17742_spec.rb57
-rw-r--r--spec/ruby/security/cve_2018_16396_spec.rb4
-rw-r--r--spec/ruby/security/cve_2018_8778_spec.rb2
-rw-r--r--spec/ruby/security/cve_2019_8323_spec.rb54
-rw-r--r--spec/ruby/security/cve_2019_8325_spec.rb6
-rw-r--r--sprintf.c4
-rw-r--r--strftime.c4
-rw-r--r--string.c500
-rw-r--r--struct.c632
-rw-r--r--symbol.c28
-rw-r--r--template/Doxyfile.tmpl2542
-rw-r--r--template/GNUmakefile.in2
-rw-r--r--template/Makefile.in25
-rw-r--r--template/configure-ext.mk.tmpl2
-rw-r--r--template/ruby.pc.in16
-rw-r--r--test/-ext-/array/test_to_ary_concat.rb20
-rw-r--r--test/-ext-/bug_reporter/test_bug_reporter.rb1
-rw-r--r--test/-ext-/float/test_nextafter.rb2
-rw-r--r--test/-ext-/string/test_capacity.rb37
-rw-r--r--test/-ext-/string/test_rb_str_dup.rb6
-rw-r--r--test/-ext-/wait/test_wait.rb16
-rw-r--r--test/bigdecimal/test_bigdecimal.rb6
-rw-r--r--test/bigdecimal/test_ractor.rb2
-rw-r--r--test/coverage/test_coverage.rb146
-rw-r--r--test/csv/interface/test_read.rb32
-rw-r--r--test/csv/interface/test_read_write.rb9
-rw-r--r--test/csv/interface/test_write.rb34
-rw-r--r--test/csv/parse/test_invalid.rb13
-rw-r--r--test/date/test_date_strftime.rb2
-rw-r--r--test/did_you_mean/spell_checking/test_pattern_key_name_check.rb20
-rw-r--r--test/did_you_mean/test_spell_checker.rb1
-rw-r--r--test/did_you_mean/test_verbose_formatter.rb23
-rw-r--r--test/did_you_mean/tree_spell/test_change_word.rb2
-rw-r--r--test/drb/drbtest.rb6
-rw-r--r--test/error_highlight/test_error_highlight.rb164
-rw-r--r--test/excludes/TestArray.rb1
-rw-r--r--test/fiber/scheduler.rb38
-rw-r--r--test/fiber/test_io.rb43
-rw-r--r--test/fiber/test_thread.rb39
-rw-r--r--test/fiddle/helper.rb20
-rw-r--r--test/fiddle/test_c_struct_builder.rb33
-rw-r--r--test/fiddle/test_cparser.rb2
-rw-r--r--test/fiddle/test_func.rb25
-rw-r--r--test/fiddle/test_function.rb36
-rw-r--r--test/fiddle/test_handle.rb11
-rw-r--r--test/fiddle/test_memory_view.rb8
-rw-r--r--test/fiddle/test_pointer.rb21
-rw-r--r--test/fileutils/test_fileutils.rb2
-rw-r--r--test/io/console/test_io_console.rb2
-rw-r--r--test/irb/test_cmd.rb24
-rw-r--r--test/irb/test_color.rb2
-rw-r--r--test/irb/test_color_printer.rb2
-rw-r--r--test/irb/test_completion.rb37
-rw-r--r--test/irb/test_context.rb79
-rw-r--r--test/irb/test_raise_no_backtrace_exception.rb6
-rw-r--r--test/irb/test_ruby_lex.rb46
-rw-r--r--test/irb/test_workspace.rb21
-rw-r--r--test/irb/yamatanooroti/test_rendering.rb69
-rw-r--r--test/lib/jit_support.rb1
-rw-r--r--test/logger/helper.rb13
-rw-r--r--test/logger/test_logdevice.rb2
-rw-r--r--test/logger/test_logger.rb2
-rw-r--r--test/logger/test_logperiod.rb2
-rw-r--r--test/logger/test_severity.rb2
-rw-r--r--test/mkmf/test_have_var.rb17
-rw-r--r--test/net/http/test_httpresponse.rb2
-rw-r--r--test/objspace/test_objspace.rb4
-rw-r--r--test/openssl/test_bn.rb4
-rw-r--r--test/openssl/test_config.rb16
-rw-r--r--test/openssl/test_digest.rb2
-rw-r--r--test/openssl/test_pair.rb3
-rw-r--r--test/openssl/test_pkcs12.rb297
-rw-r--r--test/openssl/test_pkey.rb27
-rw-r--r--test/openssl/test_pkey_dh.rb8
-rw-r--r--test/openssl/test_pkey_dsa.rb15
-rw-r--r--test/openssl/test_pkey_ec.rb17
-rw-r--r--test/openssl/test_pkey_rsa.rb33
-rw-r--r--test/openssl/test_ssl.rb141
-rw-r--r--test/openssl/test_ssl_session.rb8
-rw-r--r--test/openssl/test_ts.rb18
-rw-r--r--test/openssl/utils.rb49
-rw-r--r--test/optparse/test_did_you_mean.rb8
-rw-r--r--test/ostruct/test_ostruct.rb12
-rw-r--r--test/pathname/test_pathname.rb30
-rw-r--r--test/pathname/test_ractor.rb2
-rw-r--r--test/psych/test_scalar_scanner.rb49
-rw-r--r--test/psych/test_string.rb13
-rw-r--r--test/racc/assets/mof.y6
-rw-r--r--test/racc/case.rb (renamed from test/racc/helper.rb)7
-rw-r--r--test/racc/regress/mof6
-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.rb2
-rw-r--r--test/racc/test_scan_y.rb2
-rw-r--r--test/rdoc/support/test_case.rb17
-rw-r--r--test/rdoc/test_rdoc_any_method.rb48
-rw-r--r--test/rdoc/test_rdoc_cross_reference.rb2
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb24
-rw-r--r--test/rdoc/test_rdoc_generator_json_index.rb2
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb2
-rw-r--r--test/rdoc/test_rdoc_options.rb73
-rw-r--r--test/rdoc/test_rdoc_parser_c.rb66
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb58
-rw-r--r--test/rdoc/test_rdoc_servlet.rb4
-rw-r--r--test/rdoc/test_rdoc_text.rb10
-rw-r--r--test/readline/test_readline.rb111
-rw-r--r--test/reline/helper.rb3
-rw-r--r--test/reline/test_key_actor_emacs.rb22
-rw-r--r--test/reline/test_key_actor_vi.rb30
-rw-r--r--test/reline/test_key_stroke.rb32
-rw-r--r--test/reline/test_reline.rb69
-rw-r--r--test/reline/test_reline_key.rb53
-rw-r--r--test/reline/test_terminfo.rb8
-rw-r--r--test/reline/test_unicode.rb5
-rw-r--r--test/reline/windows/test_key_event_record.rb2
-rwxr-xr-xtest/reline/yamatanooroti/multiline_repl107
-rw-r--r--test/reline/yamatanooroti/termination_checker.rb2
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb439
-rw-r--r--test/ripper/test_ripper.rb9
-rw-r--r--test/ripper/test_sexp.rb14
-rw-r--r--test/ruby/enc/test_emoji_breaks.rb8
-rw-r--r--test/ruby/test_argf.rb19
-rw-r--r--test/ruby/test_array.rb30
-rw-r--r--test/ruby/test_ast.rb37
-rw-r--r--test/ruby/test_autoload.rb27
-rw-r--r--test/ruby/test_backtrace.rb28
-rw-r--r--test/ruby/test_class.rb18
-rw-r--r--test/ruby/test_enum.rb4
-rw-r--r--test/ruby/test_enumerator.rb2
-rw-r--r--test/ruby/test_env.rb14
-rw-r--r--test/ruby/test_exception.rb3
-rw-r--r--test/ruby/test_file_exhaustive.rb20
-rw-r--r--test/ruby/test_gc_compact.rb5
-rw-r--r--test/ruby/test_hash.rb18
-rw-r--r--test/ruby/test_integer.rb2
-rw-r--r--test/ruby/test_io.rb12
-rw-r--r--test/ruby/test_iseq.rb10
-rw-r--r--test/ruby/test_jit.rb31
-rw-r--r--test/ruby/test_keyword.rb17
-rw-r--r--test/ruby/test_literal.rb35
-rw-r--r--test/ruby/test_m17n.rb4
-rw-r--r--test/ruby/test_marshal.rb106
-rw-r--r--test/ruby/test_method.rb4
-rw-r--r--test/ruby/test_module.rb70
-rw-r--r--test/ruby/test_numeric.rb8
-rw-r--r--test/ruby/test_objectspace.rb2
-rw-r--r--test/ruby/test_optimization.rb58
-rw-r--r--test/ruby/test_pack.rb30
-rw-r--r--test/ruby/test_parse.rb12
-rw-r--r--test/ruby/test_pattern_matching.rb160
-rw-r--r--test/ruby/test_process.rb107
-rw-r--r--test/ruby/test_refinement.rb121
-rw-r--r--test/ruby/test_regexp.rb62
-rw-r--r--test/ruby/test_require.rb69
-rw-r--r--test/ruby/test_rubyoptions.rb26
-rw-r--r--test/ruby/test_rubyvm.rb53
-rw-r--r--test/ruby/test_settracefunc.rb68
-rw-r--r--test/ruby/test_string.rb12
-rw-r--r--test/ruby/test_syntax.rb33
-rw-r--r--test/ruby/test_thread.rb8
-rw-r--r--test/ruby/test_thread_cv.rb3
-rw-r--r--test/ruby/test_time.rb5
-rw-r--r--test/ruby/test_yjit.rb634
-rw-r--r--test/rubygems/bogussources.rb9
-rw-r--r--test/rubygems/helper.rb24
-rw-r--r--test/rubygems/private_ec_key.pem9
-rw-r--r--test/rubygems/test_gem.rb497
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb67
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb25
-rw-r--r--test/rubygems/test_gem_installer.rb2
-rw-r--r--test/rubygems/test_gem_package.rb53
-rw-r--r--test/rubygems/test_gem_path_support.rb8
-rw-r--r--test/rubygems/test_gem_platform.rb1
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb30
-rw-r--r--test/rubygems/test_gem_request.rb44
-rw-r--r--test/rubygems/test_gem_resolver_installer_set.rb18
-rw-r--r--test/rubygems/test_gem_security.rb36
-rw-r--r--test/rubygems/test_gem_source_fetch_problem.rb10
-rw-r--r--test/rubygems/test_gem_specification.rb460
-rw-r--r--test/rubygems/test_gem_uri.rb39
-rw-r--r--test/rubygems/test_rubygems.rb44
-rw-r--r--test/runner.rb2
-rw-r--r--test/socket/test_addrinfo.rb2
-rw-r--r--test/socket/test_basicsocket.rb2
-rw-r--r--test/test_ipaddr.rb59
-rw-r--r--test/test_timeout.rb11
-rw-r--r--test/uri/test_http.rb31
-rw-r--r--test/zlib/test_zlib.rb4
-rw-r--r--thread.c195
-rw-r--r--thread_pthread.c8
-rw-r--r--thread_sync.c27
-rw-r--r--thread_win32.c2
-rw-r--r--thread_win32.h4
-rw-r--r--time.c70
-rw-r--r--timev.rb11
-rw-r--r--tool/bundler/rubocop_gems.rb.lock21
-rw-r--r--tool/bundler/standard_gems.rb.lock31
-rwxr-xr-xtool/disable_ipv6.sh9
-rw-r--r--tool/downloader.rb17
-rw-r--r--tool/fake.rb2
-rw-r--r--tool/lib/core_assertions.rb130
-rw-r--r--tool/lib/gc_checker.rb36
-rw-r--r--tool/lib/gc_compact_checker.rb10
-rw-r--r--tool/lib/leakchecker.rb4
-rw-r--r--tool/lib/memory_status.rb6
-rw-r--r--tool/lib/minitest/README.txt457
-rw-r--r--tool/lib/minitest/unit.rb1479
-rw-r--r--tool/lib/profile_test_all.rb2
-rw-r--r--tool/lib/test/unit.rb702
-rw-r--r--tool/lib/test/unit/assertions.rb546
-rw-r--r--tool/lib/test/unit/parallel.rb45
-rw-r--r--tool/lib/test/unit/testcase.rb282
-rw-r--r--tool/lib/vcs.rb25
-rw-r--r--tool/m4/ruby_define_if.m410
-rw-r--r--tool/m4/ruby_universal_arch.m432
-rw-r--r--tool/mk_builtin_loader.rb2
-rwxr-xr-xtool/mkrunnable.rb18
-rwxr-xr-xtool/rbinstall.rb38
-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/_trace_instruction.erb7
-rwxr-xr-xtool/runruby.rb5
-rwxr-xr-xtool/strip-rdoc.rb30
-rwxr-xr-x[-rw-r--r--]tool/sync_default_gems.rb33
-rw-r--r--tool/test-bundled-gems.rb21
-rw-r--r--tool/test/runner.rb2
-rw-r--r--tool/test/testunit/metametameta.rb (renamed from tool/test/minitest/metametameta.rb)16
-rw-r--r--tool/test/testunit/test_assertion.rb2
-rw-r--r--tool/test/testunit/test_minitest_unit.rb (renamed from tool/test/minitest/test_minitest_unit.rb)547
-rw-r--r--tool/test/testunit/test_parallel.rb31
-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/utils.rb2
-rw-r--r--transcode.c16
-rw-r--r--transient_heap.c4
-rw-r--r--util.c7
-rw-r--r--variable.c163
-rw-r--r--variable.h1
-rw-r--r--version.c11
-rw-r--r--version.h5
-rw-r--r--vm.c166
-rw-r--r--vm_args.c4
-rw-r--r--vm_backtrace.c505
-rw-r--r--vm_callinfo.h7
-rw-r--r--vm_core.h26
-rw-r--r--vm_debug.h21
-rw-r--r--vm_dump.c50
-rw-r--r--vm_eval.c132
-rw-r--r--vm_exec.c1
-rw-r--r--vm_exec.h25
-rw-r--r--vm_insnhelper.c253
-rw-r--r--vm_insnhelper.h5
-rw-r--r--vm_method.c62
-rw-r--r--vm_sync.c6
-rw-r--r--vm_trace.c66
-rw-r--r--win32/Makefile.sub17
-rwxr-xr-xwin32/configure.bat22
-rw-r--r--win32/win32.c23
-rw-r--r--yjit.c187
-rw-r--r--yjit.h63
-rw-r--r--yjit.rb268
-rw-r--r--yjit_asm.c1786
-rw-r--r--yjit_asm.h414
-rw-r--r--yjit_codegen.c4772
-rw-r--r--yjit_codegen.h19
-rw-r--r--yjit_core.c1186
-rw-r--r--yjit_core.h306
-rw-r--r--yjit_iface.c1153
-rw-r--r--yjit_iface.h38
-rw-r--r--yjit_utils.c113
1169 files changed, 431374 insertions, 18889 deletions
diff --git a/appveyor.yml b/.appveyor.yml
index 351b7c70f01..9bc135873c8 100644
--- a/appveyor.yml
+++ b/.appveyor.yml
@@ -6,6 +6,7 @@ init:
- 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
@@ -48,7 +49,7 @@ for:
- echo>> Makefile RT_VER=0
- echo>> Makefile BUILTIN_ENCOBJS=nul
- type win32\Makefile.sub >> Makefile
- - nmake %mflags% up
+ - nmake %mflags% up VCSUP="echo Update OK"
- nmake %mflags% extract-extlibs
- del Makefile
- mkdir \usr\local\bin
diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 00000000000..01897e986ed
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,63 @@
+# This CI is used to test Arm cases. We can set the maximum 16 tasks.
+# The entire testing design is inspired from .github/workflows/compilers.yml.
+
+# By default, Cirrus mounts an empty volume to `/tmp`
+# which triggers all sorts of warnings like "system temporary path is world-writable: /tmp".
+# Lets workaround it by specifying a custom volume mount point.
+env:
+ CIRRUS_VOLUME: /cirrus-ci-volume
+ LANG: C.UTF-8
+
+task:
+ name: Arm64 Graviton2 / $CC
+ arm_container:
+ # We use the arm64 images at http://ghcr.io/ruby/ruby-ci-image .
+ image: ghcr.io/ruby/ruby-ci-image:$CC
+ # Define the used cpu core in each matrix task. We can use total 16 cpu
+ # cores in entire matrix. [cpu] = [total cpu: 16] / [number of tasks]
+ cpu: 8
+ # We can request maximum 4 GB per cpu.
+ # [memory per task] = [memory per cpu: 4 GB] * [cpu]
+ memory: 32G
+ env:
+ CIRRUS_CLONE_DEPTH: 50
+ optflags: '-O1'
+ debugflags: '-ggdb3'
+ RUBY_PREFIX: /tmp/ruby-prefix
+ RUBY_DEBUG: ci rgengc
+ RUBY_TESTOPTS: >-
+ -q
+ --color=always
+ --tty=no
+ matrix:
+ CC: clang-12
+ CC: gcc-11
+ id_script: id
+ set_env_script:
+ # Set `GNUMAKEFLAGS`, because the flags are GNU make specific. Note using
+ # the `make` environment variable used in compilers.yml causes some rubygems
+ # tests to fail.
+ # https://github.com/rubygems/rubygems/issues/4921
+ - echo "GNUMAKEFLAGS=-s -j$((1 + $CIRRUS_CPU))" >> $CIRRUS_ENV
+ print_env_script:
+ - echo "GNUMAKEFLAGS=$GNUMAKEFLAGS"
+ # Arm containers are executed in AWS's EKS, and it's not yet supporting IPv6
+ # See https://github.com/aws/containers-roadmap/issues/835
+ disable_ipv6_script: sudo ./tool/disable_ipv6.sh
+ autogen_script: ./autogen.sh
+ configure_script: >-
+ ./configure -C
+ --enable-debug-env
+ --disable-install-doc
+ --with-ext=-test-/cxxanyargs,+
+ --prefix="$RUBY_PREFIX"
+ make_extract-extlibs_script: make extract-extlibs
+ make_incs_script: make incs
+ make_script: make
+ make_leaked-globals_script: make leaked-globals
+ make_test_script: make test
+ make_install_script: make install
+ install_gems_for_test_script: $RUBY_PREFIX/bin/gem install --no-doc timezone tzinfo
+ make_test-tool_script: make test-tool
+ make_test-all_script: make test-all
+ make_test-spec_script: make test-spec
diff --git a/.document b/.document
index 2c68af227d2..6e08f42698c 100644
--- a/.document
+++ b/.document
@@ -17,6 +17,7 @@ dir.rb
gc.rb
io.rb
kernel.rb
+marshal.rb
numeric.rb
nilclass.rb
pack.rb
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 00000000000..f962bce6821
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,9 @@
+# Lines starting with '#' are comments.
+# Each line is a file pattern followed by one or more owners.
+# Code owners will be automatically tagged as reviewers when a pull request is opened
+
+# YJIT sources and tests
+yjit* @maximecb @xrxr
+doc/yjit/* @maximecb @xrxr
+bootstraptest/test_yjit* @maximecb @xrxr
+test/ruby/test_yjit* @maximecb @xrxr
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
index 7196708b21a..91f82b842bf 100644
--- a/.github/codeql/codeql-config.yml
+++ b/.github/codeql/codeql-config.yml
@@ -1,4 +1,3 @@
name: "CodeQL config for the Ruby language"
-paths-ignore:
- - '/ext/**/*/conftest.c'
+languages: cpp
diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml
index 11f71e0cdb1..83e6ca03b08 100644
--- a/.github/workflows/baseruby.yml
+++ b/.github/workflows/baseruby.yml
@@ -15,6 +15,7 @@ jobs:
# - ruby-2.5
# - ruby-2.6
- ruby-2.7
+ - ruby-3.0
steps:
- uses: actions/checkout@v2
@@ -22,14 +23,14 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler: none
- - run: echo "make=make -sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ - run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
- run: sudo apt-get install build-essential autoconf bison
- run: ./autogen.sh
- run: ./configure --disable-install-doc
- - run: $make common-srcs
- - run: $make incs
- - run: $make all
- - run: $make test
+ - run: make common-srcs
+ - run: make incs
+ - run: make all
+ - run: make test
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
@@ -42,4 +43,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ 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 00000000000..265c7dc0205
--- /dev/null
+++ b/.github/workflows/bundled_gems.yml
@@ -0,0 +1,66 @@
+name: bundled_gems
+
+on:
+ schedule:
+ - cron: '45 6 * * *'
+
+jobs:
+ update:
+ if: ${{ 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
+
+ - uses: actions/checkout@v2
+
+ - name: Update ${{ github.workflow }}
+ run: |
+ ruby -i~ tool/update-bundled_gems.rb gems/${{ github.workflow }}
+
+ - name: Check diffs
+ id: diff
+ run: |
+ git diff --no-ext-diff --ignore-submodules --exit-code
+ 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: Test bundled gems
+ run: |
+ make -s test-bundled-gems
+ timeout-minutes: 30
+ env:
+ RUBY_TESTOPTS: "-q --tty=no"
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ if: ${{ steps.diff.outcome == 'failure' }}
+
+ - name: Commit
+ run: |
+ git commit --message="Update ${{ github.workflow }} at $(date +%F)" gems/${{ github.workflow }}
+ git pull --ff-only origin ${GITHUB_REF#refs/heads/}
+ git push origin ${GITHUB_REF#refs/heads/}
+ env:
+ EMAIL: svn-admin@ruby-lang.org
+ GIT_AUTHOR_NAME: git
+ GIT_COMMITTER_NAME: git
+ if: ${{ steps.diff.outcome == 'failure' }}
diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml
index 77227bb7f96..e6b4abbe989 100644
--- a/.github/workflows/check_dependencies.yml
+++ b/.github/workflows/check_dependencies.yml
@@ -4,7 +4,7 @@ jobs:
update-deps:
strategy:
matrix:
- os: [ubuntu-20.04, macos-latest]
+ os: [ubuntu-20.04, macos-11]
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
@@ -13,12 +13,12 @@ jobs:
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')"
+ if: ${{ contains(matrix.os, 'ubuntu') }}
- name: Install libraries
run: |
brew upgrade
brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
- if: "contains(matrix.os, 'macos')"
+ if: ${{ contains(matrix.os, 'macos') }}
- name: git config
run: |
git config --global advice.detachedHead 0
@@ -42,4 +42,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index cffb12b2dec..5897c5d37ed 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -12,6 +12,9 @@ jobs:
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
+ env:
+ enable_install_doc: no
+
steps:
- name: Install libraries
run: |
@@ -21,8 +24,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
- with:
- fetch-depth: 2
- name: Remove an obsolete rubygems vendored file
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
@@ -30,9 +31,11 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
- languages: cpp
config-file: ./.github/codeql/codeql-config.yml
+ - name: Set ENV
+ run: echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+
- name: Autobuild
uses: github/codeql-action/autobuild@v1
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index ea19c016fa0..eb287d1b2c4 100644
--- a/.github/workflows/compilers.yml
+++ b/.github/workflows/compilers.yml
@@ -3,15 +3,15 @@ name: Compilations
on: [push, pull_request]
# Github actions does not support YAML anchors. This creative use of
-# environment variables (plus the "echo ::set-env" hack) is to reroute that
+# environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
# restriction.
env:
- default_cc: clang-13
+ default_cc: clang-14
append_cc: ''
crosshost: ''
# -O1 is faster than -O3 in our tests... Majority of time are consumed trying
- # to optimize binaries. Also Github Actions runs on a relatively modern CPU
+ # 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'
@@ -55,6 +55,13 @@ jobs:
- { key: default_cc, name: gcc-6, value: gcc-6, container: gcc-6 }
- { key: default_cc, name: gcc-5, value: gcc-5, container: gcc-5 }
- { key: default_cc, name: gcc-4.8, value: gcc-4.8, container: gcc-4.8 }
+ - key: default_cc
+ name: 'gcc-11 LTO'
+ value: 'gcc-11 -O2 -flto=auto -ffat-lto-objects'
+ container: gcc-11
+ shared: '--disable-shared'
+ # check: true
+ - { key: default_cc, name: clang-14, value: clang-14, container: clang-14 }
- { key: default_cc, name: clang-13, value: clang-13, container: clang-13 }
- { key: default_cc, name: clang-12, value: clang-12, container: clang-12 }
- { key: default_cc, name: clang-11, value: clang-11, container: clang-11 }
@@ -66,6 +73,12 @@ jobs:
- { key: default_cc, name: clang-5.0, value: clang-5.0, container: clang-5.0 }
- { key: default_cc, name: clang-4.0, value: clang-4.0, container: clang-4.0 }
- { key: default_cc, name: clang-3.9, value: clang-3.9, container: clang-3.9 }
+ - key: default_cc
+ name: 'clang-14 LTO'
+ value: 'clang-14 -O2 -flto=auto'
+ container: clang-14
+ shared: '--disable-shared'
+ # check: true
- { key: crosshost, name: aarch64-linux-gnu, value: aarch64-linux-gnu, container: crossbuild-essential-arm64 }
# - { key: crosshost, name: arm-linux-gnueabi, value: arm-linux-gnueabi }
@@ -87,7 +100,7 @@ jobs:
- { key: CXXFLAGS, name: c++2a, value: '-std=c++2a -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' }
- { key: optflags, name: '-O0', value: '-O0 -march=x86-64 -mtune=generic' }
-# - { key: optflags, name: '-O3', value: '-O3 -march=x86-64 -mtune=generic' }
+# - { key: optflags, name: '-O3', value: '-O3 -march=x86-64 -mtune=generic', check: true }
- { key: append_configure, name: gmp, value: '--with-gmp' }
- { key: append_configure, name: jemalloc, value: '--with-jemalloc' }
@@ -154,50 +167,47 @@ jobs:
# - { key: cppflags, name: VM_DEBUG_VERIFY_METHOD_CACHE, value: '-DVM_DEBUG_VERIFY_METHOD_CACHE' }
- { key: cppflags, name: MJIT_FORCE_ENABLE, value: '-DMJIT_FORCE_ENABLE' }
+ - { key: cppflags, name: YJIT_FORCE_ENABLE, value: '-DYJIT_FORCE_ENABLE' }
name: ${{ matrix.entry.name }}
runs-on: ubuntu-latest
- container: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || 'clang-13' }}
+ container:
+ image: ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || 'clang-14' }}
+ options: --user root
steps:
+ - run: id
+ working-directory:
- run: mkdir build
working-directory:
- name: setenv
run: |
echo "${{ matrix.entry.key }}=${{ matrix.entry.value }}" >> $GITHUB_ENV
- echo "make=make -sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ echo "GNUMAKEFLAGS=-sj$((1 + $(nproc --all)))" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
path: src
- run: ./autogen.sh
working-directory: src
- name: Run configure
- run: |
- if [ -n "${crosshost}" ]; then
- ../src/configure -C \
- ${default_configure} \
- ${append_configure} \
- --host="${crosshost}"
- else
- ../src/configure -C \
- ${default_configure} \
- ${append_configure} \
- --with-gcc="${default_cc} ${append_cc}"
- fi
- - run: $make extract-extlibs
- - run: $make incs
- - run: $make
- - run: $make leaked-globals
- - run: $make test
- - run: $make install
- if: "matrix.entry.name == '-O3'"
- - run: /usr/local/bin/gem install --no-doc timezone tzinfo
- if: "matrix.entry.name == '-O3'"
- - run: $make test-tool
- if: "matrix.entry.name == '-O3'"
- - run: $make test-all TESTS='-- ruby -ext-'
- if: "matrix.entry.name == '-O3'"
- - run: $make test-spec
- if: "matrix.entry.name == '-O3'"
+ run: >
+ ../src/configure -C ${default_configure} ${append_configure}
+ ${{ matrix.entry.key == 'crosshost' && '--host="${crosshost}"' || '--with-gcc="${default_cc} ${append_cc}"' }}
+ ${{ matrix.entry.shared || '--enable-shared' }}
+ - run: make extract-extlibs
+ - run: make incs
+ - run: make
+ - run: make leaked-globals
+ - run: make test
+ - run: make install
+ if: ${{ matrix.entry.check }}
+ - run: make prepare-gems
+ 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
+ if: ${{ matrix.entry.check }}
- uses: k0kubun/action-slack@v2.0.0
with:
@@ -211,7 +221,7 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index b69b0fbe256..20d14766f75 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -2,13 +2,14 @@ name: macOS
on: [push, pull_request]
jobs:
make:
- runs-on: macos-latest
strategy:
matrix:
+ os: [macos-10.15, macos-11]
test_task: [ "check", "test-bundler-parallel" ] #, "test-bundled-gems" ] matrix tests has unknown issues
fail-fast: false
env:
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ runs-on: ${{ matrix.os }}
steps:
- run: mkdir build
working-directory:
@@ -26,19 +27,19 @@ jobs:
working-directory: src
- name: Set ENV
run: |
- echo "JOBS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
+ echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $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 $JOBS incs
- - run: make $JOBS
+ - run: make incs
+ - run: make
- run: make leaked-globals
- if: matrix.test_task == 'check'
+ if: ${{ matrix.test_task == 'check' }}
- run: make prepare-gems
- if: matrix.test_task == 'check'
- - run: make $JOBS -s ${{ matrix.test_task }}
- timeout-minutes: 60
+ if: ${{ matrix.test_task == 'check' }}
+ - run: make -s ${{ matrix.test_task }}
+ timeout-minutes: ${{ matrix.test_task == 'check' && 15 || 40 }}
env:
RUBY_TESTOPTS: "-q --tty=no"
TEST_BUNDLED_GEMS_ALLOW_FAILURES: "rexml"
@@ -54,7 +55,7 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 6787f96b6d5..7ccf5f0b618 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -8,8 +8,7 @@ jobs:
make:
runs-on: windows-2019
env:
- MSYSTEM: MINGW64
- MSYSTEM_PREFIX: /mingw64
+ MSYSTEM: ${{ matrix.msystem }}
MSYS2_ARCH: x86_64
CHOST: "x86_64-w64-mingw32"
CFLAGS: "-march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong"
@@ -20,7 +19,13 @@ jobs:
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
strategy:
matrix:
- test_task: [ "check" ] # to make job names consistent
+ include:
+ - msystem: "MINGW64"
+ base_ruby: 2.6
+ test_task: [ "check" ] # to make job names consistent
+ - msystem: "UCRT64"
+ base_ruby: head
+ test_task: [ "check" ] # to make job names consistent
fail-fast: false
steps:
- run: mkdir build
@@ -35,10 +40,11 @@ jobs:
with:
path: src
- name: Set up Ruby & MSYS2
- uses: MSP-Greg/setup-ruby-pkgs@v1
+ uses: MSP-Greg/setup-ruby-pkgs@ucrt
with:
- ruby-version: 2.6
- mingw: _upgrade_ gmp libffi libyaml openssl ragel readline
+ ruby-version: ${{ matrix.base_ruby }}
+ setup-ruby-ref: MSP-Greg/ruby-setup-ruby/00-win-ucrt
+ mingw: _upgrade_ gmp libffi libyaml openssl ragel readline gcc
msys2: automake1.16 bison
- name: where check
run: |
@@ -81,7 +87,7 @@ jobs:
make -j $jobs update-gems
- name: make all
- timeout-minutes: 40
+ timeout-minutes: 20
run: |
$jobs = [int](2 * $env:NUMBER_OF_PROCESSORS)
make -j $jobs
@@ -102,7 +108,7 @@ jobs:
make test
- name: test-all
- timeout-minutes: 60
+ timeout-minutes: 30
run: |
# Actions uses UTF8, causes test failures, similar to normal OS setup
$PSDefaultParameterValues['*:Encoding'] = 'utf8'
@@ -136,7 +142,7 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index 99282cf591a..3ec0f830d69 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -34,29 +34,29 @@ jobs:
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
- name: Set ENV
run: |
- echo "JOBS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ 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 $JOBS incs
- - run: make $JOBS
- - run: sudo make $JOBS -s install
+ - run: make incs
+ - run: make
+ - run: sudo make -s install
- run: sudo apt-get install gdb # used by test / test-all failure
- name: Run test
run: |
ulimit -c unlimited
- make $JOBS -s test RUN_OPTS="$RUN_OPTS"
+ make -s test RUN_OPTS="$RUN_OPTS"
timeout-minutes: 60
- name: Run test-all
run: |
ulimit -c unlimited
- make $JOBS -s test-all RUN_OPTS="$RUN_OPTS"
+ make -s test-all RUN_OPTS="$RUN_OPTS"
timeout-minutes: 60
- name: Run test-spec
run: |
ulimit -c unlimited
- make $JOBS -s test-spec RUN_OPTS="$RUN_OPTS"
+ make -s test-spec RUN_OPTS="$RUN_OPTS"
timeout-minutes: 60
- uses: k0kubun/action-slack@v2.0.0
with:
@@ -70,7 +70,7 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml
index f921d66c75f..61ebeb33c1e 100644
--- a/.github/workflows/spec_guards.yml
+++ b/.github/workflows/spec_guards.yml
@@ -35,4 +35,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index f7b07ca80b5..b40a21b5716 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -40,22 +40,22 @@ jobs:
sudo bash -c 'IFS=:; for d in '"$PATH"'; do chmod -v go-w $d; done' || :
- name: Set ENV
run: |
- echo "JOBS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
+ echo "GNUMAKEFLAGS=-j$((1 + $(nproc --all)))" >> $GITHUB_ENV
- run: ./autogen.sh
working-directory: src
- name: Run configure
run: ../src/configure -C --disable-install-doc ${{ matrix.configure }}
- - run: make $JOBS incs
- - run: make $JOBS
+ - run: make incs
+ - run: make
- run: make leaked-globals
- if: matrix.test_task == 'check'
+ if: ${{ matrix.test_task == 'check' }}
- run: make prepare-gems
- if: matrix.test_task == 'check'
+ 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'
- - run: make $JOBS -s ${{ matrix.test_task }}
+ if: ${{ matrix.test_task == 'check' }}
+ - run: make -s ${{ matrix.test_task }}
timeout-minutes: 30
env:
RUBY_TESTOPTS: "-q --tty=no"
@@ -72,7 +72,7 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index fdcccff11af..66b29920491 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -4,18 +4,34 @@ jobs:
make:
strategy:
matrix:
- test_task: [check] # to make job names consistent
- os: [windows-2019]
- vs: [2019]
+ include:
+ - vs: 2019
+ os: windows-2019
+ vcvars: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"'
+ # - vs: 2022
+ # os: windows-2022
+ # vcvars: '"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvars64.bat"'
fail-fast: false
runs-on: ${{ matrix.os }}
+ name: VisualStudio ${{ matrix.vs }}
env:
GITPULLOPTIONS: --no-tags origin ${{github.ref}}
- VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\${{ matrix.vs }}\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ VCVARS: ${{ matrix.vcvars }}
PATCH: C:\msys64\usr\bin\patch.exe
steps:
- run: md build
working-directory:
+ - uses: msys2/setup-msys2@v2
+ id: setup-msys2
+ with:
+ update: true
+ install: >-
+ patch
+ if: ${{ matrix.os != 'windows-2019' }}
+ - 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@v2
with:
path: C:\vcpkg\downloads
@@ -49,50 +65,58 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
+ - 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
+ run: |
+ set | C:\msys64\usr\bin\sort > old.env
+ call %VCVARS%
+ set TMP=%USERPROFILE%\AppData\Local\Temp
+ set TEMP=%USERPROFILE%\AppData\Local\Temp
+ set | C:\msys64\usr\bin\sort > new.env
+ C:\msys64\usr\bin\comm -13 old.env new.env >> %GITHUB_ENV%
+ del *.env
- name: Configure
run: |
- call "%VCVARS%"
../src/win32/configure.bat --disable-install-doc --enable-bundled-libffi --with-opt-dir=C:/vcpkg/installed/x64-windows --with-openssl-dir="C:/Program Files/OpenSSL-Win64"
- name: nmake
run: |
- call "%VCVARS%"
- set YACC=win_bison
- echo on
+ echo ^#^#[group]incs
nmake incs
+ echo ^#^#[endgroup]
+ echo ^#^#[group]extract-extlibs
nmake extract-extlibs
+ echo ^#^#[endgroup]
nmake
+ env:
+ YACC: win_bison
- name: nmake test
timeout-minutes: 5
run: |
- call "%VCVARS%"
nmake test
- name: nmake test-all
timeout-minutes: 60
run: |
- call "%VCVARS%"
- ::- %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
- ::- https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
- set TMP=%USERPROFILE%\AppData\Local\Temp
- set TEMP=%USERPROFILE%\AppData\Local\Temp
- nmake test-all
+ nmake test-all TESTOPTS="-j%NUMBER_OF_PROCESSORS% --job-status=normal"
+ continue-on-error: ${{ matrix.continue-on-error || false }}
- name: nmake test-spec
timeout-minutes: 10
run: |
- call "%VCVARS%"
nmake test-spec
+ continue-on-error: ${{ matrix.continue-on-error || false }}
- uses: k0kubun/action-slack@v2.0.0
with:
payload: |
{
"ci": "GitHub Actions",
- "env": "${{ matrix.os }} / ${{ matrix.test_task }}",
+ "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 }}".split('/').reverse()[0]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
- if: failure() && github.event_name == 'push'
+ if: ${{ failure() && github.event_name == 'push' }}
defaults:
run:
diff --git a/.github/workflows/yjit-macos.yml b/.github/workflows/yjit-macos.yml
new file mode 100644
index 00000000000..c19f623337e
--- /dev/null
+++ b/.github/workflows/yjit-macos.yml
@@ -0,0 +1,69 @@
+name: YJIT macOS
+on: [push, pull_request]
+jobs:
+ make:
+ runs-on: macos-latest
+ strategy:
+ matrix:
+ test_task: [ "check" ] #, "test-bundler-parallel" ] #, "test-bundled-gems" ]
+ yjit_opts: [
+ "--yjit",
+ "--yjit --yjit-call-threshold=1 --yjit-max-versions=1",
+ # "--yjit --yjit-call-threshold=1",
+ # "--yjit --yjit-call-threshold=2"
+ ]
+ fail-fast: false
+ env:
+ TESTOPTS: '-q --tty=no'
+ RUN_OPTS: '--disable-gems ${{ matrix.yjit_opts }}'
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ 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@v2
+ with:
+ path: src
+ - name: Install libraries
+ run: |
+ brew upgrade
+ brew install gmp libffi openssl@1.1 zlib autoconf automake libtool readline
+ working-directory: src
+ - name: Set ENV
+ run: |
+ echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $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
+ - run: make leaked-globals
+ if: ${{ matrix.test_task == 'check' }}
+ - run: make prepare-gems
+ if: ${{ matrix.test_task == 'check' }}
+ - run: make -s ${{ matrix.test_task }} RUN_OPTS="$RUN_OPTS"
+ timeout-minutes: 60
+ env:
+ RUBY_TESTOPTS: "-q --tty=no"
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: "rexml"
+ - uses: k0kubun/action-slack@v2.0.0
+ with:
+ payload: |
+ {
+ "ci": "GitHub Actions",
+ "env": "${{ github.workflow }} / ${{ matrix.test_task }}",
+ "url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
+ "commit": "${{ github.sha }}",
+ "branch": "${{ github.ref }}".split('/').reverse()[0]
+ }
+ 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/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
new file mode 100644
index 00000000000..ef2e5c75b1f
--- /dev/null
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -0,0 +1,94 @@
+name: YJIT Ubuntu
+on: [push, pull_request]
+jobs:
+ make:
+ strategy:
+ matrix:
+ test_task: ["check"] # "test-bundler-parallel",
+ os:
+ - ubuntu-20.04
+# - ubuntu-18.04
+ yjit_opts: [
+ "--yjit",
+ "--yjit --yjit-call-threshold=1 --yjit-max-versions=1",
+ # "--yjit --yjit-call-threshold=1",
+ # "--yjit --yjit-call-threshold=2"
+ ]
+ configure: ["", "cppflags=-DRUBY_DEBUG"]
+ include:
+ - test_task: "test-all TESTS=--repeat-count=2"
+ os: ubuntu-20.04
+ configure: ""
+ yjit_enable_env: RUBY_YJIT_ENABLE
+ - test_task: "test-bundled-gems"
+ os: ubuntu-20.04
+ configure: "cppflags=-DRUBY_DEBUG"
+ yjit_enable_env: RUBY_YJIT_ENABLE
+ fail-fast: false
+ env:
+ GITPULLOPTIONS: --no-tags origin ${{github.ref}}
+ RUN_OPTS: ${{ matrix.yjit_opts }}
+ RUBY_DEBUG: ci
+ runs-on: ${{ matrix.os }}
+ 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: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@v2
+ with:
+ path: src
+ - 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 ${{ matrix.configure }}
+ - run: make incs
+ - run: make
+ - run: make leaked-globals
+ if: ${{ matrix.test_task == 'check' }}
+ - run: make prepare-gems
+ 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
+ if: ${{ matrix.yjit_enable_env }}
+ - run: make -s ${{ matrix.test_task }} RUN_OPTS="$RUN_OPTS"
+ timeout-minutes: 60
+ env:
+ RUBY_TESTOPTS: "-q --tty=no"
+ TEST_BUNDLED_GEMS_ALLOW_FAILURES: ""
+ - uses: k0kubun/action-slack@v2.0.0
+ 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 }}".split('/').reverse()[0]
+ }
+ 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/yjit_asm_tests.yml b/.github/workflows/yjit_asm_tests.yml
new file mode 100644
index 00000000000..1c4394e9608
--- /dev/null
+++ b/.github/workflows/yjit_asm_tests.yml
@@ -0,0 +1,23 @@
+name: YJIT x86 assembler tests
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Install dependencies
+ run: |
+ set -x
+ sudo apt-get update -q || :
+ sudo apt-get install --no-install-recommends -q -y build-essential
+ - name: git config
+ run: |
+ git config --global advice.detachedHead 0
+ git config --global init.defaultBranch garbage
+ - uses: actions/checkout@v2
+ with:
+ path: src
+ - name: Run ASM tests
+ run: ./misc/test_yjit_asm.sh
+ working-directory: src
diff --git a/.travis.yml b/.travis.yml
index ff0ce6911e0..eb816b815ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,6 +26,10 @@ cache:
env:
global:
+ # The tests skipped in `make test-all`.
+ - TEST_ALL_SKIPPED_TESTS=
+ # The tests executed separately by `make test-all`.
+ - TEST_ALL_SEPARATED_TESTS=
# Reset timestamps early
- _=$(touch NEWS && find . -type f -exec touch -r NEWS {} +)
- CONFIGURE_TTY=no
@@ -38,12 +42,6 @@ env:
- SETARCH=
- RUBY_PREFIX=/tmp/ruby-prefix
- GEMS_FOR_TEST='timezone tzinfo'
- # The tests skipped in `make test-all`.
- - TEST_ALL_SKIPPED_TESTS=
- # Run the separated tests with allowing failures.
- - RUN_SEPARATED_TESTS=true
- # The tests executed separately by `make test-all`.
- - TEST_ALL_SEPARATED_TESTS=
# 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"
@@ -97,6 +95,9 @@ env:
compiler: arm-linux-gnueabihf-gcc
env:
- SETARCH='setarch linux32 --verbose --32bit'
+ # The "TestReadline#test_interrupt_in_other_thread" started failing on arm32
+ # from https://www.travis-ci.com/github/ruby/ruby/jobs/529005145
+ - TEST_ALL_SKIPPED_TESTS=test_interrupt_in_other_thread
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"
@@ -119,15 +120,20 @@ matrix:
include:
# Build every commit (Allowed Failures):
- <<: *arm32-linux
- - <<: *arm64-linux
+ # Comment out as the 2nd arm64 pipeline is unstable.
+ # - <<: *arm64-linux
- <<: *ppc64le-linux
- <<: *s390x-linux
allow_failures:
- # An arm64 job sometimes does not start right now.
- # https://travis-ci.community/t/11629
+ # We see multiple errors indicating errors on the Travis environment itself in a short while:
+ # https://app.travis-ci.com/github/ruby/ruby/jobs/544382885
+ # https://app.travis-ci.com/github/ruby/ruby/jobs/544361370
+ # It's not a fault of Ruby's arm32 support but just Travis arm32 seems unsable.
- name: arm32-linux
- - name: arm64-linux
- # - name: ppc64le-linux
+ # - name: arm64-linux
+ # We see "Some worker was crashed." in about 40% of recent ppc64le-linux jobs
+ # e.g. https://app.travis-ci.com/github/ruby/ruby/jobs/530959548
+ - name: ppc64le-linux
# - name: s390x-linux
fast_finish: true
@@ -197,7 +203,7 @@ script:
# Run the failing tests separately returning ok status to check if it works,
# visualize them.
- |
- if [ "${RUN_SEPARATED_TESTS}" = true -a -n "${TEST_ALL_OPTS_SEPARATED}" ]; then
+ if [ -n "${TEST_ALL_OPTS_SEPARATED}" ]; then
$SETARCH make -s test-all -o exts TESTOPTS="$JOBS -v --tty=no ${TEST_ALL_OPTS_SEPARATED}" RUBYOPT="-w" || :
fi
- $SETARCH make -s test-spec MSPECOPT=-ff # not using `-j` because sometimes `mspec -j` silently dies
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c112806acf4..7363c106a24 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,5 +1,5 @@
Please see the [official issue tracker], [doc/contributing.rdoc] and wiki [HowToContribute].
[official issue tracker]: https://bugs.ruby-lang.org
-[doc/contributing.rdoc]: doc/contributing.rdoc
+[doc/contributing.rdoc]: contributing.rdoc
[HowToContribute]: https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute
diff --git a/LEGAL b/LEGAL
index ecd1e160506..57804508ebf 100644
--- a/LEGAL
+++ b/LEGAL
@@ -343,6 +343,34 @@ mentioned below.
program. This Exception is an additional permission under section 7
of the GNU General Public License, version 3 ("GPLv3").
+[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.
+
[parse.c]
[parse.h]
@@ -440,7 +468,8 @@ mentioned below.
>>>
A C-program for MT19937, with initialization improved 2002/2/10.::
- Coded by Takuji Nishimura and Makoto Matsumoto.
+ 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.
@@ -532,10 +561,7 @@ mentioned below.
[missing/acosh.c]
[missing/alloca.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]
diff --git a/NEWS.md b/NEWS.md
index 7d8089524c0..efa6174370a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -33,41 +33,58 @@ Note that each entry is kept to a minimum, see links for details.
foo[0] = bar
```
- The following evaluation order is used:
+ The following evaluation order is used:
- 1. `foo`
- 2. `bar`
- 3. `[]=` called on the result of `foo`
+ 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:
+ In Ruby before 3.1.0, multiple assignment did not follow this
+ evaluation order. With this code:
- ```ruby
- foo[0], bar.baz = a, b
- ```
+ ```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, 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`
- Versions of Ruby before 3.1.0 would evaluate in the following
- order
+ [[Bug #4443]]
- 1. `a`
- 2. `b`
- 3. `foo`
- 4. `[]=` called on the result of `foo`
- 5. `bar`
- 6. `baz=` called on the result of `bar`
+* Values in Hash literals and keyword arguments can be omitted.
+ [[Feature #14579]]
- Starting in Ruby 3.1.0, evaluation order is now consistent with
- single assignment, with the left hand side being evaluated before
- the right hand side:
+ For example,
- 1. `foo`
- 2. `bar`
- 3. `a`
- 4. `b`
- 5. `[]=` called on the result of `foo`
- 6. `baz=` called on the result of `bar`
+ * `{x:, y:}` is a syntax sugar of `{x: x, y: y}`.
+ * `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`.
- [[Bug #4443]]
+ 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]]
## Command line options
@@ -79,6 +96,22 @@ Outstanding ones only.
* Array#intersect? is added. [[Feature #15198]]
+* Class
+
+ * Class#descendants, which returns an array of classes
+ directly or indirectly inheriting from the receiver, not
+ including the receiver or singleton classes.
+ [[Feature #14394]]
+
+ ```ruby
+ class A; end
+ class B < A; end
+ class C < B; end
+ A.descendants #=> [B, C]
+ B.descendants #=> [C]
+ C.descendants #=> []
+ ```
+
* Enumerable
* Enumerable#compact is added. [[Feature #17312]]
@@ -98,6 +131,12 @@ Outstanding ones only.
* Integer.try_convert is added. [[Feature #15211]]
+* MatchData
+
+ * MatchData#match is added [[Feature #18172]]
+
+ * MatchData#match_length is added [[Feature #18172]]
+
* Module
* Module#prepend now modifies the ancestor chain if the receiver
@@ -113,6 +152,11 @@ Outstanding ones only.
* 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]]
+
* Queue
* Queue#initialize now accepts an Enumerable of initial values.
@@ -147,9 +191,84 @@ Outstanding ones only.
* 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
-Outstanding ones only.
+* The following default gem are updated.
+ * RubyGems
+ * Bundler
+ * RDoc 6.3.2
+ * ReLine
+ * JSON 2.6.1
+ * Psych 4.0.2
+ * FileUtils 1.6.0
+ * Fiddle 1.1.0
+ * StringIO 3.0.1
+ * IO::Console 0.5.9
+ * IO::Wait 0.2.0
+ * CSV 3.2.1
+ * Etc 1.3.0
+ * Date 3.2.0
+ * Zlib 2.1.1
+ * StringScanner 3.0.1
+ * IpAddr 1.2.2
+ * Logger 1.4.4
+ * OStruct 0.5.0
+ * Irb
+ * Racc 1.6.0
+ * Delegate 0.2.0
+ * Benchmark 0.2.0
+ * CGI 0.3.0
+ * Readline(C-ext) 0.1.3
+ * Timeout 0.2.0
+ * YAML 0.2.0
+ * URI 0.11.0
+ * OpenSSL
+ * DidYouMean
+ * Weakref 0.1.1
+ * Tempfile 0.1.2
+ * TmpDir 0.1.2
+ * English 0.7.1
+ * Net::Protocol 0.1.2
+ * Net::Http 0.2.0
+ * BigDecimal
+ * OptionParser 0.2.0
+ * Set 1.0.1
+ * Find 0.1.1
+ * Rinda 0.1.1
+ * Erb 2.2.3
+ * NKF 0.1.1
+ * Base64 0.1.1
+ * OpenUri 0.2.0
+ * SecureRandom 0.1.1
+ * Resolv 0.2.1
+ * Resolv::Replace 0.1.0
+ * Time 0.2.0
+ * PP 0.2.1
+ * Prettyprint 0.1.1
+ * Drb 2.1.0
+ * Pathname 0.2.0
+ * Digest 3.1.0.pre2
+ * Un 0.2.0
+* The following bundled gems are updated.
+ * minitest 5.14.4
+ * power_assert 2.0.1
+ * rake 13.0.6
+ * test-unit 3.5.0
+ * rbs 1.6.2
+ * typeprof 0.20.1
+* The following default gems are now bundled gems.
+ * net-ftp
+ * net-imap
+ * net-pop
+ * net-smtp
+ * matrix
+ * prime
## Compatibility issues
@@ -165,25 +284,81 @@ Excluding feature bug fixes.
* `ERB#initialize` warns `safe_level` and later arguments even without -w.
[[Feature #14256]]
+* `lib/debug.rb` is replaced with `debug.gem`
+
## C API updates
+* Documented. [[GH-4815]]
+
## Implementation improvements
### JIT
* The default `--jit-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.
+* `--jit-verbose` and `--jit-warning` output "JIT cancel" when JIT-ed
+ code is disabled because TracePoint or GC.compact is used.
+
* `RubyVM::MJIT` is renamed to `RubyVM::JIT`. [[Feature #17490]]
+### 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 most real-world software, up to 22% on railsbench, 39% on liquid-render.
+
+* Fast warm-up times.
+
+* Limited to macOS & Linux on x86-64 platforms for now.
+
## Static analysis
### RBS
### TypeProf
+* [Experimental IDE support](https://github.com/ruby/typeprof/blob/master/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 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, error_highlight, has been introduced.
+It includes fine-grained error location in backtrace:
+
+```
+$ ruby test.rb
+test.rb:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError)
+
+1.time {}
+ ^^^^^
+Did you mean? times
+```
+
+This gem 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.
+
## Miscellaneous changes
* lib/objspace/trace.rb is added, which is a tool for tracing the object
@@ -199,23 +374,33 @@ Excluding feature bug fixes.
[Bug #4443]: https://bugs.ruby-lang.org/issues/4443
[Feature #12194]: https://bugs.ruby-lang.org/issues/12194
[Feature #14256]: https://bugs.ruby-lang.org/issues/14256
+[Feature #14394]: https://bugs.ruby-lang.org/issues/14394
+[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 #16043]: https://bugs.ruby-lang.org/issues/16043
[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 #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 #17490]: https://bugs.ruby-lang.org/issues/17490
+[Feature #17592]: https://bugs.ruby-lang.org/issues/17592
[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 #17798]: https://bugs.ruby-lang.org/issues/17798
-[Bug #18003]: https://bugs.ruby-lang.org/issues/18003
-[Feature #17370]: https://bugs.ruby-lang.org/issues/17370
-[Feature #17470]: https://bugs.ruby-lang.org/issues/17470
-[Feature #17853]: https://bugs.ruby-lang.org/issues/17853
[Bug #17827]: https://bugs.ruby-lang.org/issues/17827
+[Feature #17853]: https://bugs.ruby-lang.org/issues/17853
+[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 #18029]: https://bugs.ruby-lang.org/issues/18029
+[Feature #18172]: https://bugs.ruby-lang.org/issues/18172
+[Feature #18229]: https://bugs.ruby-lang.org/issues/18229
+[GH-4815]: https://github.com/ruby/ruby/pull/4815
diff --git a/README.md b/README.md
index 5d225fdfa11..8d23de8b7a8 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,8 @@
[![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://www.travis-ci.com/ruby/ruby.svg?branch=master)](https://www.travis-ci.com/ruby/ruby)
+[![Travis Status](https://app.travis-ci.com/ruby/ruby.svg?branch=master)](https://app.travis-ci.com/ruby/ruby)
+[![Cirrus Status](https://api.cirrus-ci.com/github/ruby/ruby.svg)](https://cirrus-ci.com/github/ruby/ruby/master)
# What's Ruby
diff --git a/addr2line.c b/addr2line.c
index 8ee4416650d..f660be91296 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -192,12 +192,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;
@@ -209,12 +209,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;
@@ -231,7 +231,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 "";
@@ -249,11 +249,11 @@ get_nth_dirname(unsigned long dir, char *p)
}
static void
-fill_filename(int file, char *include_directories, char *filenames, line_info_t *line, obj_info_t *obj)
+fill_filename(int file, 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;
@@ -280,7 +280,7 @@ fill_filename(int file, char *include_directories, char *filenames, line_info_t
static void
fill_line(int num_traces, void **traces, uintptr_t addr, int file, int line,
- char *include_directories, char *filenames,
+ const char *include_directories, const char *filenames,
obj_info_t *obj, line_info_t *lines, int offset)
{
int i;
@@ -374,7 +374,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;
@@ -399,8 +399,8 @@ parse_debug_line_cu(int num_traces, void **traces, char **debug_line,
#define FILL_LINE() \
do { \
fill_line(num_traces, traces, addr, file, line, \
- (char *)header.include_directories, \
- (char *)header.filenames, \
+ header.include_directories, \
+ header.filenames, \
obj, lines, offset); \
/*basic_block = prologue_end = epilogue_begin = 0;*/ \
} while (0)
@@ -413,19 +413,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) * header.minimum_instruction_length;
+ 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;
@@ -450,10 +450,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 = uleb128((char **)&p);
+ a = uleb128(&p);
op = *p++;
switch (op) {
case DW_LNE_end_sequence:
@@ -477,7 +477,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",
@@ -500,10 +500,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;
@@ -833,21 +833,21 @@ enum {
# define ABBREV_TABLE_SIZE 256
typedef struct {
obj_info_t *obj;
- char *file;
- char *current_cu;
+ const char *file;
+ 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;
+ const char *debug_line_cu_end;
+ 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 {
@@ -858,7 +858,7 @@ typedef struct {
typedef struct {
union {
- char *ptr;
+ const char *ptr;
uint64_t uint64;
int64_t int64;
} as;
@@ -891,39 +891,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);
@@ -931,7 +931,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);
@@ -976,7 +976,7 @@ debug_info_reader_init(DebugInfoReader *reader, obj_info_t *obj)
}
static void
-di_skip_die_attributes(char **p)
+di_skip_die_attributes(const char **p)
{
for (;;) {
uint64_t at = uleb128(p);
@@ -996,7 +996,7 @@ 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;
@@ -1042,7 +1042,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;
@@ -1050,7 +1050,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;
@@ -1058,7 +1058,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;
@@ -1138,12 +1138,12 @@ 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) {
+ if (reader->format == 4) {
set_uint_value(v, read_uint32(&reader->p));
- } else if (reader->address_size == 8) {
+ } else if (reader->format == 8) {
set_uint_value(v, read_uint64(&reader->p));
} else {
- fprintf(stderr,"unknown address_size:%d", reader->address_size);
+ fprintf(stderr,"unknown format:%d", reader->format);
abort();
}
break;
@@ -1259,10 +1259,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];
}
@@ -1313,10 +1313,10 @@ 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:%zx 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:%zx 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);
@@ -1407,13 +1407,13 @@ ranges_set(ranges_t *ptr, DebugInfoValue *v)
}
static uint64_t
-read_dw_form_addr(DebugInfoReader *reader, char **ptr)
+read_dw_form_addr(DebugInfoReader *reader, const char **ptr)
{
- char *p = *ptr;
- *ptr = p + reader->format;
- if (reader->format == 4) {
+ const char *p = *ptr;
+ *ptr = p + reader->address_size;
+ if (reader->address_size == 4) {
return read_uint32(&p);
- } else if (reader->format == 8) {
+ } else if (reader->address_size == 8) {
return read_uint64(&p);
} else {
fprintf(stderr,"unknown address_size:%d", reader->address_size);
@@ -1434,18 +1434,19 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
}
else if (ptr->ranges_set) {
/* TODO: support base address selection entry */
- char *p;
+ const char *p;
uint64_t base = ptr->low_pc_set ? ptr->low_pc : reader->current_low_pc;
+ bool base_valid = true;
if (reader->obj->debug_rnglists.ptr) {
p = reader->obj->debug_rnglists.ptr + ptr->ranges;
for (;;) {
uint8_t rle = read_uint8(&p);
- uintptr_t base_address = 0;
- uintptr_t from, to;
+ 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);
@@ -1456,24 +1457,26 @@ ranges_include(DebugInfoReader *reader, ranges_t *ptr, uint64_t addr)
uleb128(&p);
break;
case DW_RLE_offset_pair:
- from = base_address + uleb128(&p);
- to = base_address + uleb128(&p);
- if (base + from <= addr && addr < base + to) {
- return from;
- }
+ if (!base_valid) break;
+ from = (uintptr_t)base + uleb128(&p);
+ to = (uintptr_t)base + uleb128(&p);
break;
case DW_RLE_base_address:
- base_address = (uintptr_t)read_dw_form_addr(reader, &p);
+ base = read_dw_form_addr(reader, &p);
+ base_valid = true;
break;
case DW_RLE_start_end:
- read_dw_form_addr(reader, &p);
- read_dw_form_addr(reader, &p);
+ from = (uintptr_t)read_dw_form_addr(reader, &p);
+ to = (uintptr_t)read_dw_form_addr(reader, &p);
break;
case DW_RLE_start_length:
- read_dw_form_addr(reader, &p);
- uleb128(&p);
+ from = (uintptr_t)read_dw_form_addr(reader, &p);
+ to = from + uleb128(&p);
break;
}
+ if (from <= addr && addr < to) {
+ return from;
+ }
}
return false;
}
@@ -1487,7 +1490,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;
}
}
}
@@ -1593,14 +1596,31 @@ di_read_cu(DebugInfoReader *reader)
}
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 */
@@ -1665,7 +1685,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; */
}
}
@@ -2118,7 +2138,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];
@@ -2170,7 +2190,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)
@@ -2193,7 +2213,7 @@ main_exe_path(void)
binary_filename[len] = 0;
return len;
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
static ssize_t
main_exe_path(void)
{
diff --git a/array.c b/array.c
index 36f712bcac9..cef48d3336a 100644
--- a/array.c
+++ b/array.c
@@ -2234,14 +2234,6 @@ rb_ary_set_len(VALUE ary, long len)
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)
{
@@ -2668,9 +2660,7 @@ rb_ary_length(VALUE ary)
static VALUE
rb_ary_empty_p(VALUE ary)
{
- if (RARRAY_LEN(ary) == 0)
- return Qtrue;
- return Qfalse;
+ return RBOOL(RARRAY_LEN(ary) == 0);
}
VALUE
@@ -3432,89 +3422,8 @@ static VALUE rb_ary_bsearch_index(VALUE ary);
* array.bsearch -> new_enumerator
*
* Returns an element from +self+ selected by a binary search.
- * +self+ should be sorted, but this is not checked.
- *
- * By using binary search, finds a value from this array which meets
- * the given condition in <tt>O(log n)</tt> where +n+ is the size of the array.
- *
- * There are two search modes:
- * - <b>Find-minimum mode</b>: the block should return +true+ or +false+.
- * - <b>Find-any mode</b>: the block should return a numeric value.
- *
- * The block should not mix the modes by and sometimes returning +true+ or +false+
- * and sometimes returning a numeric value, but this is not checked.
- *
- * <b>Find-Minimum Mode</b>
*
- * In find-minimum mode, the block always returns +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>.
- *
- * 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
- *
- * Less formally: the block is such that all +false+-evaluating elements
- * precede all +true+-evaluating elements.
- *
- * These make sense as blocks 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 = [0, 4, 7, 10, 12]
- * a.map {|x| x == 7 } # => [false, false, true, false, false]
- *
- * <b>Find-Any Mode</b>
- *
- * In find-any mode, the block always returns 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>.
- *
- * 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
- *
- * 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.
- *
- * These make sense as blocks 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 = [0, 4, 7, 10, 12]
- * a.map {|element| element <=> 7 } # => [-1, -1, 0, 1, 1]
- *
- * Returns an enumerator if no block given:
- * a = [0, 4, 7, 10, 12]
- * a.bsearch # => #<Enumerator: [0, 4, 7, 10, 12]:bsearch>
+ * See {Binary Searching}[rdoc-ref:bsearch.rdoc].
*/
static VALUE
@@ -3557,7 +3466,7 @@ rb_ary_bsearch_index(VALUE ary)
satisfied = 1;
smaller = 1;
}
- else if (v == Qfalse || v == Qnil) {
+ else if (!RTEST(v)) {
smaller = 0;
}
else if (rb_obj_is_kind_of(v, rb_cNumeric)) {
@@ -4098,7 +4007,7 @@ ary_slice_bang_by_rb_ary_splice(VALUE ary, long pos, long len)
else if (orig_len < pos) {
return Qnil;
}
- else if (orig_len < pos + len) {
+ if (orig_len < pos + len) {
len = orig_len - pos;
}
if (len == 0) {
@@ -4847,6 +4756,7 @@ 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;
}
@@ -5923,8 +5833,7 @@ ary_min_opt_string(VALUE ary, long i, VALUE vmin)
*
* With an argument +n+ and a block, returns a new \Array with at most +n+ elements,
* in ascending order per the block:
- * [0, 1, 2, 3].min(3) # => [0, 1, 2]
- * [0, 1, 2, 3].min(6) # => [0, 1, 2, 3]
+ * ['0', '00', '000'].min(2) {|a, b| a.size <=> b.size } # => ["0", "00"]
*/
static VALUE
rb_ary_min(int argc, VALUE *argv, VALUE ary)
@@ -6570,7 +6479,7 @@ rb_ary_cycle_size(VALUE self, VALUE args, VALUE eobj)
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);
@@ -7435,7 +7344,7 @@ rb_ary_drop(VALUE ary, VALUE n)
}
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;
}
@@ -7719,7 +7628,7 @@ rb_ary_one_p(int argc, VALUE *argv, VALUE ary)
* 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:doc/dig_methods.rdoc].
+ * See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
*
* Examples:
* a = [:foo, [:bar, :baz, [:bat, :bam]]]
@@ -7813,7 +7722,7 @@ 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)
@@ -7850,7 +7759,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);
@@ -8335,7 +8244,7 @@ rb_ary_deconstruct(VALUE ary)
* - 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 the elements into a binary sequence.
+ * #pack:: Packs the elements into a binary sequence.
* #sum:: Returns a sum of elements according to either <tt>+</tt> or a given block.
*/
diff --git a/array.rb b/array.rb
index a43a3b27b17..05ce60773e7 100644
--- a/array.rb
+++ b/array.rb
@@ -49,6 +49,8 @@ class Array
# 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:
diff --git a/ast.c b/ast.c
index 32d8ab9eb64..96116d43eba 100644
--- a/ast.c
+++ b/ast.c
@@ -64,8 +64,8 @@ ast_new_internal(rb_ast_t *ast, const NODE *node)
return obj;
}
-static VALUE rb_ast_parse_str(VALUE str, VALUE save_script_lines);
-static VALUE rb_ast_parse_file(VALUE path, VALUE save_script_lines);
+static VALUE rb_ast_parse_str(VALUE str, VALUE keep_script_lines);
+static VALUE rb_ast_parse_file(VALUE path, VALUE keep_script_lines);
static VALUE
ast_parse_new(void)
@@ -85,31 +85,31 @@ ast_parse_done(rb_ast_t *ast)
}
static VALUE
-ast_s_parse(rb_execution_context_t *ec, VALUE module, VALUE str, VALUE save_script_lines)
+ast_s_parse(rb_execution_context_t *ec, VALUE module, VALUE str, VALUE keep_script_lines)
{
- return rb_ast_parse_str(str, save_script_lines);
+ return rb_ast_parse_str(str, keep_script_lines);
}
static VALUE
-rb_ast_parse_str(VALUE str, VALUE save_script_lines)
+rb_ast_parse_str(VALUE str, VALUE keep_script_lines)
{
rb_ast_t *ast = 0;
StringValue(str);
VALUE vparser = ast_parse_new();
- if (RTEST(save_script_lines)) rb_parser_save_script_lines(vparser);
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(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, VALUE save_script_lines)
+ast_s_parse_file(rb_execution_context_t *ec, VALUE module, VALUE path, VALUE keep_script_lines)
{
- return rb_ast_parse_file(path, save_script_lines);
+ return rb_ast_parse_file(path, keep_script_lines);
}
static VALUE
-rb_ast_parse_file(VALUE path, VALUE save_script_lines)
+rb_ast_parse_file(VALUE path, VALUE keep_script_lines)
{
VALUE f;
rb_ast_t *ast = 0;
@@ -119,7 +119,7 @@ rb_ast_parse_file(VALUE path, VALUE save_script_lines)
f = rb_file_open_str(path, "r");
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
VALUE vparser = ast_parse_new();
- if (RTEST(save_script_lines)) rb_parser_save_script_lines(vparser);
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(vparser);
ast = rb_parser_compile_file_path(vparser, Qnil, f, 1);
rb_io_close(f);
return ast_parse_done(ast);
@@ -139,13 +139,13 @@ lex_array(VALUE array, int index)
}
static VALUE
-rb_ast_parse_array(VALUE array, VALUE save_script_lines)
+rb_ast_parse_array(VALUE array, VALUE keep_script_lines)
{
rb_ast_t *ast = 0;
array = rb_check_array_type(array);
VALUE vparser = ast_parse_new();
- if (RTEST(save_script_lines)) rb_parser_save_script_lines(vparser);
+ if (RTEST(keep_script_lines)) rb_parser_keep_script_lines(vparser);
ast = rb_parser_compile_generic(vparser, lex_array, Qnil, array, 1);
return ast_parse_done(ast);
}
@@ -193,14 +193,14 @@ script_lines(VALUE path)
}
static VALUE
-ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE save_script_lines)
+ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE keep_script_lines)
{
- VALUE path, node, lines;
+ VALUE path, node, lines = Qnil;
int node_id;
if (rb_frame_info_p(body)) {
- rb_frame_info_get(body, &path, &node_id);
- if (NIL_P(path)) return Qnil;
+ rb_frame_info_get(body, &path, &lines, &node_id);
+ if (NIL_P(path) && NIL_P(lines)) return Qnil;
}
else {
const rb_iseq_t *iseq = NULL;
@@ -213,18 +213,25 @@ ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE save_script
else {
iseq = rb_method_iseq(body);
}
+ if (!iseq) {
+ return Qnil;
+ }
+ if (rb_iseq_from_eval_p(iseq)) {
+ rb_raise(rb_eArgError, "cannot get AST for method defined in eval");
+ }
path = rb_iseq_path(iseq);
+ lines = iseq->body->variable.script_lines;
node_id = iseq->body->location.node_id;
}
- if (!NIL_P(lines = script_lines(path))) {
- node = rb_ast_parse_array(lines, save_script_lines);
+ if (!NIL_P(lines) || !NIL_P(lines = script_lines(path))) {
+ node = rb_ast_parse_array(lines, keep_script_lines);
}
else if (RSTRING_LEN(path) == 2 && memcmp(RSTRING_PTR(path), "-e", 2) == 0) {
- node = rb_ast_parse_str(rb_e_script, save_script_lines);
+ node = rb_ast_parse_str(rb_e_script, keep_script_lines);
}
else {
- node = rb_ast_parse_file(path, save_script_lines);
+ node = rb_ast_parse_file(path, keep_script_lines);
}
return node_find(node, node_id);
@@ -363,7 +370,7 @@ node_children(rb_ast_t *ast, const NODE *node)
case NODE_WHILE:
case NODE_UNTIL:
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);
@@ -430,7 +437,7 @@ node_children(rb_ast_t *ast, const NODE *node)
NEW_CHILD(ast, node->nd_args->nd_body));
case NODE_OP_ASGN2:
return rb_ary_new_from_args(5, NEW_CHILD(ast, node->nd_recv),
- node->nd_next->nd_aid ? Qtrue : Qfalse,
+ RBOOL(node->nd_next->nd_aid),
ID2SYM(node->nd_next->nd_vid),
ID2SYM(node->nd_next->nd_mid),
NEW_CHILD(ast, node->nd_value));
diff --git a/ast.rb b/ast.rb
index 34dd3f1d496..f866bd23e5a 100644
--- a/ast.rb
+++ b/ast.rb
@@ -29,8 +29,8 @@ module RubyVM::AbstractSyntaxTree
#
# RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:9>
- def self.parse string, save_script_lines: false
- Primitive.ast_s_parse string, save_script_lines
+ def self.parse string, keep_script_lines: false
+ Primitive.ast_s_parse string, keep_script_lines
end
# call-seq:
@@ -44,8 +44,8 @@ module RubyVM::AbstractSyntaxTree
#
# RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>
- def self.parse_file pathname, save_script_lines: false
- Primitive.ast_s_parse_file pathname, save_script_lines
+ def self.parse_file pathname, keep_script_lines: false
+ Primitive.ast_s_parse_file pathname, keep_script_lines
end
# call-seq:
@@ -63,8 +63,8 @@ module RubyVM::AbstractSyntaxTree
#
# RubyVM::AbstractSyntaxTree.of(method(:hello))
# # => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-3:3>
- def self.of body, save_script_lines: false
- Primitive.ast_s_of body, save_script_lines
+ def self.of body, keep_script_lines: false
+ Primitive.ast_s_of body, keep_script_lines
end
# RubyVM::AbstractSyntaxTree::Node instances are created by parse methods in
diff --git a/benchmark/attr_accessor.yml b/benchmark/attr_accessor.yml
new file mode 100644
index 00000000000..82134cdf9b4
--- /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/hash_aref_array.rb b/benchmark/hash_aref_array.rb
new file mode 100644
index 00000000000..ac7a683d954
--- /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/time_new.yml b/benchmark/time_new.yml
new file mode 100644
index 00000000000..5947dd3a411
--- /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_parse.yml b/benchmark/time_parse.yml
new file mode 100644
index 00000000000..a6d6948b9c3
--- /dev/null
+++ b/benchmark/time_parse.yml
@@ -0,0 +1,8 @@
+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)
diff --git a/benchmark/vm_ivar_of_class.yml b/benchmark/vm_ivar_of_class.yml
new file mode 100644
index 00000000000..172e28b2fd3
--- /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 00000000000..2ea5199423b
--- /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/bignum.c b/bignum.c
index d3e6cf29bb1..c74df3f4da2 100644
--- a/bignum.c
+++ b/bignum.c
@@ -36,15 +36,12 @@
#include "internal/numeric.h"
#include "internal/object.h"
#include "internal/sanitizers.h"
-#include "internal/util.h"
#include "internal/variable.h"
#include "internal/warnings.h"
#include "ruby/thread.h"
#include "ruby/util.h"
#include "ruby_assert.h"
-#define RB_BIGNUM_TYPE_P(x) RB_TYPE_P((x), T_BIGNUM)
-
const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
#ifndef SIZEOF_BDIGIT_DBL
@@ -463,7 +460,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;
@@ -1053,6 +1049,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
}
@@ -1644,11 +1641,13 @@ rb_big_sq_fast(VALUE x)
/* 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);
@@ -1656,14 +1655,20 @@ bary_mul_balance_with_mulfunc(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t
BDIGITS_ZERO(zds, xn);
+ if (wn < xn) {
+ const size_t r = (yn % xn) ? (yn % xn) : xn;
+ if ((2 * xn + yn + 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,
@@ -1671,21 +1676,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;
}
- BDIGITS_ZERO(zds+xn+yn0, zn - (xn+yn0));
+ BDIGITS_ZERO(zds+xn+yn, zn - (xn+yn));
if (work)
ALLOCV_END(work);
@@ -3401,6 +3410,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
}
@@ -5381,7 +5391,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)
@@ -5389,18 +5399,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);
@@ -5470,10 +5476,10 @@ big_op(VALUE x, VALUE y, enum big_op_t op)
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;
}
@@ -5517,7 +5523,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)) {
}
@@ -5529,8 +5535,7 @@ rb_big_eq(VALUE x, VALUE y)
}
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
@@ -5539,8 +5544,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
@@ -6823,10 +6827,7 @@ 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
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb
index 28c9e6d90c2..bf80b94cc70 100644
--- a/bootstraptest/test_ractor.rb
+++ b/bootstraptest/test_ractor.rb
@@ -187,6 +187,28 @@ assert_equal '[:ok, :ok, :ok]', %q{
}.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 = 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 = -> {
+ b, c, d = :b, :c, :d
+ -> {
+ e, f, g = :e, :f, :g
+ -> { [a, b, c, d, e, f, g] }
+ }.call
+ }.call
+
+ Ractor.make_shareable(closure).call
+}
+
###
###
# Ractor still has several memory corruption so skip huge number of tests
@@ -906,7 +928,7 @@ assert_equal 'ArgumentError', %q{
}
# ivar in shareable-objects are not allowed to access from non-main Ractor
-assert_equal 'can not access instance variables of classes/modules from non-main Ractors', %q{
+assert_equal "can not get unshareable values from instance variables of classes/modules from non-main Ractors", %q{
class C
@iv = 'str'
end
@@ -1000,6 +1022,53 @@ assert_equal '11', %q{
}.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
@@ -1061,7 +1130,7 @@ assert_equal 'can not set constants with non-shareable objects by non-main Racto
}
# define_method is not allowed
-assert_equal "defined in a different Ractor", %q{
+assert_equal "defined with an un-shareable Proc in a different Ractor", %q{
str = "foo"
define_method(:buggy){|i| str << "#{i}"}
begin
@@ -1418,4 +1487,19 @@ assert_equal "ok", %q{
'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"
+}
+
end # if !ENV['GITHUB_WORKFLOW']
diff --git a/bootstraptest/test_yjit.rb b/bootstraptest/test_yjit.rb
new file mode 100644
index 00000000000..0a3aa81860d
--- /dev/null
+++ b/bootstraptest/test_yjit.rb
@@ -0,0 +1,2290 @@
+# 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{
+ 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(double_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
+}
+
+# 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 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 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
+}
+
+# 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
+}
+
+# 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
+}
+
+# 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 '[[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
+}
+
+# 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
+}
+
+# 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
+}
diff --git a/bootstraptest/test_yjit_30k_ifelse.rb b/bootstraptest/test_yjit_30k_ifelse.rb
new file mode 100644
index 00000000000..c3afa95e4dd
--- /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