From b4638476ccf1d4f066560df7193e9835148810d3 Mon Sep 17 00:00:00 2001 From: Daniel Heath Date: Mon, 22 Jan 2018 21:07:50 +1100 Subject: [PATCH] Update all dependencies to latest --- Gopkg.lock | 32 +- .../gin-teeny-security/gin-teeny-security.go | 168 +- .../gin-teeny-security_test.go | 109 + .../garyburd/redigo/README.markdown | 1 + .../github.com/garyburd/redigo/redis/conn.go | 63 +- .../garyburd/redigo/redis/conn_test.go | 57 +- .../redigo/redis/{pre_go17.go => go16.go} | 6 +- .../github.com/garyburd/redigo/redis/go17.go | 8 +- .../github.com/garyburd/redigo/redis/go18.go | 9 + .../github.com/garyburd/redigo/redis/log.go | 17 + .../github.com/garyburd/redigo/redis/pool.go | 41 +- .../garyburd/redigo/redis/pubsub.go | 20 +- .../redigo/redis/pubsub_example_test.go | 165 + .../garyburd/redigo/redis/pubsub_test.go | 88 +- .../github.com/garyburd/redigo/redis/redis.go | 56 + .../garyburd/redigo/redis/redis_test.go | 71 + .../github.com/garyburd/redigo/redis/reply.go | 164 +- .../garyburd/redigo/redis/reply_test.go | 41 +- .../garyburd/redigo/redis/test_test.go | 17 +- .../golang/protobuf/jsonpb/jsonpb.go | 3 +- .../golang/protobuf/jsonpb/jsonpb_test.go | 1 + .../microcosm-cc/bluemonday/CREDITS.md | 2 +- .../microcosm-cc/bluemonday/README.md | 2 +- .../cmd/sanitise_html_email/main.go | 1 - .../microcosm-cc/bluemonday/policy.go | 19 +- .../microcosm-cc/bluemonday/sanitize.go | 24 +- .../microcosm-cc/bluemonday/sanitize_test.go | 244 +- vendor/github.com/sergi/go-diff/.travis.yml | 2 +- .../shurcooL/github_flavored_markdown/main.go | 148 +- vendor/github.com/shurcooL/go/README.md | 1 - .../go/analysis/generated_detection.go | 51 - .../go/analysis/generated_detection_test.go | 28 - .../go/analysis/testdata/generated_0.go.txt | 32 - .../go/analysis/testdata/handcrafted_0.go.txt | 9 - .../go/analysis/testdata/handcrafted_1.go.txt | 1 - vendor/github.com/shurcooL/graphql/README.md | 4 +- .../graphql/example/graphqldev/main.go | 2 +- vendor/github.com/shurcooL/graphql/graphql.go | 15 +- .../shurcooL/graphql/ident/ident.go | 18 + .../shurcooL/graphql/ident/ident_test.go | 5 +- vendor/github.com/shurcooL/graphql/query.go | 121 +- .../github.com/shurcooL/graphql/query_test.go | 60 +- .../shurcooL/octiconssvg/generate.go | 36 +- .../shurcooL/octiconssvg/octicons.go | 375 +- .../shurcooL/octiconssvg/octicons_test.go | 14 +- vendor/github.com/ugorji/go/.travis.yml | 11 +- vendor/github.com/ugorji/go/README.md | 2 +- vendor/github.com/ugorji/go/codec/0doc.go | 74 +- vendor/github.com/ugorji/go/codec/README.md | 29 +- vendor/github.com/ugorji/go/codec/binc.go | 344 +- vendor/github.com/ugorji/go/codec/cbor.go | 192 +- .../github.com/ugorji/go/codec/cbor_test.go | 2 +- .../github.com/ugorji/go/codec/codec_test.go | 681 +- .../ugorji/go/codec/codecgen/gen.go | 53 +- vendor/github.com/ugorji/go/codec/decode.go | 938 +- vendor/github.com/ugorji/go/codec/encode.go | 765 +- .../ugorji/go/codec/fast-path.generated.go | 18309 ++++++------ .../ugorji/go/codec/fast-path.go.tmpl | 296 +- .../ugorji/go/codec/fast-path.not.go | 19 +- .../ugorji/go/codec/gen-dec-array.go.tmpl | 2 +- .../ugorji/go/codec/gen-helper.generated.go | 182 +- .../ugorji/go/codec/gen-helper.go.tmpl | 184 +- .../ugorji/go/codec/gen.generated.go | 5 +- vendor/github.com/ugorji/go/codec/gen.go | 923 +- .../go/codec/goversion_arrayof_gte_go15.go | 2 +- .../go/codec/goversion_arrayof_lt_go15.go | 2 +- .../go/codec/goversion_makemap_gte_go19.go | 2 +- .../go/codec/goversion_makemap_lt_go19.go | 2 +- ...version_unexportedembeddedptr_gte_go110.go | 8 + ...oversion_unexportedembeddedptr_lt_go110.go | 8 + .../go/codec/goversion_unsupported_lt_go14.go | 2 +- .../go/codec/goversion_vendor_eq_go15.go | 2 +- .../go/codec/goversion_vendor_eq_go16.go | 2 +- .../go/codec/goversion_vendor_gte_go17.go | 2 +- .../go/codec/goversion_vendor_lt_go15.go | 2 +- vendor/github.com/ugorji/go/codec/helper.go | 1616 +- .../ugorji/go/codec/helper_internal.go | 86 +- .../ugorji/go/codec/helper_not_unsafe.go | 132 +- .../ugorji/go/codec/helper_unsafe.go | 244 +- vendor/github.com/ugorji/go/codec/json.go | 915 +- .../ugorji/go/codec/mammoth-test.go.tmpl | 88 +- .../ugorji/go/codec/mammoth2-test.go.tmpl | 5 +- .../codec/mammoth2_codecgen_generated_test.go | 23063 ++++++---------- .../go/codec/mammoth2_generated_test.go | 7 +- .../ugorji/go/codec/mammoth_generated_test.go | 12046 ++++++-- vendor/github.com/ugorji/go/codec/msgpack.go | 249 +- vendor/github.com/ugorji/go/codec/noop.go | 19 +- vendor/github.com/ugorji/go/codec/py_test.go | 2 +- vendor/github.com/ugorji/go/codec/rpc.go | 176 +- .../github.com/ugorji/go/codec/shared_test.go | 11 +- vendor/github.com/ugorji/go/codec/simple.go | 225 +- vendor/github.com/ugorji/go/codec/time.go | 220 - .../ugorji/go/codec/values_flex_test.go | 125 +- .../github.com/ugorji/go/codec/values_test.go | 184 +- .../ugorji/go/codec/x_bench_gen_test.go | 123 - vendor/github.com/ugorji/go/codec/xml.go | 130 +- .../github.com/ugorji/go/codec/z_all_test.go | 116 +- .../ugorji/go/codec/z_all_x_bench_gen_test.go | 49 - vendor/golang.org/x/crypto/acme/acme_test.go | 2 +- .../x/crypto/acme/autocert/autocert.go | 330 +- .../x/crypto/acme/autocert/autocert_test.go | 151 + .../x/crypto/acme/autocert/example_test.go | 3 +- vendor/golang.org/x/crypto/argon2/argon2.go | 228 + .../golang.org/x/crypto/argon2/argon2_test.go | 233 + vendor/golang.org/x/crypto/argon2/blake2b.go | 53 + .../x/crypto/argon2/blamka_amd64.go | 61 + .../golang.org/x/crypto/argon2/blamka_amd64.s | 252 + .../x/crypto/argon2/blamka_generic.go | 163 + .../golang.org/x/crypto/argon2/blamka_ref.go | 15 + vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 4 +- vendor/golang.org/x/crypto/blake2b/blake2b.go | 16 +- .../x/crypto/blake2s/blake2s_test.go | 2 +- vendor/golang.org/x/crypto/bn256/bn256.go | 22 +- .../chacha20poly1305_generic.go | 2 +- .../internal/chacha20/chacha_generic.go | 0 .../internal/chacha20/chacha_test.go | 0 vendor/golang.org/x/crypto/nacl/auth/auth.go | 2 +- vendor/golang.org/x/crypto/ocsp/ocsp.go | 2 +- vendor/golang.org/x/crypto/ocsp/ocsp_test.go | 12 +- vendor/golang.org/x/crypto/openpgp/keys.go | 3 +- .../golang.org/x/crypto/pbkdf2/pbkdf2_test.go | 19 + .../x/crypto/pkcs12/internal/rc2/rc2.go | 3 - .../x/crypto/pkcs12/internal/rc2/rc2_test.go | 1 - vendor/golang.org/x/crypto/sha3/sha3_test.go | 2 +- .../golang.org/x/crypto/ssh/agent/client.go | 12 +- .../golang.org/x/crypto/ssh/agent/server.go | 2 +- .../golang.org/x/crypto/ssh/benchmark_test.go | 3 +- vendor/golang.org/x/crypto/ssh/certs.go | 4 +- vendor/golang.org/x/crypto/ssh/certs_test.go | 113 + vendor/golang.org/x/crypto/ssh/channel.go | 142 +- vendor/golang.org/x/crypto/ssh/cipher.go | 252 +- vendor/golang.org/x/crypto/ssh/cipher_test.go | 86 +- vendor/golang.org/x/crypto/ssh/client.go | 21 + vendor/golang.org/x/crypto/ssh/client_auth.go | 30 +- vendor/golang.org/x/crypto/ssh/client_test.go | 141 +- vendor/golang.org/x/crypto/ssh/common.go | 20 +- vendor/golang.org/x/crypto/ssh/handshake.go | 6 + vendor/golang.org/x/crypto/ssh/kex.go | 24 +- vendor/golang.org/x/crypto/ssh/keys.go | 44 +- .../x/crypto/ssh/knownhosts/knownhosts.go | 4 +- vendor/golang.org/x/crypto/ssh/messages.go | 38 +- vendor/golang.org/x/crypto/ssh/mux.go | 6 +- vendor/golang.org/x/crypto/ssh/server.go | 21 +- vendor/golang.org/x/crypto/ssh/session.go | 2 +- .../x/crypto/ssh/terminal/terminal.go | 2 +- .../golang.org/x/crypto/ssh/terminal/util.go | 69 +- .../x/crypto/ssh/terminal/util_windows.go | 11 +- .../x/crypto/ssh/test/banner_test.go | 32 + vendor/golang.org/x/crypto/ssh/test/doc.go | 2 +- .../x/crypto/ssh/test/session_test.go | 37 +- .../x/crypto/ssh/test/test_unix_test.go | 9 +- .../golang.org/x/crypto/ssh/testdata/keys.go | 21 + vendor/golang.org/x/crypto/ssh/transport.go | 72 +- .../golang.org/x/crypto/ssh/transport_test.go | 14 +- vendor/golang.org/x/crypto/tea/cipher.go | 1 - vendor/golang.org/x/crypto/xtea/cipher.go | 2 +- .../x/net/dns/dnsmessage/message.go | 8 +- vendor/golang.org/x/net/html/doc.go | 8 +- vendor/golang.org/x/net/html/token.go | 4 +- .../x/net/http/httpproxy/export_test.go | 7 + .../x/net/http/httpproxy/go19_test.go | 13 + .../golang.org/x/net/http/httpproxy/proxy.go | 239 + .../x/net/http/httpproxy/proxy_test.go | 301 + .../x/net/http2/configure_transport.go | 2 +- vendor/golang.org/x/net/http2/go19_test.go | 1 - vendor/golang.org/x/net/http2/server.go | 43 +- vendor/golang.org/x/net/http2/server_test.go | 11 +- vendor/golang.org/x/net/http2/transport.go | 83 +- .../golang.org/x/net/http2/transport_test.go | 51 + .../x/net/internal/nettest/stack.go | 5 + .../x/net/internal/socket/socket.go | 12 +- .../net/internal/socket/zsys_darwin_arm64.go | 61 + vendor/golang.org/x/sys/plan9/env_plan9.go | 4 + vendor/golang.org/x/sys/plan9/env_unset.go | 14 - vendor/golang.org/x/sys/unix/.gitignore | 1 + .../golang.org/x/sys/unix/affinity_linux.go | 124 + vendor/golang.org/x/sys/unix/asm_linux_386.s | 36 +- .../golang.org/x/sys/unix/asm_linux_amd64.s | 30 +- vendor/golang.org/x/sys/unix/asm_linux_arm.s | 35 +- .../golang.org/x/sys/unix/asm_linux_arm64.s | 30 +- .../golang.org/x/sys/unix/asm_linux_mips64x.s | 36 +- .../golang.org/x/sys/unix/asm_linux_mipsx.s | 33 +- .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 30 +- .../golang.org/x/sys/unix/asm_linux_s390x.s | 28 + vendor/golang.org/x/sys/unix/creds_test.go | 16 + .../golang.org/x/sys/unix/dev_darwin_test.go | 2 + .../x/sys/unix/dev_dragonfly_test.go | 2 + .../golang.org/x/sys/unix/dev_linux_test.go | 2 + .../golang.org/x/sys/unix/dev_netbsd_test.go | 6 +- .../golang.org/x/sys/unix/dev_openbsd_test.go | 2 + .../golang.org/x/sys/unix/dev_solaris_test.go | 2 + vendor/golang.org/x/sys/unix/dirent.go | 89 +- vendor/golang.org/x/sys/unix/env_unix.go | 4 + vendor/golang.org/x/sys/unix/env_unset.go | 14 - vendor/golang.org/x/sys/unix/file_unix.go | 27 - vendor/golang.org/x/sys/unix/gccgo.go | 15 + vendor/golang.org/x/sys/unix/gccgo_c.c | 6 + vendor/golang.org/x/sys/unix/linux/types.go | 58 +- vendor/golang.org/x/sys/unix/mkall.sh | 6 - vendor/golang.org/x/sys/unix/mkerrors.sh | 9 +- vendor/golang.org/x/sys/unix/mkpost.go | 6 +- vendor/golang.org/x/sys/unix/mksyscall.pl | 16 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 12 + .../golang.org/x/sys/unix/syscall_bsd_test.go | 31 + .../golang.org/x/sys/unix/syscall_darwin.go | 58 +- .../x/sys/unix/syscall_darwin_arm.go | 4 + .../x/sys/unix/syscall_dragonfly.go | 136 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 88 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 49 +- .../x/sys/unix/syscall_linux_386.go | 1 + .../x/sys/unix/syscall_linux_amd64.go | 1 + .../x/sys/unix/syscall_linux_arm.go | 1 + .../x/sys/unix/syscall_linux_mips64x.go | 1 + .../x/sys/unix/syscall_linux_mipsx.go | 1 + .../x/sys/unix/syscall_linux_ppc64x.go | 1 + .../x/sys/unix/syscall_linux_s390x.go | 1 + .../x/sys/unix/syscall_linux_sparc64.go | 1 + .../x/sys/unix/syscall_linux_test.go | 227 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 116 +- .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 - .../golang.org/x/sys/unix/syscall_openbsd.go | 138 +- .../golang.org/x/sys/unix/syscall_solaris.go | 38 +- .../x/sys/unix/syscall_solaris_test.go | 21 + vendor/golang.org/x/sys/unix/syscall_test.go | 10 + vendor/golang.org/x/sys/unix/syscall_unix.go | 11 + .../x/sys/unix/syscall_unix_test.go | 48 + vendor/golang.org/x/sys/unix/timestruct.go | 20 + .../golang.org/x/sys/unix/timestruct_test.go | 54 + vendor/golang.org/x/sys/unix/types_darwin.go | 5 + .../golang.org/x/sys/unix/types_dragonfly.go | 13 + vendor/golang.org/x/sys/unix/types_freebsd.go | 11 + vendor/golang.org/x/sys/unix/types_netbsd.go | 13 + vendor/golang.org/x/sys/unix/types_openbsd.go | 13 + .../x/sys/unix/zerrors_darwin_386.go | 11 + .../x/sys/unix/zerrors_darwin_amd64.go | 11 + .../x/sys/unix/zerrors_darwin_arm.go | 11 + .../x/sys/unix/zerrors_darwin_arm64.go | 11 + .../x/sys/unix/zerrors_dragonfly_amd64.go | 7 + .../x/sys/unix/zerrors_freebsd_386.go | 7 + .../x/sys/unix/zerrors_freebsd_amd64.go | 7 + .../x/sys/unix/zerrors_freebsd_arm.go | 7 + .../x/sys/unix/zerrors_linux_386.go | 22 + .../x/sys/unix/zerrors_linux_amd64.go | 22 + .../x/sys/unix/zerrors_linux_arm.go | 22 + .../x/sys/unix/zerrors_linux_arm64.go | 22 + .../x/sys/unix/zerrors_linux_mips.go | 22 + .../x/sys/unix/zerrors_linux_mips64.go | 22 + .../x/sys/unix/zerrors_linux_mips64le.go | 22 + .../x/sys/unix/zerrors_linux_mipsle.go | 22 + .../x/sys/unix/zerrors_linux_ppc64.go | 22 + .../x/sys/unix/zerrors_linux_ppc64le.go | 22 + .../x/sys/unix/zerrors_linux_s390x.go | 22 + .../x/sys/unix/zerrors_netbsd_386.go | 9 +- .../x/sys/unix/zerrors_netbsd_amd64.go | 9 +- .../x/sys/unix/zerrors_netbsd_arm.go | 9 +- .../x/sys/unix/zerrors_openbsd_386.go | 9 +- .../x/sys/unix/zerrors_openbsd_amd64.go | 9 +- .../x/sys/unix/zerrors_openbsd_arm.go | 9 +- .../x/sys/unix/zsyscall_darwin_386.go | 22 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 22 +- .../x/sys/unix/zsyscall_darwin_arm.go | 24 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 22 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 27 + .../x/sys/unix/zsyscall_freebsd_386.go | 34 + .../x/sys/unix/zsyscall_freebsd_amd64.go | 34 + .../x/sys/unix/zsyscall_freebsd_arm.go | 34 + .../x/sys/unix/zsyscall_linux_386.go | 50 +- .../x/sys/unix/zsyscall_linux_amd64.go | 50 +- .../x/sys/unix/zsyscall_linux_arm.go | 50 +- .../x/sys/unix/zsyscall_linux_arm64.go | 35 +- .../x/sys/unix/zsyscall_linux_mips.go | 50 +- .../x/sys/unix/zsyscall_linux_mips64.go | 50 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 50 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 50 +- .../x/sys/unix/zsyscall_linux_ppc64.go | 50 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 50 +- .../x/sys/unix/zsyscall_linux_s390x.go | 50 +- .../x/sys/unix/zsyscall_netbsd_386.go | 27 + .../x/sys/unix/zsyscall_netbsd_amd64.go | 27 + .../x/sys/unix/zsyscall_netbsd_arm.go | 27 + .../x/sys/unix/zsyscall_openbsd_386.go | 27 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 27 + .../x/sys/unix/zsyscall_openbsd_arm.go | 27 + .../x/sys/unix/zsyscall_solaris_amd64.go | 11 + .../x/sys/unix/zsysnum_darwin_386.go | 60 +- .../x/sys/unix/zsysnum_darwin_amd64.go | 60 +- .../x/sys/unix/zsysnum_darwin_arm.go | 14 +- .../x/sys/unix/zsysnum_darwin_arm64.go | 14 +- .../x/sys/unix/zsysnum_solaris_amd64.go | 13 - .../x/sys/unix/ztypes_darwin_386.go | 8 + .../x/sys/unix/ztypes_darwin_amd64.go | 8 + .../x/sys/unix/ztypes_darwin_arm.go | 8 + .../x/sys/unix/ztypes_darwin_arm64.go | 8 + .../x/sys/unix/ztypes_dragonfly_amd64.go | 19 + .../x/sys/unix/ztypes_freebsd_386.go | 12 + .../x/sys/unix/ztypes_freebsd_amd64.go | 12 + .../x/sys/unix/ztypes_freebsd_arm.go | 12 + .../golang.org/x/sys/unix/ztypes_linux_386.go | 66 +- .../x/sys/unix/ztypes_linux_amd64.go | 66 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 66 +- .../x/sys/unix/ztypes_linux_arm64.go | 66 +- .../x/sys/unix/ztypes_linux_mips.go | 66 +- .../x/sys/unix/ztypes_linux_mips64.go | 66 +- .../x/sys/unix/ztypes_linux_mips64le.go | 66 +- .../x/sys/unix/ztypes_linux_mipsle.go | 66 +- .../x/sys/unix/ztypes_linux_ppc64.go | 66 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 66 +- .../x/sys/unix/ztypes_linux_s390x.go | 66 +- .../x/sys/unix/ztypes_netbsd_386.go | 19 + .../x/sys/unix/ztypes_netbsd_amd64.go | 19 + .../x/sys/unix/ztypes_netbsd_arm.go | 19 + .../x/sys/unix/ztypes_openbsd_386.go | 19 + .../x/sys/unix/ztypes_openbsd_amd64.go | 19 + .../x/sys/unix/ztypes_openbsd_arm.go | 19 + vendor/golang.org/x/sys/windows/env_unset.go | 15 - .../golang.org/x/sys/windows/env_windows.go | 4 + .../x/sys/windows/security_windows.go | 41 + .../x/sys/windows/syscall_windows.go | 131 +- .../x/sys/windows/syscall_windows_test.go | 2 +- .../golang.org/x/sys/windows/types_windows.go | 57 +- .../x/sys/windows/zsyscall_windows.go | 259 + vendor/gopkg.in/yaml.v2/README.md | 2 + vendor/gopkg.in/yaml.v2/decode.go | 4 +- vendor/gopkg.in/yaml.v2/decode_test.go | 17 +- vendor/gopkg.in/yaml.v2/emitterc.go | 6 +- .../gopkg.in/yaml.v2/example_embedded_test.go | 18 +- vendor/gopkg.in/yaml.v2/yaml.go | 2 +- 327 files changed, 43002 insertions(+), 30657 deletions(-) create mode 100644 vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security_test.go rename vendor/github.com/garyburd/redigo/redis/{pre_go17.go => go16.go} (78%) create mode 100644 vendor/github.com/garyburd/redigo/redis/go18.go create mode 100644 vendor/github.com/garyburd/redigo/redis/pubsub_example_test.go create mode 100644 vendor/github.com/garyburd/redigo/redis/redis_test.go delete mode 100644 vendor/github.com/shurcooL/go/analysis/generated_detection.go delete mode 100644 vendor/github.com/shurcooL/go/analysis/generated_detection_test.go delete mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/generated_0.go.txt delete mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_0.go.txt delete mode 100644 vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_1.go.txt create mode 100644 vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go create mode 100644 vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go delete mode 100644 vendor/github.com/ugorji/go/codec/time.go delete mode 100644 vendor/github.com/ugorji/go/codec/x_bench_gen_test.go delete mode 100644 vendor/github.com/ugorji/go/codec/z_all_x_bench_gen_test.go create mode 100644 vendor/golang.org/x/crypto/argon2/argon2.go create mode 100644 vendor/golang.org/x/crypto/argon2/argon2_test.go create mode 100644 vendor/golang.org/x/crypto/argon2/blake2b.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_amd64.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_amd64.s create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_generic.go create mode 100644 vendor/golang.org/x/crypto/argon2/blamka_ref.go rename vendor/golang.org/x/crypto/{chacha20poly1305 => }/internal/chacha20/chacha_generic.go (100%) rename vendor/golang.org/x/crypto/{chacha20poly1305 => }/internal/chacha20/chacha_test.go (100%) create mode 100644 vendor/golang.org/x/crypto/ssh/test/banner_test.go create mode 100644 vendor/golang.org/x/net/http/httpproxy/export_test.go create mode 100644 vendor/golang.org/x/net/http/httpproxy/go19_test.go create mode 100644 vendor/golang.org/x/net/http/httpproxy/proxy.go create mode 100644 vendor/golang.org/x/net/http/httpproxy/proxy_test.go create mode 100644 vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go delete mode 100644 vendor/golang.org/x/sys/plan9/env_unset.go create mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unset.go delete mode 100644 vendor/golang.org/x/sys/unix/file_unix.go delete mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go create mode 100644 vendor/golang.org/x/sys/unix/timestruct_test.go delete mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go delete mode 100644 vendor/golang.org/x/sys/windows/env_unset.go diff --git a/Gopkg.lock b/Gopkg.lock index 10183c9..768d3ef 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -29,13 +29,13 @@ branch = "master" name = "github.com/danielheath/gin-teeny-security" packages = ["."] - revision = "0bc769386cc5a75bd79ccdcceaf0f977eeb6990e" + revision = "5f00fb6ac0933c2b378c907a3e2a43667afc4289" [[projects]] name = "github.com/garyburd/redigo" packages = ["internal","redis"] - revision = "34a326de1fea52965fa5ad664d3fc7163dd4b0a1" - version = "v1.2.0" + revision = "d1ed5c67e5794de818ea85e6b522fda02623a484" + version = "v1.4.0" [[projects]] branch = "master" @@ -65,7 +65,7 @@ branch = "master" name = "github.com/golang/protobuf" packages = ["proto"] - revision = "1643683e1b54a9e88ad26d98f81400c8c9d9f4f9" + revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845" [[projects]] name = "github.com/gorilla/context" @@ -107,7 +107,7 @@ branch = "master" name = "github.com/microcosm-cc/bluemonday" packages = ["."] - revision = "68fecaef60268522d2ac3f0123cec9d3bcab7b6e" + revision = "542fd4642604d0d0c26112396ce5b1a9d01eee0b" [[projects]] name = "github.com/russross/blackfriday" @@ -137,19 +137,19 @@ branch = "master" name = "github.com/sergi/go-diff" packages = ["diffmatchpatch"] - revision = "2fc9cd33b5f86077aa3e0f442fa0476a9fa9a1dc" + revision = "1744e2970ca51c86172c8190fadad617561ed6e7" [[projects]] branch = "master" name = "github.com/shurcooL/github_flavored_markdown" packages = ["."] - revision = "cccd3ce4f8e394ae9f87de0bd8b37e00625913d9" + revision = "28433ea3fc83827d77424782fefdcd94703366cc" [[projects]] branch = "master" name = "github.com/shurcooL/go" packages = ["parserutil","printerutil","reflectfind","reflectsource"] - revision = "c661e953e604ba4a84a3c4e458462a481bd6ce72" + revision = "004faa6b0118cf52635363b72b51cdcc297800a2" [[projects]] branch = "master" @@ -161,7 +161,7 @@ branch = "master" name = "github.com/shurcooL/graphql" packages = ["ident"] - revision = "cf6db17b893acfad0ca1929ba6be45bf854790ed" + revision = "d0549edd16dceb6939e538fdb1b4f2ec7ee816cc" [[projects]] branch = "master" @@ -179,7 +179,7 @@ branch = "master" name = "github.com/shurcooL/octiconssvg" packages = ["."] - revision = "8c9861b86a08c72d14e0285d0dc313bb6df52295" + revision = "38b02129bb6460858e11f90798a3832da1e502bd" [[projects]] branch = "master" @@ -200,28 +200,28 @@ revision = "bd320f5d308e1a3c4314c678d8227a0d72574ae7" [[projects]] - branch = "master" name = "github.com/ugorji/go" packages = ["codec"] - revision = "50189f05eaf5a0c17e5084eb8f7fb91e23699840" + revision = "9831f2c3ac1068a78f50999a30db84270f647af6" + version = "v1.1" [[projects]] branch = "master" name = "golang.org/x/crypto" packages = ["bcrypt","blowfish"] - revision = "bd6f299fb381e4c3393d1c4b1f0b94f5e77650c8" + revision = "39efaea5da11abd5e2b90a435b1f338cdb94619c" [[projects]] branch = "master" name = "golang.org/x/net" packages = ["html","html/atom"] - revision = "01c190206fbdffa42f334f4b2bf2220f50e64920" + revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec" [[projects]] branch = "master" name = "golang.org/x/sys" packages = ["unix"] - revision = "4fe5d7925040acd225bf9c7cee65e82d07f06bff" + revision = "af50095a40f9041b3b38960738837185c26e9419" [[projects]] name = "gopkg.in/go-playground/validator.v8" @@ -245,7 +245,7 @@ branch = "v2" name = "gopkg.in/yaml.v2" packages = ["."] - revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" + revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" [solve-meta] analyzer-name = "dep" diff --git a/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security.go b/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security.go index e645ed3..c73c772 100644 --- a/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security.go +++ b/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security.go @@ -1,9 +1,14 @@ // A GIN middleware providing low-fi security for personal stuff. + package gin_teeny_security import "github.com/gin-gonic/gin" import "github.com/gin-contrib/sessions" import "net/http" +import "net/url" +import "fmt" +import "io" +import "html/template" // Forces you to a login page until you provide a secret code. // No CSRF protection, so any script on any page can log you @@ -12,54 +17,135 @@ import "net/http" // net can inject stuff. If you're sending open CORS headers this // would be particularly bad. func RequiresSecretAccessCode(secretAccessCode, path string) gin.HandlerFunc { - return func(c *gin.Context) { - session := sessions.Default(c) - if c.Request.URL.Path == path { - if c.Request.Method == "POST" { - c.Request.ParseForm() + cfg := &Config{ + Path: path, + Secret: secretAccessCode, + } - if c.Request.PostForm.Get("secretAccessCode") == secretAccessCode { - c.Header("Location", "/") - session.Set("secretAccessCode", secretAccessCode) - session.Save() - c.AbortWithStatus(http.StatusFound) - return - } else { - session.Set("secretAccessCode", "") - session.Save() - c.Data(http.StatusForbidden, "text/html", []byte(` -

Login

-

Wrong password

-
- - -
- `)) - c.Abort() - return - } - } else if c.Request.Method == "GET" { - c.Data(http.StatusOK, "text/html", []byte(` -

Login

-
- - -
- `)) - c.Abort() + return cfg.Middleware +} + +type Config struct { + Path string // defaults to login + Secret string + RequireAuth func(*gin.Context) bool // defaults to always requiring auth if unset + Template *template.Template + SaveKeyToSession func(*gin.Context, string) + GetKeyFromSession func(*gin.Context) string +} + +func (c Config) saveKey(ctx *gin.Context, k string) { + if c.SaveKeyToSession == nil { + c.SaveKeyToSession = DefaultSetSession + } + c.SaveKeyToSession(ctx, k) +} + +func (c Config) getKey(ctx *gin.Context) string { + if c.GetKeyFromSession == nil { + c.GetKeyFromSession = DefaultGetSession + } + return c.GetKeyFromSession(ctx) +} + +func DefaultSetSession(c *gin.Context, secret string) { + session := sessions.Default(c) + session.Set("secretAccessCode", secret) + session.Save() +} + +func DefaultGetSession(c *gin.Context) string { + session := sessions.Default(c) + str, ok := session.Get("secretAccessCode").(string) + if !ok { + fmt.Println(session.Get("secretAccessCode")) + return "" + } + return str +} + +func (c Config) path() string { + if c.Path == "" { + return "/login/" + } + return c.Path +} + +func (c Config) requireAuth(ctx *gin.Context) bool { + if ctx.Request.Header.Get("Authorization") == c.Secret { + return false + } + return c.RequireAuth == nil || c.RequireAuth(ctx) +} + +func (c Config) template() *template.Template { + if c.Template == nil { + return DEFAULT_LOGIN_PAGE + } + return c.Template +} + +func (c Config) ExecTemplate(w io.Writer, message, returnUrl string) error { + return c.template().Execute(w, LoginPageParams{ + Message: message, + Path: c.path() + "?" + url.Values{"return": []string{returnUrl}}.Encode(), + }) +} + +type LoginPageParams struct { + Message string + Path string +} + +var DEFAULT_LOGIN_PAGE = template.Must(template.New("login").Parse(` +

Login

+{{ if .Message }}

{{ .Message }}

{{ end }} +
+ + +
+`)) + +func (cfg *Config) Middleware(c *gin.Context) { + if c.Request.URL.Path == cfg.path() { + returnTo := c.Request.URL.Query().Get("return") + if returnTo == "" { + returnTo = "/" + } + + if c.Request.Method == "POST" { + c.Request.ParseForm() + + fmt.Println(c.Request.PostForm.Get("secretAccessCode")) + if c.Request.PostForm.Get("secretAccessCode") == cfg.Secret { + + c.Header("Location", returnTo) + cfg.saveKey(c, cfg.Secret) + + c.AbortWithStatus(http.StatusFound) return } else { - c.Next() + cfg.saveKey(c, "") + c.Writer.WriteHeader(http.StatusForbidden) + cfg.ExecTemplate(c.Writer, "Wrong Password", returnTo) + c.Abort() return } - } - - v := session.Get("secretAccessCode") - if v != secretAccessCode { - c.Header("Location", path) - c.AbortWithStatus(http.StatusTemporaryRedirect) + } else if c.Request.Method == "GET" { + cfg.ExecTemplate(c.Writer, "", returnTo) + c.Abort() + return } else { c.Next() + return } } + + v := cfg.getKey(c) + if cfg.requireAuth(c) && (v != cfg.Secret) { + c.Header("Location", cfg.Path+"?"+url.Values{"return": []string{c.Request.URL.RequestURI()}}.Encode()) + c.AbortWithStatus(http.StatusTemporaryRedirect) + } else { + c.Next() + } } diff --git a/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security_test.go b/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security_test.go new file mode 100644 index 0000000..f16d121 --- /dev/null +++ b/vendor/github.com/danielheath/gin-teeny-security/gin-teeny-security_test.go @@ -0,0 +1,109 @@ +package gin_teeny_security + +import "net/http/cookiejar" +import "strings" +import "net/http/httptest" +import "net/http" +import "net/url" +import "log" +import "io" +import "io/ioutil" +import "testing" +import "github.com/gin-gonic/gin" +import "github.com/gin-contrib/sessions" + +func init() { + http.DefaultClient.Jar, _ = cookiejar.New(nil) +} + +func SampleGinApp() *gin.Engine { + router := gin.Default() + store := sessions.NewCookieStore([]byte("tis a secret")) + router.Use(sessions.Sessions("mysession", store)) + cfg := &Config{ + Path: "/enter-password/", + Secret: "garden", + RequireAuth: func(c *gin.Context) bool { + return !strings.HasPrefix(c.Request.URL.Path, "/public") + }, + } + router.Use(cfg.Middleware) + + router.GET("/private", func(c *gin.Context) { + c.Data(http.StatusOK, "application/html", []byte("private stuff")) + }) + + router.GET("/public", func(c *gin.Context) { + c.Data(http.StatusOK, "application/html", []byte("public stuff")) + }) + + return router +} + +func TestAuth(t *testing.T) { + ts := httptest.NewServer(SampleGinApp()) + + // Check public stuff can be accessed + res, err := http.Get(ts.URL + "/public/") + die(err) + mustBe("public stuff", readString(res.Body)) + + // Check private stuff can't be accessed + res, err = http.Get(ts.URL + "/private/") + die(err) + + // Check entering the password as an HTTP header instead of a cookie works + r, err := http.NewRequest("GET", ts.URL+"/private/", nil) + die(err) + r.Header.Set("Authorization", "garden") + res, err = http.DefaultClient.Do(r) + die(err) + mustBe("private stuff", readString(res.Body)) + + // Check entering the wrong password as an HTTP header instead of a cookie works + r, err = http.NewRequest("GET", ts.URL+"/private/", nil) + die(err) + r.Header.Set("Authorization", "wrong") + res, err = http.DefaultClient.Do(r) + die(err) + mustStartWith("

Login

\n\n
Login\n\nLogin\n

Wrong Password

", readString(res.Body)) + + // Check entering a good password lets you access things + res, err = http.PostForm(ts.URL+"/enter-password/?return=/private/", url.Values{"secretAccessCode": []string{"garden"}}) + die(err) + mustBe("private stuff", readString(res.Body)) +} + +func mustStartWith(expected, actual string) { + if !strings.HasPrefix(strings.TrimSpace(actual), expected) { + log.Panicf("Should have gotten content starting with '%s' but got '%s'", expected, actual) + } +} + +func mustBe(expected, actual string) { + if actual != expected { + log.Panicf("Should have gotten '%s' but got '%s'", expected, actual) + } +} + +func readString(r io.ReadCloser) string { + b, e := ioutil.ReadAll(r) + defer r.Close() + die(e) + return string(b) +} + +func die(e error) { + if e != nil { + log.Fatal(e) + } +} diff --git a/vendor/github.com/garyburd/redigo/README.markdown b/vendor/github.com/garyburd/redigo/README.markdown index fb0d35c..b3d5460 100644 --- a/vendor/github.com/garyburd/redigo/README.markdown +++ b/vendor/github.com/garyburd/redigo/README.markdown @@ -21,6 +21,7 @@ Documentation - [API Reference](http://godoc.org/github.com/garyburd/redigo/redis) - [FAQ](https://github.com/garyburd/redigo/wiki/FAQ) +- [Examples](https://godoc.org/github.com/garyburd/redigo/redis#pkg-examples) Installation ------------ diff --git a/vendor/github.com/garyburd/redigo/redis/conn.go b/vendor/github.com/garyburd/redigo/redis/conn.go index 82b6751..5aa0f32 100644 --- a/vendor/github.com/garyburd/redigo/redis/conn.go +++ b/vendor/github.com/garyburd/redigo/redis/conn.go @@ -29,9 +29,12 @@ import ( "time" ) +var ( + _ ConnWithTimeout = (*conn)(nil) +) + // conn is the low-level implementation of Conn type conn struct { - // Shared mu sync.Mutex pending int @@ -73,6 +76,7 @@ type DialOption struct { type dialOptions struct { readTimeout time.Duration writeTimeout time.Duration + dialer *net.Dialer dial func(network, addr string) (net.Conn, error) db int password string @@ -95,17 +99,27 @@ func DialWriteTimeout(d time.Duration) DialOption { }} } -// DialConnectTimeout specifies the timeout for connecting to the Redis server. +// DialConnectTimeout specifies the timeout for connecting to the Redis server when +// no DialNetDial option is specified. func DialConnectTimeout(d time.Duration) DialOption { return DialOption{func(do *dialOptions) { - dialer := net.Dialer{Timeout: d} - do.dial = dialer.Dial + do.dialer.Timeout = d + }} +} + +// DialKeepAlive specifies the keep-alive period for TCP connections to the Redis server +// when no DialNetDial option is specified. +// If zero, keep-alives are not enabled. If no DialKeepAlive option is specified then +// the default of 5 minutes is used to ensure that half-closed TCP sessions are detected. +func DialKeepAlive(d time.Duration) DialOption { + return DialOption{func(do *dialOptions) { + do.dialer.KeepAlive = d }} } // DialNetDial specifies a custom dial function for creating TCP -// connections. If this option is left out, then net.Dial is -// used. DialNetDial overrides DialConnectTimeout. +// connections, otherwise a net.Dialer customized via the other options is used. +// DialNetDial overrides DialConnectTimeout and DialKeepAlive. func DialNetDial(dial func(network, addr string) (net.Conn, error)) DialOption { return DialOption{func(do *dialOptions) { do.dial = dial @@ -155,11 +169,16 @@ func DialUseTLS(useTLS bool) DialOption { // address using the specified options. func Dial(network, address string, options ...DialOption) (Conn, error) { do := dialOptions{ - dial: net.Dial, + dialer: &net.Dialer{ + KeepAlive: time.Minute * 5, + }, } for _, option := range options { option.f(&do) } + if do.dial == nil { + do.dial = do.dialer.Dial + } netConn, err := do.dial(network, address) if err != nil { @@ -167,7 +186,12 @@ func Dial(network, address string, options ...DialOption) (Conn, error) { } if do.useTLS { - tlsConfig := cloneTLSClientConfig(do.tlsConfig, do.skipVerify) + var tlsConfig *tls.Config + if do.tlsConfig == nil { + tlsConfig = &tls.Config{InsecureSkipVerify: do.skipVerify} + } else { + tlsConfig = cloneTLSConfig(do.tlsConfig) + } if tlsConfig.ServerName == "" { host, _, err := net.SplitHostPort(address) if err != nil { @@ -556,10 +580,17 @@ func (c *conn) Flush() error { return nil } -func (c *conn) Receive() (reply interface{}, err error) { - if c.readTimeout != 0 { - c.conn.SetReadDeadline(time.Now().Add(c.readTimeout)) +func (c *conn) Receive() (interface{}, error) { + return c.ReceiveWithTimeout(c.readTimeout) +} + +func (c *conn) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) { + var deadline time.Time + if timeout != 0 { + deadline = time.Now().Add(timeout) } + c.conn.SetReadDeadline(deadline) + if reply, err = c.readReply(); err != nil { return nil, c.fatal(err) } @@ -582,6 +613,10 @@ func (c *conn) Receive() (reply interface{}, err error) { } func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error) { + return c.DoWithTimeout(c.readTimeout, cmd, args...) +} + +func (c *conn) DoWithTimeout(readTimeout time.Duration, cmd string, args ...interface{}) (interface{}, error) { c.mu.Lock() pending := c.pending c.pending = 0 @@ -605,9 +640,11 @@ func (c *conn) Do(cmd string, args ...interface{}) (interface{}, error) { return nil, c.fatal(err) } - if c.readTimeout != 0 { - c.conn.SetReadDeadline(time.Now().Add(c.readTimeout)) + var deadline time.Time + if readTimeout != 0 { + deadline = time.Now().Add(readTimeout) } + c.conn.SetReadDeadline(deadline) if cmd == "" { reply := make([]interface{}, pending) diff --git a/vendor/github.com/garyburd/redigo/redis/conn_test.go b/vendor/github.com/garyburd/redigo/redis/conn_test.go index a0e9636..12fe526 100644 --- a/vendor/github.com/garyburd/redigo/redis/conn_test.go +++ b/vendor/github.com/garyburd/redigo/redis/conn_test.go @@ -34,14 +34,16 @@ import ( type testConn struct { io.Reader io.Writer + readDeadline time.Time + writeDeadline time.Time } -func (*testConn) Close() error { return nil } -func (*testConn) LocalAddr() net.Addr { return nil } -func (*testConn) RemoteAddr() net.Addr { return nil } -func (*testConn) SetDeadline(t time.Time) error { return nil } -func (*testConn) SetReadDeadline(t time.Time) error { return nil } -func (*testConn) SetWriteDeadline(t time.Time) error { return nil } +func (*testConn) Close() error { return nil } +func (*testConn) LocalAddr() net.Addr { return nil } +func (*testConn) RemoteAddr() net.Addr { return nil } +func (c *testConn) SetDeadline(t time.Time) error { c.readDeadline = t; c.writeDeadline = t; return nil } +func (c *testConn) SetReadDeadline(t time.Time) error { c.readDeadline = t; return nil } +func (c *testConn) SetWriteDeadline(t time.Time) error { c.writeDeadline = t; return nil } func dialTestConn(r string, w io.Writer) redis.DialOption { return redis.DialNetDial(func(network, addr string) (net.Conn, error) { @@ -764,7 +766,6 @@ func BenchmarkDoPing(b *testing.B) { var clientTLSConfig, serverTLSConfig tls.Config func init() { - // The certificate and key for testing TLS dial options was created // using the command // @@ -822,3 +823,45 @@ Bjqn3yoLHaoZVvbWOi0C2TCN4FjXjaLNZGifQPbIcaA= clientTLSConfig.RootCAs = x509.NewCertPool() clientTLSConfig.RootCAs.AddCert(certificate) } + +func TestWithTimeout(t *testing.T) { + for _, recv := range []bool{true, false} { + for _, defaultTimout := range []time.Duration{0, time.Minute} { + var buf bytes.Buffer + nc := &testConn{Reader: strings.NewReader("+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n+OK\r\n"), Writer: &buf} + c, _ := redis.Dial("", "", redis.DialReadTimeout(defaultTimout), redis.DialNetDial(func(network, addr string) (net.Conn, error) { return nc, nil })) + for i := 0; i < 4; i++ { + var minDeadline, maxDeadline time.Time + + // Alternate between default and specified timeout. + if i%2 == 0 { + if defaultTimout != 0 { + minDeadline = time.Now().Add(defaultTimout) + } + if recv { + c.Receive() + } else { + c.Do("PING") + } + if defaultTimout != 0 { + maxDeadline = time.Now().Add(defaultTimout) + } + } else { + timeout := 10 * time.Minute + minDeadline = time.Now().Add(timeout) + if recv { + redis.ReceiveWithTimeout(c, timeout) + } else { + redis.DoWithTimeout(c, timeout, "PING") + } + maxDeadline = time.Now().Add(timeout) + } + + // Expect set deadline in expected range. + if nc.readDeadline.Before(minDeadline) || nc.readDeadline.After(maxDeadline) { + t.Errorf("recv %v, %d: do deadline error: %v, %v, %v", recv, i, minDeadline, nc.readDeadline, maxDeadline) + } + } + } + } +} diff --git a/vendor/github.com/garyburd/redigo/redis/pre_go17.go b/vendor/github.com/garyburd/redigo/redis/go16.go similarity index 78% rename from vendor/github.com/garyburd/redigo/redis/pre_go17.go rename to vendor/github.com/garyburd/redigo/redis/go16.go index 0212f60..f6b1a7c 100644 --- a/vendor/github.com/garyburd/redigo/redis/pre_go17.go +++ b/vendor/github.com/garyburd/redigo/redis/go16.go @@ -4,11 +4,7 @@ package redis import "crypto/tls" -// similar cloneTLSClientConfig in the stdlib, but also honor skipVerify for the nil case -func cloneTLSClientConfig(cfg *tls.Config, skipVerify bool) *tls.Config { - if cfg == nil { - return &tls.Config{InsecureSkipVerify: skipVerify} - } +func cloneTLSConfig(cfg *tls.Config) *tls.Config { return &tls.Config{ Rand: cfg.Rand, Time: cfg.Time, diff --git a/vendor/github.com/garyburd/redigo/redis/go17.go b/vendor/github.com/garyburd/redigo/redis/go17.go index 3f951e5..5f36379 100644 --- a/vendor/github.com/garyburd/redigo/redis/go17.go +++ b/vendor/github.com/garyburd/redigo/redis/go17.go @@ -1,14 +1,10 @@ -// +build go1.7 +// +build go1.7,!go1.8 package redis import "crypto/tls" -// similar cloneTLSClientConfig in the stdlib, but also honor skipVerify for the nil case -func cloneTLSClientConfig(cfg *tls.Config, skipVerify bool) *tls.Config { - if cfg == nil { - return &tls.Config{InsecureSkipVerify: skipVerify} - } +func cloneTLSConfig(cfg *tls.Config) *tls.Config { return &tls.Config{ Rand: cfg.Rand, Time: cfg.Time, diff --git a/vendor/github.com/garyburd/redigo/redis/go18.go b/vendor/github.com/garyburd/redigo/redis/go18.go new file mode 100644 index 0000000..558363b --- /dev/null +++ b/vendor/github.com/garyburd/redigo/redis/go18.go @@ -0,0 +1,9 @@ +// +build go1.8 + +package redis + +import "crypto/tls" + +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + return cfg.Clone() +} diff --git a/vendor/github.com/garyburd/redigo/redis/log.go b/vendor/github.com/garyburd/redigo/redis/log.go index 129b86d..b299661 100644 --- a/vendor/github.com/garyburd/redigo/redis/log.go +++ b/vendor/github.com/garyburd/redigo/redis/log.go @@ -18,6 +18,11 @@ import ( "bytes" "fmt" "log" + "time" +) + +var ( + _ ConnWithTimeout = (*loggingConn)(nil) ) // NewLoggingConn returns a logging wrapper around a connection. @@ -104,6 +109,12 @@ func (c *loggingConn) Do(commandName string, args ...interface{}) (interface{}, return reply, err } +func (c *loggingConn) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (interface{}, error) { + reply, err := DoWithTimeout(c.Conn, timeout, commandName, args...) + c.print("DoWithTimeout", commandName, args, reply, err) + return reply, err +} + func (c *loggingConn) Send(commandName string, args ...interface{}) error { err := c.Conn.Send(commandName, args...) c.print("Send", commandName, args, nil, err) @@ -115,3 +126,9 @@ func (c *loggingConn) Receive() (interface{}, error) { c.print("Receive", "", nil, reply, err) return reply, err } + +func (c *loggingConn) ReceiveWithTimeout(timeout time.Duration) (interface{}, error) { + reply, err := ReceiveWithTimeout(c.Conn, timeout) + c.print("ReceiveWithTimeout", "", nil, reply, err) + return reply, err +} diff --git a/vendor/github.com/garyburd/redigo/redis/pool.go b/vendor/github.com/garyburd/redigo/redis/pool.go index aad088c..5af97a0 100644 --- a/vendor/github.com/garyburd/redigo/redis/pool.go +++ b/vendor/github.com/garyburd/redigo/redis/pool.go @@ -28,6 +28,11 @@ import ( "github.com/garyburd/redigo/internal" ) +var ( + _ ConnWithTimeout = (*pooledConnection)(nil) + _ ConnWithTimeout = (*errorConnection)(nil) +) + var nowFunc = time.Now // for testing // ErrPoolExhausted is returned from a pool connection method (Do, Send, @@ -96,7 +101,7 @@ var ( // return nil, err // } // return c, nil -// } +// }, // } // // Use the TestOnBorrow function to check the health of an idle connection @@ -115,7 +120,6 @@ var ( // } // type Pool struct { - // Dial is an application supplied function for creating and configuring a // connection. // @@ -269,7 +273,6 @@ func (p *Pool) get() (Conn, error) { } for { - // Get idle connection. for i, n := 0, p.idle.Len(); i < n; i++ { @@ -420,6 +423,16 @@ func (pc *pooledConnection) Do(commandName string, args ...interface{}) (reply i return pc.c.Do(commandName, args...) } +func (pc *pooledConnection) DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) { + cwt, ok := pc.c.(ConnWithTimeout) + if !ok { + return nil, errTimeoutNotSupported + } + ci := internal.LookupCommandInfo(commandName) + pc.state = (pc.state | ci.Set) &^ ci.Clear + return cwt.DoWithTimeout(timeout, commandName, args...) +} + func (pc *pooledConnection) Send(commandName string, args ...interface{}) error { ci := internal.LookupCommandInfo(commandName) pc.state = (pc.state | ci.Set) &^ ci.Clear @@ -434,11 +447,23 @@ func (pc *pooledConnection) Receive() (reply interface{}, err error) { return pc.c.Receive() } +func (pc *pooledConnection) ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) { + cwt, ok := pc.c.(ConnWithTimeout) + if !ok { + return nil, errTimeoutNotSupported + } + return cwt.ReceiveWithTimeout(timeout) +} + type errorConnection struct{ err error } func (ec errorConnection) Do(string, ...interface{}) (interface{}, error) { return nil, ec.err } -func (ec errorConnection) Send(string, ...interface{}) error { return ec.err } -func (ec errorConnection) Err() error { return ec.err } -func (ec errorConnection) Close() error { return ec.err } -func (ec errorConnection) Flush() error { return ec.err } -func (ec errorConnection) Receive() (interface{}, error) { return nil, ec.err } +func (ec errorConnection) DoWithTimeout(time.Duration, string, ...interface{}) (interface{}, error) { + return nil, ec.err +} +func (ec errorConnection) Send(string, ...interface{}) error { return ec.err } +func (ec errorConnection) Err() error { return ec.err } +func (ec errorConnection) Close() error { return nil } +func (ec errorConnection) Flush() error { return ec.err } +func (ec errorConnection) Receive() (interface{}, error) { return nil, ec.err } +func (ec errorConnection) ReceiveWithTimeout(time.Duration) (interface{}, error) { return nil, ec.err } diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub.go b/vendor/github.com/garyburd/redigo/redis/pubsub.go index 5019e7b..f0ac825 100644 --- a/vendor/github.com/garyburd/redigo/redis/pubsub.go +++ b/vendor/github.com/garyburd/redigo/redis/pubsub.go @@ -14,11 +14,13 @@ package redis -import "errors" +import ( + "errors" + "time" +) // Subscription represents a subscribe or unsubscribe notification. type Subscription struct { - // Kind is "subscribe", "unsubscribe", "psubscribe" or "punsubscribe" Kind string @@ -31,7 +33,6 @@ type Subscription struct { // Message represents a message notification. type Message struct { - // The originating channel. Channel string @@ -41,7 +42,6 @@ type Message struct { // PMessage represents a pmessage notification. type PMessage struct { - // The matched pattern. Pattern string @@ -106,7 +106,17 @@ func (c PubSubConn) Ping(data string) error { // or error. The return value is intended to be used directly in a type switch // as illustrated in the PubSubConn example. func (c PubSubConn) Receive() interface{} { - reply, err := Values(c.Conn.Receive()) + return c.receiveInternal(c.Conn.Receive()) +} + +// ReceiveWithTimeout is like Receive, but it allows the application to +// override the connection's default timeout. +func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} { + return c.receiveInternal(ReceiveWithTimeout(c.Conn, timeout)) +} + +func (c PubSubConn) receiveInternal(replyArg interface{}, errArg error) interface{} { + reply, err := Values(replyArg, errArg) if err != nil { return err } diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub_example_test.go b/vendor/github.com/garyburd/redigo/redis/pubsub_example_test.go new file mode 100644 index 0000000..61e2f74 --- /dev/null +++ b/vendor/github.com/garyburd/redigo/redis/pubsub_example_test.go @@ -0,0 +1,165 @@ +// Copyright 2012 Gary Burd +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +// +build go1.7 + +package redis_test + +import ( + "context" + "fmt" + "time" + + "github.com/garyburd/redigo/redis" +) + +// listenPubSubChannels listens for messages on Redis pubsub channels. The +// onStart function is called after the channels are subscribed. The onMessage +// function is called for each message. +func listenPubSubChannels(ctx context.Context, redisServerAddr string, + onStart func() error, + onMessage func(channel string, data []byte) error, + channels ...string) error { + // A ping is set to the server with this period to test for the health of + // the connection and server. + const healthCheckPeriod = time.Minute + + c, err := redis.Dial("tcp", redisServerAddr, + // Read timeout on server should be greater than ping period. + redis.DialReadTimeout(healthCheckPeriod+10*time.Second), + redis.DialWriteTimeout(10*time.Second)) + if err != nil { + return err + } + defer c.Close() + + psc := redis.PubSubConn{Conn: c} + + if err := psc.Subscribe(redis.Args{}.AddFlat(channels)...); err != nil { + return err + } + + done := make(chan error, 1) + + // Start a goroutine to receive notifications from the server. + go func() { + for { + switch n := psc.Receive().(type) { + case error: + done <- n + return + case redis.Message: + if err := onMessage(n.Channel, n.Data); err != nil { + done <- err + return + } + case redis.Subscription: + switch n.Count { + case len(channels): + // Notify application when all channels are subscribed. + if err := onStart(); err != nil { + done <- err + return + } + case 0: + // Return from the goroutine when all channels are unsubscribed. + done <- nil + return + } + } + } + }() + + ticker := time.NewTicker(healthCheckPeriod) + defer ticker.Stop() +loop: + for err == nil { + select { + case <-ticker.C: + // Send ping to test health of connection and server. If + // corresponding pong is not received, then receive on the + // connection will timeout and the receive goroutine will exit. + if err = psc.Ping(""); err != nil { + break loop + } + case <-ctx.Done(): + break loop + case err := <-done: + // Return error from the receive goroutine. + return err + } + } + + // Signal the receiving goroutine to exit by unsubscribing from all channels. + psc.Unsubscribe() + + // Wait for goroutine to complete. + return <-done +} + +func publish() { + c, err := dial() + if err != nil { + fmt.Println(err) + return + } + defer c.Close() + + c.Do("PUBLISH", "c1", "hello") + c.Do("PUBLISH", "c2", "world") + c.Do("PUBLISH", "c1", "goodbye") +} + +// This example shows how receive pubsub notifications with cancelation and +// health checks. +func ExamplePubSubConn() { + redisServerAddr, err := serverAddr() + if err != nil { + fmt.Println(err) + return + } + + ctx, cancel := context.WithCancel(context.Background()) + + err = listenPubSubChannels(ctx, + redisServerAddr, + func() error { + // The start callback is a good place to backfill missed + // notifications. For the purpose of this example, a goroutine is + // started to send notifications. + go publish() + return nil + }, + func(channel string, message []byte) error { + fmt.Printf("channel: %s, message: %s\n", channel, message) + + // For the purpose of this example, cancel the listener's context + // after receiving last message sent by publish(). + if string(message) == "goodbye" { + cancel() + } + return nil + }, + "c1", "c2") + + if err != nil { + fmt.Println(err) + return + } + + // Output: + // channel: c1, message: hello + // channel: c2, message: world + // channel: c1, message: goodbye +} diff --git a/vendor/github.com/garyburd/redigo/redis/pubsub_test.go b/vendor/github.com/garyburd/redigo/redis/pubsub_test.go index b955131..6ccdbee 100644 --- a/vendor/github.com/garyburd/redigo/redis/pubsub_test.go +++ b/vendor/github.com/garyburd/redigo/redis/pubsub_test.go @@ -15,93 +15,13 @@ package redis_test import ( - "fmt" "reflect" - "sync" "testing" + "time" "github.com/garyburd/redigo/redis" ) -func publish(channel, value interface{}) { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - c.Do("PUBLISH", channel, value) -} - -// Applications can receive pushed messages from one goroutine and manage subscriptions from another goroutine. -func ExamplePubSubConn() { - c, err := dial() - if err != nil { - fmt.Println(err) - return - } - defer c.Close() - var wg sync.WaitGroup - wg.Add(2) - - psc := redis.PubSubConn{Conn: c} - - // This goroutine receives and prints pushed notifications from the server. - // The goroutine exits when the connection is unsubscribed from all - // channels or there is an error. - go func() { - defer wg.Done() - for { - switch n := psc.Receive().(type) { - case redis.Message: - fmt.Printf("Message: %s %s\n", n.Channel, n.Data) - case redis.PMessage: - fmt.Printf("PMessage: %s %s %s\n", n.Pattern, n.Channel, n.Data) - case redis.Subscription: - fmt.Printf("Subscription: %s %s %d\n", n.Kind, n.Channel, n.Count) - if n.Count == 0 { - return - } - case error: - fmt.Printf("error: %v\n", n) - return - } - } - }() - - // This goroutine manages subscriptions for the connection. - go func() { - defer wg.Done() - - psc.Subscribe("example") - psc.PSubscribe("p*") - - // The following function calls publish a message using another - // connection to the Redis server. - publish("example", "hello") - publish("example", "world") - publish("pexample", "foo") - publish("pexample", "bar") - - // Unsubscribe from all connections. This will cause the receiving - // goroutine to exit. - psc.Unsubscribe() - psc.PUnsubscribe() - }() - - wg.Wait() - - // Output: - // Subscription: subscribe example 1 - // Subscription: psubscribe p* 2 - // Message: example hello - // Message: example world - // PMessage: p* pexample foo - // PMessage: p* pexample bar - // Subscription: unsubscribe example 1 - // Subscription: punsubscribe p* 0 -} - func expectPushed(t *testing.T, c redis.PubSubConn, message string, expected interface{}) { actual := c.Receive() if !reflect.DeepEqual(actual, expected) { @@ -145,4 +65,10 @@ func TestPushed(t *testing.T) { c.Conn.Send("PING") c.Conn.Flush() expectPushed(t, c, `Send("PING")`, redis.Pong{}) + + c.Ping("timeout") + got := c.ReceiveWithTimeout(time.Minute) + if want := (redis.Pong{Data: "timeout"}); want != got { + t.Errorf("recv /w timeout got %v, want %v", got, want) + } } diff --git a/vendor/github.com/garyburd/redigo/redis/redis.go b/vendor/github.com/garyburd/redigo/redis/redis.go index 6bd9824..141fa4a 100644 --- a/vendor/github.com/garyburd/redigo/redis/redis.go +++ b/vendor/github.com/garyburd/redigo/redis/redis.go @@ -14,6 +14,11 @@ package redis +import ( + "errors" + "time" +) + // Error represents an error returned in a command reply. type Error string @@ -59,3 +64,54 @@ type Scanner interface { // loss of information. RedisScan(src interface{}) error } + +// ConnWithTimeout is an optional interface that allows the caller to override +// a connection's default read timeout. This interface is useful for executing +// the BLPOP, BRPOP, BRPOPLPUSH, XREAD and other commands that block at the +// server. +// +// A connection's default read timeout is set with the DialReadTimeout dial +// option. Applications should rely on the default timeout for commands that do +// not block at the server. +// +// All of the Conn implementations in this package satisfy the ConnWithTimeout +// interface. +// +// Use the DoWithTimeout and ReceiveWithTimeout helper functions to simplify +// use of this interface. +type ConnWithTimeout interface { + Conn + + // Do sends a command to the server and returns the received reply. + // The timeout overrides the read timeout set when dialing the + // connection. + DoWithTimeout(timeout time.Duration, commandName string, args ...interface{}) (reply interface{}, err error) + + // Receive receives a single reply from the Redis server. The timeout + // overrides the read timeout set when dialing the connection. + ReceiveWithTimeout(timeout time.Duration) (reply interface{}, err error) +} + +var errTimeoutNotSupported = errors.New("redis: connection does not support ConnWithTimeout") + +// DoWithTimeout executes a Redis command with the specified read timeout. If +// the connection does not satisfy the ConnWithTimeout interface, then an error +// is returned. +func DoWithTimeout(c Conn, timeout time.Duration, cmd string, args ...interface{}) (interface{}, error) { + cwt, ok := c.(ConnWithTimeout) + if !ok { + return nil, errTimeoutNotSupported + } + return cwt.DoWithTimeout(timeout, cmd, args...) +} + +// ReceiveWithTimeout receives a reply with the specified read timeout. If the +// connection does not satisfy the ConnWithTimeout interface, then an error is +// returned. +func ReceiveWithTimeout(c Conn, timeout time.Duration) (interface{}, error) { + cwt, ok := c.(ConnWithTimeout) + if !ok { + return nil, errTimeoutNotSupported + } + return cwt.ReceiveWithTimeout(timeout) +} diff --git a/vendor/github.com/garyburd/redigo/redis/redis_test.go b/vendor/github.com/garyburd/redigo/redis/redis_test.go new file mode 100644 index 0000000..494b88d --- /dev/null +++ b/vendor/github.com/garyburd/redigo/redis/redis_test.go @@ -0,0 +1,71 @@ +// Copyright 2017 Gary Burd +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +package redis_test + +import ( + "testing" + "time" + + "github.com/garyburd/redigo/redis" +) + +type timeoutTestConn int + +func (tc timeoutTestConn) Do(string, ...interface{}) (interface{}, error) { + return time.Duration(-1), nil +} +func (tc timeoutTestConn) DoWithTimeout(timeout time.Duration, cmd string, args ...interface{}) (interface{}, error) { + return timeout, nil +} + +func (tc timeoutTestConn) Receive() (interface{}, error) { + return time.Duration(-1), nil +} +func (tc timeoutTestConn) ReceiveWithTimeout(timeout time.Duration) (interface{}, error) { + return timeout, nil +} + +func (tc timeoutTestConn) Send(string, ...interface{}) error { return nil } +func (tc timeoutTestConn) Err() error { return nil } +func (tc timeoutTestConn) Close() error { return nil } +func (tc timeoutTestConn) Flush() error { return nil } + +func testTimeout(t *testing.T, c redis.Conn) { + r, err := c.Do("PING") + if r != time.Duration(-1) || err != nil { + t.Errorf("Do() = %v, %v, want %v, %v", r, err, time.Duration(-1), nil) + } + r, err = redis.DoWithTimeout(c, time.Minute, "PING") + if r != time.Minute || err != nil { + t.Errorf("DoWithTimeout() = %v, %v, want %v, %v", r, err, time.Minute, nil) + } + r, err = c.Receive() + if r != time.Duration(-1) || err != nil { + t.Errorf("Receive() = %v, %v, want %v, %v", r, err, time.Duration(-1), nil) + } + r, err = redis.ReceiveWithTimeout(c, time.Minute) + if r != time.Minute || err != nil { + t.Errorf("ReceiveWithTimeout() = %v, %v, want %v, %v", r, err, time.Minute, nil) + } +} + +func TestConnTimeout(t *testing.T) { + testTimeout(t, timeoutTestConn(0)) +} + +func TestPoolConnTimeout(t *testing.T) { + p := &redis.Pool{Dial: func() (redis.Conn, error) { return timeoutTestConn(0), nil }} + testTimeout(t, p.Get()) +} diff --git a/vendor/github.com/garyburd/redigo/redis/reply.go b/vendor/github.com/garyburd/redigo/redis/reply.go index a4dd7c8..c2b3b2b 100644 --- a/vendor/github.com/garyburd/redigo/redis/reply.go +++ b/vendor/github.com/garyburd/redigo/redis/reply.go @@ -243,34 +243,67 @@ func Values(reply interface{}, err error) ([]interface{}, error) { return nil, fmt.Errorf("redigo: unexpected type for Values, got type %T", reply) } +func sliceHelper(reply interface{}, err error, name string, makeSlice func(int), assign func(int, interface{}) error) error { + if err != nil { + return err + } + switch reply := reply.(type) { + case []interface{}: + makeSlice(len(reply)) + for i := range reply { + if reply[i] == nil { + continue + } + if err := assign(i, reply[i]); err != nil { + return err + } + } + return nil + case nil: + return ErrNil + case Error: + return reply + } + return fmt.Errorf("redigo: unexpected type for %s, got type %T", name, reply) +} + +// Float64s is a helper that converts an array command reply to a []float64. If +// err is not equal to nil, then Float64s returns nil, err. Nil array items are +// converted to 0 in the output slice. Floats64 returns an error if an array +// item is not a bulk string or nil. +func Float64s(reply interface{}, err error) ([]float64, error) { + var result []float64 + err = sliceHelper(reply, err, "Float64s", func(n int) { result = make([]float64, n) }, func(i int, v interface{}) error { + p, ok := v.([]byte) + if !ok { + return fmt.Errorf("redigo: unexpected element type for Floats64, got type %T", v) + } + f, err := strconv.ParseFloat(string(p), 64) + result[i] = f + return err + }) + return result, err +} + // Strings is a helper that converts an array command reply to a []string. If // err is not equal to nil, then Strings returns nil, err. Nil array items are // converted to "" in the output slice. Strings returns an error if an array // item is not a bulk string or nil. func Strings(reply interface{}, err error) ([]string, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []interface{}: - result := make([]string, len(reply)) - for i := range reply { - if reply[i] == nil { - continue - } - p, ok := reply[i].([]byte) - if !ok { - return nil, fmt.Errorf("redigo: unexpected element type for Strings, got type %T", reply[i]) - } - result[i] = string(p) + var result []string + err = sliceHelper(reply, err, "Strings", func(n int) { result = make([]string, n) }, func(i int, v interface{}) error { + switch v := v.(type) { + case string: + result[i] = v + return nil + case []byte: + result[i] = string(v) + return nil + default: + return fmt.Errorf("redigo: unexpected element type for Strings, got type %T", v) } - return result, nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for Strings, got type %T", reply) + }) + return result, err } // ByteSlices is a helper that converts an array command reply to a [][]byte. @@ -278,43 +311,64 @@ func Strings(reply interface{}, err error) ([]string, error) { // items are stay nil. ByteSlices returns an error if an array item is not a // bulk string or nil. func ByteSlices(reply interface{}, err error) ([][]byte, error) { - if err != nil { - return nil, err - } - switch reply := reply.(type) { - case []interface{}: - result := make([][]byte, len(reply)) - for i := range reply { - if reply[i] == nil { - continue - } - p, ok := reply[i].([]byte) - if !ok { - return nil, fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", reply[i]) - } - result[i] = p + var result [][]byte + err = sliceHelper(reply, err, "ByteSlices", func(n int) { result = make([][]byte, n) }, func(i int, v interface{}) error { + p, ok := v.([]byte) + if !ok { + return fmt.Errorf("redigo: unexpected element type for ByteSlices, got type %T", v) } - return result, nil - case nil: - return nil, ErrNil - case Error: - return nil, reply - } - return nil, fmt.Errorf("redigo: unexpected type for ByteSlices, got type %T", reply) + result[i] = p + return nil + }) + return result, err } -// Ints is a helper that converts an array command reply to a []int. If -// err is not equal to nil, then Ints returns nil, err. +// Int64s is a helper that converts an array command reply to a []int64. +// If err is not equal to nil, then Int64s returns nil, err. Nil array +// items are stay nil. Int64s returns an error if an array item is not a +// bulk string or nil. +func Int64s(reply interface{}, err error) ([]int64, error) { + var result []int64 + err = sliceHelper(reply, err, "Int64s", func(n int) { result = make([]int64, n) }, func(i int, v interface{}) error { + switch v := v.(type) { + case int64: + result[i] = v + return nil + case []byte: + n, err := strconv.ParseInt(string(v), 10, 64) + result[i] = n + return err + default: + return fmt.Errorf("redigo: unexpected element type for Int64s, got type %T", v) + } + }) + return result, err +} + +// Ints is a helper that converts an array command reply to a []in. +// If err is not equal to nil, then Ints returns nil, err. Nil array +// items are stay nil. Ints returns an error if an array item is not a +// bulk string or nil. func Ints(reply interface{}, err error) ([]int, error) { - var ints []int - values, err := Values(reply, err) - if err != nil { - return ints, err - } - if err := ScanSlice(values, &ints); err != nil { - return ints, err - } - return ints, nil + var result []int + err = sliceHelper(reply, err, "Ints", func(n int) { result = make([]int, n) }, func(i int, v interface{}) error { + switch v := v.(type) { + case int64: + n := int(v) + if int64(n) != v { + return strconv.ErrRange + } + result[i] = n + return nil + case []byte: + n, err := strconv.Atoi(string(v)) + result[i] = n + return err + default: + return fmt.Errorf("redigo: unexpected element type for Ints, got type %T", v) + } + }) + return result, err } // StringMap is a helper that converts an array of strings (alternating key, value) diff --git a/vendor/github.com/garyburd/redigo/redis/reply_test.go b/vendor/github.com/garyburd/redigo/redis/reply_test.go index 81a25a9..1388454 100644 --- a/vendor/github.com/garyburd/redigo/redis/reply_test.go +++ b/vendor/github.com/garyburd/redigo/redis/reply_test.go @@ -37,24 +37,44 @@ var replyTests = []struct { expected valueError }{ { - "ints([v1, v2])", + "ints([[]byte, []byte])", ve(redis.Ints([]interface{}{[]byte("4"), []byte("5")}, nil)), ve([]int{4, 5}, nil), }, + { + "ints([nt64, int64])", + ve(redis.Ints([]interface{}{int64(4), int64(5)}, nil)), + ve([]int{4, 5}, nil), + }, + { + "ints([[]byte, nil, []byte])", + ve(redis.Ints([]interface{}{[]byte("4"), nil, []byte("5")}, nil)), + ve([]int{4, 0, 5}, nil), + }, { "ints(nil)", ve(redis.Ints(nil, nil)), ve([]int(nil), redis.ErrNil), }, { - "strings([v1, v2])", + "int64s([[]byte, []byte])", + ve(redis.Int64s([]interface{}{[]byte("4"), []byte("5")}, nil)), + ve([]int64{4, 5}, nil), + }, + { + "int64s([int64, int64])", + ve(redis.Int64s([]interface{}{int64(4), int64(5)}, nil)), + ve([]int64{4, 5}, nil), + }, + { + "strings([[]byte, []bytev2])", ve(redis.Strings([]interface{}{[]byte("v1"), []byte("v2")}, nil)), ve([]string{"v1", "v2"}, nil), }, { - "strings(nil)", - ve(redis.Strings(nil, nil)), - ve([]string(nil), redis.ErrNil), + "strings([string, string])", + ve(redis.Strings([]interface{}{"v1", "v2"}, nil)), + ve([]string{"v1", "v2"}, nil), }, { "byteslices([v1, v2])", @@ -62,9 +82,9 @@ var replyTests = []struct { ve([][]byte{[]byte("v1"), []byte("v2")}, nil), }, { - "byteslices(nil)", - ve(redis.ByteSlices(nil, nil)), - ve([][]byte(nil), redis.ErrNil), + "float64s([v1, v2])", + ve(redis.Float64s([]interface{}{[]byte("1.234"), []byte("5.678")}, nil)), + ve([]float64{1.234, 5.678}, nil), }, { "values([v1, v2])", @@ -120,6 +140,11 @@ func dial() (redis.Conn, error) { return redis.DialDefaultServer() } +// serverAddr wraps DefaultServerAddr() with a more suitable function name for examples. +func serverAddr() (string, error) { + return redis.DefaultServerAddr() +} + func ExampleBool() { c, err := dial() if err != nil { diff --git a/vendor/github.com/garyburd/redigo/redis/test_test.go b/vendor/github.com/garyburd/redigo/redis/test_test.go index 0820818..5c75848 100644 --- a/vendor/github.com/garyburd/redigo/redis/test_test.go +++ b/vendor/github.com/garyburd/redigo/redis/test_test.go @@ -38,6 +38,7 @@ var ( ErrNegativeInt = errNegativeInt serverPath = flag.String("redis-server", "redis-server", "Path to redis server binary") + serverAddress = flag.String("redis-address", "127.0.0.1", "The address of the server") serverBasePort = flag.Int("redis-port", 16379, "Beginning of port range for test servers") serverLogName = flag.String("redis-log", "", "Write Redis server logs to `filename`") serverLog = ioutil.Discard @@ -126,28 +127,32 @@ func stopDefaultServer() { } } -// startDefaultServer starts the default server if not already running. -func startDefaultServer() error { +// DefaultServerAddr starts the test server if not already started and returns +// the address of that server. +func DefaultServerAddr() (string, error) { defaultServerMu.Lock() defer defaultServerMu.Unlock() + addr := fmt.Sprintf("%v:%d", *serverAddress, *serverBasePort) if defaultServer != nil || defaultServerErr != nil { - return defaultServerErr + return addr, defaultServerErr } defaultServer, defaultServerErr = NewServer( "default", "--port", strconv.Itoa(*serverBasePort), + "--bind", *serverAddress, "--save", "", "--appendonly", "no") - return defaultServerErr + return addr, defaultServerErr } // DialDefaultServer starts the test server if not already started and dials a // connection to the server. func DialDefaultServer() (Conn, error) { - if err := startDefaultServer(); err != nil { + addr, err := DefaultServerAddr() + if err != nil { return nil, err } - c, err := Dial("tcp", fmt.Sprintf(":%d", *serverBasePort), DialReadTimeout(1*time.Second), DialWriteTimeout(1*time.Second)) + c, err := Dial("tcp", addr, DialReadTimeout(1*time.Second), DialWriteTimeout(1*time.Second)) if err != nil { return nil, err } diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go index 110ae13..dfdfc5b 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb.go @@ -193,8 +193,7 @@ func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeU // "Generated output always contains 3, 6, or 9 fractional digits, // depending on required precision." s, ns := s.Field(0).Int(), s.Field(1).Int() - d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond - x := fmt.Sprintf("%.9f", d.Seconds()) + x := fmt.Sprintf("%d.%09d", s, ns) x = strings.TrimSuffix(x, "000") x = strings.TrimSuffix(x, "000") out.write(`"`) diff --git a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go index 2428d05..4fdbde1 100644 --- a/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go +++ b/vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go @@ -407,6 +407,7 @@ var marshalingTests = []struct { {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`}, {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{ Fields: map[string]*stpb.Value{ "one": {Kind: &stpb.Value_StringValue{"loneliest number"}}, diff --git a/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md index 4422905..b98873f 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md +++ b/vendor/github.com/microcosm-cc/bluemonday/CREDITS.md @@ -1,4 +1,4 @@ - +1. Andrew Krasichkov @buglloc https://github.com/buglloc 1. John Graham-Cumming http://jgc.org/ 1. Mike Samuel mikesamuel@gmail.com 1. Dmitri Shuralyov shurcooL@gmail.com diff --git a/vendor/github.com/microcosm-cc/bluemonday/README.md b/vendor/github.com/microcosm-cc/bluemonday/README.md index c229924..2e77063 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/README.md +++ b/vendor/github.com/microcosm-cc/bluemonday/README.md @@ -312,7 +312,7 @@ It is not the job of bluemonday to fix your bad HTML, it is merely the job of bl ## TODO -* Add support for CSS sanitisation to allow some CSS properties based on a whitelist, possibly using the [Gorilla CSS3 scanner](http://www.gorillatoolkit.org/pkg/css/scanner) +* Add support for CSS sanitisation to allow some CSS properties based on a whitelist, possibly using the [Gorilla CSS3 scanner](http://www.gorillatoolkit.org/pkg/css/scanner) - PRs welcome so long as testing covers XSS and demonstrates safety first * Investigate whether devs want to blacklist elements and attributes. This would allow devs to take an existing policy (such as the `bluemonday.UGCPolicy()` ) that encapsulates 90% of what they're looking for but does more than they need, and to remove the extra things they do not want to make it 100% what they want * Investigate whether devs want a validating HTML mode, in which the HTML elements are not just transformed into a balanced tree (every start tag has a closing tag at the correct depth) but also that elements and character data appear only in their allowed context (i.e. that a `table` element isn't a descendent of a `caption`, that `colgroup`, `thead`, `tbody`, `tfoot` and `tr` are permitted, and that character data is not permitted) diff --git a/vendor/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/main.go b/vendor/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/main.go index 60472a3..9f1f91f 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/main.go +++ b/vendor/github.com/microcosm-cc/bluemonday/cmd/sanitise_html_email/main.go @@ -27,7 +27,6 @@ func main() { // HTML email is often displayed in iframes and needs to preserve core // structure - p.AllowDocType(true) p.AllowElements("html", "head", "body", "title") // There are not safe, and is only being done here to demonstrate how to diff --git a/vendor/github.com/microcosm-cc/bluemonday/policy.go b/vendor/github.com/microcosm-cc/bluemonday/policy.go index 2b0965b..49ce508 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/policy.go +++ b/vendor/github.com/microcosm-cc/bluemonday/policy.go @@ -47,9 +47,6 @@ type Policy struct { // exceptions initialized bool - // Allows the tag to exist in the sanitized document - allowDocType bool - // If true then we add spaces when stripping tags, specifically the closing // tag is replaced by a space character. addSpaces bool @@ -369,21 +366,6 @@ func (p *Policy) AllowURLSchemeWithCustomPolicy( return p } -// AllowDocType states whether the HTML sanitised by the sanitizer is allowed to -// contain the HTML DocType tag: or one of it's variants. -// -// The HTML spec only permits one doctype per document, and as you know how you -// are using the output of this, you know best as to whether we should ignore it -// (default) or not. -// -// If you are sanitizing a HTML fragment the default (false) is fine. -func (p *Policy) AllowDocType(allow bool) *Policy { - - p.allowDocType = allow - - return p -} - // AddSpaceWhenStrippingTag states whether to add a single space " " when // removing tags that are not whitelisted by the policy. // @@ -498,6 +480,7 @@ func (p *Policy) addDefaultElementsWithoutAttrs() { p.setOfElementsAllowedWithoutAttrs["ruby"] = struct{}{} p.setOfElementsAllowedWithoutAttrs["s"] = struct{}{} p.setOfElementsAllowedWithoutAttrs["samp"] = struct{}{} + p.setOfElementsAllowedWithoutAttrs["script"] = struct{}{} p.setOfElementsAllowedWithoutAttrs["section"] = struct{}{} p.setOfElementsAllowedWithoutAttrs["select"] = struct{}{} p.setOfElementsAllowedWithoutAttrs["small"] = struct{}{} diff --git a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go index 1d98a4e..4de0a7b 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go +++ b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go @@ -112,9 +112,13 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { switch token.Type { case html.DoctypeToken: - if p.allowDocType { - buff.WriteString(token.String()) - } + // DocType is not handled as there is no safe parsing mechanism + // provided by golang.org/x/net/html for the content, and this can + // be misused to insert HTML tags that are not then sanitized + // + // One might wish to recursively sanitize here using the same policy + // but I will need to do some further testing before considering + // this. case html.CommentToken: @@ -217,7 +221,7 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { case html.TextToken: if !skipElementContent { - switch strings.ToLower(mostRecentlyStartedToken) { + switch mostRecentlyStartedToken { case "script": // not encouraged, but if a policy allows JavaScript we // should not HTML escape it as that would break the output @@ -231,7 +235,6 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { buff.WriteString(token.String()) } } - default: // A token that didn't exist in the html package when we wrote this return &bytes.Buffer{} @@ -490,13 +493,18 @@ func (p *Policy) allowNoAttrs(elementName string) bool { func (p *Policy) validURL(rawurl string) (string, bool) { if p.requireParseableURLs { - // URLs do not contain whitespace - if strings.Contains(rawurl, " ") || + // URLs are valid if when space is trimmed the URL is valid + rawurl = strings.TrimSpace(rawurl) + + // URLs cannot contain whitespace, unless it is a data-uri + if (strings.Contains(rawurl, " ") || strings.Contains(rawurl, "\t") || - strings.Contains(rawurl, "\n") { + strings.Contains(rawurl, "\n")) && + !strings.HasPrefix(rawurl, `data:`) { return "", false } + // URLs are valid if they parse u, err := url.Parse(rawurl) if err != nil { return "", false diff --git a/vendor/github.com/microcosm-cc/bluemonday/sanitize_test.go b/vendor/github.com/microcosm-cc/bluemonday/sanitize_test.go index 815b2e2..f7c8a76 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/sanitize_test.go +++ b/vendor/github.com/microcosm-cc/bluemonday/sanitize_test.go @@ -92,39 +92,6 @@ func TestSignatureBehaviour(t *testing.T) { } } -func TestAllowDocType(t *testing.T) { - p := NewPolicy() - p.AllowElements("b") - - in := "Hello, World!" - expected := "Hello, World!" - - out := p.Sanitize(in) - if out != expected { - t.Errorf( - "test 1 failed;\ninput : %s\noutput : %s\nexpected: %s", - in, - out, - expected, - ) - } - - // Allow the doctype and run the test again - p.AllowDocType(true) - - expected = "Hello, World!" - - out = p.Sanitize(in) - if out != expected { - t.Errorf( - "test 1 failed;\ninput : %s\noutput : %s\nexpected: %s", - in, - out, - expected, - ) - } -} - func TestLinks(t *testing.T) { tests := []test{ @@ -1506,3 +1473,214 @@ func TestTargetBlankNoOpener(t *testing.T) { } wg.Wait() } + +func TestIssue51(t *testing.T) { + // Whitespace in URLs is permitted within HTML according to: + // https://dev.w3.org/html5/spec-LC/urls.html#parsing-urls + // + // We were aggressively rejecting URLs that contained line feeds but these + // are permitted. + // + // This test ensures that we do not regress that fix. + p := NewPolicy() + p.AllowImages() + p.AllowDataURIImages() + + input := `` + out := p.Sanitize(input) + expected := `` + if out != expected { + t.Errorf( + "test failed;\ninput : %s\noutput : %s\nexpected: %s", + input, + out, + expected) + } + + input = `` + out = p.Sanitize(input) + expected = `` + if out != expected { + t.Errorf( + "test failed;\ninput : %s\noutput : %s\nexpected: %s", + input, + out, + expected) + } +} + +func TestIssue55ScriptTags(t *testing.T) { + p1 := NewPolicy() + p2 := UGCPolicy() + p3 := UGCPolicy().AllowElements("script") + + in := `` + expected := `` + out := p1.Sanitize(in) + if out != expected { + t.Errorf( + "test failed;\ninput : %s\noutput : %s\nexpected: %s", + in, + out, + expected, + ) + } + + expected = `` + out = p2.Sanitize(in) + if out != expected { + t.Errorf( + "test failed;\ninput : %s\noutput : %s\nexpected: %s", + in, + out, + expected, + ) + } + + expected = `` + out = p3.Sanitize(in) + if out != expected { + t.Errorf( + "test failed;\ninput : %s\noutput : %s\nexpected: %s", + in, + out, + expected, + ) + } +} diff --git a/vendor/github.com/sergi/go-diff/.travis.yml b/vendor/github.com/sergi/go-diff/.travis.yml index 4a22ed3..85868de 100644 --- a/vendor/github.com/sergi/go-diff/.travis.yml +++ b/vendor/github.com/sergi/go-diff/.travis.yml @@ -5,8 +5,8 @@ os: - osx go: - - 1.7.x - 1.8.x + - 1.9.x sudo: false diff --git a/vendor/github.com/shurcooL/github_flavored_markdown/main.go b/vendor/github.com/shurcooL/github_flavored_markdown/main.go index af3bd02..d6b3c05 100644 --- a/vendor/github.com/shurcooL/github_flavored_markdown/main.go +++ b/vendor/github.com/shurcooL/github_flavored_markdown/main.go @@ -199,114 +199,92 @@ var gfmHTMLConfig = syntaxhighlight.HTMLConfig{ Decimal: "m", } -// TODO: Support highlighting for more languages. func highlightCode(src []byte, lang string) (highlightedCode []byte, ok bool) { switch lang { - case "Go": + case "Go", "Go-unformatted": var buf bytes.Buffer err := highlight_go.Print(src, &buf, syntaxhighlight.HTMLPrinter(gfmHTMLConfig)) if err != nil { return nil, false } return buf.Bytes(), true - case "Go-old": - var buf bytes.Buffer - err := syntaxhighlight.Print(syntaxhighlight.NewScanner(src), &buf, syntaxhighlight.HTMLPrinter(gfmHTMLConfig)) + case "diff": + anns, err := highlight_diff.Annotate(src) if err != nil { return nil, false } - return buf.Bytes(), true - case "diff": - switch 2 { - default: - var buf bytes.Buffer - err := highlight_diff.Print(highlight_diff.NewScanner(src), &buf) - if err != nil { - return nil, false - } - return buf.Bytes(), true - case 1: - lines := bytes.Split(src, []byte("\n")) - return bytes.Join(lines, []byte("\n")), true - case 2: - anns, err := highlight_diff.Annotate(src) - if err != nil { - return nil, false - } - lines := bytes.Split(src, []byte("\n")) - lineStarts := make([]int, len(lines)) - var offset int - for lineIndex := 0; lineIndex < len(lines); lineIndex++ { - lineStarts[lineIndex] = offset - offset += len(lines[lineIndex]) + 1 - } + lines := bytes.Split(src, []byte("\n")) + lineStarts := make([]int, len(lines)) + var offset int + for lineIndex := 0; lineIndex < len(lines); lineIndex++ { + lineStarts[lineIndex] = offset + offset += len(lines[lineIndex]) + 1 + } - lastDel, lastIns := -1, -1 - for lineIndex := 0; lineIndex < len(lines); lineIndex++ { - var lineFirstChar byte - if len(lines[lineIndex]) > 0 { - lineFirstChar = lines[lineIndex][0] + lastDel, lastIns := -1, -1 + for lineIndex := 0; lineIndex < len(lines); lineIndex++ { + var lineFirstChar byte + if len(lines[lineIndex]) > 0 { + lineFirstChar = lines[lineIndex][0] + } + switch lineFirstChar { + case '+': + if lastIns == -1 { + lastIns = lineIndex } - switch lineFirstChar { - case '+': - if lastIns == -1 { + case '-': + if lastDel == -1 { + lastDel = lineIndex + } + default: + if lastDel != -1 || lastIns != -1 { + if lastDel == -1 { + lastDel = lastIns + } else if lastIns == -1 { lastIns = lineIndex } - case '-': - if lastDel == -1 { - lastDel = lineIndex - } - default: - if lastDel != -1 || lastIns != -1 { - if lastDel == -1 { - lastDel = lastIns - } else if lastIns == -1 { - lastIns = lineIndex + + beginOffsetLeft := lineStarts[lastDel] + endOffsetLeft := lineStarts[lastIns] + beginOffsetRight := lineStarts[lastIns] + endOffsetRight := lineStarts[lineIndex] + + anns = append(anns, &annotate.Annotation{Start: beginOffsetLeft, End: endOffsetLeft, Left: []byte(``), Right: []byte(``), WantInner: 0}) + anns = append(anns, &annotate.Annotation{Start: beginOffsetRight, End: endOffsetRight, Left: []byte(``), Right: []byte(``), WantInner: 0}) + + if '@' != lineFirstChar { + //leftContent := string(src[beginOffsetLeft:endOffsetLeft]) + //rightContent := string(src[beginOffsetRight:endOffsetRight]) + // This is needed to filter out the "-" and "+" at the beginning of each line from being highlighted. + // TODO: Still not completely filtered out. + leftContent := "" + for line := lastDel; line < lastIns; line++ { + leftContent += "\x00" + string(lines[line][1:]) + "\n" + } + rightContent := "" + for line := lastIns; line < lineIndex; line++ { + rightContent += "\x00" + string(lines[line][1:]) + "\n" } - beginOffsetLeft := lineStarts[lastDel] - endOffsetLeft := lineStarts[lastIns] - beginOffsetRight := lineStarts[lastIns] - endOffsetRight := lineStarts[lineIndex] + var sectionSegments [2][]*annotate.Annotation + highlight_diff.HighlightedDiffFunc(leftContent, rightContent, §ionSegments, [2]int{beginOffsetLeft, beginOffsetRight}) - anns = append(anns, &annotate.Annotation{Start: beginOffsetLeft, End: endOffsetLeft, Left: []byte(``), Right: []byte(``), WantInner: 0}) - anns = append(anns, &annotate.Annotation{Start: beginOffsetRight, End: endOffsetRight, Left: []byte(``), Right: []byte(``), WantInner: 0}) - - if '@' != lineFirstChar { - //leftContent := string(src[beginOffsetLeft:endOffsetLeft]) - //rightContent := string(src[beginOffsetRight:endOffsetRight]) - // This is needed to filter out the "-" and "+" at the beginning of each line from being highlighted. - // TODO: Still not completely filtered out. - leftContent := "" - for line := lastDel; line < lastIns; line++ { - leftContent += "\x00" + string(lines[line][1:]) + "\n" - } - rightContent := "" - for line := lastIns; line < lineIndex; line++ { - rightContent += "\x00" + string(lines[line][1:]) + "\n" - } - - var sectionSegments [2][]*annotate.Annotation - highlight_diff.HighlightedDiffFunc(leftContent, rightContent, §ionSegments, [2]int{beginOffsetLeft, beginOffsetRight}) - - anns = append(anns, sectionSegments[0]...) - anns = append(anns, sectionSegments[1]...) - } + anns = append(anns, sectionSegments[0]...) + anns = append(anns, sectionSegments[1]...) } - lastDel, lastIns = -1, -1 } + lastDel, lastIns = -1, -1 } - - sort.Sort(anns) - - out, err := annotate.Annotate(src, anns, template.HTMLEscape) - if err != nil { - return nil, false - } - - return out, true } + + sort.Sort(anns) + + out, err := annotate.Annotate(src, anns, template.HTMLEscape) + if err != nil { + return nil, false + } + return out, true default: return nil, false } diff --git a/vendor/github.com/shurcooL/go/README.md b/vendor/github.com/shurcooL/go/README.md index 44c028d..fc0f959 100644 --- a/vendor/github.com/shurcooL/go/README.md +++ b/vendor/github.com/shurcooL/go/README.md @@ -17,7 +17,6 @@ Directories | Path | Synopsis | |-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [analysis](https://godoc.org/github.com/shurcooL/go/analysis) | Package analysis provides a routine that determines if a file is generated or handcrafted. | | [browser](https://godoc.org/github.com/shurcooL/go/browser) | Package browser provides utilities for interacting with users' browsers. | | [ctxhttp](https://godoc.org/github.com/shurcooL/go/ctxhttp) | Package ctxhttp provides helper functions for performing context-aware HTTP requests. | | [gddo](https://godoc.org/github.com/shurcooL/go/gddo) | Package gddo is a simple client library for accessing the godoc.org API. | diff --git a/vendor/github.com/shurcooL/go/analysis/generated_detection.go b/vendor/github.com/shurcooL/go/analysis/generated_detection.go deleted file mode 100644 index e9ce478..0000000 --- a/vendor/github.com/shurcooL/go/analysis/generated_detection.go +++ /dev/null @@ -1,51 +0,0 @@ -// Package analysis provides a routine that determines if a file is generated or handcrafted. -// -// Deprecated: Use github.com/shurcooL/go/generated package instead. This implementation -// was done ad-hoc before a standard was proposed. -package analysis - -import ( - "bufio" - "io" - "os" - "path/filepath" - "strings" -) - -// IsFileGenerated returns true if the specified file is generated, or false if it's handcrafted. -// rootDir is the filepath of root directory, but name is a '/'-separated path to file. -// -// It considers vendored files as "generated", in the sense that they are not the canonical -// version of a file. This behavior would ideally be factored out into a higher level utility, -// since it has nothing to do with generated comments. -// -// Deprecated: Use generated.ParseFile instead, which is more well defined because it -// implements a specification. -func IsFileGenerated(rootDir, name string) (bool, error) { - // Detect from name. - switch { - case strings.HasPrefix(name, "vendor/") || strings.Contains(name, "/vendor/"): - return true, nil - case strings.HasPrefix(name, "Godeps/"): - return true, nil - } - - // Detect from file contents. - f, err := os.Open(filepath.Join(rootDir, filepath.FromSlash(name))) - if err != nil { - return false, err - } - defer f.Close() - r := bufio.NewReader(f) - s, err := r.ReadString('\n') - if err == io.EOF { - // Empty file or exactly 1 line is not considered to be generated. - return false, nil - } else if err != nil { - return false, err - } - if strings.Contains(s, "Code generated by") { // Consistent with https://golang.org/cl/15073. - return true, nil - } - return (strings.Contains(s, "GENERATED") || strings.Contains(s, "generated")) && strings.Contains(s, "DO NOT EDIT"), nil -} diff --git a/vendor/github.com/shurcooL/go/analysis/generated_detection_test.go b/vendor/github.com/shurcooL/go/analysis/generated_detection_test.go deleted file mode 100644 index 02dd3c9..0000000 --- a/vendor/github.com/shurcooL/go/analysis/generated_detection_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package analysis_test - -import ( - "fmt" - "os" - - "github.com/shurcooL/go/analysis" -) - -func ExampleIsFileGenerated() { - cwd, err := os.Getwd() - if err != nil { - panic(err) - } - - fmt.Println(analysis.IsFileGenerated(cwd, "testdata/generated_0.go.txt")) - fmt.Println(analysis.IsFileGenerated(cwd, "testdata/handcrafted_0.go.txt")) - fmt.Println(analysis.IsFileGenerated(cwd, "testdata/handcrafted_1.go.txt")) - fmt.Println(analysis.IsFileGenerated(cwd, "vendor/github.com/shurcooL/go/analysis/file.go")) - fmt.Println(analysis.IsFileGenerated(cwd, "subpkg/vendor/math/math.go")) - - // Output: - // true - // false - // false - // true - // true -} diff --git a/vendor/github.com/shurcooL/go/analysis/testdata/generated_0.go.txt b/vendor/github.com/shurcooL/go/analysis/testdata/generated_0.go.txt deleted file mode 100644 index 68aec21..0000000 --- a/vendor/github.com/shurcooL/go/analysis/testdata/generated_0.go.txt +++ /dev/null @@ -1,32 +0,0 @@ -// generated by vfsgen; DO NOT EDIT - -// +build !dev - -package issues - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "net/http" - "os" - pathpkg "path" - "time" -) - -// Assets statically implements the virtual filesystem given to vfsgen as input. -var Assets = func() http.FileSystem { - mustUnmarshalTextTime := func(text string) time.Time { - var t time.Time - err := t.UnmarshalText([]byte(text)) - if err != nil { - panic(err) - } - return t - } - - fs := _vfsgen_fs{ - ... - } -} diff --git a/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_0.go.txt b/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_0.go.txt deleted file mode 100644 index ffa0975..0000000 --- a/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_0.go.txt +++ /dev/null @@ -1,9 +0,0 @@ -// Package foo offers bar. -package foo - -import "strings" - -// Bar is bar. -func Bar() string { - return strings.Title("bar") -} diff --git a/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_1.go.txt b/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_1.go.txt deleted file mode 100644 index f3f910c..0000000 --- a/vendor/github.com/shurcooL/go/analysis/testdata/handcrafted_1.go.txt +++ /dev/null @@ -1 +0,0 @@ -// Code generated by protoc-gen-gogo. Actually it isn't, because it's only 1 line. \ No newline at end of file diff --git a/vendor/github.com/shurcooL/graphql/README.md b/vendor/github.com/shurcooL/graphql/README.md index 381a6b1..ea279c5 100644 --- a/vendor/github.com/shurcooL/graphql/README.md +++ b/vendor/github.com/shurcooL/graphql/README.md @@ -24,7 +24,7 @@ Usage Construct a GraphQL client, specifying the GraphQL server URL. Then, you can use it to make GraphQL queries and mutations. ```Go -client := graphql.NewClient("https://example.com/graphql", nil, nil) +client := graphql.NewClient("https://example.com/graphql", nil) // Use client... ``` @@ -41,7 +41,7 @@ func main() { ) httpClient := oauth2.NewClient(context.Background(), src) - client := graphql.NewClient("https://example.com/graphql", httpClient, nil) + client := graphql.NewClient("https://example.com/graphql", httpClient) // Use client... ``` diff --git a/vendor/github.com/shurcooL/graphql/example/graphqldev/main.go b/vendor/github.com/shurcooL/graphql/example/graphqldev/main.go index e232a1f..37b5eb9 100644 --- a/vendor/github.com/shurcooL/graphql/example/graphqldev/main.go +++ b/vendor/github.com/shurcooL/graphql/example/graphqldev/main.go @@ -38,7 +38,7 @@ func run() error { mux := http.NewServeMux() mux.Handle("/query", &relay.Handler{Schema: schema}) - client := graphql.NewClient("/query", &http.Client{Transport: localRoundTripper{handler: mux}}, nil) + client := graphql.NewClient("/query", &http.Client{Transport: localRoundTripper{handler: mux}}) /* query { diff --git a/vendor/github.com/shurcooL/graphql/graphql.go b/vendor/github.com/shurcooL/graphql/graphql.go index 8a14ac3..b7f0e5a 100644 --- a/vendor/github.com/shurcooL/graphql/graphql.go +++ b/vendor/github.com/shurcooL/graphql/graphql.go @@ -6,7 +6,6 @@ import ( "encoding/json" "fmt" "net/http" - "reflect" "github.com/shurcooL/go/ctxhttp" "github.com/shurcooL/graphql/internal/jsonutil" @@ -16,25 +15,17 @@ import ( type Client struct { url string // GraphQL server URL. httpClient *http.Client - - qctx *queryContext } // NewClient creates a GraphQL client targeting the specified GraphQL server URL. // If httpClient is nil, then http.DefaultClient is used. -// scalars optionally specifies types that are scalars (this matters -// when constructing queries from types, scalars are never expanded). -func NewClient(url string, httpClient *http.Client, scalars []reflect.Type) *Client { +func NewClient(url string, httpClient *http.Client) *Client { if httpClient == nil { httpClient = http.DefaultClient } return &Client{ url: url, httpClient: httpClient, - - qctx: &queryContext{ - Scalars: scalars, - }, } } @@ -57,9 +48,9 @@ func (c *Client) do(ctx context.Context, op operationType, v interface{}, variab var query string switch op { case queryOperation: - query = constructQuery(c.qctx, v, variables) + query = constructQuery(v, variables) case mutationOperation: - query = constructMutation(c.qctx, v, variables) + query = constructMutation(v, variables) } in := struct { Query string `json:"query"` diff --git a/vendor/github.com/shurcooL/graphql/ident/ident.go b/vendor/github.com/shurcooL/graphql/ident/ident.go index ff1b24b..29e498e 100644 --- a/vendor/github.com/shurcooL/graphql/ident/ident.go +++ b/vendor/github.com/shurcooL/graphql/ident/ident.go @@ -131,6 +131,10 @@ func (n Name) ToMixedCaps() string { n[i] = initialism continue } + if brand, ok := isBrand(word); ok { + n[i] = brand + continue + } r, size := utf8.DecodeRuneInString(word) n[i] = string(unicode.ToUpper(r)) + strings.ToLower(word[size:]) } @@ -220,3 +224,17 @@ var initialisms = map[string]struct{}{ // Additional common initialisms. "RSS": {}, } + +// isBrand reports whether word is a brand. +func isBrand(word string) (string, bool) { + brand, ok := brands[strings.ToLower(word)] + return brand, ok +} + +// brands is the map of brands in the MixedCaps naming convention; +// see https://dmitri.shuralyov.com/idiomatic-go#for-brands-or-words-with-more-than-1-capital-letter-lowercase-all-letters. +// Key is the lower case version of the brand, value is the canonical brand spelling. +// Only add entries that are highly unlikely to be non-brands. +var brands = map[string]string{ + "github": "GitHub", +} diff --git a/vendor/github.com/shurcooL/graphql/ident/ident_test.go b/vendor/github.com/shurcooL/graphql/ident/ident_test.go index 9a1562b..9ee1b47 100644 --- a/vendor/github.com/shurcooL/graphql/ident/ident_test.go +++ b/vendor/github.com/shurcooL/graphql/ident/ident_test.go @@ -81,13 +81,14 @@ func TestParseScreamingSnakeCase(t *testing.T) { } } -func TestWords_ToMixedCaps(t *testing.T) { +func TestName_ToMixedCaps(t *testing.T) { tests := []struct { in ident.Name want string }{ {in: ident.Name{"client", "Mutation", "Id"}, want: "ClientMutationID"}, {in: ident.Name{"CLIENT", "MUTATION", "ID"}, want: "ClientMutationID"}, + {in: ident.Name{"github", "logo"}, want: "GitHubLogo"}, } for _, tc := range tests { got := tc.in.ToMixedCaps() @@ -97,7 +98,7 @@ func TestWords_ToMixedCaps(t *testing.T) { } } -func TestWords_ToLowerCamelCase(t *testing.T) { +func TestName_ToLowerCamelCase(t *testing.T) { tests := []struct { in ident.Name want string diff --git a/vendor/github.com/shurcooL/graphql/query.go b/vendor/github.com/shurcooL/graphql/query.go index 87e1e2e..a6b6aac 100644 --- a/vendor/github.com/shurcooL/graphql/query.go +++ b/vendor/github.com/shurcooL/graphql/query.go @@ -2,6 +2,7 @@ package graphql import ( "bytes" + "encoding/json" "io" "reflect" "sort" @@ -9,16 +10,16 @@ import ( "github.com/shurcooL/graphql/ident" ) -func constructQuery(qctx *queryContext, v interface{}, variables map[string]interface{}) string { - query := qctx.Query(v) +func constructQuery(v interface{}, variables map[string]interface{}) string { + query := query(v) if variables != nil { return "query(" + queryArguments(variables) + ")" + query } return query } -func constructMutation(qctx *queryContext, v interface{}, variables map[string]interface{}) string { - query := qctx.Query(v) +func constructMutation(v interface{}, variables map[string]interface{}) string { + query := query(v) if variables != nil { return "mutation(" + queryArguments(variables) + ")" + query } @@ -29,62 +30,78 @@ func constructMutation(qctx *queryContext, v interface{}, variables map[string]i // // E.g., map[string]interface{}{"a": Int(123), "b": NewBoolean(true)} -> "$a:Int!$b:Boolean". func queryArguments(variables map[string]interface{}) string { - sorted := make([]string, 0, len(variables)) + // Sort keys in order to produce deterministic output for testing purposes. + // TODO: If tests can be made to work with non-deterministic output, then no need to sort. + keys := make([]string, 0, len(variables)) for k := range variables { - sorted = append(sorted, k) + keys = append(keys, k) } - sort.Strings(sorted) - var s string - for _, k := range sorted { - v := variables[k] - s += "$" + k + ":" - t := reflect.TypeOf(v) - switch t.Kind() { - case reflect.Slice, reflect.Array: - // TODO: Support t.Elem() being a pointer, if needed. Probably want to do this recursively. - s += "[" + t.Elem().Name() + "!]" // E.g., "[IssueState!]". - case reflect.Ptr: - // Pointer is an optional type, so no "!" at the end. - s += t.Elem().Name() // E.g., "Int". - default: - name := t.Name() - if name == "string" { // HACK: Workaround for https://github.com/shurcooL/githubql/issues/12. - name = "ID" - } - // Value is a required type, so add "!" to the end. - s += name + "!" // E.g., "Int!". - } - } - return s -} + sort.Strings(keys) -type queryContext struct { - // Scalars are Go types that map to GraphQL scalars, and therefore we don't want to expand them. - Scalars []reflect.Type -} - -// Query uses writeQuery to recursively construct -// a minified query string from the provided struct v. -// -// E.g., struct{Foo Int, BarBaz *Boolean} -> "{foo,barBaz}". -func (c *queryContext) Query(v interface{}) string { var buf bytes.Buffer - c.writeQuery(&buf, reflect.TypeOf(v), false) + for _, k := range keys { + io.WriteString(&buf, "$") + io.WriteString(&buf, k) + io.WriteString(&buf, ":") + writeArgumentType(&buf, reflect.TypeOf(variables[k]), true) + // Don't insert a comma here. + // Commas in GraphQL are insignificant, and we want minified output. + // See https://facebook.github.io/graphql/October2016/#sec-Insignificant-Commas. + } return buf.String() } -// writeQuery writes a minified query for t to w. If inline is true, -// the struct fields of t are inlined into parent struct. -func (c *queryContext) writeQuery(w io.Writer, t reflect.Type, inline bool) { +// writeArgumentType writes a minified GraphQL type for t to w. +// value indicates whether t is a value (required) type or pointer (optional) type. +// If value is true, then "!" is written at the end of t. +func writeArgumentType(w io.Writer, t reflect.Type, value bool) { + if t.Kind() == reflect.Ptr { + // Pointer is an optional type, so no "!" at the end of the pointer's underlying type. + writeArgumentType(w, t.Elem(), false) + return + } + + switch t.Kind() { + case reflect.Slice, reflect.Array: + // List. E.g., "[Int]". + io.WriteString(w, "[") + writeArgumentType(w, t.Elem(), true) + io.WriteString(w, "]") + default: + // Named type. E.g., "Int". + name := t.Name() + if name == "string" { // HACK: Workaround for https://github.com/shurcooL/githubql/issues/12. + name = "ID" + } + io.WriteString(w, name) + } + + if value { + // Value is a required type, so add "!" to the end. + io.WriteString(w, "!") + } +} + +// query uses writeQuery to recursively construct +// a minified query string from the provided struct v. +// +// E.g., struct{Foo Int, BarBaz *Boolean} -> "{foo,barBaz}". +func query(v interface{}) string { + var buf bytes.Buffer + writeQuery(&buf, reflect.TypeOf(v), false) + return buf.String() +} + +// writeQuery writes a minified query for t to w. +// If inline is true, the struct fields of t are inlined into parent struct. +func writeQuery(w io.Writer, t reflect.Type, inline bool) { switch t.Kind() { case reflect.Ptr, reflect.Slice: - c.writeQuery(w, t.Elem(), false) + writeQuery(w, t.Elem(), false) case reflect.Struct: - // Special handling of scalar struct types. Don't expand them. - for _, scalar := range c.Scalars { - if t == scalar { - return - } + // If the type implements json.Unmarshaler, it's a scalar. Don't expand it. + if reflect.PtrTo(t).Implements(jsonUnmarshaler) { + return } if !inline { io.WriteString(w, "{") @@ -103,10 +120,12 @@ func (c *queryContext) writeQuery(w io.Writer, t reflect.Type, inline bool) { io.WriteString(w, ident.ParseMixedCaps(f.Name).ToLowerCamelCase()) } } - c.writeQuery(w, f.Type, inlineField) + writeQuery(w, f.Type, inlineField) } if !inline { io.WriteString(w, "}") } } } + +var jsonUnmarshaler = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem() diff --git a/vendor/github.com/shurcooL/graphql/query_test.go b/vendor/github.com/shurcooL/graphql/query_test.go index 536b300..4de8cb5 100644 --- a/vendor/github.com/shurcooL/graphql/query_test.go +++ b/vendor/github.com/shurcooL/graphql/query_test.go @@ -2,7 +2,6 @@ package graphql import ( "net/url" - "reflect" "testing" "time" ) @@ -217,15 +216,20 @@ func TestConstructQuery(t *testing.T) { }(), want: `{actor{login,avatarUrl,url},createdAt,... on IssueComment{body},currentTitle,previousTitle,label{name,color}}`, }, + { + inV: struct { + Viewer struct { + Login string + CreatedAt time.Time + ID interface{} + DatabaseID int + } + }{}, + want: `{viewer{login,createdAt,id,databaseId}}`, + }, } for _, tc := range tests { - qctx := &queryContext{ - Scalars: []reflect.Type{ - reflect.TypeOf(DateTime{}), - reflect.TypeOf(URI{}), - }, - } - got := constructQuery(qctx, tc.inV, tc.inVariables) + got := constructQuery(tc.inV, tc.inVariables) if got != tc.want { t.Errorf("\ngot: %q\nwant: %q\n", got, tc.want) } @@ -260,7 +264,7 @@ func TestConstructMutation(t *testing.T) { }, } for _, tc := range tests { - got := constructMutation(&queryContext{}, tc.inV, tc.inVariables) + got := constructMutation(tc.inV, tc.inVariables) if got != tc.want { t.Errorf("\ngot: %q\nwant: %q\n", got, tc.want) } @@ -269,7 +273,6 @@ func TestConstructMutation(t *testing.T) { func TestQueryArguments(t *testing.T) { tests := []struct { - name string in map[string]interface{} want string }{ @@ -278,26 +281,43 @@ func TestQueryArguments(t *testing.T) { want: "$a:Int!$b:Boolean", }, { - in: map[string]interface{}{"states": []IssueState{IssueStateOpen, IssueStateClosed}}, - want: "$states:[IssueState!]", + in: map[string]interface{}{ + "required": []IssueState{IssueStateOpen, IssueStateClosed}, + "optional": &[]IssueState{IssueStateOpen, IssueStateClosed}, + }, + want: "$optional:[IssueState!]$required:[IssueState!]!", }, { - in: map[string]interface{}{"states": []IssueState(nil)}, - want: "$states:[IssueState!]", + in: map[string]interface{}{ + "required": []IssueState(nil), + "optional": (*[]IssueState)(nil), + }, + want: "$optional:[IssueState!]$required:[IssueState!]!", }, { - in: map[string]interface{}{"states": [...]IssueState{IssueStateOpen, IssueStateClosed}}, - want: "$states:[IssueState!]", + in: map[string]interface{}{ + "required": [...]IssueState{IssueStateOpen, IssueStateClosed}, + "optional": &[...]IssueState{IssueStateOpen, IssueStateClosed}, + }, + want: "$optional:[IssueState!]$required:[IssueState!]!", }, { - in: map[string]interface{}{"id": ID("someid")}, + in: map[string]interface{}{"id": ID("someID")}, want: "$id:ID!", }, + { + in: map[string]interface{}{"ids": []ID{"someID", "anotherID"}}, + want: `$ids:[ID!]!`, + }, + { + in: map[string]interface{}{"ids": &[]ID{"someID", "anotherID"}}, + want: `$ids:[ID!]`, + }, } - for _, tc := range tests { + for i, tc := range tests { got := queryArguments(tc.in) if got != tc.want { - t.Errorf("%s: got: %q, want: %q", tc.name, got, tc.want) + t.Errorf("test case %d:\n got: %q\nwant: %q", i, got, tc.want) } } } @@ -311,6 +331,8 @@ type ( URI struct{ *url.URL } ) +func (u *URI) UnmarshalJSON(data []byte) error { panic("mock implementation") } + // IssueState represents the possible states of an issue. type IssueState string diff --git a/vendor/github.com/shurcooL/octiconssvg/generate.go b/vendor/github.com/shurcooL/octiconssvg/generate.go index 8a06cc1..35328e0 100644 --- a/vendor/github.com/shurcooL/octiconssvg/generate.go +++ b/vendor/github.com/shurcooL/octiconssvg/generate.go @@ -7,7 +7,6 @@ import ( "encoding/json" "flag" "fmt" - "go/format" "io" "log" "os" @@ -55,6 +54,8 @@ func run() error { fmt.Fprint(&buf, `package octiconssvg import ( + "strconv" + "golang.org/x/net/html" "golang.org/x/net/html/atom" ) @@ -71,14 +72,18 @@ func Icon(name string) *html.Node { return nil } } -`) - for _, name := range names { - processOcticon(&buf, octicons, name) - } - b, err := format.Source(buf.Bytes()) - if err != nil { - return fmt.Errorf("error from format.Source(): %v", err) +// SetSize sets size of icon, and returns a reference to it. +func SetSize(icon *html.Node, size int) *html.Node { + icon.Attr[`, widthAttrIndex, `].Val = strconv.Itoa(size) + icon.Attr[`, heightAttrIndex, `].Val = strconv.Itoa(size) + return icon +} +`) + + // Write all individual Octicon functions. + for _, name := range names { + generateAndWriteOcticon(&buf, octicons, name) } var w io.Writer @@ -94,7 +99,7 @@ func Icon(name string) *html.Node { w = f } - _, err = w.Write(b) + _, err = w.Write(buf.Bytes()) return err } @@ -104,10 +109,10 @@ type octicon struct { Height int `json:",string"` } -func processOcticon(w io.Writer, octicons map[string]octicon, name string) { +func generateAndWriteOcticon(w io.Writer, octicons map[string]octicon, name string) { svgXML := generateOcticon(octicons[name]) - svg := parseOcticon(svgXML) + svg := parseOcticon(svgXML) // Clear these fields to remove cycles in the data structure, since go-goon // cannot print those in a way that's valid Go code. The generated data structure // is not a proper *html.Node with all fields set, but it's enough for rendering @@ -129,10 +134,19 @@ func generateOcticon(o octicon) (svgXML string) { // Skip fill-rule, if present. It has no effect on displayed SVG, but takes up space. path = `%s`, o.Width, o.Height, o.Width, o.Height, path) } +// These constants are used during generation of SetSize function. +// Keep them in sync with generateOcticon. +const ( + widthAttrIndex = 1 + heightAttrIndex = 2 +) + func parseOcticon(svgXML string) *html.Node { e, err := html.ParseFragment(strings.NewReader(svgXML), nil) if err != nil { diff --git a/vendor/github.com/shurcooL/octiconssvg/octicons.go b/vendor/github.com/shurcooL/octiconssvg/octicons.go index 24311ed..b78b5ef 100644 --- a/vendor/github.com/shurcooL/octiconssvg/octicons.go +++ b/vendor/github.com/shurcooL/octiconssvg/octicons.go @@ -1,6 +1,8 @@ package octiconssvg import ( + "strconv" + "golang.org/x/net/html" "golang.org/x/net/html/atom" ) @@ -212,7 +214,7 @@ func Icon(name string) *html.Node { case "logo-gist": return LogoGist() case "logo-github": - return LogoGithub() + return LogoGitHub() case "mail": return Mail() case "mail-read": @@ -220,7 +222,7 @@ func Icon(name string) *html.Node { case "mail-reply": return MailReply() case "mark-github": - return MarkGithub() + return MarkGitHub() case "markdown": return Markdown() case "megaphone": @@ -368,6 +370,13 @@ func Icon(name string) *html.Node { } } +// SetSize sets size of icon, and returns a reference to it. +func SetSize(icon *html.Node, size int) *html.Node { + icon.Attr[1].Val = strconv.Itoa(size) + icon.Attr[2].Val = strconv.Itoa(size) + return icon +} + // Alert returns an "alert" Octicon SVG node. func Alert() *html.Node { return &html.Node{ @@ -394,7 +403,7 @@ func Alert() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -453,7 +462,7 @@ func ArrowDown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -512,7 +521,7 @@ func ArrowLeft() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -571,7 +580,7 @@ func ArrowRight() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -630,7 +639,7 @@ func ArrowSmallDown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -689,7 +698,7 @@ func ArrowSmallLeft() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -748,7 +757,7 @@ func ArrowSmallRight() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -807,7 +816,7 @@ func ArrowSmallUp() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -866,7 +875,7 @@ func ArrowUp() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -925,7 +934,7 @@ func Beaker() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -984,7 +993,7 @@ func Bell() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1043,7 +1052,7 @@ func Bold() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1102,7 +1111,7 @@ func Book() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1161,7 +1170,7 @@ func Bookmark() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1220,7 +1229,7 @@ func Briefcase() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1279,7 +1288,7 @@ func Broadcast() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1338,7 +1347,7 @@ func Browser() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1397,7 +1406,7 @@ func Bug() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1456,7 +1465,7 @@ func Calendar() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1515,7 +1524,7 @@ func Check() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1574,7 +1583,7 @@ func Checklist() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1633,7 +1642,7 @@ func ChevronDown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1692,7 +1701,7 @@ func ChevronLeft() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1751,7 +1760,7 @@ func ChevronRight() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1810,7 +1819,7 @@ func ChevronUp() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1869,7 +1878,7 @@ func CircleSlash() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1928,7 +1937,7 @@ func CircuitBoard() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -1987,7 +1996,7 @@ func Clippy() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2046,7 +2055,7 @@ func Clock() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2105,7 +2114,7 @@ func CloudDownload() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2164,7 +2173,7 @@ func CloudUpload() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2223,7 +2232,7 @@ func Code() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2282,7 +2291,7 @@ func Comment() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2341,7 +2350,7 @@ func CommentDiscussion() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2400,7 +2409,7 @@ func CreditCard() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2459,7 +2468,7 @@ func Dash() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2518,7 +2527,7 @@ func Dashboard() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2577,7 +2586,7 @@ func Database() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2636,7 +2645,7 @@ func DesktopDownload() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2695,7 +2704,7 @@ func DeviceCamera() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2754,7 +2763,7 @@ func DeviceCameraVideo() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2813,7 +2822,7 @@ func DeviceDesktop() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2872,7 +2881,7 @@ func DeviceMobile() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2931,7 +2940,7 @@ func Diff() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -2990,7 +2999,7 @@ func DiffAdded() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3049,7 +3058,7 @@ func DiffIgnored() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3108,7 +3117,7 @@ func DiffModified() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3167,7 +3176,7 @@ func DiffRemoved() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3226,7 +3235,7 @@ func DiffRenamed() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3285,7 +3294,7 @@ func Ellipsis() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3344,7 +3353,7 @@ func Eye() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3403,7 +3412,7 @@ func File() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3462,7 +3471,7 @@ func FileBinary() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3521,7 +3530,7 @@ func FileCode() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3580,7 +3589,7 @@ func FileDirectory() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3639,7 +3648,7 @@ func FileMedia() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3698,7 +3707,7 @@ func FilePdf() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3757,7 +3766,7 @@ func FileSubmodule() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3816,7 +3825,7 @@ func FileSymlinkDirectory() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3875,7 +3884,7 @@ func FileSymlinkFile() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3934,7 +3943,7 @@ func FileText() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -3993,7 +4002,7 @@ func FileZip() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4052,7 +4061,7 @@ func Flame() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4111,7 +4120,7 @@ func Fold() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4170,7 +4179,7 @@ func Gear() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4229,7 +4238,7 @@ func Gift() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4288,7 +4297,7 @@ func Gist() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4347,7 +4356,7 @@ func GistSecret() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4406,7 +4415,7 @@ func GitBranch() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4465,7 +4474,7 @@ func GitCommit() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4524,7 +4533,7 @@ func GitCompare() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4583,7 +4592,7 @@ func GitMerge() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4642,7 +4651,7 @@ func GitPullRequest() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4701,7 +4710,7 @@ func Globe() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4760,7 +4769,7 @@ func Grabber() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4819,7 +4828,7 @@ func Graph() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4878,7 +4887,7 @@ func Heart() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4937,7 +4946,7 @@ func History() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -4996,7 +5005,7 @@ func Home() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5055,7 +5064,7 @@ func HorizontalRule() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5114,7 +5123,7 @@ func Hubot() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5173,7 +5182,7 @@ func Inbox() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5232,7 +5241,7 @@ func Info() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5291,7 +5300,7 @@ func IssueClosed() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5350,7 +5359,7 @@ func IssueOpened() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5409,7 +5418,7 @@ func IssueReopened() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5468,7 +5477,7 @@ func Italic() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5527,7 +5536,7 @@ func Jersey() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5586,7 +5595,7 @@ func KebabHorizontal() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5645,7 +5654,7 @@ func KebabVertical() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5704,7 +5713,7 @@ func Key() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5763,7 +5772,7 @@ func Keyboard() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5822,7 +5831,7 @@ func Law() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5881,7 +5890,7 @@ func LightBulb() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5940,7 +5949,7 @@ func Link() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -5999,7 +6008,7 @@ func LinkExternal() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6058,7 +6067,7 @@ func ListOrdered() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6117,7 +6126,7 @@ func ListUnordered() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6176,7 +6185,7 @@ func Location() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6235,7 +6244,7 @@ func Lock() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6294,7 +6303,7 @@ func LogoGist() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6327,8 +6336,8 @@ func LogoGist() *html.Node { } } -// LogoGithub returns an "logo-github" Octicon SVG node. -func LogoGithub() *html.Node { +// LogoGitHub returns an "logo-github" Octicon SVG node. +func LogoGitHub() *html.Node { return &html.Node{ Parent: (*html.Node)(nil), FirstChild: &html.Node{ @@ -6353,7 +6362,7 @@ func LogoGithub() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6412,7 +6421,7 @@ func Mail() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6471,7 +6480,7 @@ func MailRead() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6530,7 +6539,7 @@ func MailReply() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6563,8 +6572,8 @@ func MailReply() *html.Node { } } -// MarkGithub returns an "mark-github" Octicon SVG node. -func MarkGithub() *html.Node { +// MarkGitHub returns an "mark-github" Octicon SVG node. +func MarkGitHub() *html.Node { return &html.Node{ Parent: (*html.Node)(nil), FirstChild: &html.Node{ @@ -6589,7 +6598,7 @@ func MarkGithub() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6648,7 +6657,7 @@ func Markdown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6707,7 +6716,7 @@ func Megaphone() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6766,7 +6775,7 @@ func Mention() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6825,7 +6834,7 @@ func Milestone() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6884,7 +6893,7 @@ func Mirror() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -6943,7 +6952,7 @@ func MortarBoard() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7002,7 +7011,7 @@ func Mute() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7061,7 +7070,7 @@ func NoNewline() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7120,7 +7129,7 @@ func Note() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7179,7 +7188,7 @@ func Octoface() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7238,7 +7247,7 @@ func Organization() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7297,7 +7306,7 @@ func Package() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7356,7 +7365,7 @@ func Paintcan() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7415,7 +7424,7 @@ func Pencil() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7474,7 +7483,7 @@ func Person() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7533,7 +7542,7 @@ func Pin() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7592,7 +7601,7 @@ func Plug() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7651,7 +7660,7 @@ func Plus() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7710,7 +7719,7 @@ func PlusSmall() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7769,7 +7778,7 @@ func PrimitiveDot() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7828,7 +7837,7 @@ func PrimitiveSquare() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7887,7 +7896,7 @@ func Project() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -7946,7 +7955,7 @@ func Pulse() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8005,7 +8014,7 @@ func Question() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8064,7 +8073,7 @@ func Quote() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8123,7 +8132,7 @@ func RadioTower() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8182,7 +8191,7 @@ func Reply() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8241,7 +8250,7 @@ func Repo() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8300,7 +8309,7 @@ func RepoClone() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8359,7 +8368,7 @@ func RepoForcePush() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8418,7 +8427,7 @@ func RepoForked() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8477,7 +8486,7 @@ func RepoPull() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8536,7 +8545,7 @@ func RepoPush() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8595,7 +8604,7 @@ func Rocket() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8654,7 +8663,7 @@ func RSS() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8713,7 +8722,7 @@ func Ruby() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8772,7 +8781,7 @@ func ScreenFull() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8831,7 +8840,7 @@ func ScreenNormal() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8890,7 +8899,7 @@ func Search() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -8949,7 +8958,7 @@ func Server() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9008,7 +9017,7 @@ func Settings() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9067,7 +9076,7 @@ func Shield() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9126,7 +9135,7 @@ func SignIn() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9185,7 +9194,7 @@ func SignOut() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9244,7 +9253,7 @@ func Smiley() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9303,7 +9312,7 @@ func Squirrel() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9362,7 +9371,7 @@ func Star() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9421,7 +9430,7 @@ func Stop() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9480,7 +9489,7 @@ func Sync() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9539,7 +9548,7 @@ func Tag() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9598,7 +9607,7 @@ func Tasklist() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9657,7 +9666,7 @@ func Telescope() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9716,7 +9725,7 @@ func Terminal() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9775,7 +9784,7 @@ func TextSize() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9834,7 +9843,7 @@ func ThreeBars() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9893,7 +9902,7 @@ func Thumbsdown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -9952,7 +9961,7 @@ func Thumbsup() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10011,7 +10020,7 @@ func Tools() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10070,7 +10079,7 @@ func Trashcan() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10129,7 +10138,7 @@ func TriangleDown() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10188,7 +10197,7 @@ func TriangleLeft() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10247,7 +10256,7 @@ func TriangleRight() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10306,7 +10315,7 @@ func TriangleUp() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10365,7 +10374,7 @@ func Unfold() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10424,7 +10433,7 @@ func Unmute() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10483,7 +10492,7 @@ func Unverified() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10542,7 +10551,7 @@ func Verified() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10601,7 +10610,7 @@ func Versions() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10660,7 +10669,7 @@ func Watch() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10719,7 +10728,7 @@ func X() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ @@ -10778,7 +10787,7 @@ func Zap() *html.Node { PrevSibling: (*html.Node)(nil), NextSibling: (*html.Node)(nil), Type: (html.NodeType)(3), - DataAtom: (atom.Atom)(401411), + DataAtom: (atom.Atom)(460803), Data: (string)("svg"), Namespace: (string)("svg"), Attr: []html.Attribute{ diff --git a/vendor/github.com/shurcooL/octiconssvg/octicons_test.go b/vendor/github.com/shurcooL/octiconssvg/octicons_test.go index 47c256e..50a03dd 100644 --- a/vendor/github.com/shurcooL/octiconssvg/octicons_test.go +++ b/vendor/github.com/shurcooL/octiconssvg/octicons_test.go @@ -10,7 +10,7 @@ import ( ) func Example() { - var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your handler, etc. + var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc. err := html.Render(w, octiconssvg.Alert()) if err != nil { @@ -20,3 +20,15 @@ func Example() { // Output: // } + +func ExampleSetSize() { + var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc. + + err := html.Render(w, octiconssvg.SetSize(octiconssvg.MarkGitHub(), 24)) + if err != nil { + log.Fatalln(err) + } + + // Output: + // +} diff --git a/vendor/github.com/ugorji/go/.travis.yml b/vendor/github.com/ugorji/go/.travis.yml index 2d899c5..05e5934 100644 --- a/vendor/github.com/ugorji/go/.travis.yml +++ b/vendor/github.com/ugorji/go/.travis.yml @@ -1,10 +1,11 @@ language: go sudo: false go: - - 1.8.x - - 1.9.x - - tip + - 1.7.x # go testing suite support, which we use, was introduced in go 1.7 + - 1.8.x + - 1.9.x + - tip script: - - go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec + - go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec after_success: - - bash <(curl -s https://codecov.io/bash) + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/ugorji/go/README.md b/vendor/github.com/ugorji/go/README.md index 31a5dbd..8867438 100644 --- a/vendor/github.com/ugorji/go/README.md +++ b/vendor/github.com/ugorji/go/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/ugorji/go.svg?branch=master)](https://travis-ci.org/ugorji/go) [![codecov](https://codecov.io/gh/ugorji/go/branch/master/graph/badge.svg)](https://codecov.io/gh/ugorji/go) [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/ugorji/go/codec) -[![rcard](https://goreportcard.com/badge/github.com/ugorji/go/codec)](https://goreportcard.com/report/github.com/ugorji/go/codec) +[![rcard](https://goreportcard.com/badge/github.com/ugorji/go/codec?v=2)](https://goreportcard.com/report/github.com/ugorji/go/codec) [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/ugorji/go/master/LICENSE) # go/codec diff --git a/vendor/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/ugorji/go/codec/0doc.go index 78b3205..cf7b48d 100644 --- a/vendor/github.com/ugorji/go/codec/0doc.go +++ b/vendor/github.com/ugorji/go/codec/0doc.go @@ -1,9 +1,10 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. /* -High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library for -binc, msgpack, cbor, json +Package codec provides a +High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library +for binc, msgpack, cbor, json. Supported Serialization formats are: @@ -32,15 +33,14 @@ Rich Feature Set includes: - Simple but extremely powerful and feature-rich API - Support for go1.4 and above, while selectively using newer APIs for later releases - - Good code coverage ( > 70% ) + - Excellent code coverage ( > 90% ) - Very High Performance. Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. - Careful selected use of 'unsafe' for targeted performance gains. 100% mode exists where 'unsafe' is not used at all. - Lock-free (sans mutex) concurrency for scaling to 100's of cores - - Multiple conversions: - Package coerces types where appropriate - e.g. decode an int in the stream into a float, etc. + - Coerce types where appropriate + e.g. decode an int in the stream into a float, decode numbers from formatted strings, etc - Corner Cases: Overflows, nil maps/slices, nil values in streams are handled correctly - Standard field renaming via tags @@ -49,10 +49,16 @@ Rich Feature Set includes: (struct, slice, map, primitives, pointers, interface{}, etc) - Extensions to support efficient encoding/decoding of any named types - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Support IsZero() bool to determine if a value is a zero value. + Analogous to time.Time.IsZero() bool. - Decoding without a schema (into a interface{}). Includes Options to configure what specific map or slice type to use when decoding an encoded list or map into a nil interface{} + - Mapping a non-interface type to an interface, so we can decode appropriately + into any interface type with a correctly configured non-interface value. - Encode a struct as an array, and decode struct from an array in the data stream + - Option to encode struct keys as numbers (instead of strings) + (to support structured streams with fields encoded as numeric codes) - Comprehensive support for anonymous fields - Fast (no-reflection) encoding/decoding of common maps and slices - Code-generation for faster performance. @@ -109,7 +115,7 @@ This symmetry is important to reduce chances of issues happening because the encoding and decoding sides are out of sync e.g. decoded via very specific encoding.TextUnmarshaler but encoded via kind-specific generalized mode. -Consequently, if a type only defines one-half of the symetry +Consequently, if a type only defines one-half of the symmetry (e.g. it implements UnmarshalJSON() but not MarshalJSON() ), then that type doesn't satisfy the check and we will continue walking down the decision tree. @@ -201,6 +207,58 @@ Running Benchmarks Please see http://github.com/ugorji/go-codec-bench . +Caveats + +Struct fields matching the following are ignored during encoding and decoding + - struct tag value set to - + - func, complex numbers, unsafe pointers + - unexported and not embedded + - unexported and embedded and not struct kind + - unexported and embedded pointers (from go1.10) + +Every other field in a struct will be encoded/decoded. + +Embedded fields are encoded as if they exist in the top-level struct, +with some caveats. See Encode documentation. + */ package codec +// TODO: +// - In Go 1.10, when mid-stack inlining is enabled, +// we should use committed functions for writeXXX and readXXX calls. +// This involves uncommenting the methods for decReaderSwitch and encWriterSwitch +// and using those (decReaderSwitch and encWriterSwitch) in all handles +// instead of encWriter and decReader. +// The benefit is that, for the (En|De)coder over []byte, the encWriter/decReader +// will be inlined, giving a performance bump for that typical case. +// However, it will only be inlined if mid-stack inlining is enabled, +// as we call panic to raise errors, and panic currently prevents inlining. +// +// PUNTED: +// - To make Handle comparable, make extHandle in BasicHandle a non-embedded pointer, +// and use overlay methods on *BasicHandle to call through to extHandle after initializing +// the "xh *extHandle" to point to a real slice. +// +// BEFORE EACH RELEASE: +// - Look through and fix padding for each type, to eliminate false sharing +// - critical shared objects that are read many times +// TypeInfos +// - pooled objects: +// decNaked, decNakedContainers, codecFner, typeInfoLoadArray, +// - small objects allocated independently, that we read/use much across threads: +// codecFn, typeInfo +// - Objects allocated independently and used a lot +// Decoder, Encoder, +// xxxHandle, xxxEncDriver, xxxDecDriver (xxx = json, msgpack, cbor, binc, simple) +// - In all above, arrange values modified together to be close to each other. +// +// For all of these, either ensure that they occupy full cache lines, +// or ensure that the things just past the cache line boundary are hardly read/written +// e.g. JsonHandle.RawBytesExt - which is copied into json(En|De)cDriver at init +// +// Occupying full cache lines means they occupy 8*N words (where N is an integer). +// Check this out by running: ./run.sh -z +// - look at those tagged ****, meaning they are not occupying full cache lines +// - look at those tagged <<<<, meaning they are larger than 32 words (something to watch) +// - Run "golint -min_confidence 0.81" diff --git a/vendor/github.com/ugorji/go/codec/README.md b/vendor/github.com/ugorji/go/codec/README.md index 95c7d61..50d65e5 100644 --- a/vendor/github.com/ugorji/go/codec/README.md +++ b/vendor/github.com/ugorji/go/codec/README.md @@ -31,15 +31,14 @@ Rich Feature Set includes: - Simple but extremely powerful and feature-rich API - Support for go1.4 and above, while selectively using newer APIs for later releases - - Good code coverage ( > 70% ) + - Excellent code coverage ( > 90% ) - Very High Performance. Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. - Careful selected use of 'unsafe' for targeted performance gains. 100% mode exists where 'unsafe' is not used at all. - Lock-free (sans mutex) concurrency for scaling to 100's of cores - - Multiple conversions: - Package coerces types where appropriate - e.g. decode an int in the stream into a float, etc. + - Coerce types where appropriate + e.g. decode an int in the stream into a float, decode numbers from formatted strings, etc - Corner Cases: Overflows, nil maps/slices, nil values in streams are handled correctly - Standard field renaming via tags @@ -48,10 +47,16 @@ Rich Feature Set includes: (struct, slice, map, primitives, pointers, interface{}, etc) - Extensions to support efficient encoding/decoding of any named types - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Support IsZero() bool to determine if a value is a zero value. + Analogous to time.Time.IsZero() bool. - Decoding without a schema (into a interface{}). Includes Options to configure what specific map or slice type to use when decoding an encoded list or map into a nil interface{} + - Mapping a non-interface type to an interface, so we can decode appropriately + into any interface type with a correctly configured non-interface value. - Encode a struct as an array, and decode struct from an array in the data stream + - Option to encode struct keys as numbers (instead of strings) + (to support structured streams with fields encoded as numeric codes) - Comprehensive support for anonymous fields - Fast (no-reflection) encoding/decoding of common maps and slices - Code-generation for faster performance. @@ -107,7 +112,7 @@ This symmetry is important to reduce chances of issues happening because the encoding and decoding sides are out of sync e.g. decoded via very specific encoding.TextUnmarshaler but encoded via kind-specific generalized mode. -Consequently, if a type only defines one-half of the symetry +Consequently, if a type only defines one-half of the symmetry (e.g. it implements UnmarshalJSON() but not MarshalJSON() ), then that type doesn't satisfy the check and we will continue walking down the decision tree. @@ -185,3 +190,17 @@ You can run the tag 'safe' to run tests or build in safe mode. e.g. Please see http://github.com/ugorji/go-codec-bench . +## Caveats + +Struct fields matching the following are ignored during encoding and decoding + + - struct tag value set to - + - func, complex numbers, unsafe pointers + - unexported and not embedded + - unexported and embedded and not struct kind + - unexported and embedded pointers (from go1.10) + +Every other field in a struct will be encoded/decoded. + +Embedded fields are encoded as if they exist in the top-level struct, +with some caveats. See Encode documentation. diff --git a/vendor/github.com/ugorji/go/codec/binc.go b/vendor/github.com/ugorji/go/codec/binc.go index be5b7d3..39fd7d4 100644 --- a/vendor/github.com/ugorji/go/codec/binc.go +++ b/vendor/github.com/ugorji/go/codec/binc.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -57,38 +57,31 @@ const ( type bincEncDriver struct { e *Encoder + h *BincHandle w encWriter m map[string]uint16 // symbols - b [scratchByteArrayLen]byte - s uint16 // symbols sequencer + b [16]byte // scratch, used for encoding numbers - bigendian style + s uint16 // symbols sequencer + // c containerState + encDriverTrackContainerWriter + noBuiltInTypes // encNoSeparator - encDriverNoopContainerWriter -} - -func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool { - return rt == timeTypId -} - -func (e *bincEncDriver) EncodeBuiltin(rt uintptr, v interface{}) { - if rt == timeTypId { - var bs []byte - switch x := v.(type) { - case time.Time: - bs = encodeTime(x) - case *time.Time: - bs = encodeTime(*x) - default: - e.e.errorf("binc error encoding builtin: expect time.Time, received %T", v) - } - e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) - e.w.writeb(bs) - } } func (e *bincEncDriver) EncodeNil() { e.w.writen1(bincVdSpecial<<4 | bincSpNil) } +func (e *bincEncDriver) EncodeTime(t time.Time) { + if t.IsZero() { + e.EncodeNil() + } else { + bs := bincEncodeTime(t) + e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) + e.w.writeb(bs) + } +} + func (e *bincEncDriver) EncodeBool(b bool) { if b { e.w.writen1(bincVdSpecial<<4 | bincSpTrue) @@ -198,13 +191,19 @@ func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { func (e *bincEncDriver) WriteArrayStart(length int) { e.encLen(bincVdArray<<4, uint64(length)) + e.c = containerArrayStart } func (e *bincEncDriver) WriteMapStart(length int) { e.encLen(bincVdMap<<4, uint64(length)) + e.c = containerMapStart } func (e *bincEncDriver) EncodeString(c charEncoding, v string) { + if e.c == containerMapKey && c == cUTF8 && (e.h.AsSymbols == 0 || e.h.AsSymbols == 1) { + e.EncodeSymbol(v) + return + } l := uint64(len(v)) e.encBytesLen(c, l) if l > 0 { @@ -214,7 +213,7 @@ func (e *bincEncDriver) EncodeString(c charEncoding, v string) { func (e *bincEncDriver) EncodeSymbol(v string) { // if WriteSymbolsNoRefs { - // e.encodeString(c_UTF8, v) + // e.encodeString(cUTF8, v) // return // } @@ -224,10 +223,10 @@ func (e *bincEncDriver) EncodeSymbol(v string) { l := len(v) if l == 0 { - e.encBytesLen(c_UTF8, 0) + e.encBytesLen(cUTF8, 0) return } else if l == 1 { - e.encBytesLen(c_UTF8, 1) + e.encBytesLen(cUTF8, 1) e.w.writen1(v[0]) return } @@ -277,6 +276,10 @@ func (e *bincEncDriver) EncodeSymbol(v string) { } func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + if v == nil { + e.EncodeNil() + return + } l := uint64(len(v)) e.encBytesLen(c, l) if l > 0 { @@ -286,7 +289,7 @@ func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { //TODO: support bincUnicodeOther (for now, just use string or bytearray) - if c == c_RAW { + if c == cRAW { e.encLen(bincVdByteArray<<4, length) } else { e.encLen(bincVdString<<4, length) @@ -325,6 +328,9 @@ type bincDecSymbol struct { } type bincDecDriver struct { + decDriverNoopContainerReader + noBuiltInTypes + d *Decoder h *BincHandle r decReader @@ -333,14 +339,15 @@ type bincDecDriver struct { bd byte vd byte vs byte - // noStreamingCodec - // decNoSeparator - b [scratchByteArrayLen]byte - + _ [3]byte // padding // linear searching on this slice is ok, // because we typically expect < 32 symbols in each stream. s []bincDecSymbol - decDriverNoopContainerReader + + // noStreamingCodec + // decNoSeparator + + b [8 * 8]byte // scratch } func (d *bincDecDriver) readNextBd() { @@ -371,9 +378,10 @@ func (d *bincDecDriver) ContainerType() (vt valueType) { return valueTypeArray } else if d.vd == bincVdMap { return valueTypeMap - } else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) } + // else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // } return valueTypeUnset } @@ -388,27 +396,24 @@ func (d *bincDecDriver) TryDecodeAsNil() bool { return false } -func (d *bincDecDriver) IsBuiltinType(rt uintptr) bool { - return rt == timeTypId -} - -func (d *bincDecDriver) DecodeBuiltin(rt uintptr, v interface{}) { +func (d *bincDecDriver) DecodeTime() (t time.Time) { if !d.bdRead { d.readNextBd() } - if rt == timeTypId { - if d.vd != bincVdTimestamp { - d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd) - return - } - tt, err := decodeTime(d.r.readx(int(d.vs))) - if err != nil { - panic(err) - } - var vt *time.Time = v.(*time.Time) - *vt = tt + if d.bd == bincVdSpecial<<4|bincSpNil { d.bdRead = false + return } + if d.vd != bincVdTimestamp { + d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd) + return + } + t, err := bincDecodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + d.bdRead = false + return } func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { @@ -497,45 +502,33 @@ func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { return } } else { - d.d.errorf("number can only be decoded from uint or int values. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd) + d.d.errorf("integer can only be decoded from int/uint. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd) return } return } -func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) { +func (d *bincDecDriver) DecodeInt64() (i int64) { ui, neg := d.decCheckInteger() - i, overflow := chkOvf.SignedInt(ui) - if overflow { - d.d.errorf("simple: overflow converting %v to signed integer", ui) - return - } + i = chkOvf.SignedIntV(ui) if neg { i = -i } - if chkOvf.Int(i, bitsize) { - d.d.errorf("binc: overflow integer: %v for num bits: %v", i, bitsize) - return - } d.bdRead = false return } -func (d *bincDecDriver) DecodeUint(bitsize uint8) (ui uint64) { +func (d *bincDecDriver) DecodeUint64() (ui uint64) { ui, neg := d.decCheckInteger() if neg { d.d.errorf("Assigning negative signed value to unsigned type") return } - if chkOvf.Uint(ui, bitsize) { - d.d.errorf("binc: overflow integer: %v", ui) - return - } d.bdRead = false return } -func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { +func (d *bincDecDriver) DecodeFloat64() (f float64) { if !d.bdRead { d.readNextBd() } @@ -557,11 +550,7 @@ func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { } else if vd == bincVdFloat { f = d.decFloat() } else { - f = float64(d.DecodeInt(64)) - } - if chkOverflow32 && chkOvf.Float32(f) { - d.d.errorf("binc: float32 overflow: %v", f) - return + f = float64(d.DecodeInt64()) } d.bdRead = false return @@ -633,7 +622,8 @@ func (d *bincDecDriver) decLenNumber() (v uint64) { return } -func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) (bs2 []byte, s string) { +func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) ( + bs2 []byte, s string) { if !d.bdRead { d.readNextBd() } @@ -641,7 +631,7 @@ func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) d.bdRead = false return } - var slen int = -1 + var slen = -1 // var ok bool switch d.vd { case bincVdString, bincVdByteArray: @@ -743,6 +733,11 @@ func (d *bincDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { d.bdRead = false return nil } + // check if an "array" of uint8's (see ContainerType for how to infer if an array) + if d.vd == bincVdArray { + bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + return + } var clen int if d.vd == bincVdString || d.vd == bincVdByteArray { clen = d.decLen() @@ -863,8 +858,8 @@ func (d *bincDecDriver) DecodeNaked() { n.v = valueTypeBytes n.l = d.DecodeBytes(nil, false) case bincVdTimestamp: - n.v = valueTypeTimestamp - tt, err := decodeTime(d.r.readx(int(d.vs))) + n.v = valueTypeTime + tt, err := bincDecodeTime(d.r.readx(int(d.vs))) if err != nil { panic(err) } @@ -912,27 +907,50 @@ type BincHandle struct { BasicHandle binaryEncodingType noElemSeparators + + // AsSymbols defines what should be encoded as symbols. + // + // Encoding as symbols can reduce the encoded size significantly. + // + // However, during decoding, each string to be encoded as a symbol must + // be checked to see if it has been seen before. Consequently, encoding time + // will increase if using symbols, because string comparisons has a clear cost. + // + // Values: + // - 0: default: library uses best judgement + // - 1: use symbols + // - 2: do not use symbols + AsSymbols uint8 + + // AsSymbols: may later on introduce more options ... + // - m: map keys + // - s: struct fields + // - n: none + // - a: all: same as m, s, ... + + _ [1]uint64 // padding } +// Name returns the name of the handle: binc +func (h *BincHandle) Name() string { return "binc" } + +// SetBytesExt sets an extension func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{b: ext}) + return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) } func (h *BincHandle) newEncDriver(e *Encoder) encDriver { - return &bincEncDriver{e: e, w: e.w} + return &bincEncDriver{e: e, h: h, w: e.w} } func (h *BincHandle) newDecDriver(d *Decoder) decDriver { return &bincDecDriver{d: d, h: h, r: d.r, br: d.bytes} } -func (_ *BincHandle) IsBuiltinType(rt uintptr) bool { - return rt == timeTypId -} - func (e *bincEncDriver) reset() { e.w = e.e.w e.s = 0 + e.c = 0 e.m = nil } @@ -942,5 +960,165 @@ func (d *bincDecDriver) reset() { d.bd, d.bdRead, d.vd, d.vs = 0, false, 0, 0 } +// var timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} + +// EncodeTime encodes a time.Time as a []byte, including +// information on the instant in time and UTC offset. +// +// Format Description +// +// A timestamp is composed of 3 components: +// +// - secs: signed integer representing seconds since unix epoch +// - nsces: unsigned integer representing fractional seconds as a +// nanosecond offset within secs, in the range 0 <= nsecs < 1e9 +// - tz: signed integer representing timezone offset in minutes east of UTC, +// and a dst (daylight savings time) flag +// +// When encoding a timestamp, the first byte is the descriptor, which +// defines which components are encoded and how many bytes are used to +// encode secs and nsecs components. *If secs/nsecs is 0 or tz is UTC, it +// is not encoded in the byte array explicitly*. +// +// Descriptor 8 bits are of the form `A B C DDD EE`: +// A: Is secs component encoded? 1 = true +// B: Is nsecs component encoded? 1 = true +// C: Is tz component encoded? 1 = true +// DDD: Number of extra bytes for secs (range 0-7). +// If A = 1, secs encoded in DDD+1 bytes. +// If A = 0, secs is not encoded, and is assumed to be 0. +// If A = 1, then we need at least 1 byte to encode secs. +// DDD says the number of extra bytes beyond that 1. +// E.g. if DDD=0, then secs is represented in 1 byte. +// if DDD=2, then secs is represented in 3 bytes. +// EE: Number of extra bytes for nsecs (range 0-3). +// If B = 1, nsecs encoded in EE+1 bytes (similar to secs/DDD above) +// +// Following the descriptor bytes, subsequent bytes are: +// +// secs component encoded in `DDD + 1` bytes (if A == 1) +// nsecs component encoded in `EE + 1` bytes (if B == 1) +// tz component encoded in 2 bytes (if C == 1) +// +// secs and nsecs components are integers encoded in a BigEndian +// 2-complement encoding format. +// +// tz component is encoded as 2 bytes (16 bits). Most significant bit 15 to +// Least significant bit 0 are described below: +// +// Timezone offset has a range of -12:00 to +14:00 (ie -720 to +840 minutes). +// Bit 15 = have\_dst: set to 1 if we set the dst flag. +// Bit 14 = dst\_on: set to 1 if dst is in effect at the time, or 0 if not. +// Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. +// +func bincEncodeTime(t time.Time) []byte { + //t := rv.Interface().(time.Time) + tsecs, tnsecs := t.Unix(), t.Nanosecond() + var ( + bd byte + btmp [8]byte + bs [16]byte + i int = 1 + ) + l := t.Location() + if l == time.UTC { + l = nil + } + if tsecs != 0 { + bd = bd | 0x80 + bigen.PutUint64(btmp[:], uint64(tsecs)) + f := pruneSignExt(btmp[:], tsecs >= 0) + bd = bd | (byte(7-f) << 2) + copy(bs[i:], btmp[f:]) + i = i + (8 - f) + } + if tnsecs != 0 { + bd = bd | 0x40 + bigen.PutUint32(btmp[:4], uint32(tnsecs)) + f := pruneSignExt(btmp[:4], true) + bd = bd | byte(3-f) + copy(bs[i:], btmp[f:4]) + i = i + (4 - f) + } + if l != nil { + bd = bd | 0x20 + // Note that Go Libs do not give access to dst flag. + _, zoneOffset := t.Zone() + //zoneName, zoneOffset := t.Zone() + zoneOffset /= 60 + z := uint16(zoneOffset) + bigen.PutUint16(btmp[:2], z) + // clear dst flags + bs[i] = btmp[0] & 0x3f + bs[i+1] = btmp[1] + i = i + 2 + } + bs[0] = bd + return bs[0:i] +} + +// bincDecodeTime decodes a []byte into a time.Time. +func bincDecodeTime(bs []byte) (tt time.Time, err error) { + bd := bs[0] + var ( + tsec int64 + tnsec uint32 + tz uint16 + i byte = 1 + i2 byte + n byte + ) + if bd&(1<<7) != 0 { + var btmp [8]byte + n = ((bd >> 2) & 0x7) + 1 + i2 = i + n + copy(btmp[8-n:], bs[i:i2]) + //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) + if bs[i]&(1<<7) != 0 { + copy(btmp[0:8-n], bsAll0xff) + //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } + } + i = i2 + tsec = int64(bigen.Uint64(btmp[:])) + } + if bd&(1<<6) != 0 { + var btmp [4]byte + n = (bd & 0x3) + 1 + i2 = i + n + copy(btmp[4-n:], bs[i:i2]) + i = i2 + tnsec = bigen.Uint32(btmp[:]) + } + if bd&(1<<5) == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + return + } + // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. + // However, we need name here, so it can be shown when time is printed. + // Zone name is in form: UTC-08:00. + // Note that Go Libs do not give access to dst flag, so we ignore dst bits + + i2 = i + 2 + tz = bigen.Uint16(bs[i:i2]) + // i = i2 + // sign extend sign bit into top 2 MSB (which were dst bits): + if tz&(1<<13) == 0 { // positive + tz = tz & 0x3fff //clear 2 MSBs: dst bits + } else { // negative + tz = tz | 0xc000 //set 2 MSBs: dst bits + } + tzint := int16(tz) + if tzint == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + } else { + // For Go Time, do not use a descriptive timezone. + // It's unnecessary, and makes it harder to do a reflect.DeepEqual. + // The Offset already tells what the offset should be, if not on UTC and unknown zone name. + // var zoneName = timeLocUTCName(tzint) + tt = time.Unix(tsec, int64(tnsec)).In(time.FixedZone("", int(tzint)*60)) + } + return +} + var _ decDriver = (*bincDecDriver)(nil) var _ encDriver = (*bincEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/cbor.go b/vendor/github.com/ugorji/go/codec/cbor.go index 3bc328f..be01e19 100644 --- a/vendor/github.com/ugorji/go/codec/cbor.go +++ b/vendor/github.com/ugorji/go/codec/cbor.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -6,6 +6,7 @@ package codec import ( "math" "reflect" + "time" ) const ( @@ -38,6 +39,8 @@ const ( cborBdBreak = 0xff ) +// These define some in-stream descriptors for +// manual encoding e.g. when doing explicit indefinite-length const ( CborStreamBytes byte = 0x5f CborStreamString = 0x7f @@ -67,6 +70,7 @@ type cborEncDriver struct { w encWriter h *CborHandle x [8]byte + _ [3]uint64 // padding } func (e *cborEncDriver) EncodeNil() { @@ -124,6 +128,24 @@ func (e *cborEncDriver) encLen(bd byte, length int) { e.encUint(uint64(length), bd) } +func (e *cborEncDriver) EncodeTime(t time.Time) { + if t.IsZero() { + e.EncodeNil() + } else if e.h.TimeRFC3339 { + e.encUint(0, cborBaseTag) + e.EncodeString(cUTF8, t.Format(time.RFC3339Nano)) + } else { + e.encUint(1, cborBaseTag) + t = t.UTC().Round(time.Microsecond) + sec, nsec := t.Unix(), uint64(t.Nanosecond()) + if nsec == 0 { + e.EncodeInt(sec) + } else { + e.EncodeFloat64(float64(sec) + float64(nsec)/1e9) + } + } +} + func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { e.encUint(uint64(xtag), cborBaseTag) if v := ext.ConvertExt(rv); v == nil { @@ -172,16 +194,14 @@ func (e *cborEncDriver) WriteArrayEnd() { } } -func (e *cborEncDriver) EncodeSymbol(v string) { - e.encStringBytesS(cborBaseString, v) -} - func (e *cborEncDriver) EncodeString(c charEncoding, v string) { e.encStringBytesS(cborBaseString, v) } func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { - if c == c_RAW { + if v == nil { + e.EncodeNil() + } else if c == cRAW { e.encStringBytesS(cborBaseBytes, stringView(v)) } else { e.encStringBytesS(cborBaseString, stringView(v)) @@ -223,16 +243,17 @@ func (e *cborEncDriver) encStringBytesS(bb byte, v string) { // ---------------------- type cborDecDriver struct { - d *Decoder - h *CborHandle - r decReader - b [scratchByteArrayLen]byte + d *Decoder + h *CborHandle + r decReader + // b [scratchByteArrayLen]byte br bool // bytes reader bdRead bool bd byte noBuiltInTypes // decNoSeparator decDriverNoopContainerReader + _ [3]uint64 // padding } func (d *cborDecDriver) readNextBd() { @@ -261,9 +282,10 @@ func (d *cborDecDriver) ContainerType() (vt valueType) { return valueTypeArray } else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) { return valueTypeMap - } else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) } + // else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // } return valueTypeUnset } @@ -326,46 +348,30 @@ func (d *cborDecDriver) decCheckInteger() (neg bool) { return } -func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) { +func (d *cborDecDriver) DecodeInt64() (i int64) { neg := d.decCheckInteger() ui := d.decUint() // check if this number can be converted to an int without overflow - var overflow bool if neg { - if i, overflow = chkOvf.SignedInt(ui + 1); overflow { - d.d.errorf("cbor: overflow converting %v to signed integer", ui+1) - return - } - i = -i + i = -(chkOvf.SignedIntV(ui + 1)) } else { - if i, overflow = chkOvf.SignedInt(ui); overflow { - d.d.errorf("cbor: overflow converting %v to signed integer", ui) - return - } - } - if chkOvf.Int(i, bitsize) { - d.d.errorf("cbor: overflow integer: %v", i) - return + i = chkOvf.SignedIntV(ui) } d.bdRead = false return } -func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) { +func (d *cborDecDriver) DecodeUint64() (ui uint64) { if d.decCheckInteger() { d.d.errorf("Assigning negative signed value to unsigned type") return } ui = d.decUint() - if chkOvf.Uint(ui, bitsize) { - d.d.errorf("cbor: overflow integer: %v", ui) - return - } d.bdRead = false return } -func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { +func (d *cborDecDriver) DecodeFloat64() (f float64) { if !d.bdRead { d.readNextBd() } @@ -376,15 +382,11 @@ func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { } else if bd == cborBdFloat64 { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) } else if bd >= cborBaseUint && bd < cborBaseBytes { - f = float64(d.DecodeInt(64)) + f = float64(d.DecodeInt64()) } else { d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd) return } - if chkOverflow32 && chkOvf.Float32(f) { - d.d.errorf("cbor: float32 overflow: %v", f) - return - } d.bdRead = false return } @@ -438,7 +440,8 @@ func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { break } if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText { - d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd) + d.d.errorf("expect bytes/string major type in indefinite string/bytes;"+ + " got: %v, byte: %v", major, d.bd) return nil } n := d.decLen() @@ -470,28 +473,82 @@ func (d *cborDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString { d.bdRead = false if bs == nil { + if zerocopy { + return d.decAppendIndefiniteBytes(d.d.b[:0]) + } return d.decAppendIndefiniteBytes(zeroByteSlice) } return d.decAppendIndefiniteBytes(bs[:0]) } + // check if an "array" of uint8's (see ContainerType for how to infer if an array) + if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { + bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + return + } clen := d.decLen() d.bdRead = false if zerocopy { if d.br { return d.r.readx(clen) } else if len(bs) == 0 { - bs = d.b[:] + bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.d.h.MaxInitLen, bs) + return decByteSlice(d.r, clen, d.h.MaxInitLen, bs) } func (d *cborDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.b[:], true)) + return string(d.DecodeBytes(d.d.b[:], true)) } func (d *cborDecDriver) DecodeStringAsBytes() (s []byte) { - return d.DecodeBytes(d.b[:], true) + return d.DecodeBytes(d.d.b[:], true) +} + +func (d *cborDecDriver) DecodeTime() (t time.Time) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return + } + xtag := d.decUint() + d.bdRead = false + return d.decodeTime(xtag) +} + +func (d *cborDecDriver) decodeTime(xtag uint64) (t time.Time) { + if !d.bdRead { + d.readNextBd() + } + switch xtag { + case 0: + var err error + if t, err = time.Parse(time.RFC3339, stringView(d.DecodeStringAsBytes())); err != nil { + d.d.errorv(err) + } + case 1: + // decode an int64 or a float, and infer time.Time from there. + // for floats, round to microseconds, as that is what is guaranteed to fit well. + switch { + case d.bd == cborBdFloat16, d.bd == cborBdFloat32: + f1, f2 := math.Modf(d.DecodeFloat64()) + t = time.Unix(int64(f1), int64(f2*1e9)) + case d.bd == cborBdFloat64: + f1, f2 := math.Modf(d.DecodeFloat64()) + t = time.Unix(int64(f1), int64(f2*1e9)) + case d.bd >= cborBaseUint && d.bd < cborBaseNegInt, + d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: + t = time.Unix(d.DecodeInt64(), 0) + default: + d.d.errorf("time.Time can only be decoded from a number (or RFC3339 string)") + } + default: + d.d.errorf("invalid tag for time.Time - expecting 0 or 1, got 0x%x", xtag) + } + t = t.UTC().Round(time.Microsecond) + return } func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { @@ -534,12 +591,9 @@ func (d *cborDecDriver) DecodeNaked() { case cborBdTrue: n.v = valueTypeBool n.b = true - case cborBdFloat16, cborBdFloat32: + case cborBdFloat16, cborBdFloat32, cborBdFloat64: n.v = valueTypeFloat - n.f = d.DecodeFloat(true) - case cborBdFloat64: - n.v = valueTypeFloat - n.f = d.DecodeFloat(false) + n.f = d.DecodeFloat64() case cborBdIndefiniteBytes: n.v = valueTypeBytes n.l = d.DecodeBytes(nil, false) @@ -557,14 +611,14 @@ func (d *cborDecDriver) DecodeNaked() { case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: if d.h.SignedInteger { n.v = valueTypeInt - n.i = d.DecodeInt(64) + n.i = d.DecodeInt64() } else { n.v = valueTypeUint - n.u = d.DecodeUint(64) + n.u = d.DecodeUint64() } case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: n.v = valueTypeInt - n.i = d.DecodeInt(64) + n.i = d.DecodeInt64() case d.bd >= cborBaseBytes && d.bd < cborBaseString: n.v = valueTypeBytes n.l = d.DecodeBytes(nil, false) @@ -581,6 +635,11 @@ func (d *cborDecDriver) DecodeNaked() { n.v = valueTypeExt n.u = d.decUint() n.l = nil + if n.u == 0 || n.u == 1 { + d.bdRead = false + n.v = valueTypeTime + n.t = d.decodeTime(n.u) + } // d.bdRead = false // d.d.decode(&re.Value) // handled by decode itself. // decodeFurther = true @@ -611,23 +670,8 @@ func (d *cborDecDriver) DecodeNaked() { // // None of the optional extensions (with tags) defined in the spec are supported out-of-the-box. // Users can implement them as needed (using SetExt), including spec-documented ones: -// - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. -// -// To encode with indefinite lengths (streaming), users will use -// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants. -// -// For example, to encode "one-byte" as an indefinite length string: -// var buf bytes.Buffer -// e := NewEncoder(&buf, new(CborHandle)) -// buf.WriteByte(CborStreamString) -// e.MustEncode("one-") -// e.MustEncode("byte") -// buf.WriteByte(CborStreamBreak) -// encodedBytes := buf.Bytes() -// var vv interface{} -// NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv) -// // Now, vv contains the same string "one-byte" -// +// - timestamp, BigNum, BigFloat, Decimals, +// - Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. type CborHandle struct { binaryEncodingType noElemSeparators @@ -635,10 +679,20 @@ type CborHandle struct { // IndefiniteLength=true, means that we encode using indefinitelength IndefiniteLength bool + + // TimeRFC3339 says to encode time.Time using RFC3339 format. + // If unset, we encode time.Time using seconds past epoch. + TimeRFC3339 bool + + _ [1]uint64 // padding } +// Name returns the name of the handle: cbor +func (h *CborHandle) Name() string { return "cbor" } + +// SetInterfaceExt sets an extension func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{i: ext}) + return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) } func (h *CborHandle) newEncDriver(e *Encoder) encDriver { diff --git a/vendor/github.com/ugorji/go/codec/cbor_test.go b/vendor/github.com/ugorji/go/codec/cbor_test.go index af94027..611ddff 100644 --- a/vendor/github.com/ugorji/go/codec/cbor_test.go +++ b/vendor/github.com/ugorji/go/codec/cbor_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec diff --git a/vendor/github.com/ugorji/go/codec/codec_test.go b/vendor/github.com/ugorji/go/codec/codec_test.go index 1b4e921..22e1e3a 100644 --- a/vendor/github.com/ugorji/go/codec/codec_test.go +++ b/vendor/github.com/ugorji/go/codec/codec_test.go @@ -1,28 +1,14 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec -// Test works by using a slice of interfaces. -// It can test for encoding/decoding into/from a nil interface{} -// or passing the object to encode/decode into. -// -// There are basically 2 main tests here. -// First test internally encodes and decodes things and verifies that -// the artifact was as expected. -// Second test will use python msgpack to create a bunch of golden files, -// read those files, and compare them to what it should be. It then -// writes those files back out and compares the byte streams. -// -// Taken together, the tests are pretty extensive. -// -// The following manual tests must be done: -// - TestCodecUnderlyingType - import ( + "bufio" "bytes" "encoding/gob" "fmt" + "io" "io/ioutil" "math" "math/rand" @@ -49,10 +35,34 @@ func init() { // ) } +type testCustomStringT string + // make this a mapbyslice type testMbsT []interface{} -func (_ testMbsT) MapBySlice() {} +func (testMbsT) MapBySlice() {} + +type testMbsCustStrT []testCustomStringT + +func (testMbsCustStrT) MapBySlice() {} + +type testIntfMapI interface { + GetIntfMapV() string +} + +type testIntfMapT1 struct { + IntfMapV string +} + +func (x *testIntfMapT1) GetIntfMapV() string { return x.IntfMapV } + +type testIntfMapT2 struct { + IntfMapV string +} + +func (x testIntfMapT2) GetIntfMapV() string { return x.IntfMapV } + +// ---- type testVerifyFlag uint8 @@ -102,6 +112,9 @@ var ( testRpcInt = new(TestRpcInt) ) +var wrapInt64Typ = reflect.TypeOf(wrapInt64(0)) +var wrapBytesTyp = reflect.TypeOf(wrapBytes(nil)) + func testByteBuf(in []byte) *bytes.Buffer { return bytes.NewBuffer(in) } @@ -179,23 +192,27 @@ type TestRawValue struct { I int } +// ---- + type testUnixNanoTimeExt struct { // keep timestamp here, so that do not incur interface-conversion costs - ts int64 + // ts int64 } -// func (x *testUnixNanoTimeExt) WriteExt(interface{}) []byte { panic("unsupported") } -// func (x *testUnixNanoTimeExt) ReadExt(interface{}, []byte) { panic("unsupported") } +func (x *testUnixNanoTimeExt) WriteExt(v interface{}) []byte { + v2 := v.(*time.Time) + bs := make([]byte, 8) + bigen.PutUint64(bs, uint64(v2.UnixNano())) + return bs +} +func (x *testUnixNanoTimeExt) ReadExt(v interface{}, bs []byte) { + v2 := v.(*time.Time) + ui := bigen.Uint64(bs) + *v2 = time.Unix(0, int64(ui)).UTC() +} func (x *testUnixNanoTimeExt) ConvertExt(v interface{}) interface{} { - switch v2 := v.(type) { - case time.Time: - x.ts = v2.UTC().UnixNano() - case *time.Time: - x.ts = v2.UTC().UnixNano() - default: - panic(fmt.Sprintf("unsupported format for time conversion: expecting time.Time; got %T", v)) - } - return &x.ts + v2 := v.(*time.Time) // structs are encoded by passing the ptr + return v2.UTC().UnixNano() } func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { @@ -203,12 +220,8 @@ func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { switch v2 := v.(type) { case int64: *tt = time.Unix(0, v2).UTC() - case *int64: - *tt = time.Unix(0, *v2).UTC() case uint64: *tt = time.Unix(0, int64(v2)).UTC() - case *uint64: - *tt = time.Unix(0, int64(*v2)).UTC() //case float64: //case string: default: @@ -216,6 +229,91 @@ func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { } } +// ---- + +type wrapInt64Ext int64 + +func (x *wrapInt64Ext) WriteExt(v interface{}) []byte { + v2 := uint64(int64(v.(wrapInt64))) + bs := make([]byte, 8) + bigen.PutUint64(bs, v2) + return bs +} +func (x *wrapInt64Ext) ReadExt(v interface{}, bs []byte) { + v2 := v.(*wrapInt64) + ui := bigen.Uint64(bs) + *v2 = wrapInt64(int64(ui)) +} +func (x *wrapInt64Ext) ConvertExt(v interface{}) interface{} { + return int64(v.(wrapInt64)) +} +func (x *wrapInt64Ext) UpdateExt(dest interface{}, v interface{}) { + v2 := dest.(*wrapInt64) + *v2 = wrapInt64(v.(int64)) +} + +// ---- + +type wrapBytesExt struct{} + +func (x *wrapBytesExt) WriteExt(v interface{}) []byte { + return ([]byte)(v.(wrapBytes)) +} +func (x *wrapBytesExt) ReadExt(v interface{}, bs []byte) { + v2 := v.(*wrapBytes) + *v2 = wrapBytes(bs) +} +func (x *wrapBytesExt) ConvertExt(v interface{}) interface{} { + return ([]byte)(v.(wrapBytes)) +} +func (x *wrapBytesExt) UpdateExt(dest interface{}, v interface{}) { + v2 := dest.(*wrapBytes) + // some formats (e.g. json) cannot nakedly determine []byte from string, so expect both + switch v3 := v.(type) { + case []byte: + *v2 = wrapBytes(v3) + case string: + *v2 = wrapBytes([]byte(v3)) + default: + panic("UpdateExt for wrapBytesExt expects string or []byte") + } + // *v2 = wrapBytes(v.([]byte)) +} + +// ---- + +// timeExt is an extension handler for time.Time, that uses binc model for encoding/decoding time. +// we used binc model, as that is the only custom time representation that we designed ourselves. +type timeExt struct{} + +func (x timeExt) WriteExt(v interface{}) (bs []byte) { + switch v2 := v.(type) { + case time.Time: + bs = bincEncodeTime(v2) + case *time.Time: + bs = bincEncodeTime(*v2) + default: + panic(fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)) + } + return +} +func (x timeExt) ReadExt(v interface{}, bs []byte) { + tt, err := bincDecodeTime(bs) + if err != nil { + panic(err) + } + *(v.(*time.Time)) = tt +} + +func (x timeExt) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} +func (x timeExt) UpdateExt(v interface{}, src interface{}) { + x.ReadExt(v, src.([]byte)) +} + +// ---- + func testCodecEncode(ts interface{}, bsIn []byte, fn func([]byte) *bytes.Buffer, h Handle) (bs []byte, err error) { return sTestCodecEncode(ts, bsIn, fn, h, h.getBasicHandle()) @@ -258,8 +356,8 @@ func testInit() { // pre-fill them first bh.EncodeOptions = testEncodeOptions bh.DecodeOptions = testDecodeOptions - // bh.InterfaceReset = true // TODO: remove - // bh.PreferArrayOverSlice = true // TODO: remove + // bh.InterfaceReset = true + // bh.PreferArrayOverSlice = true // modify from flag'ish things bh.InternString = testInternStr bh.Canonical = testCanonical @@ -270,31 +368,59 @@ func testInit() { testMsgpackH.RawToString = true - // testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt) - // testMsgpackH.AddExt(timeTyp, 1, testMsgpackH.TimeEncodeExt, testMsgpackH.TimeDecodeExt) + var tTimeExt timeExt + var tBytesExt wrapBytesExt + var tI64Ext wrapInt64Ext - // add extensions for msgpack, simple for time.Time, so we can encode/decode same way. - // use different flavors of XXXExt calls, including deprecated ones. - // NOTE: - // DO NOT set extensions for JsonH, so we can test json(M|Unm)arshal support. + // create legacy functions suitable for deprecated AddExt functionality, + // and use on some places for testSimpleH e.g. for time.Time and wrapInt64 var ( - timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) { - defer panicToErr(&err) - bs = timeExt{}.WriteExt(rv.Interface()) + myExtEncFn = func(x BytesExt, rv reflect.Value) (bs []byte, err error) { + defer panicToErr(errstrDecoratorDef{}, &err) + bs = x.WriteExt(rv.Interface()) return } - timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) { - defer panicToErr(&err) - timeExt{}.ReadExt(rv.Interface(), bs) + myExtDecFn = func(x BytesExt, rv reflect.Value, bs []byte) (err error) { + defer panicToErr(errstrDecoratorDef{}, &err) + x.ReadExt(rv.Interface(), bs) return } + timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) { return myExtEncFn(tTimeExt, rv) } + timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) { return myExtDecFn(tTimeExt, rv, bs) } + wrapInt64ExtEncFn = func(rv reflect.Value) (bs []byte, err error) { return myExtEncFn(&tI64Ext, rv) } + wrapInt64ExtDecFn = func(rv reflect.Value, bs []byte) (err error) { return myExtDecFn(&tI64Ext, rv, bs) } ) - testSimpleH.AddExt(timeTyp, 1, timeExtEncFn, timeExtDecFn) + + chkErr := func(err error) { + if err != nil { + panic(err) + } + } + + // time.Time is a native type, so extensions will have no effect. + // However, we add these here to ensure nothing happens. + chkErr(testSimpleH.AddExt(timeTyp, 1, timeExtEncFn, timeExtDecFn)) // testBincH.SetBytesExt(timeTyp, 1, timeExt{}) // time is builtin for binc - testMsgpackH.SetBytesExt(timeTyp, 1, timeExt{}) - testCborH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{}) + chkErr(testMsgpackH.SetBytesExt(timeTyp, 1, timeExt{})) + chkErr(testCborH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{})) // testJsonH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{}) + // Now, add extensions for the type wrapInt64 and wrapBytes, + // so we can execute the Encode/Decode Ext paths. + + chkErr(testSimpleH.SetBytesExt(wrapBytesTyp, 32, &tBytesExt)) + chkErr(testMsgpackH.SetBytesExt(wrapBytesTyp, 32, &tBytesExt)) + chkErr(testBincH.SetBytesExt(wrapBytesTyp, 32, &tBytesExt)) + chkErr(testJsonH.SetInterfaceExt(wrapBytesTyp, 32, &tBytesExt)) + chkErr(testCborH.SetInterfaceExt(wrapBytesTyp, 32, &tBytesExt)) + + chkErr(testSimpleH.AddExt(wrapInt64Typ, 16, wrapInt64ExtEncFn, wrapInt64ExtDecFn)) + // chkErr(testSimpleH.SetBytesExt(wrapInt64Typ, 16, &tI64Ext)) + chkErr(testMsgpackH.SetBytesExt(wrapInt64Typ, 16, &tI64Ext)) + chkErr(testBincH.SetBytesExt(wrapInt64Typ, 16, &tI64Ext)) + chkErr(testJsonH.SetInterfaceExt(wrapInt64Typ, 16, &tI64Ext)) + chkErr(testCborH.SetInterfaceExt(wrapInt64Typ, 16, &tI64Ext)) + // primitives MUST be an even number, so it can be used as a mapBySlice also. primitives := []interface{}{ int8(-8), @@ -427,6 +553,8 @@ func testTableVerify(f testVerifyFlag, h Handle) (av []interface{}) { av[i] = testVerifyVal(v, f, h) case map[interface{}]interface{}: av[i] = testVerifyVal(v, f, h) + case time.Time: + av[i] = testVerifyVal(v, f, h) default: av[i] = v } @@ -455,6 +583,7 @@ func testVerifyVal(v interface{}, f testVerifyFlag, h Handle) (v2 interface{}) { // - all positive integers are unsigned 64-bit ints // - all floats are float64 _, isMsgp := h.(*MsgpackHandle) + _, isCbor := h.(*CborHandle) switch iv := v.(type) { case int8: v2 = testVerifyValInt(int64(iv), isMsgp) @@ -545,6 +674,11 @@ func testVerifyVal(v interface{}, f testVerifyFlag, h Handle) (v2 interface{}) { } else { v2 = int64(iv2) } + case isMsgp: + v2 = iv.UTC() + case isCbor: + // fmt.Printf("%%%% cbor verifier\n") + v2 = iv.UTC().Round(time.Microsecond) default: v2 = v } @@ -584,6 +718,17 @@ func testDeepEqualErr(v1, v2 interface{}, t *testing.T, name string) { } } +func testReadWriteCloser(c io.ReadWriteCloser) io.ReadWriteCloser { + if testRpcBufsize <= 0 && rand.Int63()%2 == 0 { + return c + } + return struct { + io.Closer + *bufio.Reader + *bufio.Writer + }{c, bufio.NewReaderSize(c, testRpcBufsize), bufio.NewWriterSize(c, testRpcBufsize)} +} + // doTestCodecTableOne allows us test for different variations based on arguments passed. func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, vs []interface{}, vsVerify []interface{}) { @@ -623,7 +768,7 @@ func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, } } - logT(t, " v1 returned: %T, %#v", v1, v1) + logT(t, " v1 returned: %T, %v %#v", v1, v1, v1) // if v1 != nil { // logT(t, " v1 returned: %T, %#v", v1, v1) // //we always indirect, because ptr to typed value may be passed (if not testNil) @@ -644,8 +789,8 @@ func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, // logT(t, "-------- Before and After marshal do not match: Error: %v"+ // " ====> GOLDEN: (%T) %#v, DECODED: (%T) %#v\n", err, v0check, v0check, v1, v1) logT(t, "-------- FAIL: Before and After marshal do not match: Error: %v", err) - logT(t, " ....... GOLDEN: (%T) %#v", v0check, v0check) - logT(t, " ....... DECODED: (%T) %#v", v1, v1) + logT(t, " ....... GOLDEN: (%T) %v %#v", v0check, v0check, v0check) + logT(t, " ....... DECODED: (%T) %v %#v", v1, v1, v1) failT(t) } } @@ -713,7 +858,7 @@ func testCodecMiscOne(t *testing.T, h Handle) { // logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr") // failT(t) // } - var i2 int32 = 0 + var i2 int32 testUnmarshalErr(&i2, b, h, t, "int32-ptr") if i2 != int32(32) { logT(t, "------- didn't unmarshal to 32: Received: %d", i2) @@ -814,6 +959,19 @@ func testCodecMiscOne(t *testing.T, h Handle) { var ya = ystruct{} testUnmarshalErr(&ya, []byte{0x91, 0x90}, h, t, "ya") } + + var tt1, tt2 time.Time + tt2 = time.Now() + bs = testMarshalErr(tt1, h, t, "zero-time-enc") + testUnmarshalErr(&tt2, bs, h, t, "zero-time-dec") + testDeepEqualErr(tt1, tt2, t, "zero-time-eq") + + // test encoding a slice of byte (but not []byte) and decoding into a []byte + var sw = []wrapUint8{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'} + var bw []byte // ("ABCDEFGHIJ") + bs = testMarshalErr(sw, h, t, "wrap-bytes-enc") + testUnmarshalErr(&bw, bs, h, t, "wrap-bytes-dec") + testDeepEqualErr(bw, []byte("ABCDEFGHIJ"), t, "wrap-bytes-eq") } func testCodecEmbeddedPointer(t *testing.T, h Handle) { @@ -1001,7 +1159,7 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs // opts.MapType = mapStrIntfTyp // opts.RawToString = false serverExitChan := make(chan bool, 1) - var serverExitFlag uint64 = 0 + var serverExitFlag uint64 serverFn := func() { for { conn1, err1 := ln.Accept() @@ -1015,7 +1173,7 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs return // exit serverFn goroutine } if err1 == nil { - var sc rpc.ServerCodec = rr.ServerCodec(conn1, h) + sc := rr.ServerCodec(testReadWriteCloser(conn1), h) srv.ServeCodec(sc) } } @@ -1066,7 +1224,7 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs } if doRequest { bs := connFn() - cc := rr.ClientCodec(bs, h) + cc := rr.ClientCodec(testReadWriteCloser(bs), h) clientFn(cc) } if exitSleepMs != 0 { @@ -1476,7 +1634,7 @@ func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) { bs, err2 = net.Dial("tcp", ":"+openPort) } checkErrT(t, err2) - cc := MsgpackSpecRpc.ClientCodec(bs, testMsgpackH) + cc := MsgpackSpecRpc.ClientCodec(testReadWriteCloser(bs), testMsgpackH) cl := rpc.NewClientWithCodec(cc) defer cl.Close() var rstr string @@ -1520,39 +1678,75 @@ func doTestSwallowAndZero(t *testing.T, h Handle) { logT(t, "swallow didn't consume all encoded bytes: %v out of %v", d1.r.numread(), len(b1)) failT(t) } - d1.setZero(v1) + setZero(v1) testDeepEqualErr(v1, &TestStrucFlex{}, t, "filled-and-zeroed") } func doTestRawExt(t *testing.T, h Handle) { testOnce.Do(testInitAll) - // return // TODO: need to fix this ... var b []byte - var v interface{} + var v RawExt // interface{} _, isJson := h.(*JsonHandle) _, isCbor := h.(*CborHandle) - isValuer := isJson || isCbor - _ = isValuer + bh := h.getBasicHandle() + // isValuer := isJson || isCbor + // _ = isValuer for _, r := range []RawExt{ {Tag: 99, Value: "9999", Data: []byte("9999")}, } { e := NewEncoderBytes(&b, h) e.MustEncode(&r) + // fmt.Printf(">>>> rawext: isnil? %v, %d - %v\n", b == nil, len(b), b) d := NewDecoderBytes(b, h) d.MustDecode(&v) - switch h.(type) { - case *JsonHandle: - testDeepEqualErr(r.Value, v, t, "rawext-json") + var r2 = r + switch { + case isJson: + r2.Tag = 0 + r2.Data = nil + case isCbor: + r2.Data = nil default: - r2 := r - if isValuer { - r2.Data = nil - } else { - r2.Value = nil - } - testDeepEqualErr(v, r2, t, "rawext-default") + r2.Value = nil } + testDeepEqualErr(v, r2, t, "rawext-default") + // switch h.(type) { + // case *JsonHandle: + // testDeepEqualErr(r.Value, v, t, "rawext-json") + // default: + // var r2 = r + // if isValuer { + // r2.Data = nil + // } else { + // r2.Value = nil + // } + // testDeepEqualErr(v, r2, t, "rawext-default") + // } } + + // Add testing for Raw also + if b != nil { + b = b[:0] + } + oldRawMode := bh.Raw + defer func() { bh.Raw = oldRawMode }() + bh.Raw = true + + var v2 Raw + for _, s := range []string{ + "goodbye", + "hello", + } { + e := NewEncoderBytes(&b, h) + e.MustEncode(&s) + // fmt.Printf(">>>> rawext: isnil? %v, %d - %v\n", b == nil, len(b), b) + var r Raw = make([]byte, len(b)) + copy(r, b) + d := NewDecoderBytes(b, h) + d.MustDecode(&v2) + testDeepEqualErr(v2, r, t, "raw-default") + } + } // func doTestTimeExt(t *testing.T, h Handle) { @@ -1589,6 +1783,7 @@ func doTestMapStructKey(t *testing.T, h Handle) { } func doTestDecodeNilMapValue(t *testing.T, handle Handle) { + testOnce.Do(testInitAll) type Struct struct { Field map[uint16]map[uint32]struct{} } @@ -1631,6 +1826,7 @@ func doTestDecodeNilMapValue(t *testing.T, handle Handle) { } func doTestEmbeddedFieldPrecedence(t *testing.T, h Handle) { + testOnce.Do(testInitAll) type Embedded struct { Field byte } @@ -1672,6 +1868,7 @@ func doTestEmbeddedFieldPrecedence(t *testing.T, h Handle) { } func doTestLargeContainerLen(t *testing.T, h Handle) { + testOnce.Do(testInitAll) m := make(map[int][]struct{}) for i := range []int{ 0, 1, @@ -1691,8 +1888,6 @@ func doTestLargeContainerLen(t *testing.T, h Handle) { testUnmarshalErr(m2, bs, h, t, "-") testDeepEqualErr(m, m2, t, "-") - // TODO: skip rest if 32-bit - // do same tests for large strings (encoded as symbols or not) // skip if 32-bit or not using unsafe mode if safeMode || (32<<(^uint(0)>>63)) < 64 { @@ -1704,10 +1899,11 @@ func doTestLargeContainerLen(t *testing.T, h Handle) { // to do this, we create a simple one-field struct, // use use flags to switch from symbols to non-symbols - bh := h.getBasicHandle() - oldAsSymbols := bh.AsSymbols - defer func() { bh.AsSymbols = oldAsSymbols }() - + hbinc, okbinc := h.(*BincHandle) + if okbinc { + oldAsSymbols := hbinc.AsSymbols + defer func() { hbinc.AsSymbols = oldAsSymbols }() + } var out []byte = make([]byte, 0, math.MaxUint16*3/2) var in []byte = make([]byte, math.MaxUint16*3/2) for i := range in { @@ -1728,7 +1924,9 @@ func doTestLargeContainerLen(t *testing.T, h Handle) { // fmt.Printf("testcontainerlen: large string: i: %v, |%s|\n", i, s1) m1[s1] = true - bh.AsSymbols = AsSymbolNone + if okbinc { + hbinc.AsSymbols = 2 + } out = out[:0] e.ResetBytes(&out) e.MustEncode(m1) @@ -1737,15 +1935,17 @@ func doTestLargeContainerLen(t *testing.T, h Handle) { testUnmarshalErr(m2, out, h, t, "no-symbols") testDeepEqualErr(m1, m2, t, "no-symbols") - // now, do as symbols - bh.AsSymbols = AsSymbolAll - out = out[:0] - e.ResetBytes(&out) - e.MustEncode(m1) - // bs, _ = testMarshalErr(m1, h, t, "-") - m2 = make(map[string]bool, 1) - testUnmarshalErr(m2, out, h, t, "symbols") - testDeepEqualErr(m1, m2, t, "symbols") + if okbinc { + // now, do as symbols + hbinc.AsSymbols = 1 + out = out[:0] + e.ResetBytes(&out) + e.MustEncode(m1) + // bs, _ = testMarshalErr(m1, h, t, "-") + m2 = make(map[string]bool, 1) + testUnmarshalErr(m2, out, h, t, "symbols") + testDeepEqualErr(m1, m2, t, "symbols") + } } } @@ -1813,7 +2013,9 @@ func testRandomFillRV(v reflect.Value) { case reflect.Float32, reflect.Float64: v.SetFloat(float64(fneg()) * float64(rand.Float32())) case reflect.String: - v.SetString(strings.Repeat(strconv.FormatInt(rand.Int63n(99), 10), rand.Intn(8))) + // ensure this string can test the extent of json string decoding + v.SetString(strings.Repeat(strconv.FormatInt(rand.Int63n(99), 10), rand.Intn(8)) + + "- ABC \x41=\x42 \u2318 - \r \b \f - \u2028 and \u2029 .") default: panic(fmt.Errorf("testRandomFillRV: unsupported type: %v", v.Kind())) } @@ -1838,6 +2040,7 @@ func testMammoth(t *testing.T, name string, h Handle) { } func testTime(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) // test time which uses the time.go implementation (ie Binc) var tt, tt2 time.Time // time in 1990 @@ -1854,6 +2057,7 @@ func testTime(t *testing.T, name string, h Handle) { } func testUintToInt(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) var golden = [...]int64{ 0, 1, 22, 333, 4444, 55555, 666666, // msgpack ones @@ -1895,9 +2099,197 @@ func testUintToInt(t *testing.T, name string, h Handle) { } } +func doTestDifferentMapOrSliceType(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) + + // - maptype, slicetype: diff from map[string]intf, map[intf]intf or []intf, etc + // include map[interface{}]string where some keys are []byte. + // To test, take a sequence of []byte and string, and decode into []string and []interface. + // Also, decode into map[string]string, map[string]interface{}, map[interface{}]string + + bh := h.getBasicHandle() + oldM, oldS := bh.MapType, bh.SliceType + defer func() { bh.MapType, bh.SliceType = oldM, oldS }() + + var b []byte + + var vi = []interface{}{ + "hello 1", + []byte("hello 2"), + "hello 3", + []byte("hello 4"), + "hello 5", + } + var vs []string + var v2i, v2s testMbsT + var v2ss testMbsCustStrT + // encode it as a map or as a slice + for i, v := range vi { + vv, ok := v.(string) + if !ok { + vv = string(v.([]byte)) + } + vs = append(vs, vv) + v2i = append(v2i, v, strconv.FormatInt(int64(i+1), 10)) + v2s = append(v2s, vv, strconv.FormatInt(int64(i+1), 10)) + v2ss = append(v2ss, testCustomStringT(vv), testCustomStringT(strconv.FormatInt(int64(i+1), 10))) + } + + var v2d interface{} + + // encode vs as a list, and decode into a list and compare + var goldSliceS = []string{"hello 1", "hello 2", "hello 3", "hello 4", "hello 5"} + var goldSliceI = []interface{}{"hello 1", "hello 2", "hello 3", "hello 4", "hello 5"} + var goldSlice = []interface{}{goldSliceS, goldSliceI} + for j, g := range goldSlice { + bh.SliceType = reflect.TypeOf(g) + name := fmt.Sprintf("slice-%s-%v", name, j+1) + b = testMarshalErr(vs, h, t, name) + v2d = nil + // v2d = reflect.New(bh.SliceType).Elem().Interface() + testUnmarshalErr(&v2d, b, h, t, name) + testDeepEqualErr(v2d, goldSlice[j], t, name) + } + + // to ensure that we do not use fast-path for map[intf]string, use a custom string type (for goldMapIS). + // this will allow us to test out the path that sees a []byte where a map has an interface{} type, + // and convert it to a string for the decoded map key. + + // encode v2i as a map, and decode into a map and compare + var goldMapSS = map[string]string{"hello 1": "1", "hello 2": "2", "hello 3": "3", "hello 4": "4", "hello 5": "5"} + var goldMapSI = map[string]interface{}{"hello 1": "1", "hello 2": "2", "hello 3": "3", "hello 4": "4", "hello 5": "5"} + var goldMapIS = map[interface{}]testCustomStringT{"hello 1": "1", "hello 2": "2", "hello 3": "3", "hello 4": "4", "hello 5": "5"} + var goldMap = []interface{}{goldMapSS, goldMapSI, goldMapIS} + for j, g := range goldMap { + bh.MapType = reflect.TypeOf(g) + name := fmt.Sprintf("map-%s-%v", name, j+1) + // for formats that clearly differentiate binary from string, use v2i + // else use the v2s (with all strings, no []byte) + v2d = nil + // v2d = reflect.New(bh.MapType).Elem().Interface() + switch h.(type) { + case *MsgpackHandle, *BincHandle, *CborHandle: + b = testMarshalErr(v2i, h, t, name) + testUnmarshalErr(&v2d, b, h, t, name) + testDeepEqualErr(v2d, goldMap[j], t, name) + default: + b = testMarshalErr(v2s, h, t, name) + testUnmarshalErr(&v2d, b, h, t, name) + testDeepEqualErr(v2d, goldMap[j], t, name) + b = testMarshalErr(v2ss, h, t, name) + v2d = nil + testUnmarshalErr(&v2d, b, h, t, name) + testDeepEqualErr(v2d, goldMap[j], t, name) + } + } + +} + +func doTestScalars(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) + + // for each scalar: + // - encode its ptr + // - encode it (non-ptr) + // - check that bytes are same + // - make a copy (using reflect) + // - check that same + // - set zero on it + // - check that its equal to 0 value + // - decode into new + // - compare to original + + bh := h.getBasicHandle() + if !bh.Canonical { + bh.Canonical = true + defer func() { bh.Canonical = false }() + } + + vi := []interface{}{ + int(0), + int8(0), + int16(0), + int32(0), + int64(0), + uint(0), + uint8(0), + uint16(0), + uint32(0), + uint64(0), + uintptr(0), + float32(0), + float64(0), + bool(false), + string(""), + []byte(nil), + } + for _, v := range fastpathAV { + vi = append(vi, reflect.Zero(v.rt).Interface()) + } + for _, v := range vi { + rv := reflect.New(reflect.TypeOf(v)).Elem() + testRandomFillRV(rv) + v = rv.Interface() + + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + vp := rv2.Interface() + + var tname string + switch rv.Kind() { + case reflect.Map: + tname = "map[" + rv.Type().Key().Name() + "]" + rv.Type().Elem().Name() + case reflect.Slice: + tname = "[]" + rv.Type().Elem().Name() + default: + tname = rv.Type().Name() + } + + var b, b1, b2 []byte + b1 = testMarshalErr(v, h, t, tname+"-enc") + // store b1 into b, as b1 slice is reused for next marshal + b = make([]byte, len(b1)) + copy(b, b1) + b2 = testMarshalErr(vp, h, t, tname+"-enc-ptr") + testDeepEqualErr(b1, b2, t, tname+"-enc-eq") + setZero(vp) + testDeepEqualErr(rv2.Elem().Interface(), reflect.Zero(rv.Type()).Interface(), t, tname+"-enc-eq-zero-ref") + + vp = rv2.Interface() + testUnmarshalErr(vp, b, h, t, tname+"-dec") + testDeepEqualErr(rv2.Elem().Interface(), v, t, tname+"-dec-eq") + } +} + +func doTestIntfMapping(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) + rti := reflect.TypeOf((*testIntfMapI)(nil)).Elem() + defer func() { h.getBasicHandle().Intf2Impl(rti, nil) }() + + type T9 struct { + I testIntfMapI + } + + for i, v := range []testIntfMapI{ + // Use a valid string to test some extents of json string decoding + &testIntfMapT1{"ABC \x41=\x42 \u2318 - \r \b \f - \u2028 and \u2029 ."}, + testIntfMapT2{"DEF"}, + } { + if err := h.getBasicHandle().Intf2Impl(rti, reflect.TypeOf(v)); err != nil { + failT(t, "Error mapping %v to %T", rti, v) + } + var v1, v2 T9 + v1 = T9{v} + b := testMarshalErr(v1, h, t, name+"-enc-"+strconv.Itoa(i)) + testUnmarshalErr(&v2, b, h, t, name+"-dec-"+strconv.Itoa(i)) + testDeepEqualErr(v1, v2, t, name+"-dec-eq-"+strconv.Itoa(i)) + } +} + // ----------------- func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) { + testOnce.Do(testInitAll) var b = `{"s.true": "true", "b.true": true, "s.false": "false", "b.false": false, "s.10": "10", "i.10": 10, "i.-10": -10}` var golden = map[string]string{"s.true": "true", "b.true": "true", "s.false": "false", "b.false": "false", "s.10": "10", "i.10": "10", "i.-10": "-10"} @@ -1913,6 +2305,7 @@ func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) { } func TestJsonEncodeIndent(t *testing.T) { + testOnce.Do(testInitAll) v := TestSimplish{ Ii: -794, Ss: `A Man is @@ -2026,6 +2419,7 @@ after the new line } func TestBufioDecReader(t *testing.T) { + testOnce.Do(testInitAll) // try to read 85 bytes in chunks of 7 at a time. var s = strings.Repeat("01234'56789 ", 5) // fmt.Printf("s: %s\n", s) @@ -2092,6 +2486,7 @@ func TestBufioDecReader(t *testing.T) { // ----------- func TestJsonLargeInteger(t *testing.T) { + testOnce.Do(testInitAll) for _, i := range []uint8{'L', 'A', 0} { for _, j := range []interface{}{ int64(1 << 60), @@ -2109,6 +2504,7 @@ func TestJsonLargeInteger(t *testing.T) { } func TestJsonInvalidUnicode(t *testing.T) { + testOnce.Do(testInitAll) var m = map[string]string{ `"\udc49\u0430abc"`: "\uFFFDabc", `"\udc49\u0430"`: "\uFFFD", @@ -2431,6 +2827,11 @@ func TestCborMammothMapsAndSlices(t *testing.T) { } func TestMsgpackMammothMapsAndSlices(t *testing.T) { + old1, old2 := testMsgpackH.RawToString, testMsgpackH.WriteExt + defer func() { testMsgpackH.RawToString, testMsgpackH.WriteExt = old1, old2 }() + testMsgpackH.RawToString = true + testMsgpackH.WriteExt = true + doTestMammothMapsAndSlices(t, testMsgpackH) } @@ -2482,41 +2883,85 @@ func TestSimpleUintToInt(t *testing.T) { testUintToInt(t, "simple", testSimpleH) } +func TestJsonDifferentMapOrSliceType(t *testing.T) { + doTestDifferentMapOrSliceType(t, "json", testJsonH) +} + +func TestCborDifferentMapOrSliceType(t *testing.T) { + doTestDifferentMapOrSliceType(t, "cbor", testCborH) +} + +func TestMsgpackDifferentMapOrSliceType(t *testing.T) { + doTestDifferentMapOrSliceType(t, "msgpack", testMsgpackH) +} + +func TestBincDifferentMapOrSliceType(t *testing.T) { + doTestDifferentMapOrSliceType(t, "binc", testBincH) +} + +func TestSimpleDifferentMapOrSliceType(t *testing.T) { + doTestDifferentMapOrSliceType(t, "simple", testSimpleH) +} + +func TestJsonScalars(t *testing.T) { + doTestScalars(t, "json", testJsonH) +} + +func TestCborScalars(t *testing.T) { + doTestScalars(t, "cbor", testCborH) +} + +func TestMsgpackScalars(t *testing.T) { + doTestScalars(t, "msgpack", testMsgpackH) +} + +func TestBincScalars(t *testing.T) { + doTestScalars(t, "binc", testBincH) +} + +func TestSimpleScalars(t *testing.T) { + doTestScalars(t, "simple", testSimpleH) +} + +func TestJsonIntfMapping(t *testing.T) { + doTestIntfMapping(t, "json", testJsonH) +} + +func TestCborIntfMapping(t *testing.T) { + doTestIntfMapping(t, "cbor", testCborH) +} + +func TestMsgpackIntfMapping(t *testing.T) { + doTestIntfMapping(t, "msgpack", testMsgpackH) +} + +func TestBincIntfMapping(t *testing.T) { + doTestIntfMapping(t, "binc", testBincH) +} + +func TestSimpleIntfMapping(t *testing.T) { + doTestIntfMapping(t, "simple", testSimpleH) +} + // TODO: // -// Add Tests for: -// - struct tags: -// on anonymous fields, _struct (all fields), etc -// - codecgen of struct containing channels. -// - (encode extensions: ext, raw ext, etc) -// - extension that isn't builtin e.g. type uint64Ext uint64. -// it encodes as a uint64. +// Add Tests for: +// - struct tags: on anonymous fields, _struct (all fields), etc +// - chan to encode and decode (with support for codecgen also) // -// Add negative tests for failure conditions: -// - bad input with large array length prefix +// Add negative tests for failure conditions: +// - bad input with large array length prefix // -// msgpack -// - support time as built-in extension: -// see https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -// -// decode.go +// decode.go (standalone) // - UnreadByte: only 2 states (z.ls = 2 and z.ls = 1) (0 --> 2 --> 1) -// - track -// z.trb: track, stop track, check -// - maptype, slicetype: diff from map[string]intf, map[intf]intf or []intf, -// - PreferArrayOverSlice??? (standalone test) -// - InterfaceReset (standalone test) +// - track: z.trb: track, stop track, check +// - PreferArrayOverSlice??? +// - InterfaceReset // - (chan byte) to decode []byte (with mapbyslice track) // - decode slice of len 6, 16 into slice of (len 4, cap 8) and (len ) with maxinitlen=6, 8, 16 -// - ktypeisintf -// - DeleteOnNilMapValue (standalone test) +// - DeleteOnNilMapValue // - decnaked: n.l == nil -// - setZero: all types: *bool, *intXXX, *uintXXX, *floatXXX, *Raw, *[]byte, etc (not just struct) -// - codec.Selfer implementation -// Ensure it is called when (en|de)coding interface{} or reflect.Value (2 different codepaths). // - ensureDecodeable (try to decode into a non-decodeable thing e.g. a nil interface{}, // -// encode.go -// - mapbyslice (for non-fastpath things) +// encode.go (standalone) // - nil and 0-len slices and maps for non-fastpath things -// - pointers to scalars at top-level e.g. v := uint(7), encode(&v) diff --git a/vendor/github.com/ugorji/go/codec/codecgen/gen.go b/vendor/github.com/ugorji/go/codec/codecgen/gen.go index bf26fa9..60999af 100644 --- a/vendor/github.com/ugorji/go/codec/codecgen/gen.go +++ b/vendor/github.com/ugorji/go/codec/codecgen/gen.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // codecgen generates codec.Selfer implementations for a set of types. @@ -29,6 +29,8 @@ const genCodecPkg = "codec1978" // keep this in sync with codec.genCodecPkg const genFrunMainTmpl = `//+build ignore +// Code generated - temporary main package for codecgen - DO NOT EDIT. + package main {{ if .Types }}import "{{ .ImportPath }}"{{ end }} func main() { @@ -38,6 +40,9 @@ func main() { // const genFrunPkgTmpl = `//+build codecgen const genFrunPkgTmpl = ` + +// Code generated - temporary package for codecgen - DO NOT EDIT. + package {{ $.PackageName }} import ( @@ -50,20 +55,33 @@ import ( ) func CodecGenTempWrite{{ .RandString }}() { + os.Remove("{{ .OutFile }}") fout, err := os.Create("{{ .OutFile }}") if err != nil { panic(err) } defer fout.Close() - var out bytes.Buffer - var typs []reflect.Type + var typs []reflect.Type + var typ reflect.Type + var numfields int {{ range $index, $element := .Types }} var t{{ $index }} {{ . }} - typs = append(typs, reflect.TypeOf(t{{ $index }})) +typ = reflect.TypeOf(t{{ $index }}) + typs = append(typs, typ) + if typ.Kind() == reflect.Struct { numfields += typ.NumField() } else { numfields += 1 } {{ end }} - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .NoExtensions }}, {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...) + + // println("initializing {{ .OutFile }}, buf size: {{ .AllFilesSize }}*16", + // {{ .AllFilesSize }}*16, "num fields: ", numfields) + var out = bytes.NewBuffer(make([]byte, 0, numfields*1024)) // {{ .AllFilesSize }}*16 + {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(out, + "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .NoExtensions }}, + {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), + typs...) + bout, err := format.Source(out.Bytes()) + // println("... lengths: before formatting: ", len(out.Bytes()), ", after formatting", len(bout)) if err != nil { fout.Write(out.Bytes()) panic(err) @@ -98,8 +116,7 @@ func Generate(outfile, buildTag, codecPkgPath string, } if uid < 0 { uid = -uid - } - if uid == 0 { + } else if uid == 0 { rr := rand.New(rand.NewSource(time.Now().UnixNano())) uid = 101 + rr.Int63n(9777) } @@ -124,6 +141,7 @@ func Generate(outfile, buildTag, codecPkgPath string, BuildTag string StructTags string Types []string + AllFilesSize int64 CodecPkgFiles bool NoExtensions bool } @@ -145,11 +163,17 @@ func Generate(outfile, buildTag, codecPkgPath string, tv.ImportPath = stripVendor(tv.ImportPath) } astfiles := make([]*ast.File, len(infiles)) + var fi os.FileInfo for i, infile := range infiles { if filepath.Dir(infile) != lastdir { err = errors.New("in files must all be in same directory as outfile") return } + if fi, err = os.Stat(infile); err != nil { + return + } + tv.AllFilesSize += fi.Size() + fset := token.NewFileSet() astfiles[i], err = parser.ParseFile(fset, infile, nil, 0) if err != nil { @@ -211,6 +235,10 @@ func Generate(outfile, buildTag, codecPkgPath string, // chan: ChanType // do not generate: // FuncType, InterfaceType, StarExpr (ptr), etc + // + // We generate for all these types (not just structs), because they may be a field + // in another struct which doesn't have codecgen run on it, and it will be nice + // to take advantage of the fact that the type is a Selfer. switch td.Type.(type) { case *ast.StructType, *ast.Ident, *ast.MapType, *ast.ArrayType, *ast.ChanType: // only add to tv.Types iff @@ -286,6 +314,7 @@ func gen1(frunName, tmplStr string, tv interface{}) (frun *os.File, err error) { } bw := bufio.NewWriter(frun) if err = t.Execute(bw, tv); err != nil { + bw.Flush() return } if err = bw.Flush(); err != nil { @@ -317,14 +346,14 @@ func main() { rt := flag.String("rt", "", "tags for go run") st := flag.String("st", "codec,json", "struct tag keys to introspect") x := flag.Bool("x", false, "keep temp file") - _ = flag.Bool("u", false, "*IGNORED - kept for backwards compatibility*: Allow unsafe use") + _ = flag.Bool("u", false, "Allow unsafe use. ***IGNORED*** - kept for backwards compatibility: ") d := flag.Int64("d", 0, "random identifier for use in generated code") - nx := flag.Bool("nx", false, "no extensions") + nx := flag.Bool("nx", false, "do not support extensions - support of extensions may cause extra allocation") flag.Parse() - if err := Generate(*o, *t, *c, *d, *rt, *st, - regexp.MustCompile(*r), regexp.MustCompile(*nr), !*x, *nx, - flag.Args()...); err != nil { + err := Generate(*o, *t, *c, *d, *rt, *st, + regexp.MustCompile(*r), regexp.MustCompile(*nr), !*x, *nx, flag.Args()...) + if err != nil { fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) os.Exit(1) } diff --git a/vendor/github.com/ugorji/go/codec/decode.go b/vendor/github.com/ugorji/go/codec/decode.go index 135e298..148c609 100644 --- a/vendor/github.com/ugorji/go/codec/decode.go +++ b/vendor/github.com/ugorji/go/codec/decode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -9,6 +9,7 @@ import ( "fmt" "io" "reflect" + "strconv" "sync" "time" ) @@ -20,12 +21,17 @@ const ( ) var ( - onlyMapOrArrayCanDecodeIntoStructErr = errors.New("only encoded map or array can be decoded into a struct") - cannotDecodeIntoNilErr = errors.New("cannot decode into nil") + errstrOnlyMapOrArrayCanDecodeIntoStruct = "only encoded map or array can be decoded into a struct" + errstrCannotDecodeIntoNil = "cannot decode into nil" - decUnreadByteNothingToReadErr = errors.New("cannot unread - nothing has been read") - decUnreadByteLastByteNotReadErr = errors.New("cannot unread - last byte has not been read") - decUnreadByteUnknownErr = errors.New("cannot unread - reason unknown") + errmsgExpandSliceOverflow = "expand slice: slice overflow" + errmsgExpandSliceCannotChange = "expand slice: cannot change" + + errDecoderNotInitialized = errors.New("Decoder not initialized") + + errDecUnreadByteNothingToRead = errors.New("cannot unread - nothing has been read") + errDecUnreadByteLastByteNotRead = errors.New("cannot unread - last byte has not been read") + errDecUnreadByteUnknown = errors.New("cannot unread - reason unknown") ) // decReader abstracts the reading source, allowing implementations that can @@ -62,7 +68,6 @@ type decDriver interface { // vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. ContainerType() (vt valueType) // IsBuiltinType(rt uintptr) bool - DecodeBuiltin(rt uintptr, v interface{}) // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. // For maps and arrays, it will not do the decoding in-band, but will signal @@ -76,9 +81,15 @@ type decDriver interface { // extensions should also use readx to decode them, for efficiency. // kInterface will extract the detached byte slice if it has to pass it outside its realm. DecodeNaked() - DecodeInt(bitsize uint8) (i int64) - DecodeUint(bitsize uint8) (ui uint64) - DecodeFloat(chkOverflow32 bool) (f float64) + + // Deprecated: use DecodeInt64 and DecodeUint64 instead + // DecodeInt(bitsize uint8) (i int64) + // DecodeUint(bitsize uint8) (ui uint64) + + DecodeInt64() (i int64) + DecodeUint64() (ui uint64) + + DecodeFloat64() (f float64) DecodeBool() (b bool) // DecodeString can also decode symbols. // It looks redundant as DecodeBytes is available. @@ -96,6 +107,9 @@ type decDriver interface { // decodeExt will decode into a *RawExt or into an extension. DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) + + DecodeTime() (t time.Time) + ReadArrayStart() int ReadArrayElem() ReadArrayEnd() @@ -108,39 +122,44 @@ type decDriver interface { uncacheRead() } -// type decNoSeparator struct {} -// func (_ decNoSeparator) ReadEnd() {} - type decDriverNoopContainerReader struct{} -func (_ decDriverNoopContainerReader) ReadArrayStart() (v int) { return } -func (_ decDriverNoopContainerReader) ReadArrayElem() {} -func (_ decDriverNoopContainerReader) ReadArrayEnd() {} -func (_ decDriverNoopContainerReader) ReadMapStart() (v int) { return } -func (_ decDriverNoopContainerReader) ReadMapElemKey() {} -func (_ decDriverNoopContainerReader) ReadMapElemValue() {} -func (_ decDriverNoopContainerReader) ReadMapEnd() {} -func (_ decDriverNoopContainerReader) CheckBreak() (v bool) { return } +func (x decDriverNoopContainerReader) ReadArrayStart() (v int) { return } +func (x decDriverNoopContainerReader) ReadArrayElem() {} +func (x decDriverNoopContainerReader) ReadArrayEnd() {} +func (x decDriverNoopContainerReader) ReadMapStart() (v int) { return } +func (x decDriverNoopContainerReader) ReadMapElemKey() {} +func (x decDriverNoopContainerReader) ReadMapElemValue() {} +func (x decDriverNoopContainerReader) ReadMapEnd() {} +func (x decDriverNoopContainerReader) CheckBreak() (v bool) { return } -// func (_ decNoSeparator) uncacheRead() {} +// func (x decNoSeparator) uncacheRead() {} +// DecodeOptions captures configuration options during decode. type DecodeOptions struct { // MapType specifies type to use during schema-less decoding of a map in the stream. - // If nil, we use map[interface{}]interface{} + // If nil (unset), we default to map[string]interface{} iff json handle and MapStringAsKey=true, + // else map[interface{}]interface{}. MapType reflect.Type // SliceType specifies type to use during schema-less decoding of an array in the stream. - // If nil, we use []interface{} + // If nil (unset), we default to []interface{} for all formats. SliceType reflect.Type - // MaxInitLen defines the maxinum initial length that we "make" a collection (string, slice, map, chan). - // If 0 or negative, we default to a sensible value based on the size of an element in the collection. + // MaxInitLen defines the maxinum initial length that we "make" a collection + // (string, slice, map, chan). If 0 or negative, we default to a sensible value + // based on the size of an element in the collection. // // For example, when decoding, a stream may say that it has 2^64 elements. - // We should not auto-matically provision a slice of that length, to prevent Out-Of-Memory crash. + // We should not auto-matically provision a slice of that size, to prevent Out-Of-Memory crash. // Instead, we provision up to MaxInitLen, fill that up, and start appending after that. MaxInitLen int + // ReaderBufferSize is the size of the buffer used when reading. + // + // if > 0, we use a smart buffer internally for performance purposes. + ReaderBufferSize int + // If ErrorIfNoField, return an error when decoding a map // from a codec stream into a struct, and no matching struct field is found. ErrorIfNoField bool @@ -211,11 +230,6 @@ type DecodeOptions struct { // If true, we will delete the mapping of the key. // Else, just set the mapping to the zero value of the type. DeleteOnNilMapValue bool - - // ReaderBufferSize is the size of the buffer used when reading. - // - // if > 0, we use a smart buffer internally for performance purposes. - ReaderBufferSize int } // ------------------------------------ @@ -228,10 +242,9 @@ type bufioDecReader struct { n int // num read err error - trb bool tr []byte - - b [8]byte + trb bool + b [4]byte } func (z *bufioDecReader) reset(r io.Reader) { @@ -334,7 +347,7 @@ func (z *bufioDecReader) UnreadByte() (err error) { } return } - return decUnreadByteNothingToReadErr + return errDecUnreadByteNothingToRead } func (z *bufioDecReader) numread() int { @@ -531,16 +544,15 @@ type ioDecReader struct { rr io.Reader br io.ByteScanner - l byte // last byte - ls byte // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread + l byte // last byte + ls byte // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread + trb bool // tracking bytes turned on + _ bool b [4]byte // tiny buffer for reading single bytes - trb bool // tracking bytes turned on - // temp byte array re-used internally for efficiency during read. - // shares buffer with Decoder, so we keep size of struct within 8 words. - x *[scratchByteArrayLen]byte - n int // num read - tr []byte // tracking bytes read + x [scratchByteArrayLen]byte // for: get struct field name, swallow valueTypeBytes, etc + n int // num read + tr []byte // tracking bytes read } func (z *ioDecReader) reset(r io.Reader) { @@ -602,11 +614,11 @@ func (z *ioDecReader) UnreadByte() (err error) { case 2: z.ls = 1 case 0: - err = decUnreadByteNothingToReadErr + err = errDecUnreadByteNothingToRead case 1: - err = decUnreadByteLastByteNotReadErr + err = errDecUnreadByteLastByteNotRead default: - err = decUnreadByteUnknownErr + err = errDecUnreadByteUnknown } return } @@ -745,7 +757,7 @@ func (z *ioDecReader) stopTrack() (bs []byte) { // ------------------------------------ -var bytesDecReaderCannotUnreadErr = errors.New("cannot unread last byte read") +var errBytesDecReaderCannotUnread = errors.New("cannot unread last byte read") // bytesDecReader is a decReader that reads off a byte slice with zero copying type bytesDecReader struct { @@ -768,7 +780,7 @@ func (z *bytesDecReader) numread() int { func (z *bytesDecReader) unreadn1() { if z.c == 0 || len(z.b) == 0 { - panic(bytesDecReaderCannotUnreadErr) + panic(errBytesDecReaderCannotUnread) } z.c-- z.a++ @@ -883,9 +895,9 @@ func (z *bytesDecReader) stopTrack() (bs []byte) { // ---------------------------------------- -func (d *Decoder) builtin(f *codecFnInfo, rv reflect.Value) { - d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv)) -} +// func (d *Decoder) builtin(f *codecFnInfo, rv reflect.Value) { +// d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv)) +// } func (d *Decoder) rawExt(f *codecFnInfo, rv reflect.Value) { d.d.DecodeExt(rv2i(rv), 0, nil) @@ -941,7 +953,6 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { return } // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). - // if num := f.ti.rt.NumMethod(); num > 0 { if f.ti.numMeth > 0 { d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, f.ti.numMeth) return @@ -949,10 +960,20 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { // var useRvn bool switch n.v { case valueTypeMap: - if d.mtid == 0 || d.mtid == mapIntfIntfTypId { + // if json, default to a map type with string keys + mtid := d.mtid + if mtid == 0 { + if d.jsms { + mtid = mapStrIntfTypId + } else { + mtid = mapIntfIntfTypId + } + } + if mtid == mapIntfIntfTypId { + n.initContainers() if n.lm < arrayCacheLen { n.ma[n.lm] = nil - rvn = n.rr[decNakedMapIntfIntfIdx*arrayCacheLen+n.lm] + rvn = n.rma[n.lm] n.lm++ d.decode(&n.ma[n.lm-1]) n.lm-- @@ -961,10 +982,11 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { d.decode(&v2) rvn = reflect.ValueOf(&v2).Elem() } - } else if d.mtid == mapStrIntfTypId { // for json performance + } else if mtid == mapStrIntfTypId { // for json performance + n.initContainers() if n.ln < arrayCacheLen { n.na[n.ln] = nil - rvn = n.rr[decNakedMapStrIntfIdx*arrayCacheLen+n.ln] + rvn = n.rna[n.ln] n.ln++ d.decode(&n.na[n.ln-1]) n.ln-- @@ -974,20 +996,21 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { rvn = reflect.ValueOf(&v2).Elem() } } else { - rvn = reflect.New(d.h.MapType) - if useLookupRecognizedTypes && d.mtr { // isRecognizedRtid(d.mtid) { + if d.mtr { + rvn = reflect.New(d.h.MapType) d.decode(rv2i(rvn)) rvn = rvn.Elem() } else { - rvn = rvn.Elem() - d.decodeValue(rvn, nil, false, true) + rvn = reflect.New(d.h.MapType).Elem() + d.decodeValue(rvn, nil, true) } } case valueTypeArray: if d.stid == 0 || d.stid == intfSliceTypId { + n.initContainers() if n.ls < arrayCacheLen { n.sa[n.ls] = nil - rvn = n.rr[decNakedSliceIntfIdx*arrayCacheLen+n.ls] + rvn = n.rsa[n.ls] n.ls++ d.decode(&n.sa[n.ls-1]) n.ls-- @@ -1002,19 +1025,20 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { rvn = rvn2 } } else { - rvn = reflect.New(d.h.SliceType) - if useLookupRecognizedTypes && d.str { // isRecognizedRtid(d.stid) { + if d.str { + rvn = reflect.New(d.h.SliceType) d.decode(rv2i(rvn)) rvn = rvn.Elem() } else { - rvn = rvn.Elem() - d.decodeValue(rvn, nil, false, true) + rvn = reflect.New(d.h.SliceType).Elem() + d.decodeValue(rvn, nil, true) } } case valueTypeExt: var v interface{} tag, bytes := n.u, n.l // calling decode below might taint the values if bytes == nil { + n.initContainers() if n.li < arrayCacheLen { n.ia[n.li] = nil n.li++ @@ -1046,21 +1070,21 @@ func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { case valueTypeNil: // no-op case valueTypeInt: - rvn = n.rr[decNakedIntIdx] // d.np.get(&n.i) + rvn = n.ri case valueTypeUint: - rvn = n.rr[decNakedUintIdx] // d.np.get(&n.u) + rvn = n.ru case valueTypeFloat: - rvn = n.rr[decNakedFloatIdx] // d.np.get(&n.f) + rvn = n.rf case valueTypeBool: - rvn = n.rr[decNakedBoolIdx] // d.np.get(&n.b) + rvn = n.rb case valueTypeString, valueTypeSymbol: - rvn = n.rr[decNakedStringIdx] // d.np.get(&n.s) + rvn = n.rs case valueTypeBytes: - rvn = n.rr[decNakedBytesIdx] // d.np.get(&n.l) - case valueTypeTimestamp: - rvn = n.rr[decNakedTimeIdx] // d.np.get(&n.t) + rvn = n.rl + case valueTypeTime: + rvn = n.rt default: - panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v)) + panicv.errorf("kInterfaceNaked: unexpected valueType: %d", n.v) } return } @@ -1074,24 +1098,25 @@ func (d *Decoder) kInterface(f *codecFnInfo, rv reflect.Value) { // every interface passed here MUST be settable. var rvn reflect.Value - if rv.IsNil() { - if rvn = d.kInterfaceNaked(f); rvn.IsValid() { - rv.Set(rvn) - } - return - } - if d.h.InterfaceReset { - if rvn = d.kInterfaceNaked(f); rvn.IsValid() { + if rv.IsNil() || d.h.InterfaceReset { + // check if mapping to a type: if so, initialize it and move on + rvn = d.h.intf2impl(f.ti.rtid) + if rvn.IsValid() { rv.Set(rvn) } else { - // reset to zero value based on current type in there. - rv.Set(reflect.Zero(rv.Elem().Type())) + rvn = d.kInterfaceNaked(f) + if rvn.IsValid() { + rv.Set(rvn) + } else if d.h.InterfaceReset { + // reset to zero value based on current type in there. + rv.Set(reflect.Zero(rv.Elem().Type())) + } + return } - return + } else { + // now we have a non-nil interface value, meaning it contains a type + rvn = rv.Elem() } - - // now we have a non-nil interface value, meaning it contains a type - rvn = rv.Elem() if d.d.TryDecodeAsNil() { rv.Set(reflect.Zero(rvn.Type())) return @@ -1104,28 +1129,38 @@ func (d *Decoder) kInterface(f *codecFnInfo, rv reflect.Value) { rvn2, canDecode := isDecodeable(rvn) if canDecode { - d.decodeValue(rvn2, nil, true, true) + d.decodeValue(rvn2, nil, true) return } rvn2 = reflect.New(rvn.Type()).Elem() rvn2.Set(rvn) - d.decodeValue(rvn2, nil, true, true) + d.decodeValue(rvn2, nil, true) rv.Set(rvn2) } -func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { - // checking if recognized within kstruct is too expensive. - // only check where you can determine if valid outside the loop - // ie on homogenous collections: slices, arrays and maps. - // - // if true, we don't create too many decFn's. - // It's a delicate balance. - const checkRecognized bool = false // false: TODO +func decStructFieldKey(dd decDriver, keyType valueType, b *[decScratchByteArrayLen]byte) (rvkencname []byte) { + // use if-else-if, not switch (which compiles to binary-search) + // since keyType is typically valueTypeString, branch prediction is pretty good. + if keyType == valueTypeString { + rvkencname = dd.DecodeStringAsBytes() + } else if keyType == valueTypeInt { + rvkencname = strconv.AppendInt(b[:0], dd.DecodeInt64(), 10) + } else if keyType == valueTypeUint { + rvkencname = strconv.AppendUint(b[:0], dd.DecodeUint64(), 10) + } else if keyType == valueTypeFloat { + rvkencname = strconv.AppendFloat(b[:0], dd.DecodeFloat64(), 'f', -1, 64) + } else { + rvkencname = dd.DecodeStringAsBytes() + } + return rvkencname +} + +func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { fti := f.ti dd := d.d - elemsep := d.hh.hasElemSeparators() + elemsep := d.esep sfn := structFieldNode{v: rv, update: true} ctyp := dd.ContainerType() if ctyp == valueTypeMap { @@ -1134,17 +1169,15 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { dd.ReadMapEnd() return } - tisfi := fti.sfi + tisfi := fti.sfiSort hasLen := containerLen >= 0 + var rvkencname []byte for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - // rvkencname := dd.DecodeString() if elemsep { dd.ReadMapElemKey() } - rvkencnameB := dd.DecodeStringAsBytes() - rvkencname := stringView(rvkencnameB) - // rvksi := ti.getForEncName(rvkencname) + rvkencname = decStructFieldKey(dd, fti.keyType, &d.b) if elemsep { dd.ReadMapElemValue() } @@ -1153,12 +1186,12 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(sfn.field(si), nil, checkRecognized, true) + d.decodeValue(sfn.field(si), nil, true) } } else { - d.structFieldNotFound(-1, rvkencname) + d.structFieldNotFound(-1, stringView(rvkencname)) } - // keepAlive4StringView(rvkencnameB) // maintain ref 4 stringView // not needed, as reference is outside loop + // keepAlive4StringView(rvkencnameB) // not needed, as reference is outside loop } dd.ReadMapEnd() } else if ctyp == valueTypeArray { @@ -1170,7 +1203,7 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { // Not much gain from doing it two ways for array. // Arrays are not used as much for structs. hasLen := containerLen >= 0 - for j, si := range fti.sfip { + for j, si := range fti.sfiSrc { if (hasLen && j == containerLen) || (!hasLen && dd.CheckBreak()) { break } @@ -1180,12 +1213,12 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(sfn.field(si), nil, checkRecognized, true) + d.decodeValue(sfn.field(si), nil, true) } } - if containerLen > len(fti.sfip) { + if containerLen > len(fti.sfiSrc) { // read remaining values and throw away - for j := len(fti.sfip); j < containerLen; j++ { + for j := len(fti.sfiSrc); j < containerLen; j++ { if elemsep { dd.ReadArrayElem() } @@ -1194,7 +1227,7 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { } dd.ReadArrayEnd() } else { - d.error(onlyMapOrArrayCanDecodeIntoStructErr) + d.errorstr(errstrOnlyMapOrArrayCanDecodeIntoStruct) return } } @@ -1203,27 +1236,35 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { // A slice can be set from a map or array in stream. // This way, the order can be kept (as order is lost with map). ti := f.ti + if f.seq == seqTypeChan && ti.chandir&uint8(reflect.SendDir) == 0 { + d.errorf("receive-only channel cannot be used for sending byte(s)") + } dd := d.d - rtelem0 := ti.rt.Elem() + rtelem0 := ti.elem ctyp := dd.ContainerType() if ctyp == valueTypeBytes || ctyp == valueTypeString { // you can only decode bytes or string in the stream into a slice or array of bytes if !(ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { - d.errorf("bytes or string in the stream must be decoded into a slice or array of bytes, not %v", ti.rt) + d.errorf("bytes/string in stream must decode into slice/array of bytes, not %v", ti.rt) } if f.seq == seqTypeChan { bs2 := dd.DecodeBytes(nil, true) - ch := rv2i(rv).(chan<- byte) + irv := rv2i(rv) + ch, ok := irv.(chan<- byte) + if !ok { + ch = irv.(chan byte) + } for _, b := range bs2 { ch <- b } } else { rvbs := rv.Bytes() bs2 := dd.DecodeBytes(rvbs, false) - if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + // if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if !(len(bs2) > 0 && len(bs2) == len(rvbs) && &bs2[0] == &rvbs[0]) { if rv.CanSet() { rv.SetBytes(bs2) - } else { + } else if len(rvbs) > 0 && len(bs2) > 0 { copy(rvbs, bs2) } } @@ -1256,7 +1297,6 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { rtelem0Size := int(rtelem0.Size()) rtElem0Kind := rtelem0.Kind() - rtElem0Id := rt2id(rtelem0) rtelem0Mut := !isImmutableKind(rtElem0Kind) rtelem := rtelem0 rtelemkind := rtelem.Kind() @@ -1267,9 +1307,10 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { var fn *codecFn - var rv0, rv9 reflect.Value - rv0 = rv - rvChanged := false + var rvCanset = rv.CanSet() + var rvChanged bool + var rv0 = rv + var rv9 reflect.Value rvlen := rv.Len() rvcap := rv.Cap() @@ -1279,42 +1320,38 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { oldRvlenGtZero := rvlen > 0 rvlen = decInferLen(containerLenS, d.h.MaxInitLen, int(rtelem0.Size())) if rvlen <= rvcap { - if rv.CanSet() { + if rvCanset { rv.SetLen(rvlen) - } else { - rv = rv.Slice(0, rvlen) - rvChanged = true } - } else { + } else if rvCanset { rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) rvcap = rvlen rvChanged = true + } else { + d.errorf("cannot decode into non-settable slice") } if rvChanged && oldRvlenGtZero && !isImmutableKind(rtelem0.Kind()) { reflect.Copy(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) } } else if containerLenS != rvlen { rvlen = containerLenS - if rv.CanSet() { + if rvCanset { rv.SetLen(rvlen) - } else { - rv = rv.Slice(0, rvlen) - rvChanged = true } + // else { + // rv = rv.Slice(0, rvlen) + // rvChanged = true + // d.errorf("cannot decode into non-settable slice") + // } } } - var recognizedRtid, recognizedRtidPtr bool - if useLookupRecognizedTypes { - recognizedRtid = isRecognizedRtid(rtElem0Id) - recognizedRtidPtr = isRecognizedRtidPtr(rtElem0Id) - } - // consider creating new element once, and just decoding into it. var rtelem0Zero reflect.Value var rtelem0ZeroValid bool var decodeAsNil bool var j int + d.cfer() for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { if j == 0 && (f.seq == seqTypeSlice || f.seq == seqTypeChan) && rv.IsNil() { if hasLen { @@ -1322,11 +1359,16 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { } else { rvlen = 8 } - if f.seq == seqTypeSlice { - rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) - rvChanged = true - } else if f.seq == seqTypeChan { - rv.Set(reflect.MakeChan(ti.rt, rvlen)) + if rvCanset { + if f.seq == seqTypeSlice { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } else { // chan + rv = reflect.MakeChan(ti.rt, rvlen) + rvChanged = true + } + } else { + d.errorf("cannot decode into non-settable slice") } } slh.ElemContainerState(j) @@ -1339,14 +1381,10 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { if rtelem0Mut || !rv9.IsValid() { // || (rtElem0Kind == reflect.Ptr && rv9.IsNil()) { rv9 = reflect.New(rtelem0).Elem() } - if useLookupRecognizedTypes && (recognizedRtid || recognizedRtidPtr) { - d.decode(rv2i(rv9.Addr())) - } else { - if fn == nil { - fn = d.cf.get(rtelem, true, true) - } - d.decodeValue(rv9, fn, false, true) + if fn == nil { + fn = d.cf.get(rtelem, true, true) } + d.decodeValue(rv9, fn, true) rv.Send(rv9) } else { // if indefinite, etc, then expand the slice if necessary @@ -1356,9 +1394,14 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { d.arrayCannotExpand(rvlen, j+1) decodeIntoBlank = true } else { // if f.seq == seqTypeSlice - // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // uses append logic, plus varargs + // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // append logic + varargs var rvcap2 int - rv9, rvcap2, rvChanged = decExpandSliceRV(rv, ti.rt, rtelem0Size, 1, rvlen, rvcap) + var rvErrmsg2 string + rv9, rvcap2, rvChanged, rvErrmsg2 = + expandSliceRV(rv, ti.rt, rvCanset, rtelem0Size, 1, rvlen, rvcap) + if rvErrmsg2 != "" { + d.errorf(rvErrmsg2) + } rvlen++ if rvChanged { rv = rv9 @@ -1383,19 +1426,10 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { continue } - if useLookupRecognizedTypes && recognizedRtid { - d.decode(rv2i(rv9.Addr())) - } else if useLookupRecognizedTypes && recognizedRtidPtr { // && !rv9.IsNil() { - if rv9.IsNil() { - rv9.Set(reflect.New(rtelem)) - } - d.decode(rv2i(rv9)) - } else { - if fn == nil { - fn = d.cf.get(rtelem, true, true) - } - d.decodeValue(rv9, fn, false, true) + if fn == nil { + fn = d.cf.get(rtelem, true, true) } + d.decodeValue(rv9, fn, true) } } } @@ -1403,19 +1437,21 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { if j < rvlen { if rv.CanSet() { rv.SetLen(j) - } else { + } else if rvCanset { rv = rv.Slice(0, j) rvChanged = true - } + } // else { d.errorf("kSlice: cannot change non-settable slice") } rvlen = j } else if j == 0 && rv.IsNil() { - rv = reflect.MakeSlice(ti.rt, 0, 0) - rvChanged = true + if rvCanset { + rv = reflect.MakeSlice(ti.rt, 0, 0) + rvChanged = true + } // else { d.errorf("kSlice: cannot change non-settable slice") } } } slh.End() - if rvChanged { + if rvChanged { // infers rvCanset=true, so it can be reset rv0.Set(rv) } } @@ -1428,7 +1464,7 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { dd := d.d containerLen := dd.ReadMapStart() - elemsep := d.hh.hasElemSeparators() + elemsep := d.esep ti := f.ti if rv.IsNil() { rv.Set(makeMapReflect(ti.rt, containerLen)) @@ -1439,20 +1475,13 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { return } - ktype, vtype := ti.rt.Key(), ti.rt.Elem() + ktype, vtype := ti.key, ti.elem ktypeId := rt2id(ktype) - vtypeId := rt2id(vtype) vtypeKind := vtype.Kind() - var recognizedKtyp, recognizedVtyp, recognizedPtrKtyp, recognizedPtrVtyp bool - if useLookupRecognizedTypes { - recognizedKtyp = isRecognizedRtid(ktypeId) - recognizedVtyp = isRecognizedRtid(vtypeId) - recognizedPtrKtyp = isRecognizedRtidPtr(ktypeId) - recognizedPtrVtyp = isRecognizedRtidPtr(vtypeId) - } var keyFn, valFn *codecFn var ktypeLo, vtypeLo reflect.Type + for ktypeLo = ktype; ktypeLo.Kind() == reflect.Ptr; ktypeLo = ktypeLo.Elem() { } @@ -1483,6 +1512,7 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { ktypeIsIntf := ktypeId == intfTypId hasLen := containerLen > 0 var kstrbs []byte + d.cfer() for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { if rvkMut || !rvkp.IsValid() { rvkp = reflect.New(ktype) @@ -1491,7 +1521,7 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { if elemsep { dd.ReadMapElemKey() } - if dd.TryDecodeAsNil() { + if false && dd.TryDecodeAsNil() { // nil cannot be a map key, so disregard this block // Previously, if a nil key, we just ignored the mapped value and continued. // However, that makes the result of encoding and then decoding map[intf]intf{nil:nil} // to be an empty map. @@ -1501,26 +1531,19 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { kstrbs = dd.DecodeStringAsBytes() rvk.SetString(stringView(kstrbs)) // NOTE: if doing an insert, you MUST use a real string (not stringview) - } else if useLookupRecognizedTypes && recognizedKtyp { - d.decode(rv2i(rvkp)) - // rvk = rvkp.Elem() //TODO: remove, unnecessary - } else if useLookupRecognizedTypes && recognizedPtrKtyp { - if rvk.IsNil() { - rvk = reflect.New(ktypeLo) - } - d.decode(rv2i(rvk)) } else { if keyFn == nil { keyFn = d.cf.get(ktypeLo, true, true) } - d.decodeValue(rvk, keyFn, false, true) + d.decodeValue(rvk, keyFn, true) } // special case if a byte array. if ktypeIsIntf { if rvk2 := rvk.Elem(); rvk2.IsValid() { - rvk = rvk2 - if rvk.Type() == uint8SliceTyp { - rvk = reflect.ValueOf(d.string(rvk.Bytes())) + if rvk2.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk2.Bytes())) + } else { + rvk = rvk2 } } } @@ -1579,21 +1602,11 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { if mapSet && ktypeIsString { rvk.SetString(d.string(kstrbs)) } - if useLookupRecognizedTypes && recognizedVtyp && rvv.CanAddr() { - d.decode(rv2i(rvv.Addr())) - } else if useLookupRecognizedTypes && recognizedPtrVtyp { - if rvv.IsNil() { - rvv = reflect.New(vtypeLo) - mapSet = true - } - d.decode(rv2i(rvv)) - } else { - if valFn == nil { - valFn = d.cf.get(vtypeLo, true, true) - } - d.decodeValue(rvv, valFn, false, true) - // d.decodeValueFn(rvv, valFn) + if valFn == nil { + valFn = d.cf.get(vtypeLo, true, true) } + d.decodeValue(rvv, valFn, true) + // d.decodeValueFn(rvv, valFn) if mapSet { rv.SetMapIndex(rvk, rvv) } @@ -1623,78 +1636,77 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { // // kInterfaceNaked will ensure that there is no allocation for the common // uses. -type decNaked struct { - // r RawExt // used for RawExt, uint, []byte. - u uint64 - i int64 - f float64 - l []byte - s string - t time.Time - - b bool - - inited bool - - v valueType - - li, lm, ln, ls int8 +type decNakedContainers struct { // array/stacks for reducing allocation // keep arrays at the bottom? Chance is that they are not used much. ia [arrayCacheLen]interface{} ma [arrayCacheLen]map[interface{}]interface{} na [arrayCacheLen]map[string]interface{} sa [arrayCacheLen][]interface{} - // ra [2]RawExt - rr [5 * arrayCacheLen]reflect.Value + // ria [arrayCacheLen]reflect.Value // not needed, as we decode directly into &ia[n] + rma, rna, rsa [arrayCacheLen]reflect.Value // reflect.Value mapping to above } -const ( - decNakedUintIdx = iota - decNakedIntIdx - decNakedFloatIdx - decNakedBytesIdx - decNakedStringIdx - decNakedTimeIdx - decNakedBoolIdx -) -const ( - _ = iota // maps to the scalars above - decNakedIntfIdx - decNakedMapIntfIntfIdx - decNakedMapStrIntfIdx - decNakedSliceIntfIdx -) +func (n *decNakedContainers) init() { + for i := 0; i < arrayCacheLen; i++ { + // n.ria[i] = reflect.ValueOf(&(n.ia[i])).Elem() + n.rma[i] = reflect.ValueOf(&(n.ma[i])).Elem() + n.rna[i] = reflect.ValueOf(&(n.na[i])).Elem() + n.rsa[i] = reflect.ValueOf(&(n.sa[i])).Elem() + } +} + +type decNaked struct { + // r RawExt // used for RawExt, uint, []byte. + + // primitives below + u uint64 + i int64 + f float64 + l []byte + s string + + // ---- cpu cache line boundary? + t time.Time + b bool + + // state + v valueType + li, lm, ln, ls int8 + inited bool + + *decNakedContainers + + ru, ri, rf, rl, rs, rb, rt reflect.Value // mapping to the primitives above + + // _ [6]uint64 // padding // no padding - rt goes into next cache line +} func (n *decNaked) init() { if n.inited { return } - // n.ms = n.ma[:0] - // n.is = n.ia[:0] - // n.ns = n.na[:0] - // n.ss = n.sa[:0] + n.ru = reflect.ValueOf(&n.u).Elem() + n.ri = reflect.ValueOf(&n.i).Elem() + n.rf = reflect.ValueOf(&n.f).Elem() + n.rl = reflect.ValueOf(&n.l).Elem() + n.rs = reflect.ValueOf(&n.s).Elem() + n.rt = reflect.ValueOf(&n.t).Elem() + n.rb = reflect.ValueOf(&n.b).Elem() - n.rr[decNakedUintIdx] = reflect.ValueOf(&n.u).Elem() - n.rr[decNakedIntIdx] = reflect.ValueOf(&n.i).Elem() - n.rr[decNakedFloatIdx] = reflect.ValueOf(&n.f).Elem() - n.rr[decNakedBytesIdx] = reflect.ValueOf(&n.l).Elem() - n.rr[decNakedStringIdx] = reflect.ValueOf(&n.s).Elem() - n.rr[decNakedTimeIdx] = reflect.ValueOf(&n.t).Elem() - n.rr[decNakedBoolIdx] = reflect.ValueOf(&n.b).Elem() - - for i := range [arrayCacheLen]struct{}{} { - n.rr[decNakedIntfIdx*arrayCacheLen+i] = reflect.ValueOf(&(n.ia[i])).Elem() - n.rr[decNakedMapIntfIntfIdx*arrayCacheLen+i] = reflect.ValueOf(&(n.ma[i])).Elem() - n.rr[decNakedMapStrIntfIdx*arrayCacheLen+i] = reflect.ValueOf(&(n.na[i])).Elem() - n.rr[decNakedSliceIntfIdx*arrayCacheLen+i] = reflect.ValueOf(&(n.sa[i])).Elem() - } n.inited = true // n.rr[] = reflect.ValueOf(&n.) } +func (n *decNaked) initContainers() { + if n.decNakedContainers == nil { + n.decNakedContainers = new(decNakedContainers) + n.decNakedContainers.init() + } +} + func (n *decNaked) reset() { if n == nil { return @@ -1707,8 +1719,92 @@ type rtid2rv struct { rv reflect.Value } +// -------------- + +type decReaderSwitch struct { + rb bytesDecReader + // ---- cpu cache line boundary? + ri *ioDecReader + mtr, str bool // whether maptype or slicetype are known types + + be bool // is binary encoding + bytes bool // is bytes reader + js bool // is json handle + jsms bool // is json handle, and MapKeyAsString + esep bool // has elem separators +} + +// TODO: Uncomment after mid-stack inlining enabled in go 1.10 +// +// func (z *decReaderSwitch) unreadn1() { +// if z.bytes { +// z.rb.unreadn1() +// } else { +// z.ri.unreadn1() +// } +// } +// func (z *decReaderSwitch) readx(n int) []byte { +// if z.bytes { +// return z.rb.readx(n) +// } +// return z.ri.readx(n) +// } +// func (z *decReaderSwitch) readb(s []byte) { +// if z.bytes { +// z.rb.readb(s) +// } else { +// z.ri.readb(s) +// } +// } +// func (z *decReaderSwitch) readn1() uint8 { +// if z.bytes { +// return z.rb.readn1() +// } +// return z.ri.readn1() +// } +// func (z *decReaderSwitch) numread() int { +// if z.bytes { +// return z.rb.numread() +// } +// return z.ri.numread() +// } +// func (z *decReaderSwitch) track() { +// if z.bytes { +// z.rb.track() +// } else { +// z.ri.track() +// } +// } +// func (z *decReaderSwitch) stopTrack() []byte { +// if z.bytes { +// return z.rb.stopTrack() +// } +// return z.ri.stopTrack() +// } +// func (z *decReaderSwitch) skip(accept *bitset256) (token byte) { +// if z.bytes { +// return z.rb.skip(accept) +// } +// return z.ri.skip(accept) +// } +// func (z *decReaderSwitch) readTo(in []byte, accept *bitset256) (out []byte) { +// if z.bytes { +// return z.rb.readTo(in, accept) +// } +// return z.ri.readTo(in, accept) +// } +// func (z *decReaderSwitch) readUntil(in []byte, stop byte) (out []byte) { +// if z.bytes { +// return z.rb.readUntil(in, stop) +// } +// return z.ri.readUntil(in, stop) +// } + +const decScratchByteArrayLen = cacheLineSize - 8 + // A Decoder reads and decodes an object from an input stream in the codec format. type Decoder struct { + panicHdl // hopefully, reduce derefencing cost by laying the decReader inside the Decoder. // Try to put things that go together to fit within a cache line (8 words). @@ -1716,42 +1812,28 @@ type Decoder struct { // NOTE: Decoder shouldn't call it's read methods, // as the handler MAY need to do some coordination. r decReader - hh Handle h *BasicHandle - - mtr, mtrp, str, strp bool // - - be bool // is binary encoding - bytes bool // is bytes reader - js bool // is json handle - - // ---- cpu cache line boundary? - - rb bytesDecReader - ri ioDecReader - bi bufioDecReader - - // cr containerStateRecv - - n *decNaked - nsp *sync.Pool - - // ---- cpu cache line boundary? - - is map[string]string // used for interning strings - + bi *bufioDecReader // cache the mapTypeId and sliceTypeId for faster comparisons mtid uintptr stid uintptr - b [scratchByteArrayLen]byte - // _ uintptr // for alignment purposes, so next one starts from a cache line - - err error // ---- cpu cache line boundary? + decReaderSwitch - cf codecFner - // _ [64]byte // force alignment??? + // ---- cpu cache line boundary? + codecFnPooler + // cr containerStateRecv + n *decNaked + nsp *sync.Pool + err error + + // ---- cpu cache line boundary? + b [decScratchByteArrayLen]byte // scratch buffer, used by Decoder and xxxEncDrivers + is map[string]string // used for interning strings + + // padding - false sharing help // modify 232 if Decoder struct changes. + // _ [cacheLineSize - 232%cacheLineSize]byte } // NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. @@ -1775,11 +1857,16 @@ func NewDecoderBytes(in []byte, h Handle) *Decoder { var defaultDecNaked decNaked func newDecoder(h Handle) *Decoder { - d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} - + d := &Decoder{h: h.getBasicHandle(), err: errDecoderNotInitialized} + d.hh = h + d.be = h.isBinary() // NOTE: do not initialize d.n here. It is lazily initialized in d.naked() - - _, d.js = h.(*JsonHandle) + var jh *JsonHandle + jh, d.js = h.(*JsonHandle) + if d.js { + d.jsms = jh.MapKeyAsString + } + d.esep = d.hh.hasElemSeparators() if d.h.InternString { d.is = make(map[string]string, 32) } @@ -1788,6 +1875,61 @@ func newDecoder(h Handle) *Decoder { return d } +func (d *Decoder) resetCommon() { + d.n.reset() + d.d.reset() + d.err = nil + // reset all things which were cached from the Handle, but could change + d.mtid, d.stid = 0, 0 + d.mtr, d.str = false, false + if d.h.MapType != nil { + d.mtid = rt2id(d.h.MapType) + d.mtr = fastpathAV.index(d.mtid) != -1 + } + if d.h.SliceType != nil { + d.stid = rt2id(d.h.SliceType) + d.str = fastpathAV.index(d.stid) != -1 + } +} + +// Reset the Decoder with a new Reader to decode from, +// clearing all state from last run(s). +func (d *Decoder) Reset(r io.Reader) { + if r == nil { + return + } + if d.bi == nil { + d.bi = new(bufioDecReader) + } + d.bytes = false + if d.h.ReaderBufferSize > 0 { + d.bi.buf = make([]byte, 0, d.h.ReaderBufferSize) + d.bi.reset(r) + d.r = d.bi + } else { + // d.ri.x = &d.b + // d.s = d.sa[:0] + if d.ri == nil { + d.ri = new(ioDecReader) + } + d.ri.reset(r) + d.r = d.ri + } + d.resetCommon() +} + +// ResetBytes resets the Decoder with a new []byte to decode from, +// clearing all state from last run(s). +func (d *Decoder) ResetBytes(in []byte) { + if in == nil { + return + } + d.bytes = true + d.rb.reset(in) + d.r = &d.rb + d.resetCommon() +} + // naked must be called before each call to .DecodeNaked, // as they will use it. func (d *Decoder) naked() *decNaked { @@ -1807,52 +1949,6 @@ func (d *Decoder) naked() *decNaked { return d.n } -func (d *Decoder) resetCommon() { - d.n.reset() - d.d.reset() - d.cf.reset(d.hh) - d.err = nil - // reset all things which were cached from the Handle, - // but could be changed. - d.mtid, d.stid = 0, 0 - d.mtr, d.mtrp, d.str, d.strp = false, false, false, false - if d.h.MapType != nil { - d.mtid = rt2id(d.h.MapType) - if useLookupRecognizedTypes { - d.mtr = isRecognizedRtid(d.mtid) - d.mtrp = isRecognizedRtidPtr(d.mtid) - } - } - if d.h.SliceType != nil { - d.stid = rt2id(d.h.SliceType) - if useLookupRecognizedTypes { - d.str = isRecognizedRtid(d.stid) - d.strp = isRecognizedRtidPtr(d.stid) - } - } -} - -func (d *Decoder) Reset(r io.Reader) { - if d.h.ReaderBufferSize > 0 { - d.bi.buf = make([]byte, 0, d.h.ReaderBufferSize) - d.bi.reset(r) - d.r = &d.bi - } else { - d.ri.x = &d.b - // d.s = d.sa[:0] - d.ri.reset(r) - d.r = &d.ri - } - d.resetCommon() -} - -func (d *Decoder) ResetBytes(in []byte) { - d.bytes = true - d.rb.reset(in) - d.r = &d.rb - d.resetCommon() -} - // Decode decodes the stream from reader and stores the result in the // value pointed to by v. v cannot be a nil pointer. v can also be // a reflect.Value of a pointer. @@ -1903,8 +1999,12 @@ func (d *Decoder) ResetBytes(in []byte) { // However, when decoding a stream nil, we reset the destination container // to its "zero" value (e.g. nil for slice/map, etc). // +// Note: we allow nil values in the stream anywhere except for map keys. +// A nil value in the encoded stream where a map key is expected is treated as an error. func (d *Decoder) Decode(v interface{}) (err error) { - defer panicToErrs2(&d.err, &err) + // need to call defer directly, else it seems the recover is not fully handled + defer panicToErrs2(d, &d.err, &err) + defer d.alwaysAtEnd() d.MustDecode(v) return } @@ -1917,18 +2017,11 @@ func (d *Decoder) MustDecode(v interface{}) { panic(d.err) } if d.d.TryDecodeAsNil() { - d.setZero(v) + setZero(v) } else { d.decode(v) } - if d.nsp != nil { - if d.n != nil { - d.nsp.Put(d.n) - d.n = nil - } - d.nsp = nil - } - d.n = nil + d.alwaysAtEnd() // xprintf(">>>>>>>> >>>>>>>> num decFns: %v\n", d.cf.sn) } @@ -1938,13 +2031,22 @@ func (d *Decoder) MustDecode(v interface{}) { // d.decodeValueNoFn(reflect.ValueOf(&blank).Elem()) // } +func (d *Decoder) alwaysAtEnd() { + if d.n != nil { + // if n != nil, then nsp != nil (they are always set together) + d.nsp.Put(d.n) + d.n, d.nsp = nil, nil + } + d.codecFnPooler.alwaysAtEnd() +} + func (d *Decoder) swallow() { // smarter decode that just swallows the content dd := d.d if dd.TryDecodeAsNil() { return } - elemsep := d.hh.hasElemSeparators() + elemsep := d.esep switch dd.ContainerType() { case valueTypeMap: containerLen := dd.ReadMapStart() @@ -1981,6 +2083,7 @@ func (d *Decoder) swallow() { n := d.naked() dd.DecodeNaked() if n.v == valueTypeExt && n.l == nil { + n.initContainers() if n.li < arrayCacheLen { n.ia[n.li] = nil n.li++ @@ -1995,7 +2098,7 @@ func (d *Decoder) swallow() { } } -func (d *Decoder) setZero(iv interface{}) { +func setZero(iv interface{}) { if iv == nil || definitelyNil(iv) { return } @@ -2033,12 +2136,14 @@ func (d *Decoder) setZero(iv interface{}) { *v = nil case *Raw: *v = nil + case *time.Time: + *v = time.Time{} case reflect.Value: if v, canDecode = isDecodeable(v); canDecode && v.CanSet() { v.Set(reflect.Zero(v.Type())) } // TODO: else drain if chan, clear if map, set all to nil if slice??? default: - if !fastpathDecodeSetZeroTypeSwitch(iv, d) { + if !fastpathDecodeSetZeroTypeSwitch(iv) { v := reflect.ValueOf(iv) if v, canDecode = isDecodeable(v); canDecode && v.CanSet() { v.Set(reflect.Zero(v.Type())) @@ -2051,7 +2156,7 @@ func (d *Decoder) decode(iv interface{}) { // check nil and interfaces explicitly, // so that type switches just have a run of constant non-interface types. if iv == nil { - d.error(cannotDecodeIntoNilErr) + d.errorstr(errstrCannotDecodeIntoNil) return } if v, ok := iv.(Selfer); ok { @@ -2065,57 +2170,67 @@ func (d *Decoder) decode(iv interface{}) { case reflect.Value: v = d.ensureDecodeable(v) - d.decodeValue(v, nil, false, true) // TODO: maybe ask to recognize ... + d.decodeValue(v, nil, true) case *string: *v = d.d.DecodeString() case *bool: *v = d.d.DecodeBool() case *int: - *v = int(d.d.DecodeInt(intBitsize)) + *v = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) case *int8: - *v = int8(d.d.DecodeInt(8)) + *v = int8(chkOvf.IntV(d.d.DecodeInt64(), 8)) case *int16: - *v = int16(d.d.DecodeInt(16)) + *v = int16(chkOvf.IntV(d.d.DecodeInt64(), 16)) case *int32: - *v = int32(d.d.DecodeInt(32)) + *v = int32(chkOvf.IntV(d.d.DecodeInt64(), 32)) case *int64: - *v = d.d.DecodeInt(64) + *v = d.d.DecodeInt64() case *uint: - *v = uint(d.d.DecodeUint(uintBitsize)) + *v = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) case *uint8: - *v = uint8(d.d.DecodeUint(8)) + *v = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) case *uint16: - *v = uint16(d.d.DecodeUint(16)) + *v = uint16(chkOvf.UintV(d.d.DecodeUint64(), 16)) case *uint32: - *v = uint32(d.d.DecodeUint(32)) + *v = uint32(chkOvf.UintV(d.d.DecodeUint64(), 32)) case *uint64: - *v = d.d.DecodeUint(64) + *v = d.d.DecodeUint64() case *float32: - *v = float32(d.d.DecodeFloat(true)) + f64 := d.d.DecodeFloat64() + if chkOvf.Float32(f64) { + d.errorf("float32 overflow: %v", f64) + } + *v = float32(f64) case *float64: - *v = d.d.DecodeFloat(false) + *v = d.d.DecodeFloat64() case *[]uint8: *v = d.d.DecodeBytes(*v, false) - + case []uint8: + b := d.d.DecodeBytes(v, false) + if !(len(b) > 0 && len(b) == len(v) && &b[0] == &v[0]) { + copy(v, b) + } + case *time.Time: + *v = d.d.DecodeTime() case *Raw: *v = d.rawBytes() case *interface{}: - d.decodeValue(reflect.ValueOf(iv).Elem(), nil, false, true) // TODO: consider recognize here + d.decodeValue(reflect.ValueOf(iv).Elem(), nil, true) // d.decodeValueNotNil(reflect.ValueOf(iv).Elem()) default: if !fastpathDecodeTypeSwitch(iv, d) { v := reflect.ValueOf(iv) v = d.ensureDecodeable(v) - d.decodeValue(v, nil, false, false) + d.decodeValue(v, nil, false) // d.decodeValueFallback(v) } } } -func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, tryRecognized, chkAll bool) { +func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, chkAll bool) { // If stream is not containing a nil value, then we can deref to the base // non-pointer value, and decode into that. var rvp reflect.Value @@ -2134,27 +2249,19 @@ func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, tryRecognized, chkA } } - if useLookupRecognizedTypes && tryRecognized && isRecognizedRtid(rv2rtid(rv)) { - if rvpValid { - d.decode(rv2i(rvp)) - return - } else if rv.CanAddr() { - d.decode(rv2i(rv.Addr())) - return - } - } - if fn == nil { // always pass checkCodecSelfer=true, in case T or ****T is passed, where *T is a Selfer - fn = d.cf.get(rv.Type(), chkAll, true) // chkAll, chkAll) + fn = d.cfer().get(rv.Type(), chkAll, true) // chkAll, chkAll) } if fn.i.addrD { if rvpValid { fn.fd(d, &fn.i, rvp) } else if rv.CanAddr() { fn.fd(d, &fn.i, rv.Addr()) - } else { + } else if !fn.i.addrF { fn.fd(d, &fn.i, rv) + } else { + d.errorf("cannot decode into a non-pointer value") } } else { fn.fd(d, &fn.i, rv) @@ -2210,7 +2317,7 @@ func (d *Decoder) ensureDecodeable(rv reflect.Value) (rv2 reflect.Value) { return } if !rv.IsValid() { - d.error(cannotDecodeIntoNilErr) + d.errorstr(errstrCannotDecodeIntoNil) return } if !rv.CanInterface() { @@ -2218,43 +2325,11 @@ func (d *Decoder) ensureDecodeable(rv reflect.Value) (rv2 reflect.Value) { return } rvi := rv2i(rv) - d.errorf("cannot decode into value of kind: %v, type: %T, %v", rv.Kind(), rvi, rvi) + rvk := rv.Kind() + d.errorf("cannot decode into value of kind: %v, type: %T, %v", rvk, rvi, rvi) return } -// func (d *Decoder) chkPtrValue(rv reflect.Value) { -// // We can only decode into a non-nil pointer -// if rv.Kind() == reflect.Ptr && !rv.IsNil() { -// return -// } -// d.errNotValidPtrValue(rv) -// } - -// func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { -// if !rv.IsValid() { -// d.error(cannotDecodeIntoNilErr) -// return -// } -// if !rv.CanInterface() { -// d.errorf("cannot decode into a value without an interface: %v", rv) -// return -// } -// rvi := rv2i(rv) -// d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi) -// } - -func (d *Decoder) error(err error) { - panic(err) -} - -func (d *Decoder) errorf(format string, params ...interface{}) { - params2 := make([]interface{}, len(params)+1) - params2[0] = d.r.numread() - copy(params2[1:], params) - err := fmt.Errorf("[pos %d]: "+format, params2...) - panic(err) -} - // Possibly get an interned version of a string // // This should mostly be used for map keys, where the key type is string. @@ -2289,6 +2364,10 @@ func (d *Decoder) rawBytes() []byte { return bs2 } +func (d *Decoder) wrapErrstr(v interface{}, err *error) { + *err = fmt.Errorf("%s decode error [pos %d]: %v", d.hh.Name(), d.r.numread(), v) +} + // -------------------------------------------------- // decSliceHelper assists when decoding into a slice, from a map or an array in the stream. @@ -2302,12 +2381,13 @@ type decSliceHelper struct { func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { dd := d.d ctyp := dd.ContainerType() - if ctyp == valueTypeArray { + switch ctyp { + case valueTypeArray: x.array = true clen = dd.ReadArrayStart() - } else if ctyp == valueTypeMap { + case valueTypeMap: clen = dd.ReadMapStart() * 2 - } else { + default: d.errorf("only encoded map or array can be decoded into a slice (%d)", ctyp) } // x.ct = ctyp @@ -2326,12 +2406,10 @@ func (x decSliceHelper) End() { func (x decSliceHelper) ElemContainerState(index int) { if x.array { x.d.d.ReadArrayElem() + } else if index%2 == 0 { + x.d.d.ReadMapElemKey() } else { - if index%2 == 0 { - x.d.d.ReadMapElemKey() - } else { - x.d.d.ReadMapElemValue() - } + x.d.d.ReadMapElemValue() } } @@ -2410,22 +2488,30 @@ func decInferLen(clen, maxlen, unit int) (rvlen int) { return } -func decExpandSliceRV(s reflect.Value, st reflect.Type, stElemSize, num, slen, scap int) ( - s2 reflect.Value, scap2 int, changed bool) { +func expandSliceRV(s reflect.Value, st reflect.Type, canChange bool, stElemSize, num, slen, scap int) ( + s2 reflect.Value, scap2 int, changed bool, err string) { l1 := slen + num // new slice length if l1 < slen { - panic("expandSlice: slice overflow") + err = errmsgExpandSliceOverflow + return } if l1 <= scap { if s.CanSet() { s.SetLen(l1) - } else { + } else if canChange { s2 = s.Slice(0, l1) scap2 = scap changed = true + } else { + err = errmsgExpandSliceCannotChange + return } return } + if !canChange { + err = errmsgExpandSliceCannotChange + return + } scap2 = growCap(scap, stElemSize, num) s2 = reflect.MakeSlice(st, l1, scap2) changed = true diff --git a/vendor/github.com/ugorji/go/codec/encode.go b/vendor/github.com/ugorji/go/codec/encode.go index c4da94b..48053d2 100644 --- a/vendor/github.com/ugorji/go/codec/encode.go +++ b/vendor/github.com/ugorji/go/codec/encode.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -6,36 +6,19 @@ package codec import ( "bufio" "encoding" + "errors" "fmt" "io" "reflect" "sort" + "strconv" "sync" + "time" ) const defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 -// AsSymbolFlag defines what should be encoded as symbols. -type AsSymbolFlag uint8 - -const ( - // AsSymbolDefault is default. - // Currently, this means only encode struct field names as symbols. - // The default is subject to change. - AsSymbolDefault AsSymbolFlag = iota - - // AsSymbolAll means encode anything which could be a symbol as a symbol. - AsSymbolAll = 0xfe - - // AsSymbolNone means do not encode anything as a symbol. - AsSymbolNone = 1 << iota - - // AsSymbolMapStringKeys means encode keys in map[string]XXX as symbols. - AsSymbolMapStringKeysFlag - - // AsSymbolStructFieldName means encode struct field names as symbols. - AsSymbolStructFieldNameFlag -) +var errEncoderNotInitialized = errors.New("Encoder not initialized") // encWriter abstracts writing to a byte array or to an io.Writer. type encWriter interface { @@ -48,8 +31,6 @@ type encWriter interface { // encDriver abstracts the actual codec (binc vs msgpack, etc) type encDriver interface { - // IsBuiltinType(rt uintptr) bool - EncodeBuiltin(rt uintptr, v interface{}) EncodeNil() EncodeInt(i int64) EncodeUint(i uint64) @@ -59,6 +40,12 @@ type encDriver interface { // encodeExtPreamble(xtag byte, length int) EncodeRawExt(re *RawExt, e *Encoder) EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) + EncodeString(c charEncoding, v string) + // EncodeSymbol(v string) + EncodeStringBytes(c charEncoding, v []byte) + EncodeTime(time.Time) + //encBignum(f *big.Int) + //encStringRunes(c charEncoding, v []rune) WriteArrayStart(length int) WriteArrayElem() WriteArrayEnd() @@ -66,13 +53,6 @@ type encDriver interface { WriteMapElemKey() WriteMapElemValue() WriteMapEnd() - EncodeString(c charEncoding, v string) - EncodeSymbol(v string) - EncodeStringBytes(c charEncoding, v []byte) - - //TODO - //encBignum(f *big.Int) - //encStringRunes(c charEncoding, v []rune) reset() atEndOfEncode() @@ -82,27 +62,33 @@ type ioEncStringWriter interface { WriteString(s string) (n int, err error) } -type ioEncFlusher interface { - Flush() error -} - type encDriverAsis interface { EncodeAsis(v []byte) } -// type encNoSeparator struct{} -// func (_ encNoSeparator) EncodeEnd() {} - type encDriverNoopContainerWriter struct{} -func (_ encDriverNoopContainerWriter) WriteArrayStart(length int) {} -func (_ encDriverNoopContainerWriter) WriteArrayElem() {} -func (_ encDriverNoopContainerWriter) WriteArrayEnd() {} -func (_ encDriverNoopContainerWriter) WriteMapStart(length int) {} -func (_ encDriverNoopContainerWriter) WriteMapElemKey() {} -func (_ encDriverNoopContainerWriter) WriteMapElemValue() {} -func (_ encDriverNoopContainerWriter) WriteMapEnd() {} -func (_ encDriverNoopContainerWriter) atEndOfEncode() {} +func (encDriverNoopContainerWriter) WriteArrayStart(length int) {} +func (encDriverNoopContainerWriter) WriteArrayElem() {} +func (encDriverNoopContainerWriter) WriteArrayEnd() {} +func (encDriverNoopContainerWriter) WriteMapStart(length int) {} +func (encDriverNoopContainerWriter) WriteMapElemKey() {} +func (encDriverNoopContainerWriter) WriteMapElemValue() {} +func (encDriverNoopContainerWriter) WriteMapEnd() {} +func (encDriverNoopContainerWriter) atEndOfEncode() {} + +type encDriverTrackContainerWriter struct { + c containerState +} + +func (e *encDriverTrackContainerWriter) WriteArrayStart(length int) { e.c = containerArrayStart } +func (e *encDriverTrackContainerWriter) WriteArrayElem() { e.c = containerArrayElem } +func (e *encDriverTrackContainerWriter) WriteArrayEnd() { e.c = containerArrayEnd } +func (e *encDriverTrackContainerWriter) WriteMapStart(length int) { e.c = containerMapStart } +func (e *encDriverTrackContainerWriter) WriteMapElemKey() { e.c = containerMapKey } +func (e *encDriverTrackContainerWriter) WriteMapElemValue() { e.c = containerMapValue } +func (e *encDriverTrackContainerWriter) WriteMapEnd() { e.c = containerMapEnd } +func (e *encDriverTrackContainerWriter) atEndOfEncode() {} // type ioEncWriterWriter interface { // WriteByte(c byte) error @@ -110,7 +96,13 @@ func (_ encDriverNoopContainerWriter) atEndOfEncode() {} // Write(p []byte) (n int, err error) // } +// EncodeOptions captures configuration options during encode. type EncodeOptions struct { + // WriterBufferSize is the size of the buffer used when writing. + // + // if > 0, we use a smart buffer internally for performance purposes. + WriterBufferSize int + // Encode a struct as an array, and not as a map StructToArray bool @@ -152,70 +144,35 @@ type EncodeOptions struct { // If unset, we error out. Raw bool - // AsSymbols defines what should be encoded as symbols. - // - // Encoding as symbols can reduce the encoded size significantly. - // - // However, during decoding, each string to be encoded as a symbol must - // be checked to see if it has been seen before. Consequently, encoding time - // will increase if using symbols, because string comparisons has a clear cost. - // - // Sample values: - // AsSymbolNone - // AsSymbolAll - // AsSymbolMapStringKeys - // AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag - AsSymbols AsSymbolFlag - - // WriterBufferSize is the size of the buffer used when writing. - // - // if > 0, we use a smart buffer internally for performance purposes. - WriterBufferSize int + // // AsSymbols defines what should be encoded as symbols. + // // + // // Encoding as symbols can reduce the encoded size significantly. + // // + // // However, during decoding, each string to be encoded as a symbol must + // // be checked to see if it has been seen before. Consequently, encoding time + // // will increase if using symbols, because string comparisons has a clear cost. + // // + // // Sample values: + // // AsSymbolNone + // // AsSymbolAll + // // AsSymbolMapStringKeys + // // AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag + // AsSymbols AsSymbolFlag } // --------------------------------------------- -type simpleIoEncWriter struct { - io.Writer -} - -// type bufIoEncWriter struct { -// w io.Writer -// buf []byte -// err error -// } - -// func (x *bufIoEncWriter) Write(b []byte) (n int, err error) { -// if x.err != nil { -// return 0, x.err -// } -// if cap(x.buf)-len(x.buf) >= len(b) { -// x.buf = append(x.buf, b) -// return len(b), nil -// } -// n, err = x.w.Write(x.buf) -// if err != nil { -// x.err = err -// return 0, x.err -// } -// n, err = x.w.Write(b) -// x.err = err -// return -// } - // ioEncWriter implements encWriter and can write to an io.Writer implementation type ioEncWriter struct { w io.Writer ww io.Writer bw io.ByteWriter sw ioEncStringWriter - fw ioEncFlusher + fw ioFlusher b [8]byte } func (z *ioEncWriter) WriteByte(b byte) (err error) { - // x.bs[0] = b - // _, err = x.ww.Write(x.bs[:]) z.b[0] = b _, err = z.w.Write(z.b[:1]) return @@ -226,18 +183,12 @@ func (z *ioEncWriter) WriteString(s string) (n int, err error) { } func (z *ioEncWriter) writeb(bs []byte) { - // if len(bs) == 0 { - // return - // } if _, err := z.ww.Write(bs); err != nil { panic(err) } } func (z *ioEncWriter) writestr(s string) { - // if len(s) == 0 { - // return - // } if _, err := z.sw.WriteString(s); err != nil { panic(err) } @@ -272,136 +223,61 @@ func (z *ioEncWriter) atEndOfEncode() { } } -// ---------------------------------------- +// --------------------------------------------- -// bytesEncWriter implements encWriter and can write to an byte slice. -// It is used by Marshal function. -type bytesEncWriter struct { +// bytesEncAppender implements encWriter and can write to an byte slice. +type bytesEncAppender struct { b []byte - c int // cursor - out *[]byte // write out on atEndOfEncode + out *[]byte } -func (z *bytesEncWriter) writeb(s []byte) { - oc, a := z.growNoAlloc(len(s)) - if a { - z.growAlloc(len(s), oc) - } - copy(z.b[oc:], s) +func (z *bytesEncAppender) writeb(s []byte) { + z.b = append(z.b, s...) } - -func (z *bytesEncWriter) writestr(s string) { - oc, a := z.growNoAlloc(len(s)) - if a { - z.growAlloc(len(s), oc) - } - copy(z.b[oc:], s) +func (z *bytesEncAppender) writestr(s string) { + z.b = append(z.b, s...) } - -func (z *bytesEncWriter) writen1(b1 byte) { - oc, a := z.growNoAlloc(1) - if a { - z.growAlloc(1, oc) - } - z.b[oc] = b1 +func (z *bytesEncAppender) writen1(b1 byte) { + z.b = append(z.b, b1) } - -func (z *bytesEncWriter) writen2(b1, b2 byte) { - oc, a := z.growNoAlloc(2) - if a { - z.growAlloc(2, oc) - } - z.b[oc+1] = b2 - z.b[oc] = b1 +func (z *bytesEncAppender) writen2(b1, b2 byte) { + z.b = append(z.b, b1, b2) } - -func (z *bytesEncWriter) atEndOfEncode() { - *(z.out) = z.b[:z.c] +func (z *bytesEncAppender) atEndOfEncode() { + *(z.out) = z.b } - -// have a growNoalloc(n int), which can be inlined. -// if allocation is needed, then call growAlloc(n int) - -func (z *bytesEncWriter) growNoAlloc(n int) (oldcursor int, allocNeeded bool) { - oldcursor = z.c - z.c = z.c + n - if z.c > len(z.b) { - if z.c > cap(z.b) { - allocNeeded = true - } else { - z.b = z.b[:cap(z.b)] - } - } - return -} - -func (z *bytesEncWriter) growAlloc(n int, oldcursor int) { - // appendslice logic (if cap < 1024, *2, else *1.25): more expensive. many copy calls. - // bytes.Buffer model (2*cap + n): much better - // bs := make([]byte, 2*cap(z.b)+n) - bs := make([]byte, growCap(cap(z.b), 1, n)) - copy(bs, z.b[:oldcursor]) - z.b = bs +func (z *bytesEncAppender) reset(in []byte, out *[]byte) { + z.b = in[:0] + z.out = out } // --------------------------------------------- -func (e *Encoder) builtin(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeBuiltin(f.ti.rtid, rv2i(rv)) -} - func (e *Encoder) rawExt(f *codecFnInfo, rv reflect.Value) { - // rev := rv2i(rv).(RawExt) - // e.e.EncodeRawExt(&rev, e) - // var re *RawExt - // if rv.CanAddr() { - // re = rv2i(rv.Addr()).(*RawExt) - // } else { - // rev := rv2i(rv).(RawExt) - // re = &rev - // } - // e.e.EncodeRawExt(re, e) e.e.EncodeRawExt(rv2i(rv).(*RawExt), e) } func (e *Encoder) ext(f *codecFnInfo, rv reflect.Value) { - // if this is a struct|array and it was addressable, then pass the address directly (not the value) - // if k := rv.Kind(); (k == reflect.Struct || k == reflect.Array) && rv.CanAddr() { - // rv = rv.Addr() - // } e.e.EncodeExt(rv2i(rv), f.xfTag, f.xfFn, e) } -// func rviptr(rv reflect.Value) (v interface{}) { -// // If a non-pointer was passed to Encode(), then that value is not addressable. -// // Take addr if addressable, else copy value to an addressable value. -// if rv.CanAddr() { -// v = rv2i(rv.Addr()) -// } else { -// rv2 := reflect.New(rv.Type()) -// rv2.Elem().Set(rv) -// v = rv2i(rv2) -// } -// return v -// } - func (e *Encoder) selferMarshal(f *codecFnInfo, rv reflect.Value) { rv2i(rv).(Selfer).CodecEncodeSelf(e) } func (e *Encoder) binaryMarshal(f *codecFnInfo, rv reflect.Value) { bs, fnerr := rv2i(rv).(encoding.BinaryMarshaler).MarshalBinary() - e.marshal(bs, fnerr, false, c_RAW) + e.marshal(bs, fnerr, false, cRAW) } func (e *Encoder) textMarshal(f *codecFnInfo, rv reflect.Value) { bs, fnerr := rv2i(rv).(encoding.TextMarshaler).MarshalText() - e.marshal(bs, fnerr, false, c_UTF8) + e.marshal(bs, fnerr, false, cUTF8) } func (e *Encoder) jsonMarshal(f *codecFnInfo, rv reflect.Value) { bs, fnerr := rv2i(rv).(jsonMarshaler).MarshalJSON() - e.marshal(bs, fnerr, true, c_UTF8) + e.marshal(bs, fnerr, true, cUTF8) } func (e *Encoder) raw(f *codecFnInfo, rv reflect.Value) { @@ -431,18 +307,25 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { // If in this method, then there was no extension function defined. // So it's okay to treat as []byte. if ti.rtid == uint8SliceTypId { - ee.EncodeStringBytes(c_RAW, rv.Bytes()) + ee.EncodeStringBytes(cRAW, rv.Bytes()) return } } - elemsep := e.hh.hasElemSeparators() - rtelem := ti.rt.Elem() + if f.seq == seqTypeChan && ti.chandir&uint8(reflect.RecvDir) == 0 { + e.errorf("send-only channel cannot be used for receiving byte(s)") + } + elemsep := e.esep l := rv.Len() - if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { + rtelem := ti.elem + rtelemIsByte := uint8TypId == rt2id(rtelem) // NOT rtelem.Kind() == reflect.Uint8 + // if a slice, array or chan of bytes, treat specially + if rtelemIsByte { switch f.seq { + case seqTypeSlice: + ee.EncodeStringBytes(cRAW, rv.Bytes()) case seqTypeArray: if rv.CanAddr() { - ee.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + ee.EncodeStringBytes(cRAW, rv.Slice(0, l).Bytes()) } else { var bs []byte if l <= cap(e.b) { @@ -451,24 +334,24 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { bs = make([]byte, l) } reflect.Copy(reflect.ValueOf(bs), rv) - ee.EncodeStringBytes(c_RAW, bs) + ee.EncodeStringBytes(cRAW, bs) } - return - case seqTypeSlice: - ee.EncodeStringBytes(c_RAW, rv.Bytes()) - return + case seqTypeChan: + bs := e.b[:0] + // do not use range, so that the number of elements encoded + // does not change, and encoding does not hang waiting on someone to close chan. + // for b := range rv2i(rv).(<-chan byte) { bs = append(bs, b) } + // ch := rv2i(rv).(<-chan byte) // fix error - that this is a chan byte, not a <-chan byte. + irv := rv2i(rv) + ch, ok := irv.(<-chan byte) + if !ok { + ch = irv.(chan byte) + } + for i := 0; i < l; i++ { + bs = append(bs, <-ch) + } + ee.EncodeStringBytes(cRAW, bs) } - } - if ti.rtid == uint8SliceTypId && f.seq == seqTypeChan { - bs := e.b[:0] - // do not use range, so that the number of elements encoded - // does not change, and encoding does not hang waiting on someone to close chan. - // for b := range rv2i(rv).(<-chan byte) { bs = append(bs, b) } - ch := rv2i(rv).(<-chan byte) - for i := 0; i < l; i++ { - bs = append(bs, <-ch) - } - ee.EncodeStringBytes(c_RAW, bs) return } @@ -484,22 +367,15 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { if l > 0 { var fn *codecFn - var recognizedVtyp bool - if useLookupRecognizedTypes { - recognizedVtyp = isRecognizedRtidOrPtr(rt2id(rtelem)) + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() } - if !(useLookupRecognizedTypes && recognizedVtyp) { - for rtelem.Kind() == reflect.Ptr { - rtelem = rtelem.Elem() - } - // if kind is reflect.Interface, do not pre-determine the - // encoding type, because preEncodeValue may break it down to - // a concrete type and kInterface will bomb. - if rtelem.Kind() != reflect.Interface { - fn = e.cf.get(rtelem, true, true) - } + // if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + if rtelem.Kind() != reflect.Interface { + fn = e.cfer().get(rtelem, true, true) } - // TODO: Consider perf implication of encoding odd index values as symbols if type is string for j := 0; j < l; j++ { if elemsep { if ti.mbs { @@ -514,20 +390,12 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { } if f.seq == seqTypeChan { if rv2, ok2 := rv.Recv(); ok2 { - if useLookupRecognizedTypes && recognizedVtyp { - e.encode(rv2i(rv2)) - } else { - e.encodeValue(rv2, fn, true) - } + e.encodeValue(rv2, fn, true) } else { ee.EncodeNil() // WE HAVE TO DO SOMETHING, so nil if nothing received. } } else { - if useLookupRecognizedTypes && recognizedVtyp { - e.encode(rv2i(rv.Index(j))) - } else { - e.encodeValue(rv.Index(j), fn, true) - } + e.encodeValue(rv.Index(j), fn, true) } } } @@ -541,50 +409,42 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { fti := f.ti - elemsep := e.hh.hasElemSeparators() - tisfi := fti.sfip + elemsep := e.esep + tisfi := fti.sfiSrc toMap := !(fti.toArray || e.h.StructToArray) if toMap { - tisfi = fti.sfi + tisfi = fti.sfiSort } ee := e.e sfn := structFieldNode{v: rv, update: false} if toMap { ee.WriteMapStart(len(tisfi)) - // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - if !elemsep { + if elemsep { for _, si := range tisfi { - if asSymbols { - ee.EncodeSymbol(si.encName) - } else { - ee.EncodeString(c_UTF8, si.encName) - } + ee.WriteMapElemKey() + // ee.EncodeString(cUTF8, si.encName) + encStructFieldKey(ee, fti.keyType, si.encName) + ee.WriteMapElemValue() e.encodeValue(sfn.field(si), nil, true) } } else { for _, si := range tisfi { - ee.WriteMapElemKey() - if asSymbols { - ee.EncodeSymbol(si.encName) - } else { - ee.EncodeString(c_UTF8, si.encName) - } - ee.WriteMapElemValue() + // ee.EncodeString(cUTF8, si.encName) + encStructFieldKey(ee, fti.keyType, si.encName) e.encodeValue(sfn.field(si), nil, true) } } ee.WriteMapEnd() } else { ee.WriteArrayStart(len(tisfi)) - if !elemsep { + if elemsep { for _, si := range tisfi { + ee.WriteArrayElem() e.encodeValue(sfn.field(si), nil, true) } } else { for _, si := range tisfi { - ee.WriteArrayElem() e.encodeValue(sfn.field(si), nil, true) } } @@ -592,16 +452,35 @@ func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { } } +func encStructFieldKey(ee encDriver, keyType valueType, s string) { + var m must + + // use if-else-if, not switch (which compiles to binary-search) + // since keyType is typically valueTypeString, branch prediction is pretty good. + + if keyType == valueTypeString { + ee.EncodeString(cUTF8, s) + } else if keyType == valueTypeInt { + ee.EncodeInt(m.Int(strconv.ParseInt(s, 10, 64))) + } else if keyType == valueTypeUint { + ee.EncodeUint(m.Uint(strconv.ParseUint(s, 10, 64))) + } else if keyType == valueTypeFloat { + ee.EncodeFloat64(m.Float(strconv.ParseFloat(s, 64))) + } else { + ee.EncodeString(cUTF8, s) + } +} + func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { fti := f.ti - elemsep := e.hh.hasElemSeparators() - tisfi := fti.sfip + elemsep := e.esep + tisfi := fti.sfiSrc toMap := !(fti.toArray || e.h.StructToArray) // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) if toMap { - tisfi = fti.sfi + tisfi = fti.sfiSort } - newlen := len(fti.sfi) + newlen := len(fti.sfiSort) ee := e.e // Use sync.Pool to reduce allocating slices unnecessarily. @@ -619,6 +498,7 @@ func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { var spool *sync.Pool var poolv interface{} var fkvs []stringRv + // fmt.Printf(">>>>>>>>>>>>>> encode.kStruct: newlen: %d\n", newlen) if newlen <= 8 { spool, poolv = pool.stringRv8() fkvs = poolv.(*[8]stringRv)[:newlen] @@ -646,14 +526,14 @@ func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { // kv.r = si.field(rv, false) kv.r = sfn.field(si) if toMap { - if si.omitEmpty && isEmptyValue(kv.r, recur, recur) { + if si.omitEmpty() && isEmptyValue(kv.r, e.h.TypeInfos, recur, recur) { continue } kv.v = si.encName } else { // use the zero value. // if a reference or struct, set to nil (so you do not output too much) - if si.omitEmpty && isEmptyValue(kv.r, recur, recur) { + if si.omitEmpty() && isEmptyValue(kv.r, e.h.TypeInfos, recur, recur) { switch kv.r.Kind() { case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, reflect.Map, reflect.Slice: kv.r = reflect.Value{} //encode as nil @@ -666,41 +546,33 @@ func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { if toMap { ee.WriteMapStart(newlen) - // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - if !elemsep { + if elemsep { for j := 0; j < newlen; j++ { kv = fkvs[j] - if asSymbols { - ee.EncodeSymbol(kv.v) - } else { - ee.EncodeString(c_UTF8, kv.v) - } + ee.WriteMapElemKey() + // ee.EncodeString(cUTF8, kv.v) + encStructFieldKey(ee, fti.keyType, kv.v) + ee.WriteMapElemValue() e.encodeValue(kv.r, nil, true) } } else { for j := 0; j < newlen; j++ { kv = fkvs[j] - ee.WriteMapElemKey() - if asSymbols { - ee.EncodeSymbol(kv.v) - } else { - ee.EncodeString(c_UTF8, kv.v) - } - ee.WriteMapElemValue() + // ee.EncodeString(cUTF8, kv.v) + encStructFieldKey(ee, fti.keyType, kv.v) e.encodeValue(kv.r, nil, true) } } ee.WriteMapEnd() } else { ee.WriteArrayStart(newlen) - if !elemsep { + if elemsep { for j := 0; j < newlen; j++ { + ee.WriteArrayElem() e.encodeValue(fkvs[j].r, nil, true) } } else { for j := 0; j < newlen; j++ { - ee.WriteArrayElem() e.encodeValue(fkvs[j].r, nil, true) } } @@ -724,12 +596,12 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { l := rv.Len() ee.WriteMapStart(l) - elemsep := e.hh.hasElemSeparators() + elemsep := e.esep if l == 0 { ee.WriteMapEnd() return } - var asSymbols bool + // var asSymbols bool // determine the underlying key and val encFn's for the map. // This eliminates some work which is done for each loop iteration i.e. // rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn. @@ -739,106 +611,61 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { // a concrete type and kInterface will bomb. var keyFn, valFn *codecFn ti := f.ti - rtkey0 := ti.rt.Key() + rtkey0 := ti.key rtkey := rtkey0 - rtval0 := ti.rt.Elem() + rtval0 := ti.elem rtval := rtval0 - rtkeyid := rt2id(rtkey0) - rtvalid := rt2id(rtval0) + // rtkeyid := rt2id(rtkey0) for rtval.Kind() == reflect.Ptr { rtval = rtval.Elem() } if rtval.Kind() != reflect.Interface { - valFn = e.cf.get(rtval, true, true) + valFn = e.cfer().get(rtval, true, true) } mks := rv.MapKeys() if e.h.Canonical { - e.kMapCanonical(rtkey, rv, mks, valFn, asSymbols) + e.kMapCanonical(rtkey, rv, mks, valFn) ee.WriteMapEnd() return } - var recognizedKtyp, recognizedVtyp bool - var keyTypeIsString = rtkeyid == stringTypId - if keyTypeIsString { - asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - } else { - if useLookupRecognizedTypes { - recognizedKtyp = isRecognizedRtidOrPtr(rtkeyid) - if recognizedKtyp { - goto LABEL1 - } - } + var keyTypeIsString = stringTypId == rt2id(rtkey0) // rtkeyid + if !keyTypeIsString { for rtkey.Kind() == reflect.Ptr { rtkey = rtkey.Elem() } if rtkey.Kind() != reflect.Interface { - rtkeyid = rt2id(rtkey) - keyFn = e.cf.get(rtkey, true, true) + // rtkeyid = rt2id(rtkey) + keyFn = e.cfer().get(rtkey, true, true) } } // for j, lmks := 0, len(mks); j < lmks; j++ { -LABEL1: - if useLookupRecognizedTypes { - recognizedVtyp = isRecognizedRtidOrPtr(rtvalid) - } for j := range mks { if elemsep { ee.WriteMapElemKey() } if keyTypeIsString { - if asSymbols { - ee.EncodeSymbol(mks[j].String()) - } else { - ee.EncodeString(c_UTF8, mks[j].String()) - } - } else if useLookupRecognizedTypes && recognizedKtyp { - e.encode(rv2i(mks[j])) + ee.EncodeString(cUTF8, mks[j].String()) } else { e.encodeValue(mks[j], keyFn, true) } if elemsep { ee.WriteMapElemValue() } - if useLookupRecognizedTypes && recognizedVtyp { - e.encode(rv2i(rv.MapIndex(mks[j]))) - } else { - e.encodeValue(rv.MapIndex(mks[j]), valFn, true) - } + e.encodeValue(rv.MapIndex(mks[j]), valFn, true) + } ee.WriteMapEnd() } -func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *codecFn, asSymbols bool) { +func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *codecFn) { ee := e.e - elemsep := e.hh.hasElemSeparators() + elemsep := e.esep // we previously did out-of-band if an extension was registered. // This is not necessary, as the natural kind is sufficient for ordering. - // WHAT IS THIS? rtkeyid can never be a []uint8, per spec - // if rtkeyid == uint8SliceTypId { - // mksv := make([]bytesRv, len(mks)) - // for i, k := range mks { - // v := &mksv[i] - // v.r = k - // v.v = k.Bytes() - // } - // sort.Sort(bytesRvSlice(mksv)) - // for i := range mksv { - // if elemsep { - // ee.WriteMapElemKey() - // } - // ee.EncodeStringBytes(c_RAW, mksv[i].v) - // if elemsep { - // ee.WriteMapElemValue() - // } - // e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) - // } - // return - // } - switch rtkey.Kind() { case reflect.Bool: mksv := make([]boolRv, len(mks)) @@ -870,11 +697,7 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl if elemsep { ee.WriteMapElemKey() } - if asSymbols { - ee.EncodeSymbol(mksv[i].v) - } else { - ee.EncodeString(c_UTF8, mksv[i].v) - } + ee.EncodeString(cUTF8, mksv[i].v) if elemsep { ee.WriteMapElemValue() } @@ -952,6 +775,28 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } + case reflect.Struct: + if rv.Type() == timeTyp { + mksv := make([]timeRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = rv2i(k).(time.Time) + } + sort.Sort(timeRvSlice(mksv)) + for i := range mksv { + if elemsep { + ee.WriteMapElemKey() + } + ee.EncodeTime(mksv[i].v) + if elemsep { + ee.WriteMapElemValue() + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + break + } + fallthrough default: // out-of-band // first encode each key to a []byte first, then sort them, then record @@ -981,32 +826,78 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl // // -------------------------------------------------- +type encWriterSwitch struct { + wi *ioEncWriter + // wb bytesEncWriter + wb bytesEncAppender + wx bool // if bytes, wx=true + esep bool // whether it has elem separators + isas bool // whether e.as != nil +} + +// // TODO: Uncomment after mid-stack inlining enabled in go 1.10 + +// func (z *encWriterSwitch) writeb(s []byte) { +// if z.wx { +// z.wb.writeb(s) +// } else { +// z.wi.writeb(s) +// } +// } +// func (z *encWriterSwitch) writestr(s string) { +// if z.wx { +// z.wb.writestr(s) +// } else { +// z.wi.writestr(s) +// } +// } +// func (z *encWriterSwitch) writen1(b1 byte) { +// if z.wx { +// z.wb.writen1(b1) +// } else { +// z.wi.writen1(b1) +// } +// } +// func (z *encWriterSwitch) writen2(b1, b2 byte) { +// if z.wx { +// z.wb.writen2(b1, b2) +// } else { +// z.wi.writen2(b1, b2) +// } +// } + // An Encoder writes an object to an output stream in the codec format. type Encoder struct { + panicHdl // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder e encDriver // NOTE: Encoder shouldn't call it's write methods, // as the handler MAY need to do some coordination. w encWriter - hh Handle h *BasicHandle - - // ---- cpu cache line boundary? - - wi ioEncWriter - wb bytesEncWriter - bw bufio.Writer - - // cr containerStateRecv + bw *bufio.Writer as encDriverAsis + // ---- cpu cache line boundary? - ci set + // ---- cpu cache line boundary? + encWriterSwitch err error - b [scratchByteArrayLen]byte - cf codecFner + // ---- cpu cache line boundary? + codecFnPooler + ci set + js bool // here, so that no need to piggy back on *codecFner for this + be bool // here, so that no need to piggy back on *codecFner for this + _ [6]byte // padding + + // ---- writable fields during execution --- *try* to keep in sep cache line + + // ---- cpu cache line boundary? + // b [scratchByteArrayLen]byte + // _ [cacheLineSize - scratchByteArrayLen]byte // padding + b [cacheLineSize - 0]byte // used for encoding a chan or (non-addressable) array of bytes } // NewEncoder returns an Encoder for encoding into an io.Writer. @@ -1031,53 +922,74 @@ func NewEncoderBytes(out *[]byte, h Handle) *Encoder { } func newEncoder(h Handle) *Encoder { - e := &Encoder{hh: h, h: h.getBasicHandle()} - e.e = h.newEncDriver(e) - e.as, _ = e.e.(encDriverAsis) - // e.cr, _ = e.e.(containerStateRecv) + e := &Encoder{h: h.getBasicHandle(), err: errEncoderNotInitialized} + e.hh = h + e.esep = h.hasElemSeparators() return e } -// Reset the Encoder with a new output stream. +func (e *Encoder) resetCommon() { + if e.e == nil || e.hh.recreateEncDriver(e.e) { + e.e = e.hh.newEncDriver(e) + e.as, e.isas = e.e.(encDriverAsis) + // e.cr, _ = e.e.(containerStateRecv) + } + e.be = e.hh.isBinary() + _, e.js = e.hh.(*JsonHandle) + e.e.reset() + e.err = nil +} + +// Reset resets the Encoder with a new output stream. // // This accommodates using the state of the Encoder, // where it has "cached" information about sub-engines. func (e *Encoder) Reset(w io.Writer) { + if w == nil { + return + } + if e.wi == nil { + e.wi = new(ioEncWriter) + } var ok bool + e.wx = false e.wi.w = w if e.h.WriterBufferSize > 0 { - bw := bufio.NewWriterSize(w, e.h.WriterBufferSize) - e.bw = *bw - e.wi.bw = &e.bw - e.wi.sw = &e.bw - e.wi.fw = &e.bw - e.wi.ww = &e.bw + e.bw = bufio.NewWriterSize(w, e.h.WriterBufferSize) + e.wi.bw = e.bw + e.wi.sw = e.bw + e.wi.fw = e.bw + e.wi.ww = e.bw } else { if e.wi.bw, ok = w.(io.ByteWriter); !ok { - e.wi.bw = &e.wi + e.wi.bw = e.wi } if e.wi.sw, ok = w.(ioEncStringWriter); !ok { - e.wi.sw = &e.wi + e.wi.sw = e.wi } - e.wi.fw, _ = w.(ioEncFlusher) + e.wi.fw, _ = w.(ioFlusher) e.wi.ww = w } - e.w = &e.wi - e.e.reset() - e.cf.reset(e.hh) - e.err = nil + e.w = e.wi + e.resetCommon() } +// ResetBytes resets the Encoder with a new destination output []byte. func (e *Encoder) ResetBytes(out *[]byte) { - in := *out + if out == nil { + return + } + var in []byte + if out != nil { + in = *out + } if in == nil { in = make([]byte, defEncByteBufSize) } - e.wb.b, e.wb.out, e.wb.c = in, out, 0 + e.wx = true + e.wb.reset(in, out) e.w = &e.wb - e.e.reset() - e.cf.reset(e.hh) - e.err = nil + e.resetCommon() } // Encode writes an object into a stream. @@ -1088,7 +1000,14 @@ func (e *Encoder) ResetBytes(out *[]byte) { // Note that the "json" key is used in the absence of the "codec" key. // // To set an option on all fields (e.g. omitempty on all fields), you -// can create a field called _struct, and set flags on it. +// can create a field called _struct, and set flags on it. The options +// which can be set on _struct are: +// - omitempty: so all fields are omitted if empty +// - toarray: so struct is encoded as an array +// - int: so struct key names are encoded as signed integers (instead of strings) +// - uint: so struct key names are encoded as unsigned integers (instead of strings) +// - float: so struct key names are encoded as floats (instead of strings) +// More details on these below. // // Struct values "usually" encode as maps. Each exported struct field is encoded unless: // - the field's tag is "-", OR @@ -1096,6 +1015,13 @@ func (e *Encoder) ResetBytes(out *[]byte) { // // When encoding as a map, the first string in the tag (before the comma) // is the map key string to use when encoding. +// ... +// This key is typically encoded as a string. +// However, there are instances where the encoded stream has mapping keys encoded as numbers. +// For example, some cbor streams have keys as integer codes in the stream, but they should map +// to fields in a structured object. Consequently, a struct is the natural representation in code. +// For these, configure the struct to encode/decode the keys as numbers (instead of string). +// This is done with the int,uint or float option on the _struct field (see above). // // However, struct values may encode as arrays. This happens when: // - StructToArray Encode option is set, OR @@ -1128,20 +1054,27 @@ func (e *Encoder) ResetBytes(out *[]byte) { // } // // type MyStruct struct { -// _struct bool `codec:",toarray"` //encode struct as an array +// _struct bool `codec:",toarray"` //encode struct as an array +// } +// +// type MyStruct struct { +// _struct bool `codec:",uint"` //encode struct with "unsigned integer" keys +// Field1 string `codec:"1"` //encode Field1 key using: EncodeInt(1) +// Field2 string `codec:"2"` //encode Field2 key using: EncodeInt(2) // } // // The mode of encoding is based on the type of the value. When a value is seen: // - If a Selfer, call its CodecEncodeSelf method // - If an extension is registered for it, call that extension function -// - If it implements encoding.(Binary|Text|JSON)Marshaler, call its Marshal(Binary|Text|JSON) method +// - If implements encoding.(Binary|Text|JSON)Marshaler, call Marshal(Binary|Text|JSON) method // - Else encode it based on its reflect.Kind // // Note that struct field names and keys in map[string]XXX will be treated as symbols. // Some formats support symbols (e.g. binc) and will properly encode the string // only once in the stream, and use a tag to refer to it thereafter. func (e *Encoder) Encode(v interface{}) (err error) { - defer panicToErrs2(&e.err, &err) + defer panicToErrs2(e, &e.err, &err) + defer e.alwaysAtEnd() e.MustEncode(v) return } @@ -1155,8 +1088,13 @@ func (e *Encoder) MustEncode(v interface{}) { e.encode(v) e.e.atEndOfEncode() e.w.atEndOfEncode() + e.alwaysAtEnd() } +// func (e *Encoder) alwaysAtEnd() { +// e.codecFnPooler.alwaysAtEnd() +// } + func (e *Encoder) encode(iv interface{}) { if iv == nil || definitelyNil(iv) { e.e.EncodeNil() @@ -1167,18 +1105,17 @@ func (e *Encoder) encode(iv interface{}) { return } + // a switch with only concrete types can be optimized. + // consequently, we deal with nil and interfaces outside. + switch v := iv.(type) { - // case nil: - // e.e.EncodeNil() - // case Selfer: - // v.CodecEncodeSelf(e) case Raw: e.rawBytes(v) case reflect.Value: e.encodeValue(v, nil, true) case string: - e.e.EncodeString(c_UTF8, v) + e.e.EncodeString(cUTF8, v) case bool: e.e.EncodeBool(v) case int: @@ -1207,12 +1144,16 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeFloat32(v) case float64: e.e.EncodeFloat64(v) - + case time.Time: + e.e.EncodeTime(v) case []uint8: - e.e.EncodeStringBytes(c_RAW, v) + e.e.EncodeStringBytes(cRAW, v) + + case *Raw: + e.rawBytes(*v) case *string: - e.e.EncodeString(c_UTF8, *v) + e.e.EncodeString(cUTF8, *v) case *bool: e.e.EncodeBool(*v) case *int: @@ -1241,9 +1182,11 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeFloat32(*v) case *float64: e.e.EncodeFloat64(*v) + case *time.Time: + e.e.EncodeTime(*v) case *[]uint8: - e.e.EncodeStringBytes(c_RAW, *v) + e.e.EncodeStringBytes(cRAW, *v) default: if !fastpathEncodeTypeSwitch(iv, e) { @@ -1297,13 +1240,8 @@ TOP: if fn == nil { rt := rv.Type() - // TODO: calling isRecognizedRtid here is a major slowdown - if false && useLookupRecognizedTypes && isRecognizedRtidOrPtr(rt2id(rt)) { - e.encode(rv2i(rv)) - return - } // always pass checkCodecSelfer=true, in case T or ****T is passed, where *T is a Selfer - fn = e.cf.get(rt, checkFastpath, true) + fn = e.cfer().get(rt, checkFastpath, true) } if fn.i.addrE { if rvpValid { @@ -1337,10 +1275,10 @@ func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { } func (e *Encoder) asis(v []byte) { - if e.as == nil { - e.w.writeb(v) - } else { + if e.isas { e.as.EncodeAsis(v) + } else { + e.w.writeb(v) } } @@ -1349,14 +1287,9 @@ func (e *Encoder) rawBytes(vv Raw) { if !e.h.Raw { e.errorf("Raw values cannot be encoded: %v", v) } - if e.as == nil { - e.w.writeb(v) - } else { - e.as.EncodeAsis(v) - } + e.asis(v) } -func (e *Encoder) errorf(format string, params ...interface{}) { - err := fmt.Errorf(format, params...) - panic(err) +func (e *Encoder) wrapErrstr(v interface{}, err *error) { + *err = fmt.Errorf("%s encode error: %v", e.hh.Name(), v) } diff --git a/vendor/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/ugorji/go/codec/fast-path.generated.go index ffe0c6d..87f2562 100644 --- a/vendor/github.com/ugorji/go/codec/fast-path.generated.go +++ b/vendor/github.com/ugorji/go/codec/fast-path.generated.go @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl -// ************************************************************ +// Code generated from fast-path.go.tmpl - DO NOT EDIT. package codec @@ -18,19 +15,19 @@ package codec // This file can be omitted without causing a build failure. // // The advantage of fast paths is: -// - Many calls bypass reflection altogether +// - Many calls bypass reflection altogether // // Currently support -// - slice of all builtin types, -// - map of all builtin types to string or interface value -// - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8) // This should provide adequate "typical" implementations. // // Note that fast track decode functions must handle values for which an address cannot be obtained. // For example: -// m2 := map[string]int{} -// p2 := []interface{}{m2} -// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. // import ( @@ -80,19 +77,12 @@ var fastpathAV fastpathA // due to possible initialization loop error, make fastpath in an init() func init() { - if useLookupRecognizedTypes && recognizedRtidsLoaded { - panic("recognizedRtidsLoaded = true - cannot happen") - } i := 0 fn := func(v interface{}, fe func(*Encoder, *codecFnInfo, reflect.Value), fd func(*Decoder, *codecFnInfo, reflect.Value)) (f fastpathE) { xrt := reflect.TypeOf(v) xptr := rt2id(xrt) - if useLookupRecognizedTypes { - recognizedRtids = append(recognizedRtids, xptr) - recognizedRtidPtrs = append(recognizedRtidPtrs, rt2id(reflect.PtrTo(xrt))) - } fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} i++ return @@ -384,1359 +374,1090 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { fastpathTV.EncSliceIntfV(v, e) case *[]interface{}: fastpathTV.EncSliceIntfV(*v, e) - - case map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(v, e) - case *map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(*v, e) - - case map[interface{}]string: - fastpathTV.EncMapIntfStringV(v, e) - case *map[interface{}]string: - fastpathTV.EncMapIntfStringV(*v, e) - - case map[interface{}]uint: - fastpathTV.EncMapIntfUintV(v, e) - case *map[interface{}]uint: - fastpathTV.EncMapIntfUintV(*v, e) - - case map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(v, e) - case *map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(*v, e) - - case map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(v, e) - case *map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(*v, e) - - case map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(v, e) - case *map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(*v, e) - - case map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(v, e) - case *map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(*v, e) - - case map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(v, e) - case *map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(*v, e) - - case map[interface{}]int: - fastpathTV.EncMapIntfIntV(v, e) - case *map[interface{}]int: - fastpathTV.EncMapIntfIntV(*v, e) - - case map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(v, e) - case *map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(*v, e) - - case map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(v, e) - case *map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(*v, e) - - case map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(v, e) - case *map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(*v, e) - - case map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(v, e) - case *map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(*v, e) - - case map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(v, e) - case *map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(*v, e) - - case map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(v, e) - case *map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(*v, e) - - case map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(v, e) - case *map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(*v, e) - case []string: fastpathTV.EncSliceStringV(v, e) case *[]string: fastpathTV.EncSliceStringV(*v, e) - - case map[string]interface{}: - fastpathTV.EncMapStringIntfV(v, e) - case *map[string]interface{}: - fastpathTV.EncMapStringIntfV(*v, e) - - case map[string]string: - fastpathTV.EncMapStringStringV(v, e) - case *map[string]string: - fastpathTV.EncMapStringStringV(*v, e) - - case map[string]uint: - fastpathTV.EncMapStringUintV(v, e) - case *map[string]uint: - fastpathTV.EncMapStringUintV(*v, e) - - case map[string]uint8: - fastpathTV.EncMapStringUint8V(v, e) - case *map[string]uint8: - fastpathTV.EncMapStringUint8V(*v, e) - - case map[string]uint16: - fastpathTV.EncMapStringUint16V(v, e) - case *map[string]uint16: - fastpathTV.EncMapStringUint16V(*v, e) - - case map[string]uint32: - fastpathTV.EncMapStringUint32V(v, e) - case *map[string]uint32: - fastpathTV.EncMapStringUint32V(*v, e) - - case map[string]uint64: - fastpathTV.EncMapStringUint64V(v, e) - case *map[string]uint64: - fastpathTV.EncMapStringUint64V(*v, e) - - case map[string]uintptr: - fastpathTV.EncMapStringUintptrV(v, e) - case *map[string]uintptr: - fastpathTV.EncMapStringUintptrV(*v, e) - - case map[string]int: - fastpathTV.EncMapStringIntV(v, e) - case *map[string]int: - fastpathTV.EncMapStringIntV(*v, e) - - case map[string]int8: - fastpathTV.EncMapStringInt8V(v, e) - case *map[string]int8: - fastpathTV.EncMapStringInt8V(*v, e) - - case map[string]int16: - fastpathTV.EncMapStringInt16V(v, e) - case *map[string]int16: - fastpathTV.EncMapStringInt16V(*v, e) - - case map[string]int32: - fastpathTV.EncMapStringInt32V(v, e) - case *map[string]int32: - fastpathTV.EncMapStringInt32V(*v, e) - - case map[string]int64: - fastpathTV.EncMapStringInt64V(v, e) - case *map[string]int64: - fastpathTV.EncMapStringInt64V(*v, e) - - case map[string]float32: - fastpathTV.EncMapStringFloat32V(v, e) - case *map[string]float32: - fastpathTV.EncMapStringFloat32V(*v, e) - - case map[string]float64: - fastpathTV.EncMapStringFloat64V(v, e) - case *map[string]float64: - fastpathTV.EncMapStringFloat64V(*v, e) - - case map[string]bool: - fastpathTV.EncMapStringBoolV(v, e) - case *map[string]bool: - fastpathTV.EncMapStringBoolV(*v, e) - case []float32: fastpathTV.EncSliceFloat32V(v, e) case *[]float32: fastpathTV.EncSliceFloat32V(*v, e) - - case map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(v, e) - case *map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(*v, e) - - case map[float32]string: - fastpathTV.EncMapFloat32StringV(v, e) - case *map[float32]string: - fastpathTV.EncMapFloat32StringV(*v, e) - - case map[float32]uint: - fastpathTV.EncMapFloat32UintV(v, e) - case *map[float32]uint: - fastpathTV.EncMapFloat32UintV(*v, e) - - case map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(v, e) - case *map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(*v, e) - - case map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(v, e) - case *map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(*v, e) - - case map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(v, e) - case *map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(*v, e) - - case map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(v, e) - case *map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(*v, e) - - case map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(v, e) - case *map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(*v, e) - - case map[float32]int: - fastpathTV.EncMapFloat32IntV(v, e) - case *map[float32]int: - fastpathTV.EncMapFloat32IntV(*v, e) - - case map[float32]int8: - fastpathTV.EncMapFloat32Int8V(v, e) - case *map[float32]int8: - fastpathTV.EncMapFloat32Int8V(*v, e) - - case map[float32]int16: - fastpathTV.EncMapFloat32Int16V(v, e) - case *map[float32]int16: - fastpathTV.EncMapFloat32Int16V(*v, e) - - case map[float32]int32: - fastpathTV.EncMapFloat32Int32V(v, e) - case *map[float32]int32: - fastpathTV.EncMapFloat32Int32V(*v, e) - - case map[float32]int64: - fastpathTV.EncMapFloat32Int64V(v, e) - case *map[float32]int64: - fastpathTV.EncMapFloat32Int64V(*v, e) - - case map[float32]float32: - fastpathTV.EncMapFloat32Float32V(v, e) - case *map[float32]float32: - fastpathTV.EncMapFloat32Float32V(*v, e) - - case map[float32]float64: - fastpathTV.EncMapFloat32Float64V(v, e) - case *map[float32]float64: - fastpathTV.EncMapFloat32Float64V(*v, e) - - case map[float32]bool: - fastpathTV.EncMapFloat32BoolV(v, e) - case *map[float32]bool: - fastpathTV.EncMapFloat32BoolV(*v, e) - case []float64: fastpathTV.EncSliceFloat64V(v, e) case *[]float64: fastpathTV.EncSliceFloat64V(*v, e) - - case map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(v, e) - case *map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(*v, e) - - case map[float64]string: - fastpathTV.EncMapFloat64StringV(v, e) - case *map[float64]string: - fastpathTV.EncMapFloat64StringV(*v, e) - - case map[float64]uint: - fastpathTV.EncMapFloat64UintV(v, e) - case *map[float64]uint: - fastpathTV.EncMapFloat64UintV(*v, e) - - case map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(v, e) - case *map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(*v, e) - - case map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(v, e) - case *map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(*v, e) - - case map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(v, e) - case *map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(*v, e) - - case map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(v, e) - case *map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(*v, e) - - case map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(v, e) - case *map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(*v, e) - - case map[float64]int: - fastpathTV.EncMapFloat64IntV(v, e) - case *map[float64]int: - fastpathTV.EncMapFloat64IntV(*v, e) - - case map[float64]int8: - fastpathTV.EncMapFloat64Int8V(v, e) - case *map[float64]int8: - fastpathTV.EncMapFloat64Int8V(*v, e) - - case map[float64]int16: - fastpathTV.EncMapFloat64Int16V(v, e) - case *map[float64]int16: - fastpathTV.EncMapFloat64Int16V(*v, e) - - case map[float64]int32: - fastpathTV.EncMapFloat64Int32V(v, e) - case *map[float64]int32: - fastpathTV.EncMapFloat64Int32V(*v, e) - - case map[float64]int64: - fastpathTV.EncMapFloat64Int64V(v, e) - case *map[float64]int64: - fastpathTV.EncMapFloat64Int64V(*v, e) - - case map[float64]float32: - fastpathTV.EncMapFloat64Float32V(v, e) - case *map[float64]float32: - fastpathTV.EncMapFloat64Float32V(*v, e) - - case map[float64]float64: - fastpathTV.EncMapFloat64Float64V(v, e) - case *map[float64]float64: - fastpathTV.EncMapFloat64Float64V(*v, e) - - case map[float64]bool: - fastpathTV.EncMapFloat64BoolV(v, e) - case *map[float64]bool: - fastpathTV.EncMapFloat64BoolV(*v, e) - case []uint: fastpathTV.EncSliceUintV(v, e) case *[]uint: fastpathTV.EncSliceUintV(*v, e) - - case map[uint]interface{}: - fastpathTV.EncMapUintIntfV(v, e) - case *map[uint]interface{}: - fastpathTV.EncMapUintIntfV(*v, e) - - case map[uint]string: - fastpathTV.EncMapUintStringV(v, e) - case *map[uint]string: - fastpathTV.EncMapUintStringV(*v, e) - - case map[uint]uint: - fastpathTV.EncMapUintUintV(v, e) - case *map[uint]uint: - fastpathTV.EncMapUintUintV(*v, e) - - case map[uint]uint8: - fastpathTV.EncMapUintUint8V(v, e) - case *map[uint]uint8: - fastpathTV.EncMapUintUint8V(*v, e) - - case map[uint]uint16: - fastpathTV.EncMapUintUint16V(v, e) - case *map[uint]uint16: - fastpathTV.EncMapUintUint16V(*v, e) - - case map[uint]uint32: - fastpathTV.EncMapUintUint32V(v, e) - case *map[uint]uint32: - fastpathTV.EncMapUintUint32V(*v, e) - - case map[uint]uint64: - fastpathTV.EncMapUintUint64V(v, e) - case *map[uint]uint64: - fastpathTV.EncMapUintUint64V(*v, e) - - case map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(v, e) - case *map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(*v, e) - - case map[uint]int: - fastpathTV.EncMapUintIntV(v, e) - case *map[uint]int: - fastpathTV.EncMapUintIntV(*v, e) - - case map[uint]int8: - fastpathTV.EncMapUintInt8V(v, e) - case *map[uint]int8: - fastpathTV.EncMapUintInt8V(*v, e) - - case map[uint]int16: - fastpathTV.EncMapUintInt16V(v, e) - case *map[uint]int16: - fastpathTV.EncMapUintInt16V(*v, e) - - case map[uint]int32: - fastpathTV.EncMapUintInt32V(v, e) - case *map[uint]int32: - fastpathTV.EncMapUintInt32V(*v, e) - - case map[uint]int64: - fastpathTV.EncMapUintInt64V(v, e) - case *map[uint]int64: - fastpathTV.EncMapUintInt64V(*v, e) - - case map[uint]float32: - fastpathTV.EncMapUintFloat32V(v, e) - case *map[uint]float32: - fastpathTV.EncMapUintFloat32V(*v, e) - - case map[uint]float64: - fastpathTV.EncMapUintFloat64V(v, e) - case *map[uint]float64: - fastpathTV.EncMapUintFloat64V(*v, e) - - case map[uint]bool: - fastpathTV.EncMapUintBoolV(v, e) - case *map[uint]bool: - fastpathTV.EncMapUintBoolV(*v, e) - - case map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(v, e) - case *map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(*v, e) - - case map[uint8]string: - fastpathTV.EncMapUint8StringV(v, e) - case *map[uint8]string: - fastpathTV.EncMapUint8StringV(*v, e) - - case map[uint8]uint: - fastpathTV.EncMapUint8UintV(v, e) - case *map[uint8]uint: - fastpathTV.EncMapUint8UintV(*v, e) - - case map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(v, e) - case *map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(*v, e) - - case map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(v, e) - case *map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(*v, e) - - case map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(v, e) - case *map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(*v, e) - - case map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(v, e) - case *map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(*v, e) - - case map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(v, e) - case *map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(*v, e) - - case map[uint8]int: - fastpathTV.EncMapUint8IntV(v, e) - case *map[uint8]int: - fastpathTV.EncMapUint8IntV(*v, e) - - case map[uint8]int8: - fastpathTV.EncMapUint8Int8V(v, e) - case *map[uint8]int8: - fastpathTV.EncMapUint8Int8V(*v, e) - - case map[uint8]int16: - fastpathTV.EncMapUint8Int16V(v, e) - case *map[uint8]int16: - fastpathTV.EncMapUint8Int16V(*v, e) - - case map[uint8]int32: - fastpathTV.EncMapUint8Int32V(v, e) - case *map[uint8]int32: - fastpathTV.EncMapUint8Int32V(*v, e) - - case map[uint8]int64: - fastpathTV.EncMapUint8Int64V(v, e) - case *map[uint8]int64: - fastpathTV.EncMapUint8Int64V(*v, e) - - case map[uint8]float32: - fastpathTV.EncMapUint8Float32V(v, e) - case *map[uint8]float32: - fastpathTV.EncMapUint8Float32V(*v, e) - - case map[uint8]float64: - fastpathTV.EncMapUint8Float64V(v, e) - case *map[uint8]float64: - fastpathTV.EncMapUint8Float64V(*v, e) - - case map[uint8]bool: - fastpathTV.EncMapUint8BoolV(v, e) - case *map[uint8]bool: - fastpathTV.EncMapUint8BoolV(*v, e) - case []uint16: fastpathTV.EncSliceUint16V(v, e) case *[]uint16: fastpathTV.EncSliceUint16V(*v, e) - - case map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(v, e) - case *map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(*v, e) - - case map[uint16]string: - fastpathTV.EncMapUint16StringV(v, e) - case *map[uint16]string: - fastpathTV.EncMapUint16StringV(*v, e) - - case map[uint16]uint: - fastpathTV.EncMapUint16UintV(v, e) - case *map[uint16]uint: - fastpathTV.EncMapUint16UintV(*v, e) - - case map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(v, e) - case *map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(*v, e) - - case map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(v, e) - case *map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(*v, e) - - case map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(v, e) - case *map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(*v, e) - - case map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(v, e) - case *map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(*v, e) - - case map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(v, e) - case *map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(*v, e) - - case map[uint16]int: - fastpathTV.EncMapUint16IntV(v, e) - case *map[uint16]int: - fastpathTV.EncMapUint16IntV(*v, e) - - case map[uint16]int8: - fastpathTV.EncMapUint16Int8V(v, e) - case *map[uint16]int8: - fastpathTV.EncMapUint16Int8V(*v, e) - - case map[uint16]int16: - fastpathTV.EncMapUint16Int16V(v, e) - case *map[uint16]int16: - fastpathTV.EncMapUint16Int16V(*v, e) - - case map[uint16]int32: - fastpathTV.EncMapUint16Int32V(v, e) - case *map[uint16]int32: - fastpathTV.EncMapUint16Int32V(*v, e) - - case map[uint16]int64: - fastpathTV.EncMapUint16Int64V(v, e) - case *map[uint16]int64: - fastpathTV.EncMapUint16Int64V(*v, e) - - case map[uint16]float32: - fastpathTV.EncMapUint16Float32V(v, e) - case *map[uint16]float32: - fastpathTV.EncMapUint16Float32V(*v, e) - - case map[uint16]float64: - fastpathTV.EncMapUint16Float64V(v, e) - case *map[uint16]float64: - fastpathTV.EncMapUint16Float64V(*v, e) - - case map[uint16]bool: - fastpathTV.EncMapUint16BoolV(v, e) - case *map[uint16]bool: - fastpathTV.EncMapUint16BoolV(*v, e) - case []uint32: fastpathTV.EncSliceUint32V(v, e) case *[]uint32: fastpathTV.EncSliceUint32V(*v, e) - - case map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(v, e) - case *map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(*v, e) - - case map[uint32]string: - fastpathTV.EncMapUint32StringV(v, e) - case *map[uint32]string: - fastpathTV.EncMapUint32StringV(*v, e) - - case map[uint32]uint: - fastpathTV.EncMapUint32UintV(v, e) - case *map[uint32]uint: - fastpathTV.EncMapUint32UintV(*v, e) - - case map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(v, e) - case *map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(*v, e) - - case map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(v, e) - case *map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(*v, e) - - case map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(v, e) - case *map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(*v, e) - - case map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(v, e) - case *map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(*v, e) - - case map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(v, e) - case *map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(*v, e) - - case map[uint32]int: - fastpathTV.EncMapUint32IntV(v, e) - case *map[uint32]int: - fastpathTV.EncMapUint32IntV(*v, e) - - case map[uint32]int8: - fastpathTV.EncMapUint32Int8V(v, e) - case *map[uint32]int8: - fastpathTV.EncMapUint32Int8V(*v, e) - - case map[uint32]int16: - fastpathTV.EncMapUint32Int16V(v, e) - case *map[uint32]int16: - fastpathTV.EncMapUint32Int16V(*v, e) - - case map[uint32]int32: - fastpathTV.EncMapUint32Int32V(v, e) - case *map[uint32]int32: - fastpathTV.EncMapUint32Int32V(*v, e) - - case map[uint32]int64: - fastpathTV.EncMapUint32Int64V(v, e) - case *map[uint32]int64: - fastpathTV.EncMapUint32Int64V(*v, e) - - case map[uint32]float32: - fastpathTV.EncMapUint32Float32V(v, e) - case *map[uint32]float32: - fastpathTV.EncMapUint32Float32V(*v, e) - - case map[uint32]float64: - fastpathTV.EncMapUint32Float64V(v, e) - case *map[uint32]float64: - fastpathTV.EncMapUint32Float64V(*v, e) - - case map[uint32]bool: - fastpathTV.EncMapUint32BoolV(v, e) - case *map[uint32]bool: - fastpathTV.EncMapUint32BoolV(*v, e) - case []uint64: fastpathTV.EncSliceUint64V(v, e) case *[]uint64: fastpathTV.EncSliceUint64V(*v, e) - - case map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(v, e) - case *map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(*v, e) - - case map[uint64]string: - fastpathTV.EncMapUint64StringV(v, e) - case *map[uint64]string: - fastpathTV.EncMapUint64StringV(*v, e) - - case map[uint64]uint: - fastpathTV.EncMapUint64UintV(v, e) - case *map[uint64]uint: - fastpathTV.EncMapUint64UintV(*v, e) - - case map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(v, e) - case *map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(*v, e) - - case map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(v, e) - case *map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(*v, e) - - case map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(v, e) - case *map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(*v, e) - - case map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(v, e) - case *map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(*v, e) - - case map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(v, e) - case *map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(*v, e) - - case map[uint64]int: - fastpathTV.EncMapUint64IntV(v, e) - case *map[uint64]int: - fastpathTV.EncMapUint64IntV(*v, e) - - case map[uint64]int8: - fastpathTV.EncMapUint64Int8V(v, e) - case *map[uint64]int8: - fastpathTV.EncMapUint64Int8V(*v, e) - - case map[uint64]int16: - fastpathTV.EncMapUint64Int16V(v, e) - case *map[uint64]int16: - fastpathTV.EncMapUint64Int16V(*v, e) - - case map[uint64]int32: - fastpathTV.EncMapUint64Int32V(v, e) - case *map[uint64]int32: - fastpathTV.EncMapUint64Int32V(*v, e) - - case map[uint64]int64: - fastpathTV.EncMapUint64Int64V(v, e) - case *map[uint64]int64: - fastpathTV.EncMapUint64Int64V(*v, e) - - case map[uint64]float32: - fastpathTV.EncMapUint64Float32V(v, e) - case *map[uint64]float32: - fastpathTV.EncMapUint64Float32V(*v, e) - - case map[uint64]float64: - fastpathTV.EncMapUint64Float64V(v, e) - case *map[uint64]float64: - fastpathTV.EncMapUint64Float64V(*v, e) - - case map[uint64]bool: - fastpathTV.EncMapUint64BoolV(v, e) - case *map[uint64]bool: - fastpathTV.EncMapUint64BoolV(*v, e) - case []uintptr: fastpathTV.EncSliceUintptrV(v, e) case *[]uintptr: fastpathTV.EncSliceUintptrV(*v, e) - - case map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(v, e) - case *map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(*v, e) - - case map[uintptr]string: - fastpathTV.EncMapUintptrStringV(v, e) - case *map[uintptr]string: - fastpathTV.EncMapUintptrStringV(*v, e) - - case map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(v, e) - case *map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(*v, e) - - case map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(v, e) - case *map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(*v, e) - - case map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(v, e) - case *map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(*v, e) - - case map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(v, e) - case *map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(*v, e) - - case map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(v, e) - case *map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(*v, e) - - case map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(v, e) - case *map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(*v, e) - - case map[uintptr]int: - fastpathTV.EncMapUintptrIntV(v, e) - case *map[uintptr]int: - fastpathTV.EncMapUintptrIntV(*v, e) - - case map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(v, e) - case *map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(*v, e) - - case map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(v, e) - case *map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(*v, e) - - case map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(v, e) - case *map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(*v, e) - - case map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(v, e) - case *map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(*v, e) - - case map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(v, e) - case *map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(*v, e) - - case map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(v, e) - case *map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(*v, e) - - case map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(v, e) - case *map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(*v, e) - case []int: fastpathTV.EncSliceIntV(v, e) case *[]int: fastpathTV.EncSliceIntV(*v, e) - - case map[int]interface{}: - fastpathTV.EncMapIntIntfV(v, e) - case *map[int]interface{}: - fastpathTV.EncMapIntIntfV(*v, e) - - case map[int]string: - fastpathTV.EncMapIntStringV(v, e) - case *map[int]string: - fastpathTV.EncMapIntStringV(*v, e) - - case map[int]uint: - fastpathTV.EncMapIntUintV(v, e) - case *map[int]uint: - fastpathTV.EncMapIntUintV(*v, e) - - case map[int]uint8: - fastpathTV.EncMapIntUint8V(v, e) - case *map[int]uint8: - fastpathTV.EncMapIntUint8V(*v, e) - - case map[int]uint16: - fastpathTV.EncMapIntUint16V(v, e) - case *map[int]uint16: - fastpathTV.EncMapIntUint16V(*v, e) - - case map[int]uint32: - fastpathTV.EncMapIntUint32V(v, e) - case *map[int]uint32: - fastpathTV.EncMapIntUint32V(*v, e) - - case map[int]uint64: - fastpathTV.EncMapIntUint64V(v, e) - case *map[int]uint64: - fastpathTV.EncMapIntUint64V(*v, e) - - case map[int]uintptr: - fastpathTV.EncMapIntUintptrV(v, e) - case *map[int]uintptr: - fastpathTV.EncMapIntUintptrV(*v, e) - - case map[int]int: - fastpathTV.EncMapIntIntV(v, e) - case *map[int]int: - fastpathTV.EncMapIntIntV(*v, e) - - case map[int]int8: - fastpathTV.EncMapIntInt8V(v, e) - case *map[int]int8: - fastpathTV.EncMapIntInt8V(*v, e) - - case map[int]int16: - fastpathTV.EncMapIntInt16V(v, e) - case *map[int]int16: - fastpathTV.EncMapIntInt16V(*v, e) - - case map[int]int32: - fastpathTV.EncMapIntInt32V(v, e) - case *map[int]int32: - fastpathTV.EncMapIntInt32V(*v, e) - - case map[int]int64: - fastpathTV.EncMapIntInt64V(v, e) - case *map[int]int64: - fastpathTV.EncMapIntInt64V(*v, e) - - case map[int]float32: - fastpathTV.EncMapIntFloat32V(v, e) - case *map[int]float32: - fastpathTV.EncMapIntFloat32V(*v, e) - - case map[int]float64: - fastpathTV.EncMapIntFloat64V(v, e) - case *map[int]float64: - fastpathTV.EncMapIntFloat64V(*v, e) - - case map[int]bool: - fastpathTV.EncMapIntBoolV(v, e) - case *map[int]bool: - fastpathTV.EncMapIntBoolV(*v, e) - case []int8: fastpathTV.EncSliceInt8V(v, e) case *[]int8: fastpathTV.EncSliceInt8V(*v, e) - - case map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(v, e) - case *map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(*v, e) - - case map[int8]string: - fastpathTV.EncMapInt8StringV(v, e) - case *map[int8]string: - fastpathTV.EncMapInt8StringV(*v, e) - - case map[int8]uint: - fastpathTV.EncMapInt8UintV(v, e) - case *map[int8]uint: - fastpathTV.EncMapInt8UintV(*v, e) - - case map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(v, e) - case *map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(*v, e) - - case map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(v, e) - case *map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(*v, e) - - case map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(v, e) - case *map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(*v, e) - - case map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(v, e) - case *map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(*v, e) - - case map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(v, e) - case *map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(*v, e) - - case map[int8]int: - fastpathTV.EncMapInt8IntV(v, e) - case *map[int8]int: - fastpathTV.EncMapInt8IntV(*v, e) - - case map[int8]int8: - fastpathTV.EncMapInt8Int8V(v, e) - case *map[int8]int8: - fastpathTV.EncMapInt8Int8V(*v, e) - - case map[int8]int16: - fastpathTV.EncMapInt8Int16V(v, e) - case *map[int8]int16: - fastpathTV.EncMapInt8Int16V(*v, e) - - case map[int8]int32: - fastpathTV.EncMapInt8Int32V(v, e) - case *map[int8]int32: - fastpathTV.EncMapInt8Int32V(*v, e) - - case map[int8]int64: - fastpathTV.EncMapInt8Int64V(v, e) - case *map[int8]int64: - fastpathTV.EncMapInt8Int64V(*v, e) - - case map[int8]float32: - fastpathTV.EncMapInt8Float32V(v, e) - case *map[int8]float32: - fastpathTV.EncMapInt8Float32V(*v, e) - - case map[int8]float64: - fastpathTV.EncMapInt8Float64V(v, e) - case *map[int8]float64: - fastpathTV.EncMapInt8Float64V(*v, e) - - case map[int8]bool: - fastpathTV.EncMapInt8BoolV(v, e) - case *map[int8]bool: - fastpathTV.EncMapInt8BoolV(*v, e) - case []int16: fastpathTV.EncSliceInt16V(v, e) case *[]int16: fastpathTV.EncSliceInt16V(*v, e) - - case map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(v, e) - case *map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(*v, e) - - case map[int16]string: - fastpathTV.EncMapInt16StringV(v, e) - case *map[int16]string: - fastpathTV.EncMapInt16StringV(*v, e) - - case map[int16]uint: - fastpathTV.EncMapInt16UintV(v, e) - case *map[int16]uint: - fastpathTV.EncMapInt16UintV(*v, e) - - case map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(v, e) - case *map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(*v, e) - - case map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(v, e) - case *map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(*v, e) - - case map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(v, e) - case *map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(*v, e) - - case map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(v, e) - case *map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(*v, e) - - case map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(v, e) - case *map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(*v, e) - - case map[int16]int: - fastpathTV.EncMapInt16IntV(v, e) - case *map[int16]int: - fastpathTV.EncMapInt16IntV(*v, e) - - case map[int16]int8: - fastpathTV.EncMapInt16Int8V(v, e) - case *map[int16]int8: - fastpathTV.EncMapInt16Int8V(*v, e) - - case map[int16]int16: - fastpathTV.EncMapInt16Int16V(v, e) - case *map[int16]int16: - fastpathTV.EncMapInt16Int16V(*v, e) - - case map[int16]int32: - fastpathTV.EncMapInt16Int32V(v, e) - case *map[int16]int32: - fastpathTV.EncMapInt16Int32V(*v, e) - - case map[int16]int64: - fastpathTV.EncMapInt16Int64V(v, e) - case *map[int16]int64: - fastpathTV.EncMapInt16Int64V(*v, e) - - case map[int16]float32: - fastpathTV.EncMapInt16Float32V(v, e) - case *map[int16]float32: - fastpathTV.EncMapInt16Float32V(*v, e) - - case map[int16]float64: - fastpathTV.EncMapInt16Float64V(v, e) - case *map[int16]float64: - fastpathTV.EncMapInt16Float64V(*v, e) - - case map[int16]bool: - fastpathTV.EncMapInt16BoolV(v, e) - case *map[int16]bool: - fastpathTV.EncMapInt16BoolV(*v, e) - case []int32: fastpathTV.EncSliceInt32V(v, e) case *[]int32: fastpathTV.EncSliceInt32V(*v, e) - - case map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(v, e) - case *map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(*v, e) - - case map[int32]string: - fastpathTV.EncMapInt32StringV(v, e) - case *map[int32]string: - fastpathTV.EncMapInt32StringV(*v, e) - - case map[int32]uint: - fastpathTV.EncMapInt32UintV(v, e) - case *map[int32]uint: - fastpathTV.EncMapInt32UintV(*v, e) - - case map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(v, e) - case *map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(*v, e) - - case map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(v, e) - case *map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(*v, e) - - case map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(v, e) - case *map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(*v, e) - - case map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(v, e) - case *map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(*v, e) - - case map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(v, e) - case *map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(*v, e) - - case map[int32]int: - fastpathTV.EncMapInt32IntV(v, e) - case *map[int32]int: - fastpathTV.EncMapInt32IntV(*v, e) - - case map[int32]int8: - fastpathTV.EncMapInt32Int8V(v, e) - case *map[int32]int8: - fastpathTV.EncMapInt32Int8V(*v, e) - - case map[int32]int16: - fastpathTV.EncMapInt32Int16V(v, e) - case *map[int32]int16: - fastpathTV.EncMapInt32Int16V(*v, e) - - case map[int32]int32: - fastpathTV.EncMapInt32Int32V(v, e) - case *map[int32]int32: - fastpathTV.EncMapInt32Int32V(*v, e) - - case map[int32]int64: - fastpathTV.EncMapInt32Int64V(v, e) - case *map[int32]int64: - fastpathTV.EncMapInt32Int64V(*v, e) - - case map[int32]float32: - fastpathTV.EncMapInt32Float32V(v, e) - case *map[int32]float32: - fastpathTV.EncMapInt32Float32V(*v, e) - - case map[int32]float64: - fastpathTV.EncMapInt32Float64V(v, e) - case *map[int32]float64: - fastpathTV.EncMapInt32Float64V(*v, e) - - case map[int32]bool: - fastpathTV.EncMapInt32BoolV(v, e) - case *map[int32]bool: - fastpathTV.EncMapInt32BoolV(*v, e) - case []int64: fastpathTV.EncSliceInt64V(v, e) case *[]int64: fastpathTV.EncSliceInt64V(*v, e) - - case map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(v, e) - case *map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(*v, e) - - case map[int64]string: - fastpathTV.EncMapInt64StringV(v, e) - case *map[int64]string: - fastpathTV.EncMapInt64StringV(*v, e) - - case map[int64]uint: - fastpathTV.EncMapInt64UintV(v, e) - case *map[int64]uint: - fastpathTV.EncMapInt64UintV(*v, e) - - case map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(v, e) - case *map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(*v, e) - - case map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(v, e) - case *map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(*v, e) - - case map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(v, e) - case *map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(*v, e) - - case map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(v, e) - case *map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(*v, e) - - case map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(v, e) - case *map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(*v, e) - - case map[int64]int: - fastpathTV.EncMapInt64IntV(v, e) - case *map[int64]int: - fastpathTV.EncMapInt64IntV(*v, e) - - case map[int64]int8: - fastpathTV.EncMapInt64Int8V(v, e) - case *map[int64]int8: - fastpathTV.EncMapInt64Int8V(*v, e) - - case map[int64]int16: - fastpathTV.EncMapInt64Int16V(v, e) - case *map[int64]int16: - fastpathTV.EncMapInt64Int16V(*v, e) - - case map[int64]int32: - fastpathTV.EncMapInt64Int32V(v, e) - case *map[int64]int32: - fastpathTV.EncMapInt64Int32V(*v, e) - - case map[int64]int64: - fastpathTV.EncMapInt64Int64V(v, e) - case *map[int64]int64: - fastpathTV.EncMapInt64Int64V(*v, e) - - case map[int64]float32: - fastpathTV.EncMapInt64Float32V(v, e) - case *map[int64]float32: - fastpathTV.EncMapInt64Float32V(*v, e) - - case map[int64]float64: - fastpathTV.EncMapInt64Float64V(v, e) - case *map[int64]float64: - fastpathTV.EncMapInt64Float64V(*v, e) - - case map[int64]bool: - fastpathTV.EncMapInt64BoolV(v, e) - case *map[int64]bool: - fastpathTV.EncMapInt64BoolV(*v, e) - case []bool: fastpathTV.EncSliceBoolV(v, e) case *[]bool: fastpathTV.EncSliceBoolV(*v, e) + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, e) + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, e) + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, e) + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, e) + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, e) + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, e) + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, e) + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, e) + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, e) + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, e) + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, e) + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, e) + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, e) + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, e) + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, e) + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, e) + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, e) + case map[string]string: + fastpathTV.EncMapStringStringV(v, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, e) + case map[string]uint: + fastpathTV.EncMapStringUintV(v, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, e) + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, e) + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, e) + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, e) + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, e) + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, e) + case map[string]int: + fastpathTV.EncMapStringIntV(v, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, e) + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, e) + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, e) + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, e) + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, e) + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, e) + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, e) + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, e) + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, e) + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, e) + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, e) + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, e) + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, e) + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, e) + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, e) + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, e) + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, e) + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, e) + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, e) + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, e) + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, e) + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, e) + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, e) + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, e) + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, e) + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, e) + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, e) + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, e) + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, e) + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, e) + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, e) + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, e) + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, e) + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, e) + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, e) + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, e) + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, e) + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, e) + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, e) + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, e) + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, e) + case map[uint]string: + fastpathTV.EncMapUintStringV(v, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, e) + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, e) + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, e) + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, e) + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, e) + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, e) + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, e) + case map[uint]int: + fastpathTV.EncMapUintIntV(v, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, e) + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, e) + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, e) + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, e) + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, e) + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, e) + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, e) + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, e) + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, e) + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, e) + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, e) + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, e) + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, e) + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, e) + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, e) + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, e) + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, e) + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, e) + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, e) + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, e) + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, e) + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, e) + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, e) + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, e) + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, e) + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, e) + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, e) + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, e) + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, e) + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, e) + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, e) + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, e) + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, e) + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, e) + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, e) + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, e) + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, e) + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, e) + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, e) + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, e) + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, e) + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, e) + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, e) + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, e) + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, e) + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, e) + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, e) + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, e) + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, e) + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, e) + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, e) + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, e) + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, e) + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, e) + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, e) + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, e) + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, e) + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, e) + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, e) + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, e) + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, e) + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, e) + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, e) + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, e) + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, e) + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, e) + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, e) + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, e) + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, e) + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, e) + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, e) + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, e) + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, e) + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, e) + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, e) + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, e) + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, e) + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, e) + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, e) + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, e) + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, e) + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, e) + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, e) + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, e) + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, e) + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, e) + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, e) + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, e) + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, e) + case map[int]string: + fastpathTV.EncMapIntStringV(v, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, e) + case map[int]uint: + fastpathTV.EncMapIntUintV(v, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, e) + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, e) + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, e) + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, e) + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, e) + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, e) + case map[int]int: + fastpathTV.EncMapIntIntV(v, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, e) + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, e) + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, e) + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, e) + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, e) + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, e) + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, e) + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, e) + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, e) + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, e) + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, e) + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, e) + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, e) + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, e) + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, e) + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, e) + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, e) + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, e) + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, e) + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, e) + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, e) + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, e) + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, e) + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, e) + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, e) + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, e) + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, e) + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, e) + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, e) + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, e) + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, e) + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, e) + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, e) + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, e) + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, e) + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, e) + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, e) + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, e) + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, e) + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, e) + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, e) + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, e) + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, e) + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, e) + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, e) + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, e) + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, e) + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, e) + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, e) + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, e) + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, e) + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, e) + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, e) + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, e) + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, e) + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, e) + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, e) + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, e) + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, e) + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, e) + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, e) + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, e) + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, e) + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, e) + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, e) + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, e) + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, e) + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, e) + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, e) + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, e) + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, e) + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, e) case map[bool]interface{}: fastpathTV.EncMapBoolIntfV(v, e) case *map[bool]interface{}: fastpathTV.EncMapBoolIntfV(*v, e) - case map[bool]string: fastpathTV.EncMapBoolStringV(v, e) case *map[bool]string: fastpathTV.EncMapBoolStringV(*v, e) - case map[bool]uint: fastpathTV.EncMapBoolUintV(v, e) case *map[bool]uint: fastpathTV.EncMapBoolUintV(*v, e) - case map[bool]uint8: fastpathTV.EncMapBoolUint8V(v, e) case *map[bool]uint8: fastpathTV.EncMapBoolUint8V(*v, e) - case map[bool]uint16: fastpathTV.EncMapBoolUint16V(v, e) case *map[bool]uint16: fastpathTV.EncMapBoolUint16V(*v, e) - case map[bool]uint32: fastpathTV.EncMapBoolUint32V(v, e) case *map[bool]uint32: fastpathTV.EncMapBoolUint32V(*v, e) - case map[bool]uint64: fastpathTV.EncMapBoolUint64V(v, e) case *map[bool]uint64: fastpathTV.EncMapBoolUint64V(*v, e) - case map[bool]uintptr: fastpathTV.EncMapBoolUintptrV(v, e) case *map[bool]uintptr: fastpathTV.EncMapBoolUintptrV(*v, e) - case map[bool]int: fastpathTV.EncMapBoolIntV(v, e) case *map[bool]int: fastpathTV.EncMapBoolIntV(*v, e) - case map[bool]int8: fastpathTV.EncMapBoolInt8V(v, e) case *map[bool]int8: fastpathTV.EncMapBoolInt8V(*v, e) - case map[bool]int16: fastpathTV.EncMapBoolInt16V(v, e) case *map[bool]int16: fastpathTV.EncMapBoolInt16V(*v, e) - case map[bool]int32: fastpathTV.EncMapBoolInt32V(v, e) case *map[bool]int32: fastpathTV.EncMapBoolInt32V(*v, e) - case map[bool]int64: fastpathTV.EncMapBoolInt64V(v, e) case *map[bool]int64: fastpathTV.EncMapBoolInt64V(*v, e) - case map[bool]float32: fastpathTV.EncMapBoolFloat32V(v, e) case *map[bool]float32: fastpathTV.EncMapBoolFloat32V(*v, e) - case map[bool]float64: fastpathTV.EncMapBoolFloat64V(v, e) case *map[bool]float64: fastpathTV.EncMapBoolFloat64V(*v, e) - case map[bool]bool: fastpathTV.EncMapBoolBoolV(v, e) case *map[bool]bool: fastpathTV.EncMapBoolBoolV(*v, e) default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true @@ -1758,15 +1479,18 @@ func (_ fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + e.encode(v2) + } + } else { + for _, v2 := range v { + e.encode(v2) } - e.encode(v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1774,15 +1498,19 @@ func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + e.encode(v2) + } + } else { + for _, v2 := range v { + e.encode(v2) } - e.encode(v2) } ee.WriteMapEnd() } @@ -1801,15 +1529,18 @@ func (_ fastpathT) EncSliceStringV(v []string, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeString(cUTF8, v2) + } + } else { + for _, v2 := range v { + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1817,15 +1548,19 @@ func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeString(cUTF8, v2) + } + } else { + for _, v2 := range v { + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } ee.WriteMapEnd() } @@ -1844,15 +1579,18 @@ func (_ fastpathT) EncSliceFloat32V(v []float32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeFloat32(v2) + } + } else { + for _, v2 := range v { + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1860,15 +1598,19 @@ func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeFloat32(v2) + } + } else { + for _, v2 := range v { + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } ee.WriteMapEnd() } @@ -1887,15 +1629,18 @@ func (_ fastpathT) EncSliceFloat64V(v []float64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeFloat64(v2) + } + } else { + for _, v2 := range v { + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1903,15 +1648,19 @@ func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeFloat64(v2) + } + } else { + for _, v2 := range v { + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } ee.WriteMapEnd() } @@ -1930,15 +1679,18 @@ func (_ fastpathT) EncSliceUintV(v []uint, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1946,15 +1698,69 @@ func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + } + ee.WriteMapEnd() +} + +func (e *Encoder) fastpathEncSliceUint8R(f *codecFnInfo, rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUint8V(rv2i(rv).([]uint8), e) + } else { + fastpathTV.EncSliceUint8V(rv2i(rv).([]uint8), e) + } +} +func (_ fastpathT) EncSliceUint8V(v []uint8, e *Encoder) { + if v == nil { + e.e.EncodeNil() + return + } + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) + if esep { + for _, v2 := range v { + ee.WriteArrayElem() + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + } + ee.WriteArrayEnd() +} +func (_ fastpathT) EncAsMapSliceUint8V(v []uint8, e *Encoder) { + ee, esep := e.e, e.hh.hasElemSeparators() + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.WriteMapStart(len(v) / 2) + if esep { + for j, v2 := range v { + if j%2 == 0 { + ee.WriteMapElemKey() + } else { + ee.WriteMapElemValue() + } + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteMapEnd() } @@ -1973,15 +1779,18 @@ func (_ fastpathT) EncSliceUint16V(v []uint16, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -1989,15 +1798,19 @@ func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteMapEnd() } @@ -2016,15 +1829,18 @@ func (_ fastpathT) EncSliceUint32V(v []uint32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2032,15 +1848,19 @@ func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteMapEnd() } @@ -2059,15 +1879,18 @@ func (_ fastpathT) EncSliceUint64V(v []uint64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2075,15 +1898,19 @@ func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeUint(uint64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } ee.WriteMapEnd() } @@ -2102,15 +1929,18 @@ func (_ fastpathT) EncSliceUintptrV(v []uintptr, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + e.encode(v2) + } + } else { + for _, v2 := range v { + e.encode(v2) } - e.encode(v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2118,15 +1948,19 @@ func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + e.encode(v2) + } + } else { + for _, v2 := range v { + e.encode(v2) } - e.encode(v2) } ee.WriteMapEnd() } @@ -2145,15 +1979,18 @@ func (_ fastpathT) EncSliceIntV(v []int, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2161,15 +1998,19 @@ func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteMapEnd() } @@ -2188,15 +2029,18 @@ func (_ fastpathT) EncSliceInt8V(v []int8, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2204,15 +2048,19 @@ func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteMapEnd() } @@ -2231,15 +2079,18 @@ func (_ fastpathT) EncSliceInt16V(v []int16, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2247,15 +2098,19 @@ func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteMapEnd() } @@ -2274,15 +2129,18 @@ func (_ fastpathT) EncSliceInt32V(v []int32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2290,15 +2148,19 @@ func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteMapEnd() } @@ -2317,15 +2179,18 @@ func (_ fastpathT) EncSliceInt64V(v []int64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2333,15 +2198,19 @@ func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeInt(int64(v2)) + } + } else { + for _, v2 := range v { + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } ee.WriteMapEnd() } @@ -2360,15 +2229,18 @@ func (_ fastpathT) EncSliceBoolV(v []bool, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) - for _, v2 := range v { - if esep { + if esep { + for _, v2 := range v { ee.WriteArrayElem() + ee.EncodeBool(v2) + } + } else { + for _, v2 := range v { + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } ee.WriteArrayEnd() } - func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -2376,15 +2248,19 @@ func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { return } ee.WriteMapStart(len(v) / 2) - for j, v2 := range v { - if esep { + if esep { + for j, v2 := range v { if j%2 == 0 { ee.WriteMapElemKey() } else { ee.WriteMapElemValue() } + ee.EncodeBool(v2) + } + } else { + for _, v2 := range v { + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } ee.WriteMapEnd() } @@ -2414,26 +2290,32 @@ func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -2464,26 +2346,32 @@ func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -2514,26 +2402,32 @@ func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -2564,26 +2458,32 @@ func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -2614,26 +2514,32 @@ func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -2664,26 +2570,32 @@ func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -2714,26 +2626,32 @@ func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -2764,26 +2682,32 @@ func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -2814,26 +2738,32 @@ func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -2864,26 +2794,32 @@ func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -2914,26 +2850,32 @@ func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -2964,26 +2906,32 @@ func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3014,26 +2962,32 @@ func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3064,26 +3018,32 @@ func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -3114,26 +3074,32 @@ func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -3164,26 +3130,32 @@ func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) { i++ } sort.Sort(bytesISlice(v2)) - for j := range v2 { - if esep { + if esep { + for j := range v2 { ee.WriteMapElemKey() - } - e.asis(v2[j].v) - if esep { + e.asis(v2[j].v) ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) } - e.encode(v[v2[j].i]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -3199,7 +3171,6 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3208,34 +3179,32 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + e.encode(v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + e.encode(v[string(k2)]) } - e.encode(v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -3251,7 +3220,6 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3260,34 +3228,32 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeString(cUTF8, v[string(k2)]) } - ee.EncodeString(c_UTF8, v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -3303,7 +3269,6 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3312,34 +3277,32 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -3355,7 +3318,6 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3364,34 +3326,32 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -3407,7 +3367,6 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3416,34 +3375,32 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -3459,7 +3416,6 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3468,34 +3424,32 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -3511,7 +3465,6 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3520,34 +3473,32 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -3563,7 +3514,6 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3572,34 +3522,32 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + e.encode(v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + e.encode(v[string(k2)]) } - e.encode(v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -3615,7 +3563,6 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3624,34 +3571,32 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3667,7 +3612,6 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3676,34 +3620,32 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3719,7 +3661,6 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3728,34 +3669,32 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3771,7 +3710,6 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3780,34 +3718,32 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3823,7 +3759,6 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3832,34 +3767,32 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v[string(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -3875,7 +3808,6 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3884,34 +3816,32 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeFloat32(v[string(k2)]) } - ee.EncodeFloat32(v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -3927,7 +3857,6 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3936,34 +3865,32 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeFloat64(v[string(k2)]) } - ee.EncodeFloat64(v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -3979,7 +3906,6 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) var i int @@ -3988,34 +3914,32 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { i++ } sort.Sort(stringSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeBool(v[string(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeString(cUTF8, k2) + ee.EncodeBool(v[string(k2)]) } - ee.EncodeBool(v[string(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - if esep { + ee.EncodeString(cUTF8, k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeString(cUTF8, k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -4039,26 +3963,32 @@ func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + e.encode(v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + e.encode(v[float32(k2)]) } - e.encode(v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -4082,26 +4012,32 @@ func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeString(cUTF8, v[float32(k2)]) } - ee.EncodeString(c_UTF8, v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -4125,26 +4061,32 @@ func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeUint(uint64(v[float32(k2)])) } - ee.EncodeUint(uint64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4168,26 +4110,32 @@ func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeUint(uint64(v[float32(k2)])) } - ee.EncodeUint(uint64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4211,26 +4159,32 @@ func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeUint(uint64(v[float32(k2)])) } - ee.EncodeUint(uint64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4254,26 +4208,32 @@ func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeUint(uint64(v[float32(k2)])) } - ee.EncodeUint(uint64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4297,26 +4257,32 @@ func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeUint(uint64(v[float32(k2)])) } - ee.EncodeUint(uint64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4340,26 +4306,32 @@ func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + e.encode(v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + e.encode(v[float32(k2)]) } - e.encode(v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -4383,26 +4355,32 @@ func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeInt(int64(v[float32(k2)])) } - ee.EncodeInt(int64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -4426,26 +4404,32 @@ func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeInt(int64(v[float32(k2)])) } - ee.EncodeInt(int64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -4469,26 +4453,32 @@ func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeInt(int64(v[float32(k2)])) } - ee.EncodeInt(int64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -4512,26 +4502,32 @@ func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeInt(int64(v[float32(k2)])) } - ee.EncodeInt(int64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -4555,26 +4551,32 @@ func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeInt(int64(v[float32(k2)])) } - ee.EncodeInt(int64(v[float32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -4598,26 +4600,32 @@ func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeFloat32(v[float32(k2)]) } - ee.EncodeFloat32(v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -4641,26 +4649,32 @@ func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeFloat64(v[float32(k2)]) } - ee.EncodeFloat64(v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -4684,26 +4698,32 @@ func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat32(float32(k2)) - if esep { + ee.EncodeFloat32(float32(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v[float32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat32(float32(k2)) + ee.EncodeBool(v[float32(k2)]) } - ee.EncodeBool(v[float32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat32(k2) - if esep { + ee.EncodeFloat32(k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -4727,26 +4747,32 @@ func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + e.encode(v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + e.encode(v[float64(k2)]) } - e.encode(v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -4770,26 +4796,32 @@ func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeString(cUTF8, v[float64(k2)]) } - ee.EncodeString(c_UTF8, v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -4813,26 +4845,32 @@ func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeUint(uint64(v[float64(k2)])) } - ee.EncodeUint(uint64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4856,26 +4894,32 @@ func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeUint(uint64(v[float64(k2)])) } - ee.EncodeUint(uint64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4899,26 +4943,32 @@ func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeUint(uint64(v[float64(k2)])) } - ee.EncodeUint(uint64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4942,26 +4992,32 @@ func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeUint(uint64(v[float64(k2)])) } - ee.EncodeUint(uint64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -4985,26 +5041,32 @@ func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeUint(uint64(v[float64(k2)])) } - ee.EncodeUint(uint64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5028,26 +5090,32 @@ func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + e.encode(v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + e.encode(v[float64(k2)]) } - e.encode(v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -5071,26 +5139,32 @@ func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeInt(int64(v[float64(k2)])) } - ee.EncodeInt(int64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5114,26 +5188,32 @@ func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeInt(int64(v[float64(k2)])) } - ee.EncodeInt(int64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5157,26 +5237,32 @@ func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeInt(int64(v[float64(k2)])) } - ee.EncodeInt(int64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5200,26 +5286,32 @@ func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeInt(int64(v[float64(k2)])) } - ee.EncodeInt(int64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5243,26 +5335,32 @@ func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeInt(int64(v[float64(k2)])) } - ee.EncodeInt(int64(v[float64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5286,26 +5384,32 @@ func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeFloat32(v[float64(k2)]) } - ee.EncodeFloat32(v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -5329,26 +5433,32 @@ func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeFloat64(v[float64(k2)]) } - ee.EncodeFloat64(v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -5372,26 +5482,32 @@ func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) { i++ } sort.Sort(floatSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeFloat64(float64(k2)) - if esep { + ee.EncodeFloat64(float64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v[float64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeFloat64(float64(k2)) + ee.EncodeBool(v[float64(k2)]) } - ee.EncodeBool(v[float64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeFloat64(k2) - if esep { + ee.EncodeFloat64(k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -5415,26 +5531,32 @@ func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + e.encode(v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + e.encode(v[uint(k2)]) } - e.encode(v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -5458,26 +5580,32 @@ func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeString(cUTF8, v[uint(k2)]) } - ee.EncodeString(c_UTF8, v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -5501,26 +5629,32 @@ func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeUint(uint64(v[uint(k2)])) } - ee.EncodeUint(uint64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5544,26 +5678,32 @@ func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeUint(uint64(v[uint(k2)])) } - ee.EncodeUint(uint64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5587,26 +5727,32 @@ func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeUint(uint64(v[uint(k2)])) } - ee.EncodeUint(uint64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5630,26 +5776,32 @@ func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeUint(uint64(v[uint(k2)])) } - ee.EncodeUint(uint64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5673,26 +5825,32 @@ func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeUint(uint64(v[uint(k2)])) } - ee.EncodeUint(uint64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -5716,26 +5874,32 @@ func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + e.encode(v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + e.encode(v[uint(k2)]) } - e.encode(v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -5759,26 +5923,32 @@ func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeInt(int64(v[uint(k2)])) } - ee.EncodeInt(int64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5802,26 +5972,32 @@ func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeInt(int64(v[uint(k2)])) } - ee.EncodeInt(int64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5845,26 +6021,32 @@ func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeInt(int64(v[uint(k2)])) } - ee.EncodeInt(int64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5888,26 +6070,32 @@ func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeInt(int64(v[uint(k2)])) } - ee.EncodeInt(int64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5931,26 +6119,32 @@ func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeInt(int64(v[uint(k2)])) } - ee.EncodeInt(int64(v[uint(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -5974,26 +6168,32 @@ func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeFloat32(v[uint(k2)]) } - ee.EncodeFloat32(v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -6017,26 +6217,32 @@ func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeFloat64(v[uint(k2)]) } - ee.EncodeFloat64(v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -6060,26 +6266,32 @@ func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint(k2))) - if esep { + ee.EncodeUint(uint64(uint(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[uint(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint(k2))) + ee.EncodeBool(v[uint(k2)]) } - ee.EncodeBool(v[uint(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -6103,26 +6315,32 @@ func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + e.encode(v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + e.encode(v[uint8(k2)]) } - e.encode(v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -6146,26 +6364,32 @@ func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeString(cUTF8, v[uint8(k2)]) } - ee.EncodeString(c_UTF8, v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -6189,26 +6413,32 @@ func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeUint(uint64(v[uint8(k2)])) } - ee.EncodeUint(uint64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6232,26 +6462,32 @@ func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeUint(uint64(v[uint8(k2)])) } - ee.EncodeUint(uint64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6275,26 +6511,32 @@ func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeUint(uint64(v[uint8(k2)])) } - ee.EncodeUint(uint64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6318,26 +6560,32 @@ func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeUint(uint64(v[uint8(k2)])) } - ee.EncodeUint(uint64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6361,26 +6609,32 @@ func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeUint(uint64(v[uint8(k2)])) } - ee.EncodeUint(uint64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6404,26 +6658,32 @@ func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + e.encode(v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + e.encode(v[uint8(k2)]) } - e.encode(v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -6447,26 +6707,32 @@ func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeInt(int64(v[uint8(k2)])) } - ee.EncodeInt(int64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -6490,26 +6756,32 @@ func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeInt(int64(v[uint8(k2)])) } - ee.EncodeInt(int64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -6533,26 +6805,32 @@ func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeInt(int64(v[uint8(k2)])) } - ee.EncodeInt(int64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -6576,26 +6854,32 @@ func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeInt(int64(v[uint8(k2)])) } - ee.EncodeInt(int64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -6619,26 +6903,32 @@ func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeInt(int64(v[uint8(k2)])) } - ee.EncodeInt(int64(v[uint8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -6662,26 +6952,32 @@ func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeFloat32(v[uint8(k2)]) } - ee.EncodeFloat32(v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -6705,26 +7001,32 @@ func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeFloat64(v[uint8(k2)]) } - ee.EncodeFloat64(v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -6748,26 +7050,32 @@ func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint8(k2))) - if esep { + ee.EncodeUint(uint64(uint8(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[uint8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint8(k2))) + ee.EncodeBool(v[uint8(k2)]) } - ee.EncodeBool(v[uint8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -6791,26 +7099,32 @@ func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + e.encode(v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + e.encode(v[uint16(k2)]) } - e.encode(v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -6834,26 +7148,32 @@ func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeString(cUTF8, v[uint16(k2)]) } - ee.EncodeString(c_UTF8, v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -6877,26 +7197,32 @@ func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeUint(uint64(v[uint16(k2)])) } - ee.EncodeUint(uint64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6920,26 +7246,32 @@ func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeUint(uint64(v[uint16(k2)])) } - ee.EncodeUint(uint64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -6963,26 +7295,32 @@ func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeUint(uint64(v[uint16(k2)])) } - ee.EncodeUint(uint64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7006,26 +7344,32 @@ func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeUint(uint64(v[uint16(k2)])) } - ee.EncodeUint(uint64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7049,26 +7393,32 @@ func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeUint(uint64(v[uint16(k2)])) } - ee.EncodeUint(uint64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7092,26 +7442,32 @@ func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + e.encode(v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + e.encode(v[uint16(k2)]) } - e.encode(v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -7135,26 +7491,32 @@ func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeInt(int64(v[uint16(k2)])) } - ee.EncodeInt(int64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7178,26 +7540,32 @@ func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeInt(int64(v[uint16(k2)])) } - ee.EncodeInt(int64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7221,26 +7589,32 @@ func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeInt(int64(v[uint16(k2)])) } - ee.EncodeInt(int64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7264,26 +7638,32 @@ func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeInt(int64(v[uint16(k2)])) } - ee.EncodeInt(int64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7307,26 +7687,32 @@ func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeInt(int64(v[uint16(k2)])) } - ee.EncodeInt(int64(v[uint16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7350,26 +7736,32 @@ func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeFloat32(v[uint16(k2)]) } - ee.EncodeFloat32(v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -7393,26 +7785,32 @@ func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeFloat64(v[uint16(k2)]) } - ee.EncodeFloat64(v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -7436,26 +7834,32 @@ func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint16(k2))) - if esep { + ee.EncodeUint(uint64(uint16(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[uint16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint16(k2))) + ee.EncodeBool(v[uint16(k2)]) } - ee.EncodeBool(v[uint16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -7479,26 +7883,32 @@ func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + e.encode(v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + e.encode(v[uint32(k2)]) } - e.encode(v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -7522,26 +7932,32 @@ func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeString(cUTF8, v[uint32(k2)]) } - ee.EncodeString(c_UTF8, v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -7565,26 +7981,32 @@ func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeUint(uint64(v[uint32(k2)])) } - ee.EncodeUint(uint64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7608,26 +8030,32 @@ func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeUint(uint64(v[uint32(k2)])) } - ee.EncodeUint(uint64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7651,26 +8079,32 @@ func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeUint(uint64(v[uint32(k2)])) } - ee.EncodeUint(uint64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7694,26 +8128,32 @@ func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeUint(uint64(v[uint32(k2)])) } - ee.EncodeUint(uint64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7737,26 +8177,32 @@ func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeUint(uint64(v[uint32(k2)])) } - ee.EncodeUint(uint64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -7780,26 +8226,32 @@ func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + e.encode(v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + e.encode(v[uint32(k2)]) } - e.encode(v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -7823,26 +8275,32 @@ func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeInt(int64(v[uint32(k2)])) } - ee.EncodeInt(int64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7866,26 +8324,32 @@ func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeInt(int64(v[uint32(k2)])) } - ee.EncodeInt(int64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7909,26 +8373,32 @@ func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeInt(int64(v[uint32(k2)])) } - ee.EncodeInt(int64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7952,26 +8422,32 @@ func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeInt(int64(v[uint32(k2)])) } - ee.EncodeInt(int64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -7995,26 +8471,32 @@ func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeInt(int64(v[uint32(k2)])) } - ee.EncodeInt(int64(v[uint32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8038,26 +8520,32 @@ func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeFloat32(v[uint32(k2)]) } - ee.EncodeFloat32(v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -8081,26 +8569,32 @@ func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeFloat64(v[uint32(k2)]) } - ee.EncodeFloat64(v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -8124,26 +8618,32 @@ func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint32(k2))) - if esep { + ee.EncodeUint(uint64(uint32(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[uint32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint32(k2))) + ee.EncodeBool(v[uint32(k2)]) } - ee.EncodeBool(v[uint32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -8167,26 +8667,32 @@ func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + e.encode(v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + e.encode(v[uint64(k2)]) } - e.encode(v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -8210,26 +8716,32 @@ func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeString(cUTF8, v[uint64(k2)]) } - ee.EncodeString(c_UTF8, v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -8253,26 +8765,32 @@ func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeUint(uint64(v[uint64(k2)])) } - ee.EncodeUint(uint64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8296,26 +8814,32 @@ func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeUint(uint64(v[uint64(k2)])) } - ee.EncodeUint(uint64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8339,26 +8863,32 @@ func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeUint(uint64(v[uint64(k2)])) } - ee.EncodeUint(uint64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8382,26 +8912,32 @@ func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeUint(uint64(v[uint64(k2)])) } - ee.EncodeUint(uint64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8425,26 +8961,32 @@ func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeUint(uint64(v[uint64(k2)])) } - ee.EncodeUint(uint64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8468,26 +9010,32 @@ func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + e.encode(v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + e.encode(v[uint64(k2)]) } - e.encode(v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -8511,26 +9059,32 @@ func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeInt(int64(v[uint64(k2)])) } - ee.EncodeInt(int64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8554,26 +9108,32 @@ func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeInt(int64(v[uint64(k2)])) } - ee.EncodeInt(int64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8597,26 +9157,32 @@ func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeInt(int64(v[uint64(k2)])) } - ee.EncodeInt(int64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8640,26 +9206,32 @@ func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeInt(int64(v[uint64(k2)])) } - ee.EncodeInt(int64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8683,26 +9255,32 @@ func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeInt(int64(v[uint64(k2)])) } - ee.EncodeInt(int64(v[uint64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -8726,26 +9304,32 @@ func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeFloat32(v[uint64(k2)]) } - ee.EncodeFloat32(v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -8769,26 +9353,32 @@ func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeFloat64(v[uint64(k2)]) } - ee.EncodeFloat64(v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -8812,26 +9402,32 @@ func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(uint64(k2))) - if esep { + ee.EncodeUint(uint64(uint64(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[uint64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeUint(uint64(uint64(k2))) + ee.EncodeBool(v[uint64(k2)]) } - ee.EncodeBool(v[uint64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeUint(uint64(k2)) - if esep { + ee.EncodeUint(uint64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -8855,26 +9451,32 @@ func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + e.encode(v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + e.encode(v[uintptr(k2)]) } - e.encode(v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -8898,26 +9500,32 @@ func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeString(cUTF8, v[uintptr(k2)]) } - ee.EncodeString(c_UTF8, v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -8941,26 +9549,32 @@ func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeUint(uint64(v[uintptr(k2)])) } - ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -8984,26 +9598,32 @@ func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeUint(uint64(v[uintptr(k2)])) } - ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9027,26 +9647,32 @@ func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeUint(uint64(v[uintptr(k2)])) } - ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9070,26 +9696,32 @@ func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeUint(uint64(v[uintptr(k2)])) } - ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9113,26 +9745,32 @@ func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeUint(uint64(v[uintptr(k2)])) } - ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9156,26 +9794,32 @@ func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + e.encode(v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + e.encode(v[uintptr(k2)]) } - e.encode(v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -9199,26 +9843,32 @@ func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeInt(int64(v[uintptr(k2)])) } - ee.EncodeInt(int64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9242,26 +9892,32 @@ func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeInt(int64(v[uintptr(k2)])) } - ee.EncodeInt(int64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9285,26 +9941,32 @@ func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeInt(int64(v[uintptr(k2)])) } - ee.EncodeInt(int64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9328,26 +9990,32 @@ func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeInt(int64(v[uintptr(k2)])) } - ee.EncodeInt(int64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9371,26 +10039,32 @@ func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeInt(int64(v[uintptr(k2)])) } - ee.EncodeInt(int64(v[uintptr(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9414,26 +10088,32 @@ func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeFloat32(v[uintptr(k2)]) } - ee.EncodeFloat32(v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -9457,26 +10137,32 @@ func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeFloat64(v[uintptr(k2)]) } - ee.EncodeFloat64(v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -9500,26 +10186,32 @@ func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) { i++ } sort.Sort(uintSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - e.encode(uintptr(k2)) - if esep { + e.encode(uintptr(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v[uintptr(k2)]) + } + } else { + for _, k2 := range v2 { + e.encode(uintptr(k2)) + ee.EncodeBool(v[uintptr(k2)]) } - ee.EncodeBool(v[uintptr(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - e.encode(k2) - if esep { + e.encode(k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + e.encode(k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -9543,26 +10235,32 @@ func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + e.encode(v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + e.encode(v[int(k2)]) } - e.encode(v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -9586,26 +10284,32 @@ func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeString(cUTF8, v[int(k2)]) } - ee.EncodeString(c_UTF8, v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -9629,26 +10333,32 @@ func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeUint(uint64(v[int(k2)])) } - ee.EncodeUint(uint64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9672,26 +10382,32 @@ func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeUint(uint64(v[int(k2)])) } - ee.EncodeUint(uint64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9715,26 +10431,32 @@ func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeUint(uint64(v[int(k2)])) } - ee.EncodeUint(uint64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9758,26 +10480,32 @@ func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeUint(uint64(v[int(k2)])) } - ee.EncodeUint(uint64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9801,26 +10529,32 @@ func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeUint(uint64(v[int(k2)])) } - ee.EncodeUint(uint64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -9844,26 +10578,32 @@ func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + e.encode(v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + e.encode(v[int(k2)]) } - e.encode(v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -9887,26 +10627,32 @@ func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeInt(int64(v[int(k2)])) } - ee.EncodeInt(int64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9930,26 +10676,32 @@ func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeInt(int64(v[int(k2)])) } - ee.EncodeInt(int64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -9973,26 +10725,32 @@ func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeInt(int64(v[int(k2)])) } - ee.EncodeInt(int64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10016,26 +10774,32 @@ func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeInt(int64(v[int(k2)])) } - ee.EncodeInt(int64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10059,26 +10823,32 @@ func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeInt(int64(v[int(k2)])) } - ee.EncodeInt(int64(v[int(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10102,26 +10872,32 @@ func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeFloat32(v[int(k2)]) } - ee.EncodeFloat32(v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -10145,26 +10921,32 @@ func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeFloat64(v[int(k2)]) } - ee.EncodeFloat64(v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -10188,26 +10970,32 @@ func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int(k2))) - if esep { + ee.EncodeInt(int64(int(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[int(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int(k2))) + ee.EncodeBool(v[int(k2)]) } - ee.EncodeBool(v[int(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -10231,26 +11019,32 @@ func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + e.encode(v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + e.encode(v[int8(k2)]) } - e.encode(v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -10274,26 +11068,32 @@ func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeString(cUTF8, v[int8(k2)]) } - ee.EncodeString(c_UTF8, v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -10317,26 +11117,32 @@ func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeUint(uint64(v[int8(k2)])) } - ee.EncodeUint(uint64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -10360,26 +11166,32 @@ func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeUint(uint64(v[int8(k2)])) } - ee.EncodeUint(uint64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -10403,26 +11215,32 @@ func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeUint(uint64(v[int8(k2)])) } - ee.EncodeUint(uint64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -10446,26 +11264,32 @@ func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeUint(uint64(v[int8(k2)])) } - ee.EncodeUint(uint64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -10489,26 +11313,32 @@ func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeUint(uint64(v[int8(k2)])) } - ee.EncodeUint(uint64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -10532,26 +11362,32 @@ func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + e.encode(v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + e.encode(v[int8(k2)]) } - e.encode(v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -10575,26 +11411,32 @@ func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeInt(int64(v[int8(k2)])) } - ee.EncodeInt(int64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10618,26 +11460,32 @@ func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeInt(int64(v[int8(k2)])) } - ee.EncodeInt(int64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10661,26 +11509,32 @@ func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeInt(int64(v[int8(k2)])) } - ee.EncodeInt(int64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10704,26 +11558,32 @@ func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeInt(int64(v[int8(k2)])) } - ee.EncodeInt(int64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10747,26 +11607,32 @@ func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeInt(int64(v[int8(k2)])) } - ee.EncodeInt(int64(v[int8(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -10790,26 +11656,32 @@ func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeFloat32(v[int8(k2)]) } - ee.EncodeFloat32(v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -10833,26 +11705,32 @@ func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeFloat64(v[int8(k2)]) } - ee.EncodeFloat64(v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -10876,26 +11754,32 @@ func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int8(k2))) - if esep { + ee.EncodeInt(int64(int8(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[int8(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int8(k2))) + ee.EncodeBool(v[int8(k2)]) } - ee.EncodeBool(v[int8(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -10919,26 +11803,32 @@ func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + e.encode(v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + e.encode(v[int16(k2)]) } - e.encode(v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -10962,26 +11852,32 @@ func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeString(cUTF8, v[int16(k2)]) } - ee.EncodeString(c_UTF8, v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -11005,26 +11901,32 @@ func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeUint(uint64(v[int16(k2)])) } - ee.EncodeUint(uint64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11048,26 +11950,32 @@ func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeUint(uint64(v[int16(k2)])) } - ee.EncodeUint(uint64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11091,26 +11999,32 @@ func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeUint(uint64(v[int16(k2)])) } - ee.EncodeUint(uint64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11134,26 +12048,32 @@ func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeUint(uint64(v[int16(k2)])) } - ee.EncodeUint(uint64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11177,26 +12097,32 @@ func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeUint(uint64(v[int16(k2)])) } - ee.EncodeUint(uint64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11220,26 +12146,32 @@ func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + e.encode(v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + e.encode(v[int16(k2)]) } - e.encode(v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -11263,26 +12195,32 @@ func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeInt(int64(v[int16(k2)])) } - ee.EncodeInt(int64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11306,26 +12244,32 @@ func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeInt(int64(v[int16(k2)])) } - ee.EncodeInt(int64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11349,26 +12293,32 @@ func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeInt(int64(v[int16(k2)])) } - ee.EncodeInt(int64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11392,26 +12342,32 @@ func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeInt(int64(v[int16(k2)])) } - ee.EncodeInt(int64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11435,26 +12391,32 @@ func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeInt(int64(v[int16(k2)])) } - ee.EncodeInt(int64(v[int16(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11478,26 +12440,32 @@ func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeFloat32(v[int16(k2)]) } - ee.EncodeFloat32(v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -11521,26 +12489,32 @@ func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeFloat64(v[int16(k2)]) } - ee.EncodeFloat64(v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -11564,26 +12538,32 @@ func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int16(k2))) - if esep { + ee.EncodeInt(int64(int16(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[int16(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int16(k2))) + ee.EncodeBool(v[int16(k2)]) } - ee.EncodeBool(v[int16(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -11607,26 +12587,32 @@ func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + e.encode(v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + e.encode(v[int32(k2)]) } - e.encode(v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -11650,26 +12636,32 @@ func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeString(cUTF8, v[int32(k2)]) } - ee.EncodeString(c_UTF8, v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -11693,26 +12685,32 @@ func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeUint(uint64(v[int32(k2)])) } - ee.EncodeUint(uint64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11736,26 +12734,32 @@ func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeUint(uint64(v[int32(k2)])) } - ee.EncodeUint(uint64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11779,26 +12783,32 @@ func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeUint(uint64(v[int32(k2)])) } - ee.EncodeUint(uint64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11822,26 +12832,32 @@ func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeUint(uint64(v[int32(k2)])) } - ee.EncodeUint(uint64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11865,26 +12881,32 @@ func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeUint(uint64(v[int32(k2)])) } - ee.EncodeUint(uint64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -11908,26 +12930,32 @@ func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + e.encode(v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + e.encode(v[int32(k2)]) } - e.encode(v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -11951,26 +12979,32 @@ func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeInt(int64(v[int32(k2)])) } - ee.EncodeInt(int64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -11994,26 +13028,32 @@ func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeInt(int64(v[int32(k2)])) } - ee.EncodeInt(int64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12037,26 +13077,32 @@ func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeInt(int64(v[int32(k2)])) } - ee.EncodeInt(int64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12080,26 +13126,32 @@ func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeInt(int64(v[int32(k2)])) } - ee.EncodeInt(int64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12123,26 +13175,32 @@ func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeInt(int64(v[int32(k2)])) } - ee.EncodeInt(int64(v[int32(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12166,26 +13224,32 @@ func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeFloat32(v[int32(k2)]) } - ee.EncodeFloat32(v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -12209,26 +13273,32 @@ func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeFloat64(v[int32(k2)]) } - ee.EncodeFloat64(v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -12252,26 +13322,32 @@ func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int32(k2))) - if esep { + ee.EncodeInt(int64(int32(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[int32(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int32(k2))) + ee.EncodeBool(v[int32(k2)]) } - ee.EncodeBool(v[int32(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -12295,26 +13371,32 @@ func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + e.encode(v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + e.encode(v[int64(k2)]) } - e.encode(v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -12338,26 +13420,32 @@ func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeString(cUTF8, v[int64(k2)]) } - ee.EncodeString(c_UTF8, v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -12381,26 +13469,32 @@ func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeUint(uint64(v[int64(k2)])) } - ee.EncodeUint(uint64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -12424,26 +13518,32 @@ func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeUint(uint64(v[int64(k2)])) } - ee.EncodeUint(uint64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -12467,26 +13567,32 @@ func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeUint(uint64(v[int64(k2)])) } - ee.EncodeUint(uint64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -12510,26 +13616,32 @@ func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeUint(uint64(v[int64(k2)])) } - ee.EncodeUint(uint64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -12553,26 +13665,32 @@ func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeUint(uint64(v[int64(k2)])) } - ee.EncodeUint(uint64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -12596,26 +13714,32 @@ func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + e.encode(v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + e.encode(v[int64(k2)]) } - e.encode(v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -12639,26 +13763,32 @@ func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeInt(int64(v[int64(k2)])) } - ee.EncodeInt(int64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12682,26 +13812,32 @@ func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeInt(int64(v[int64(k2)])) } - ee.EncodeInt(int64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12725,26 +13861,32 @@ func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeInt(int64(v[int64(k2)])) } - ee.EncodeInt(int64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12768,26 +13910,32 @@ func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeInt(int64(v[int64(k2)])) } - ee.EncodeInt(int64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12811,26 +13959,32 @@ func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeInt(int64(v[int64(k2)])) } - ee.EncodeInt(int64(v[int64(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -12854,26 +14008,32 @@ func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeFloat32(v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeFloat32(v[int64(k2)]) } - ee.EncodeFloat32(v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -12897,26 +14057,32 @@ func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeFloat64(v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeFloat64(v[int64(k2)]) } - ee.EncodeFloat64(v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -12940,26 +14106,32 @@ func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { i++ } sort.Sort(intSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(int64(k2))) - if esep { + ee.EncodeInt(int64(int64(k2))) ee.WriteMapElemValue() + ee.EncodeBool(v[int64(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeInt(int64(int64(k2))) + ee.EncodeBool(v[int64(k2)]) } - ee.EncodeBool(v[int64(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeInt(int64(k2)) - if esep { + ee.EncodeInt(int64(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -12983,26 +14155,32 @@ func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + e.encode(v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + e.encode(v[bool(k2)]) } - e.encode(v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -13026,26 +14204,32 @@ func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeString(cUTF8, v[bool(k2)]) } - ee.EncodeString(c_UTF8, v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeString(cUTF8, v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeString(cUTF8, v2) } - ee.EncodeString(c_UTF8, v2) } } ee.WriteMapEnd() @@ -13069,26 +14253,32 @@ func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeUint(uint64(v[bool(k2)])) } - ee.EncodeUint(uint64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -13112,26 +14302,32 @@ func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeUint(uint64(v[bool(k2)])) } - ee.EncodeUint(uint64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -13155,26 +14351,32 @@ func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeUint(uint64(v[bool(k2)])) } - ee.EncodeUint(uint64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -13198,26 +14400,32 @@ func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeUint(uint64(v[bool(k2)])) } - ee.EncodeUint(uint64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -13241,26 +14449,32 @@ func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeUint(uint64(v[bool(k2)])) } - ee.EncodeUint(uint64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeUint(uint64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) } - ee.EncodeUint(uint64(v2)) } } ee.WriteMapEnd() @@ -13284,26 +14498,32 @@ func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + e.encode(v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + e.encode(v[bool(k2)]) } - e.encode(v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + e.encode(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + e.encode(v2) } - e.encode(v2) } } ee.WriteMapEnd() @@ -13327,26 +14547,32 @@ func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeInt(int64(v[bool(k2)])) } - ee.EncodeInt(int64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -13370,26 +14596,32 @@ func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeInt(int64(v[bool(k2)])) } - ee.EncodeInt(int64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -13413,26 +14645,32 @@ func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeInt(int64(v[bool(k2)])) } - ee.EncodeInt(int64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -13456,26 +14694,32 @@ func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeInt(int64(v[bool(k2)])) } - ee.EncodeInt(int64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -13499,26 +14743,32 @@ func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeInt(int64(v[bool(k2)])) } - ee.EncodeInt(int64(v[bool(k2)])) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeInt(int64(v2)) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) } - ee.EncodeInt(int64(v2)) } } ee.WriteMapEnd() @@ -13542,26 +14792,32 @@ func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeFloat32(v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeFloat32(v[bool(k2)]) } - ee.EncodeFloat32(v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeFloat32(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeFloat32(v2) } - ee.EncodeFloat32(v2) } } ee.WriteMapEnd() @@ -13585,26 +14841,32 @@ func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeFloat64(v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeFloat64(v[bool(k2)]) } - ee.EncodeFloat64(v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeFloat64(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeFloat64(v2) } - ee.EncodeFloat64(v2) } } ee.WriteMapEnd() @@ -13628,26 +14890,32 @@ func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { i++ } sort.Sort(boolSlice(v2)) - for _, k2 := range v2 { - if esep { + if esep { + for _, k2 := range v2 { ee.WriteMapElemKey() - } - ee.EncodeBool(bool(k2)) - if esep { + ee.EncodeBool(bool(k2)) ee.WriteMapElemValue() + ee.EncodeBool(v[bool(k2)]) + } + } else { + for _, k2 := range v2 { + ee.EncodeBool(bool(k2)) + ee.EncodeBool(v[bool(k2)]) } - ee.EncodeBool(v[bool(k2)]) } } else { - for k2, v2 := range v { - if esep { + if esep { + for k2, v2 := range v { ee.WriteMapElemKey() - } - ee.EncodeBool(k2) - if esep { + ee.EncodeBool(k2) ee.WriteMapElemValue() + ee.EncodeBool(v2) + } + } else { + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeBool(v2) } - ee.EncodeBool(v2) } } ee.WriteMapEnd() @@ -13657,2730 +14925,2795 @@ func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { // -- -- fast path type switch func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + var changed bool switch v := iv.(type) { case []interface{}: - fastpathTV.DecSliceIntfV(v, false, d) + var v2 []interface{} + v2, changed = fastpathTV.DecSliceIntfV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } case *[]interface{}: - if v2, changed2 := fastpathTV.DecSliceIntfV(*v, true, d); changed2 { + var v2 []interface{} + v2, changed = fastpathTV.DecSliceIntfV(*v, true, d) + if changed { + *v = v2 + } + case []string: + var v2 []string + v2, changed = fastpathTV.DecSliceStringV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]string: + var v2 []string + v2, changed = fastpathTV.DecSliceStringV(*v, true, d) + if changed { + *v = v2 + } + case []float32: + var v2 []float32 + v2, changed = fastpathTV.DecSliceFloat32V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]float32: + var v2 []float32 + v2, changed = fastpathTV.DecSliceFloat32V(*v, true, d) + if changed { + *v = v2 + } + case []float64: + var v2 []float64 + v2, changed = fastpathTV.DecSliceFloat64V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]float64: + var v2 []float64 + v2, changed = fastpathTV.DecSliceFloat64V(*v, true, d) + if changed { + *v = v2 + } + case []uint: + var v2 []uint + v2, changed = fastpathTV.DecSliceUintV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]uint: + var v2 []uint + v2, changed = fastpathTV.DecSliceUintV(*v, true, d) + if changed { + *v = v2 + } + case []uint16: + var v2 []uint16 + v2, changed = fastpathTV.DecSliceUint16V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]uint16: + var v2 []uint16 + v2, changed = fastpathTV.DecSliceUint16V(*v, true, d) + if changed { + *v = v2 + } + case []uint32: + var v2 []uint32 + v2, changed = fastpathTV.DecSliceUint32V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]uint32: + var v2 []uint32 + v2, changed = fastpathTV.DecSliceUint32V(*v, true, d) + if changed { + *v = v2 + } + case []uint64: + var v2 []uint64 + v2, changed = fastpathTV.DecSliceUint64V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]uint64: + var v2 []uint64 + v2, changed = fastpathTV.DecSliceUint64V(*v, true, d) + if changed { + *v = v2 + } + case []uintptr: + var v2 []uintptr + v2, changed = fastpathTV.DecSliceUintptrV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]uintptr: + var v2 []uintptr + v2, changed = fastpathTV.DecSliceUintptrV(*v, true, d) + if changed { + *v = v2 + } + case []int: + var v2 []int + v2, changed = fastpathTV.DecSliceIntV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]int: + var v2 []int + v2, changed = fastpathTV.DecSliceIntV(*v, true, d) + if changed { + *v = v2 + } + case []int8: + var v2 []int8 + v2, changed = fastpathTV.DecSliceInt8V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]int8: + var v2 []int8 + v2, changed = fastpathTV.DecSliceInt8V(*v, true, d) + if changed { + *v = v2 + } + case []int16: + var v2 []int16 + v2, changed = fastpathTV.DecSliceInt16V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]int16: + var v2 []int16 + v2, changed = fastpathTV.DecSliceInt16V(*v, true, d) + if changed { + *v = v2 + } + case []int32: + var v2 []int32 + v2, changed = fastpathTV.DecSliceInt32V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]int32: + var v2 []int32 + v2, changed = fastpathTV.DecSliceInt32V(*v, true, d) + if changed { + *v = v2 + } + case []int64: + var v2 []int64 + v2, changed = fastpathTV.DecSliceInt64V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]int64: + var v2 []int64 + v2, changed = fastpathTV.DecSliceInt64V(*v, true, d) + if changed { + *v = v2 + } + case []bool: + var v2 []bool + v2, changed = fastpathTV.DecSliceBoolV(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + case *[]bool: + var v2 []bool + v2, changed = fastpathTV.DecSliceBoolV(*v, true, d) + if changed { *v = v2 } case map[interface{}]interface{}: fastpathTV.DecMapIntfIntfV(v, false, d) case *map[interface{}]interface{}: - if v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, true, d); changed2 { + var v2 map[interface{}]interface{} + v2, changed = fastpathTV.DecMapIntfIntfV(*v, true, d) + if changed { *v = v2 } - case map[interface{}]string: fastpathTV.DecMapIntfStringV(v, false, d) case *map[interface{}]string: - if v2, changed2 := fastpathTV.DecMapIntfStringV(*v, true, d); changed2 { + var v2 map[interface{}]string + v2, changed = fastpathTV.DecMapIntfStringV(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uint: fastpathTV.DecMapIntfUintV(v, false, d) case *map[interface{}]uint: - if v2, changed2 := fastpathTV.DecMapIntfUintV(*v, true, d); changed2 { + var v2 map[interface{}]uint + v2, changed = fastpathTV.DecMapIntfUintV(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uint8: fastpathTV.DecMapIntfUint8V(v, false, d) case *map[interface{}]uint8: - if v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, true, d); changed2 { + var v2 map[interface{}]uint8 + v2, changed = fastpathTV.DecMapIntfUint8V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uint16: fastpathTV.DecMapIntfUint16V(v, false, d) case *map[interface{}]uint16: - if v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, true, d); changed2 { + var v2 map[interface{}]uint16 + v2, changed = fastpathTV.DecMapIntfUint16V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uint32: fastpathTV.DecMapIntfUint32V(v, false, d) case *map[interface{}]uint32: - if v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, true, d); changed2 { + var v2 map[interface{}]uint32 + v2, changed = fastpathTV.DecMapIntfUint32V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uint64: fastpathTV.DecMapIntfUint64V(v, false, d) case *map[interface{}]uint64: - if v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, true, d); changed2 { + var v2 map[interface{}]uint64 + v2, changed = fastpathTV.DecMapIntfUint64V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]uintptr: fastpathTV.DecMapIntfUintptrV(v, false, d) case *map[interface{}]uintptr: - if v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, true, d); changed2 { + var v2 map[interface{}]uintptr + v2, changed = fastpathTV.DecMapIntfUintptrV(*v, true, d) + if changed { *v = v2 } - case map[interface{}]int: fastpathTV.DecMapIntfIntV(v, false, d) case *map[interface{}]int: - if v2, changed2 := fastpathTV.DecMapIntfIntV(*v, true, d); changed2 { + var v2 map[interface{}]int + v2, changed = fastpathTV.DecMapIntfIntV(*v, true, d) + if changed { *v = v2 } - case map[interface{}]int8: fastpathTV.DecMapIntfInt8V(v, false, d) case *map[interface{}]int8: - if v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, true, d); changed2 { + var v2 map[interface{}]int8 + v2, changed = fastpathTV.DecMapIntfInt8V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]int16: fastpathTV.DecMapIntfInt16V(v, false, d) case *map[interface{}]int16: - if v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, true, d); changed2 { + var v2 map[interface{}]int16 + v2, changed = fastpathTV.DecMapIntfInt16V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]int32: fastpathTV.DecMapIntfInt32V(v, false, d) case *map[interface{}]int32: - if v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, true, d); changed2 { + var v2 map[interface{}]int32 + v2, changed = fastpathTV.DecMapIntfInt32V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]int64: fastpathTV.DecMapIntfInt64V(v, false, d) case *map[interface{}]int64: - if v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, true, d); changed2 { + var v2 map[interface{}]int64 + v2, changed = fastpathTV.DecMapIntfInt64V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]float32: fastpathTV.DecMapIntfFloat32V(v, false, d) case *map[interface{}]float32: - if v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, true, d); changed2 { + var v2 map[interface{}]float32 + v2, changed = fastpathTV.DecMapIntfFloat32V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]float64: fastpathTV.DecMapIntfFloat64V(v, false, d) case *map[interface{}]float64: - if v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, true, d); changed2 { + var v2 map[interface{}]float64 + v2, changed = fastpathTV.DecMapIntfFloat64V(*v, true, d) + if changed { *v = v2 } - case map[interface{}]bool: fastpathTV.DecMapIntfBoolV(v, false, d) case *map[interface{}]bool: - if v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, true, d); changed2 { + var v2 map[interface{}]bool + v2, changed = fastpathTV.DecMapIntfBoolV(*v, true, d) + if changed { *v = v2 } - - case []string: - fastpathTV.DecSliceStringV(v, false, d) - case *[]string: - if v2, changed2 := fastpathTV.DecSliceStringV(*v, true, d); changed2 { - *v = v2 - } - case map[string]interface{}: fastpathTV.DecMapStringIntfV(v, false, d) case *map[string]interface{}: - if v2, changed2 := fastpathTV.DecMapStringIntfV(*v, true, d); changed2 { + var v2 map[string]interface{} + v2, changed = fastpathTV.DecMapStringIntfV(*v, true, d) + if changed { *v = v2 } - case map[string]string: fastpathTV.DecMapStringStringV(v, false, d) case *map[string]string: - if v2, changed2 := fastpathTV.DecMapStringStringV(*v, true, d); changed2 { + var v2 map[string]string + v2, changed = fastpathTV.DecMapStringStringV(*v, true, d) + if changed { *v = v2 } - case map[string]uint: fastpathTV.DecMapStringUintV(v, false, d) case *map[string]uint: - if v2, changed2 := fastpathTV.DecMapStringUintV(*v, true, d); changed2 { + var v2 map[string]uint + v2, changed = fastpathTV.DecMapStringUintV(*v, true, d) + if changed { *v = v2 } - case map[string]uint8: fastpathTV.DecMapStringUint8V(v, false, d) case *map[string]uint8: - if v2, changed2 := fastpathTV.DecMapStringUint8V(*v, true, d); changed2 { + var v2 map[string]uint8 + v2, changed = fastpathTV.DecMapStringUint8V(*v, true, d) + if changed { *v = v2 } - case map[string]uint16: fastpathTV.DecMapStringUint16V(v, false, d) case *map[string]uint16: - if v2, changed2 := fastpathTV.DecMapStringUint16V(*v, true, d); changed2 { + var v2 map[string]uint16 + v2, changed = fastpathTV.DecMapStringUint16V(*v, true, d) + if changed { *v = v2 } - case map[string]uint32: fastpathTV.DecMapStringUint32V(v, false, d) case *map[string]uint32: - if v2, changed2 := fastpathTV.DecMapStringUint32V(*v, true, d); changed2 { + var v2 map[string]uint32 + v2, changed = fastpathTV.DecMapStringUint32V(*v, true, d) + if changed { *v = v2 } - case map[string]uint64: fastpathTV.DecMapStringUint64V(v, false, d) case *map[string]uint64: - if v2, changed2 := fastpathTV.DecMapStringUint64V(*v, true, d); changed2 { + var v2 map[string]uint64 + v2, changed = fastpathTV.DecMapStringUint64V(*v, true, d) + if changed { *v = v2 } - case map[string]uintptr: fastpathTV.DecMapStringUintptrV(v, false, d) case *map[string]uintptr: - if v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, true, d); changed2 { + var v2 map[string]uintptr + v2, changed = fastpathTV.DecMapStringUintptrV(*v, true, d) + if changed { *v = v2 } - case map[string]int: fastpathTV.DecMapStringIntV(v, false, d) case *map[string]int: - if v2, changed2 := fastpathTV.DecMapStringIntV(*v, true, d); changed2 { + var v2 map[string]int + v2, changed = fastpathTV.DecMapStringIntV(*v, true, d) + if changed { *v = v2 } - case map[string]int8: fastpathTV.DecMapStringInt8V(v, false, d) case *map[string]int8: - if v2, changed2 := fastpathTV.DecMapStringInt8V(*v, true, d); changed2 { + var v2 map[string]int8 + v2, changed = fastpathTV.DecMapStringInt8V(*v, true, d) + if changed { *v = v2 } - case map[string]int16: fastpathTV.DecMapStringInt16V(v, false, d) case *map[string]int16: - if v2, changed2 := fastpathTV.DecMapStringInt16V(*v, true, d); changed2 { + var v2 map[string]int16 + v2, changed = fastpathTV.DecMapStringInt16V(*v, true, d) + if changed { *v = v2 } - case map[string]int32: fastpathTV.DecMapStringInt32V(v, false, d) case *map[string]int32: - if v2, changed2 := fastpathTV.DecMapStringInt32V(*v, true, d); changed2 { + var v2 map[string]int32 + v2, changed = fastpathTV.DecMapStringInt32V(*v, true, d) + if changed { *v = v2 } - case map[string]int64: fastpathTV.DecMapStringInt64V(v, false, d) case *map[string]int64: - if v2, changed2 := fastpathTV.DecMapStringInt64V(*v, true, d); changed2 { + var v2 map[string]int64 + v2, changed = fastpathTV.DecMapStringInt64V(*v, true, d) + if changed { *v = v2 } - case map[string]float32: fastpathTV.DecMapStringFloat32V(v, false, d) case *map[string]float32: - if v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, true, d); changed2 { + var v2 map[string]float32 + v2, changed = fastpathTV.DecMapStringFloat32V(*v, true, d) + if changed { *v = v2 } - case map[string]float64: fastpathTV.DecMapStringFloat64V(v, false, d) case *map[string]float64: - if v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, true, d); changed2 { + var v2 map[string]float64 + v2, changed = fastpathTV.DecMapStringFloat64V(*v, true, d) + if changed { *v = v2 } - case map[string]bool: fastpathTV.DecMapStringBoolV(v, false, d) case *map[string]bool: - if v2, changed2 := fastpathTV.DecMapStringBoolV(*v, true, d); changed2 { + var v2 map[string]bool + v2, changed = fastpathTV.DecMapStringBoolV(*v, true, d) + if changed { *v = v2 } - - case []float32: - fastpathTV.DecSliceFloat32V(v, false, d) - case *[]float32: - if v2, changed2 := fastpathTV.DecSliceFloat32V(*v, true, d); changed2 { - *v = v2 - } - case map[float32]interface{}: fastpathTV.DecMapFloat32IntfV(v, false, d) case *map[float32]interface{}: - if v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, true, d); changed2 { + var v2 map[float32]interface{} + v2, changed = fastpathTV.DecMapFloat32IntfV(*v, true, d) + if changed { *v = v2 } - case map[float32]string: fastpathTV.DecMapFloat32StringV(v, false, d) case *map[float32]string: - if v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, true, d); changed2 { + var v2 map[float32]string + v2, changed = fastpathTV.DecMapFloat32StringV(*v, true, d) + if changed { *v = v2 } - case map[float32]uint: fastpathTV.DecMapFloat32UintV(v, false, d) case *map[float32]uint: - if v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, true, d); changed2 { + var v2 map[float32]uint + v2, changed = fastpathTV.DecMapFloat32UintV(*v, true, d) + if changed { *v = v2 } - case map[float32]uint8: fastpathTV.DecMapFloat32Uint8V(v, false, d) case *map[float32]uint8: - if v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, true, d); changed2 { + var v2 map[float32]uint8 + v2, changed = fastpathTV.DecMapFloat32Uint8V(*v, true, d) + if changed { *v = v2 } - case map[float32]uint16: fastpathTV.DecMapFloat32Uint16V(v, false, d) case *map[float32]uint16: - if v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, true, d); changed2 { + var v2 map[float32]uint16 + v2, changed = fastpathTV.DecMapFloat32Uint16V(*v, true, d) + if changed { *v = v2 } - case map[float32]uint32: fastpathTV.DecMapFloat32Uint32V(v, false, d) case *map[float32]uint32: - if v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, true, d); changed2 { + var v2 map[float32]uint32 + v2, changed = fastpathTV.DecMapFloat32Uint32V(*v, true, d) + if changed { *v = v2 } - case map[float32]uint64: fastpathTV.DecMapFloat32Uint64V(v, false, d) case *map[float32]uint64: - if v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, true, d); changed2 { + var v2 map[float32]uint64 + v2, changed = fastpathTV.DecMapFloat32Uint64V(*v, true, d) + if changed { *v = v2 } - case map[float32]uintptr: fastpathTV.DecMapFloat32UintptrV(v, false, d) case *map[float32]uintptr: - if v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, true, d); changed2 { + var v2 map[float32]uintptr + v2, changed = fastpathTV.DecMapFloat32UintptrV(*v, true, d) + if changed { *v = v2 } - case map[float32]int: fastpathTV.DecMapFloat32IntV(v, false, d) case *map[float32]int: - if v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, true, d); changed2 { + var v2 map[float32]int + v2, changed = fastpathTV.DecMapFloat32IntV(*v, true, d) + if changed { *v = v2 } - case map[float32]int8: fastpathTV.DecMapFloat32Int8V(v, false, d) case *map[float32]int8: - if v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, true, d); changed2 { + var v2 map[float32]int8 + v2, changed = fastpathTV.DecMapFloat32Int8V(*v, true, d) + if changed { *v = v2 } - case map[float32]int16: fastpathTV.DecMapFloat32Int16V(v, false, d) case *map[float32]int16: - if v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, true, d); changed2 { + var v2 map[float32]int16 + v2, changed = fastpathTV.DecMapFloat32Int16V(*v, true, d) + if changed { *v = v2 } - case map[float32]int32: fastpathTV.DecMapFloat32Int32V(v, false, d) case *map[float32]int32: - if v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, true, d); changed2 { + var v2 map[float32]int32 + v2, changed = fastpathTV.DecMapFloat32Int32V(*v, true, d) + if changed { *v = v2 } - case map[float32]int64: fastpathTV.DecMapFloat32Int64V(v, false, d) case *map[float32]int64: - if v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, true, d); changed2 { + var v2 map[float32]int64 + v2, changed = fastpathTV.DecMapFloat32Int64V(*v, true, d) + if changed { *v = v2 } - case map[float32]float32: fastpathTV.DecMapFloat32Float32V(v, false, d) case *map[float32]float32: - if v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, true, d); changed2 { + var v2 map[float32]float32 + v2, changed = fastpathTV.DecMapFloat32Float32V(*v, true, d) + if changed { *v = v2 } - case map[float32]float64: fastpathTV.DecMapFloat32Float64V(v, false, d) case *map[float32]float64: - if v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, true, d); changed2 { + var v2 map[float32]float64 + v2, changed = fastpathTV.DecMapFloat32Float64V(*v, true, d) + if changed { *v = v2 } - case map[float32]bool: fastpathTV.DecMapFloat32BoolV(v, false, d) case *map[float32]bool: - if v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, true, d); changed2 { + var v2 map[float32]bool + v2, changed = fastpathTV.DecMapFloat32BoolV(*v, true, d) + if changed { *v = v2 } - - case []float64: - fastpathTV.DecSliceFloat64V(v, false, d) - case *[]float64: - if v2, changed2 := fastpathTV.DecSliceFloat64V(*v, true, d); changed2 { - *v = v2 - } - case map[float64]interface{}: fastpathTV.DecMapFloat64IntfV(v, false, d) case *map[float64]interface{}: - if v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, true, d); changed2 { + var v2 map[float64]interface{} + v2, changed = fastpathTV.DecMapFloat64IntfV(*v, true, d) + if changed { *v = v2 } - case map[float64]string: fastpathTV.DecMapFloat64StringV(v, false, d) case *map[float64]string: - if v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, true, d); changed2 { + var v2 map[float64]string + v2, changed = fastpathTV.DecMapFloat64StringV(*v, true, d) + if changed { *v = v2 } - case map[float64]uint: fastpathTV.DecMapFloat64UintV(v, false, d) case *map[float64]uint: - if v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, true, d); changed2 { + var v2 map[float64]uint + v2, changed = fastpathTV.DecMapFloat64UintV(*v, true, d) + if changed { *v = v2 } - case map[float64]uint8: fastpathTV.DecMapFloat64Uint8V(v, false, d) case *map[float64]uint8: - if v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, true, d); changed2 { + var v2 map[float64]uint8 + v2, changed = fastpathTV.DecMapFloat64Uint8V(*v, true, d) + if changed { *v = v2 } - case map[float64]uint16: fastpathTV.DecMapFloat64Uint16V(v, false, d) case *map[float64]uint16: - if v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, true, d); changed2 { + var v2 map[float64]uint16 + v2, changed = fastpathTV.DecMapFloat64Uint16V(*v, true, d) + if changed { *v = v2 } - case map[float64]uint32: fastpathTV.DecMapFloat64Uint32V(v, false, d) case *map[float64]uint32: - if v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, true, d); changed2 { + var v2 map[float64]uint32 + v2, changed = fastpathTV.DecMapFloat64Uint32V(*v, true, d) + if changed { *v = v2 } - case map[float64]uint64: fastpathTV.DecMapFloat64Uint64V(v, false, d) case *map[float64]uint64: - if v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, true, d); changed2 { + var v2 map[float64]uint64 + v2, changed = fastpathTV.DecMapFloat64Uint64V(*v, true, d) + if changed { *v = v2 } - case map[float64]uintptr: fastpathTV.DecMapFloat64UintptrV(v, false, d) case *map[float64]uintptr: - if v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, true, d); changed2 { + var v2 map[float64]uintptr + v2, changed = fastpathTV.DecMapFloat64UintptrV(*v, true, d) + if changed { *v = v2 } - case map[float64]int: fastpathTV.DecMapFloat64IntV(v, false, d) case *map[float64]int: - if v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, true, d); changed2 { + var v2 map[float64]int + v2, changed = fastpathTV.DecMapFloat64IntV(*v, true, d) + if changed { *v = v2 } - case map[float64]int8: fastpathTV.DecMapFloat64Int8V(v, false, d) case *map[float64]int8: - if v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, true, d); changed2 { + var v2 map[float64]int8 + v2, changed = fastpathTV.DecMapFloat64Int8V(*v, true, d) + if changed { *v = v2 } - case map[float64]int16: fastpathTV.DecMapFloat64Int16V(v, false, d) case *map[float64]int16: - if v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, true, d); changed2 { + var v2 map[float64]int16 + v2, changed = fastpathTV.DecMapFloat64Int16V(*v, true, d) + if changed { *v = v2 } - case map[float64]int32: fastpathTV.DecMapFloat64Int32V(v, false, d) case *map[float64]int32: - if v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, true, d); changed2 { + var v2 map[float64]int32 + v2, changed = fastpathTV.DecMapFloat64Int32V(*v, true, d) + if changed { *v = v2 } - case map[float64]int64: fastpathTV.DecMapFloat64Int64V(v, false, d) case *map[float64]int64: - if v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, true, d); changed2 { + var v2 map[float64]int64 + v2, changed = fastpathTV.DecMapFloat64Int64V(*v, true, d) + if changed { *v = v2 } - case map[float64]float32: fastpathTV.DecMapFloat64Float32V(v, false, d) case *map[float64]float32: - if v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, true, d); changed2 { + var v2 map[float64]float32 + v2, changed = fastpathTV.DecMapFloat64Float32V(*v, true, d) + if changed { *v = v2 } - case map[float64]float64: fastpathTV.DecMapFloat64Float64V(v, false, d) case *map[float64]float64: - if v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, true, d); changed2 { + var v2 map[float64]float64 + v2, changed = fastpathTV.DecMapFloat64Float64V(*v, true, d) + if changed { *v = v2 } - case map[float64]bool: fastpathTV.DecMapFloat64BoolV(v, false, d) case *map[float64]bool: - if v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, true, d); changed2 { + var v2 map[float64]bool + v2, changed = fastpathTV.DecMapFloat64BoolV(*v, true, d) + if changed { *v = v2 } - - case []uint: - fastpathTV.DecSliceUintV(v, false, d) - case *[]uint: - if v2, changed2 := fastpathTV.DecSliceUintV(*v, true, d); changed2 { - *v = v2 - } - case map[uint]interface{}: fastpathTV.DecMapUintIntfV(v, false, d) case *map[uint]interface{}: - if v2, changed2 := fastpathTV.DecMapUintIntfV(*v, true, d); changed2 { + var v2 map[uint]interface{} + v2, changed = fastpathTV.DecMapUintIntfV(*v, true, d) + if changed { *v = v2 } - case map[uint]string: fastpathTV.DecMapUintStringV(v, false, d) case *map[uint]string: - if v2, changed2 := fastpathTV.DecMapUintStringV(*v, true, d); changed2 { + var v2 map[uint]string + v2, changed = fastpathTV.DecMapUintStringV(*v, true, d) + if changed { *v = v2 } - case map[uint]uint: fastpathTV.DecMapUintUintV(v, false, d) case *map[uint]uint: - if v2, changed2 := fastpathTV.DecMapUintUintV(*v, true, d); changed2 { + var v2 map[uint]uint + v2, changed = fastpathTV.DecMapUintUintV(*v, true, d) + if changed { *v = v2 } - case map[uint]uint8: fastpathTV.DecMapUintUint8V(v, false, d) case *map[uint]uint8: - if v2, changed2 := fastpathTV.DecMapUintUint8V(*v, true, d); changed2 { + var v2 map[uint]uint8 + v2, changed = fastpathTV.DecMapUintUint8V(*v, true, d) + if changed { *v = v2 } - case map[uint]uint16: fastpathTV.DecMapUintUint16V(v, false, d) case *map[uint]uint16: - if v2, changed2 := fastpathTV.DecMapUintUint16V(*v, true, d); changed2 { + var v2 map[uint]uint16 + v2, changed = fastpathTV.DecMapUintUint16V(*v, true, d) + if changed { *v = v2 } - case map[uint]uint32: fastpathTV.DecMapUintUint32V(v, false, d) case *map[uint]uint32: - if v2, changed2 := fastpathTV.DecMapUintUint32V(*v, true, d); changed2 { + var v2 map[uint]uint32 + v2, changed = fastpathTV.DecMapUintUint32V(*v, true, d) + if changed { *v = v2 } - case map[uint]uint64: fastpathTV.DecMapUintUint64V(v, false, d) case *map[uint]uint64: - if v2, changed2 := fastpathTV.DecMapUintUint64V(*v, true, d); changed2 { + var v2 map[uint]uint64 + v2, changed = fastpathTV.DecMapUintUint64V(*v, true, d) + if changed { *v = v2 } - case map[uint]uintptr: fastpathTV.DecMapUintUintptrV(v, false, d) case *map[uint]uintptr: - if v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, true, d); changed2 { + var v2 map[uint]uintptr + v2, changed = fastpathTV.DecMapUintUintptrV(*v, true, d) + if changed { *v = v2 } - case map[uint]int: fastpathTV.DecMapUintIntV(v, false, d) case *map[uint]int: - if v2, changed2 := fastpathTV.DecMapUintIntV(*v, true, d); changed2 { + var v2 map[uint]int + v2, changed = fastpathTV.DecMapUintIntV(*v, true, d) + if changed { *v = v2 } - case map[uint]int8: fastpathTV.DecMapUintInt8V(v, false, d) case *map[uint]int8: - if v2, changed2 := fastpathTV.DecMapUintInt8V(*v, true, d); changed2 { + var v2 map[uint]int8 + v2, changed = fastpathTV.DecMapUintInt8V(*v, true, d) + if changed { *v = v2 } - case map[uint]int16: fastpathTV.DecMapUintInt16V(v, false, d) case *map[uint]int16: - if v2, changed2 := fastpathTV.DecMapUintInt16V(*v, true, d); changed2 { + var v2 map[uint]int16 + v2, changed = fastpathTV.DecMapUintInt16V(*v, true, d) + if changed { *v = v2 } - case map[uint]int32: fastpathTV.DecMapUintInt32V(v, false, d) case *map[uint]int32: - if v2, changed2 := fastpathTV.DecMapUintInt32V(*v, true, d); changed2 { + var v2 map[uint]int32 + v2, changed = fastpathTV.DecMapUintInt32V(*v, true, d) + if changed { *v = v2 } - case map[uint]int64: fastpathTV.DecMapUintInt64V(v, false, d) case *map[uint]int64: - if v2, changed2 := fastpathTV.DecMapUintInt64V(*v, true, d); changed2 { + var v2 map[uint]int64 + v2, changed = fastpathTV.DecMapUintInt64V(*v, true, d) + if changed { *v = v2 } - case map[uint]float32: fastpathTV.DecMapUintFloat32V(v, false, d) case *map[uint]float32: - if v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, true, d); changed2 { + var v2 map[uint]float32 + v2, changed = fastpathTV.DecMapUintFloat32V(*v, true, d) + if changed { *v = v2 } - case map[uint]float64: fastpathTV.DecMapUintFloat64V(v, false, d) case *map[uint]float64: - if v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, true, d); changed2 { + var v2 map[uint]float64 + v2, changed = fastpathTV.DecMapUintFloat64V(*v, true, d) + if changed { *v = v2 } - case map[uint]bool: fastpathTV.DecMapUintBoolV(v, false, d) case *map[uint]bool: - if v2, changed2 := fastpathTV.DecMapUintBoolV(*v, true, d); changed2 { + var v2 map[uint]bool + v2, changed = fastpathTV.DecMapUintBoolV(*v, true, d) + if changed { *v = v2 } - case map[uint8]interface{}: fastpathTV.DecMapUint8IntfV(v, false, d) case *map[uint8]interface{}: - if v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, true, d); changed2 { + var v2 map[uint8]interface{} + v2, changed = fastpathTV.DecMapUint8IntfV(*v, true, d) + if changed { *v = v2 } - case map[uint8]string: fastpathTV.DecMapUint8StringV(v, false, d) case *map[uint8]string: - if v2, changed2 := fastpathTV.DecMapUint8StringV(*v, true, d); changed2 { + var v2 map[uint8]string + v2, changed = fastpathTV.DecMapUint8StringV(*v, true, d) + if changed { *v = v2 } - case map[uint8]uint: fastpathTV.DecMapUint8UintV(v, false, d) case *map[uint8]uint: - if v2, changed2 := fastpathTV.DecMapUint8UintV(*v, true, d); changed2 { + var v2 map[uint8]uint + v2, changed = fastpathTV.DecMapUint8UintV(*v, true, d) + if changed { *v = v2 } - case map[uint8]uint8: fastpathTV.DecMapUint8Uint8V(v, false, d) case *map[uint8]uint8: - if v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, true, d); changed2 { + var v2 map[uint8]uint8 + v2, changed = fastpathTV.DecMapUint8Uint8V(*v, true, d) + if changed { *v = v2 } - case map[uint8]uint16: fastpathTV.DecMapUint8Uint16V(v, false, d) case *map[uint8]uint16: - if v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, true, d); changed2 { + var v2 map[uint8]uint16 + v2, changed = fastpathTV.DecMapUint8Uint16V(*v, true, d) + if changed { *v = v2 } - case map[uint8]uint32: fastpathTV.DecMapUint8Uint32V(v, false, d) case *map[uint8]uint32: - if v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, true, d); changed2 { + var v2 map[uint8]uint32 + v2, changed = fastpathTV.DecMapUint8Uint32V(*v, true, d) + if changed { *v = v2 } - case map[uint8]uint64: fastpathTV.DecMapUint8Uint64V(v, false, d) case *map[uint8]uint64: - if v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, true, d); changed2 { + var v2 map[uint8]uint64 + v2, changed = fastpathTV.DecMapUint8Uint64V(*v, true, d) + if changed { *v = v2 } - case map[uint8]uintptr: fastpathTV.DecMapUint8UintptrV(v, false, d) case *map[uint8]uintptr: - if v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, true, d); changed2 { + var v2 map[uint8]uintptr + v2, changed = fastpathTV.DecMapUint8UintptrV(*v, true, d) + if changed { *v = v2 } - case map[uint8]int: fastpathTV.DecMapUint8IntV(v, false, d) case *map[uint8]int: - if v2, changed2 := fastpathTV.DecMapUint8IntV(*v, true, d); changed2 { + var v2 map[uint8]int + v2, changed = fastpathTV.DecMapUint8IntV(*v, true, d) + if changed { *v = v2 } - case map[uint8]int8: fastpathTV.DecMapUint8Int8V(v, false, d) case *map[uint8]int8: - if v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, true, d); changed2 { + var v2 map[uint8]int8 + v2, changed = fastpathTV.DecMapUint8Int8V(*v, true, d) + if changed { *v = v2 } - case map[uint8]int16: fastpathTV.DecMapUint8Int16V(v, false, d) case *map[uint8]int16: - if v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, true, d); changed2 { + var v2 map[uint8]int16 + v2, changed = fastpathTV.DecMapUint8Int16V(*v, true, d) + if changed { *v = v2 } - case map[uint8]int32: fastpathTV.DecMapUint8Int32V(v, false, d) case *map[uint8]int32: - if v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, true, d); changed2 { + var v2 map[uint8]int32 + v2, changed = fastpathTV.DecMapUint8Int32V(*v, true, d) + if changed { *v = v2 } - case map[uint8]int64: fastpathTV.DecMapUint8Int64V(v, false, d) case *map[uint8]int64: - if v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, true, d); changed2 { + var v2 map[uint8]int64 + v2, changed = fastpathTV.DecMapUint8Int64V(*v, true, d) + if changed { *v = v2 } - case map[uint8]float32: fastpathTV.DecMapUint8Float32V(v, false, d) case *map[uint8]float32: - if v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, true, d); changed2 { + var v2 map[uint8]float32 + v2, changed = fastpathTV.DecMapUint8Float32V(*v, true, d) + if changed { *v = v2 } - case map[uint8]float64: fastpathTV.DecMapUint8Float64V(v, false, d) case *map[uint8]float64: - if v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, true, d); changed2 { + var v2 map[uint8]float64 + v2, changed = fastpathTV.DecMapUint8Float64V(*v, true, d) + if changed { *v = v2 } - case map[uint8]bool: fastpathTV.DecMapUint8BoolV(v, false, d) case *map[uint8]bool: - if v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, true, d); changed2 { + var v2 map[uint8]bool + v2, changed = fastpathTV.DecMapUint8BoolV(*v, true, d) + if changed { *v = v2 } - - case []uint16: - fastpathTV.DecSliceUint16V(v, false, d) - case *[]uint16: - if v2, changed2 := fastpathTV.DecSliceUint16V(*v, true, d); changed2 { - *v = v2 - } - case map[uint16]interface{}: fastpathTV.DecMapUint16IntfV(v, false, d) case *map[uint16]interface{}: - if v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, true, d); changed2 { + var v2 map[uint16]interface{} + v2, changed = fastpathTV.DecMapUint16IntfV(*v, true, d) + if changed { *v = v2 } - case map[uint16]string: fastpathTV.DecMapUint16StringV(v, false, d) case *map[uint16]string: - if v2, changed2 := fastpathTV.DecMapUint16StringV(*v, true, d); changed2 { + var v2 map[uint16]string + v2, changed = fastpathTV.DecMapUint16StringV(*v, true, d) + if changed { *v = v2 } - case map[uint16]uint: fastpathTV.DecMapUint16UintV(v, false, d) case *map[uint16]uint: - if v2, changed2 := fastpathTV.DecMapUint16UintV(*v, true, d); changed2 { + var v2 map[uint16]uint + v2, changed = fastpathTV.DecMapUint16UintV(*v, true, d) + if changed { *v = v2 } - case map[uint16]uint8: fastpathTV.DecMapUint16Uint8V(v, false, d) case *map[uint16]uint8: - if v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, true, d); changed2 { + var v2 map[uint16]uint8 + v2, changed = fastpathTV.DecMapUint16Uint8V(*v, true, d) + if changed { *v = v2 } - case map[uint16]uint16: fastpathTV.DecMapUint16Uint16V(v, false, d) case *map[uint16]uint16: - if v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, true, d); changed2 { + var v2 map[uint16]uint16 + v2, changed = fastpathTV.DecMapUint16Uint16V(*v, true, d) + if changed { *v = v2 } - case map[uint16]uint32: fastpathTV.DecMapUint16Uint32V(v, false, d) case *map[uint16]uint32: - if v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, true, d); changed2 { + var v2 map[uint16]uint32 + v2, changed = fastpathTV.DecMapUint16Uint32V(*v, true, d) + if changed { *v = v2 } - case map[uint16]uint64: fastpathTV.DecMapUint16Uint64V(v, false, d) case *map[uint16]uint64: - if v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, true, d); changed2 { + var v2 map[uint16]uint64 + v2, changed = fastpathTV.DecMapUint16Uint64V(*v, true, d) + if changed { *v = v2 } - case map[uint16]uintptr: fastpathTV.DecMapUint16UintptrV(v, false, d) case *map[uint16]uintptr: - if v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, true, d); changed2 { + var v2 map[uint16]uintptr + v2, changed = fastpathTV.DecMapUint16UintptrV(*v, true, d) + if changed { *v = v2 } - case map[uint16]int: fastpathTV.DecMapUint16IntV(v, false, d) case *map[uint16]int: - if v2, changed2 := fastpathTV.DecMapUint16IntV(*v, true, d); changed2 { + var v2 map[uint16]int + v2, changed = fastpathTV.DecMapUint16IntV(*v, true, d) + if changed { *v = v2 } - case map[uint16]int8: fastpathTV.DecMapUint16Int8V(v, false, d) case *map[uint16]int8: - if v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, true, d); changed2 { + var v2 map[uint16]int8 + v2, changed = fastpathTV.DecMapUint16Int8V(*v, true, d) + if changed { *v = v2 } - case map[uint16]int16: fastpathTV.DecMapUint16Int16V(v, false, d) case *map[uint16]int16: - if v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, true, d); changed2 { + var v2 map[uint16]int16 + v2, changed = fastpathTV.DecMapUint16Int16V(*v, true, d) + if changed { *v = v2 } - case map[uint16]int32: fastpathTV.DecMapUint16Int32V(v, false, d) case *map[uint16]int32: - if v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, true, d); changed2 { + var v2 map[uint16]int32 + v2, changed = fastpathTV.DecMapUint16Int32V(*v, true, d) + if changed { *v = v2 } - case map[uint16]int64: fastpathTV.DecMapUint16Int64V(v, false, d) case *map[uint16]int64: - if v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, true, d); changed2 { + var v2 map[uint16]int64 + v2, changed = fastpathTV.DecMapUint16Int64V(*v, true, d) + if changed { *v = v2 } - case map[uint16]float32: fastpathTV.DecMapUint16Float32V(v, false, d) case *map[uint16]float32: - if v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, true, d); changed2 { + var v2 map[uint16]float32 + v2, changed = fastpathTV.DecMapUint16Float32V(*v, true, d) + if changed { *v = v2 } - case map[uint16]float64: fastpathTV.DecMapUint16Float64V(v, false, d) case *map[uint16]float64: - if v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, true, d); changed2 { + var v2 map[uint16]float64 + v2, changed = fastpathTV.DecMapUint16Float64V(*v, true, d) + if changed { *v = v2 } - case map[uint16]bool: fastpathTV.DecMapUint16BoolV(v, false, d) case *map[uint16]bool: - if v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, true, d); changed2 { + var v2 map[uint16]bool + v2, changed = fastpathTV.DecMapUint16BoolV(*v, true, d) + if changed { *v = v2 } - - case []uint32: - fastpathTV.DecSliceUint32V(v, false, d) - case *[]uint32: - if v2, changed2 := fastpathTV.DecSliceUint32V(*v, true, d); changed2 { - *v = v2 - } - case map[uint32]interface{}: fastpathTV.DecMapUint32IntfV(v, false, d) case *map[uint32]interface{}: - if v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, true, d); changed2 { + var v2 map[uint32]interface{} + v2, changed = fastpathTV.DecMapUint32IntfV(*v, true, d) + if changed { *v = v2 } - case map[uint32]string: fastpathTV.DecMapUint32StringV(v, false, d) case *map[uint32]string: - if v2, changed2 := fastpathTV.DecMapUint32StringV(*v, true, d); changed2 { + var v2 map[uint32]string + v2, changed = fastpathTV.DecMapUint32StringV(*v, true, d) + if changed { *v = v2 } - case map[uint32]uint: fastpathTV.DecMapUint32UintV(v, false, d) case *map[uint32]uint: - if v2, changed2 := fastpathTV.DecMapUint32UintV(*v, true, d); changed2 { + var v2 map[uint32]uint + v2, changed = fastpathTV.DecMapUint32UintV(*v, true, d) + if changed { *v = v2 } - case map[uint32]uint8: fastpathTV.DecMapUint32Uint8V(v, false, d) case *map[uint32]uint8: - if v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, true, d); changed2 { + var v2 map[uint32]uint8 + v2, changed = fastpathTV.DecMapUint32Uint8V(*v, true, d) + if changed { *v = v2 } - case map[uint32]uint16: fastpathTV.DecMapUint32Uint16V(v, false, d) case *map[uint32]uint16: - if v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, true, d); changed2 { + var v2 map[uint32]uint16 + v2, changed = fastpathTV.DecMapUint32Uint16V(*v, true, d) + if changed { *v = v2 } - case map[uint32]uint32: fastpathTV.DecMapUint32Uint32V(v, false, d) case *map[uint32]uint32: - if v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, true, d); changed2 { + var v2 map[uint32]uint32 + v2, changed = fastpathTV.DecMapUint32Uint32V(*v, true, d) + if changed { *v = v2 } - case map[uint32]uint64: fastpathTV.DecMapUint32Uint64V(v, false, d) case *map[uint32]uint64: - if v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, true, d); changed2 { + var v2 map[uint32]uint64 + v2, changed = fastpathTV.DecMapUint32Uint64V(*v, true, d) + if changed { *v = v2 } - case map[uint32]uintptr: fastpathTV.DecMapUint32UintptrV(v, false, d) case *map[uint32]uintptr: - if v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, true, d); changed2 { + var v2 map[uint32]uintptr + v2, changed = fastpathTV.DecMapUint32UintptrV(*v, true, d) + if changed { *v = v2 } - case map[uint32]int: fastpathTV.DecMapUint32IntV(v, false, d) case *map[uint32]int: - if v2, changed2 := fastpathTV.DecMapUint32IntV(*v, true, d); changed2 { + var v2 map[uint32]int + v2, changed = fastpathTV.DecMapUint32IntV(*v, true, d) + if changed { *v = v2 } - case map[uint32]int8: fastpathTV.DecMapUint32Int8V(v, false, d) case *map[uint32]int8: - if v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, true, d); changed2 { + var v2 map[uint32]int8 + v2, changed = fastpathTV.DecMapUint32Int8V(*v, true, d) + if changed { *v = v2 } - case map[uint32]int16: fastpathTV.DecMapUint32Int16V(v, false, d) case *map[uint32]int16: - if v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, true, d); changed2 { + var v2 map[uint32]int16 + v2, changed = fastpathTV.DecMapUint32Int16V(*v, true, d) + if changed { *v = v2 } - case map[uint32]int32: fastpathTV.DecMapUint32Int32V(v, false, d) case *map[uint32]int32: - if v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, true, d); changed2 { + var v2 map[uint32]int32 + v2, changed = fastpathTV.DecMapUint32Int32V(*v, true, d) + if changed { *v = v2 } - case map[uint32]int64: fastpathTV.DecMapUint32Int64V(v, false, d) case *map[uint32]int64: - if v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, true, d); changed2 { + var v2 map[uint32]int64 + v2, changed = fastpathTV.DecMapUint32Int64V(*v, true, d) + if changed { *v = v2 } - case map[uint32]float32: fastpathTV.DecMapUint32Float32V(v, false, d) case *map[uint32]float32: - if v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, true, d); changed2 { + var v2 map[uint32]float32 + v2, changed = fastpathTV.DecMapUint32Float32V(*v, true, d) + if changed { *v = v2 } - case map[uint32]float64: fastpathTV.DecMapUint32Float64V(v, false, d) case *map[uint32]float64: - if v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, true, d); changed2 { + var v2 map[uint32]float64 + v2, changed = fastpathTV.DecMapUint32Float64V(*v, true, d) + if changed { *v = v2 } - case map[uint32]bool: fastpathTV.DecMapUint32BoolV(v, false, d) case *map[uint32]bool: - if v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, true, d); changed2 { + var v2 map[uint32]bool + v2, changed = fastpathTV.DecMapUint32BoolV(*v, true, d) + if changed { *v = v2 } - - case []uint64: - fastpathTV.DecSliceUint64V(v, false, d) - case *[]uint64: - if v2, changed2 := fastpathTV.DecSliceUint64V(*v, true, d); changed2 { - *v = v2 - } - case map[uint64]interface{}: fastpathTV.DecMapUint64IntfV(v, false, d) case *map[uint64]interface{}: - if v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, true, d); changed2 { + var v2 map[uint64]interface{} + v2, changed = fastpathTV.DecMapUint64IntfV(*v, true, d) + if changed { *v = v2 } - case map[uint64]string: fastpathTV.DecMapUint64StringV(v, false, d) case *map[uint64]string: - if v2, changed2 := fastpathTV.DecMapUint64StringV(*v, true, d); changed2 { + var v2 map[uint64]string + v2, changed = fastpathTV.DecMapUint64StringV(*v, true, d) + if changed { *v = v2 } - case map[uint64]uint: fastpathTV.DecMapUint64UintV(v, false, d) case *map[uint64]uint: - if v2, changed2 := fastpathTV.DecMapUint64UintV(*v, true, d); changed2 { + var v2 map[uint64]uint + v2, changed = fastpathTV.DecMapUint64UintV(*v, true, d) + if changed { *v = v2 } - case map[uint64]uint8: fastpathTV.DecMapUint64Uint8V(v, false, d) case *map[uint64]uint8: - if v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, true, d); changed2 { + var v2 map[uint64]uint8 + v2, changed = fastpathTV.DecMapUint64Uint8V(*v, true, d) + if changed { *v = v2 } - case map[uint64]uint16: fastpathTV.DecMapUint64Uint16V(v, false, d) case *map[uint64]uint16: - if v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, true, d); changed2 { + var v2 map[uint64]uint16 + v2, changed = fastpathTV.DecMapUint64Uint16V(*v, true, d) + if changed { *v = v2 } - case map[uint64]uint32: fastpathTV.DecMapUint64Uint32V(v, false, d) case *map[uint64]uint32: - if v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, true, d); changed2 { + var v2 map[uint64]uint32 + v2, changed = fastpathTV.DecMapUint64Uint32V(*v, true, d) + if changed { *v = v2 } - case map[uint64]uint64: fastpathTV.DecMapUint64Uint64V(v, false, d) case *map[uint64]uint64: - if v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, true, d); changed2 { + var v2 map[uint64]uint64 + v2, changed = fastpathTV.DecMapUint64Uint64V(*v, true, d) + if changed { *v = v2 } - case map[uint64]uintptr: fastpathTV.DecMapUint64UintptrV(v, false, d) case *map[uint64]uintptr: - if v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, true, d); changed2 { + var v2 map[uint64]uintptr + v2, changed = fastpathTV.DecMapUint64UintptrV(*v, true, d) + if changed { *v = v2 } - case map[uint64]int: fastpathTV.DecMapUint64IntV(v, false, d) case *map[uint64]int: - if v2, changed2 := fastpathTV.DecMapUint64IntV(*v, true, d); changed2 { + var v2 map[uint64]int + v2, changed = fastpathTV.DecMapUint64IntV(*v, true, d) + if changed { *v = v2 } - case map[uint64]int8: fastpathTV.DecMapUint64Int8V(v, false, d) case *map[uint64]int8: - if v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, true, d); changed2 { + var v2 map[uint64]int8 + v2, changed = fastpathTV.DecMapUint64Int8V(*v, true, d) + if changed { *v = v2 } - case map[uint64]int16: fastpathTV.DecMapUint64Int16V(v, false, d) case *map[uint64]int16: - if v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, true, d); changed2 { + var v2 map[uint64]int16 + v2, changed = fastpathTV.DecMapUint64Int16V(*v, true, d) + if changed { *v = v2 } - case map[uint64]int32: fastpathTV.DecMapUint64Int32V(v, false, d) case *map[uint64]int32: - if v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, true, d); changed2 { + var v2 map[uint64]int32 + v2, changed = fastpathTV.DecMapUint64Int32V(*v, true, d) + if changed { *v = v2 } - case map[uint64]int64: fastpathTV.DecMapUint64Int64V(v, false, d) case *map[uint64]int64: - if v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, true, d); changed2 { + var v2 map[uint64]int64 + v2, changed = fastpathTV.DecMapUint64Int64V(*v, true, d) + if changed { *v = v2 } - case map[uint64]float32: fastpathTV.DecMapUint64Float32V(v, false, d) case *map[uint64]float32: - if v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, true, d); changed2 { + var v2 map[uint64]float32 + v2, changed = fastpathTV.DecMapUint64Float32V(*v, true, d) + if changed { *v = v2 } - case map[uint64]float64: fastpathTV.DecMapUint64Float64V(v, false, d) case *map[uint64]float64: - if v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, true, d); changed2 { + var v2 map[uint64]float64 + v2, changed = fastpathTV.DecMapUint64Float64V(*v, true, d) + if changed { *v = v2 } - case map[uint64]bool: fastpathTV.DecMapUint64BoolV(v, false, d) case *map[uint64]bool: - if v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, true, d); changed2 { + var v2 map[uint64]bool + v2, changed = fastpathTV.DecMapUint64BoolV(*v, true, d) + if changed { *v = v2 } - - case []uintptr: - fastpathTV.DecSliceUintptrV(v, false, d) - case *[]uintptr: - if v2, changed2 := fastpathTV.DecSliceUintptrV(*v, true, d); changed2 { - *v = v2 - } - case map[uintptr]interface{}: fastpathTV.DecMapUintptrIntfV(v, false, d) case *map[uintptr]interface{}: - if v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, true, d); changed2 { + var v2 map[uintptr]interface{} + v2, changed = fastpathTV.DecMapUintptrIntfV(*v, true, d) + if changed { *v = v2 } - case map[uintptr]string: fastpathTV.DecMapUintptrStringV(v, false, d) case *map[uintptr]string: - if v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, true, d); changed2 { + var v2 map[uintptr]string + v2, changed = fastpathTV.DecMapUintptrStringV(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uint: fastpathTV.DecMapUintptrUintV(v, false, d) case *map[uintptr]uint: - if v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, true, d); changed2 { + var v2 map[uintptr]uint + v2, changed = fastpathTV.DecMapUintptrUintV(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uint8: fastpathTV.DecMapUintptrUint8V(v, false, d) case *map[uintptr]uint8: - if v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, true, d); changed2 { + var v2 map[uintptr]uint8 + v2, changed = fastpathTV.DecMapUintptrUint8V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uint16: fastpathTV.DecMapUintptrUint16V(v, false, d) case *map[uintptr]uint16: - if v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, true, d); changed2 { + var v2 map[uintptr]uint16 + v2, changed = fastpathTV.DecMapUintptrUint16V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uint32: fastpathTV.DecMapUintptrUint32V(v, false, d) case *map[uintptr]uint32: - if v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, true, d); changed2 { + var v2 map[uintptr]uint32 + v2, changed = fastpathTV.DecMapUintptrUint32V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uint64: fastpathTV.DecMapUintptrUint64V(v, false, d) case *map[uintptr]uint64: - if v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, true, d); changed2 { + var v2 map[uintptr]uint64 + v2, changed = fastpathTV.DecMapUintptrUint64V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]uintptr: fastpathTV.DecMapUintptrUintptrV(v, false, d) case *map[uintptr]uintptr: - if v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, true, d); changed2 { + var v2 map[uintptr]uintptr + v2, changed = fastpathTV.DecMapUintptrUintptrV(*v, true, d) + if changed { *v = v2 } - case map[uintptr]int: fastpathTV.DecMapUintptrIntV(v, false, d) case *map[uintptr]int: - if v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, true, d); changed2 { + var v2 map[uintptr]int + v2, changed = fastpathTV.DecMapUintptrIntV(*v, true, d) + if changed { *v = v2 } - case map[uintptr]int8: fastpathTV.DecMapUintptrInt8V(v, false, d) case *map[uintptr]int8: - if v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, true, d); changed2 { + var v2 map[uintptr]int8 + v2, changed = fastpathTV.DecMapUintptrInt8V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]int16: fastpathTV.DecMapUintptrInt16V(v, false, d) case *map[uintptr]int16: - if v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, true, d); changed2 { + var v2 map[uintptr]int16 + v2, changed = fastpathTV.DecMapUintptrInt16V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]int32: fastpathTV.DecMapUintptrInt32V(v, false, d) case *map[uintptr]int32: - if v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, true, d); changed2 { + var v2 map[uintptr]int32 + v2, changed = fastpathTV.DecMapUintptrInt32V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]int64: fastpathTV.DecMapUintptrInt64V(v, false, d) case *map[uintptr]int64: - if v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, true, d); changed2 { + var v2 map[uintptr]int64 + v2, changed = fastpathTV.DecMapUintptrInt64V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]float32: fastpathTV.DecMapUintptrFloat32V(v, false, d) case *map[uintptr]float32: - if v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, true, d); changed2 { + var v2 map[uintptr]float32 + v2, changed = fastpathTV.DecMapUintptrFloat32V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]float64: fastpathTV.DecMapUintptrFloat64V(v, false, d) case *map[uintptr]float64: - if v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, true, d); changed2 { + var v2 map[uintptr]float64 + v2, changed = fastpathTV.DecMapUintptrFloat64V(*v, true, d) + if changed { *v = v2 } - case map[uintptr]bool: fastpathTV.DecMapUintptrBoolV(v, false, d) case *map[uintptr]bool: - if v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, true, d); changed2 { + var v2 map[uintptr]bool + v2, changed = fastpathTV.DecMapUintptrBoolV(*v, true, d) + if changed { *v = v2 } - - case []int: - fastpathTV.DecSliceIntV(v, false, d) - case *[]int: - if v2, changed2 := fastpathTV.DecSliceIntV(*v, true, d); changed2 { - *v = v2 - } - case map[int]interface{}: fastpathTV.DecMapIntIntfV(v, false, d) case *map[int]interface{}: - if v2, changed2 := fastpathTV.DecMapIntIntfV(*v, true, d); changed2 { + var v2 map[int]interface{} + v2, changed = fastpathTV.DecMapIntIntfV(*v, true, d) + if changed { *v = v2 } - case map[int]string: fastpathTV.DecMapIntStringV(v, false, d) case *map[int]string: - if v2, changed2 := fastpathTV.DecMapIntStringV(*v, true, d); changed2 { + var v2 map[int]string + v2, changed = fastpathTV.DecMapIntStringV(*v, true, d) + if changed { *v = v2 } - case map[int]uint: fastpathTV.DecMapIntUintV(v, false, d) case *map[int]uint: - if v2, changed2 := fastpathTV.DecMapIntUintV(*v, true, d); changed2 { + var v2 map[int]uint + v2, changed = fastpathTV.DecMapIntUintV(*v, true, d) + if changed { *v = v2 } - case map[int]uint8: fastpathTV.DecMapIntUint8V(v, false, d) case *map[int]uint8: - if v2, changed2 := fastpathTV.DecMapIntUint8V(*v, true, d); changed2 { + var v2 map[int]uint8 + v2, changed = fastpathTV.DecMapIntUint8V(*v, true, d) + if changed { *v = v2 } - case map[int]uint16: fastpathTV.DecMapIntUint16V(v, false, d) case *map[int]uint16: - if v2, changed2 := fastpathTV.DecMapIntUint16V(*v, true, d); changed2 { + var v2 map[int]uint16 + v2, changed = fastpathTV.DecMapIntUint16V(*v, true, d) + if changed { *v = v2 } - case map[int]uint32: fastpathTV.DecMapIntUint32V(v, false, d) case *map[int]uint32: - if v2, changed2 := fastpathTV.DecMapIntUint32V(*v, true, d); changed2 { + var v2 map[int]uint32 + v2, changed = fastpathTV.DecMapIntUint32V(*v, true, d) + if changed { *v = v2 } - case map[int]uint64: fastpathTV.DecMapIntUint64V(v, false, d) case *map[int]uint64: - if v2, changed2 := fastpathTV.DecMapIntUint64V(*v, true, d); changed2 { + var v2 map[int]uint64 + v2, changed = fastpathTV.DecMapIntUint64V(*v, true, d) + if changed { *v = v2 } - case map[int]uintptr: fastpathTV.DecMapIntUintptrV(v, false, d) case *map[int]uintptr: - if v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, true, d); changed2 { + var v2 map[int]uintptr + v2, changed = fastpathTV.DecMapIntUintptrV(*v, true, d) + if changed { *v = v2 } - case map[int]int: fastpathTV.DecMapIntIntV(v, false, d) case *map[int]int: - if v2, changed2 := fastpathTV.DecMapIntIntV(*v, true, d); changed2 { + var v2 map[int]int + v2, changed = fastpathTV.DecMapIntIntV(*v, true, d) + if changed { *v = v2 } - case map[int]int8: fastpathTV.DecMapIntInt8V(v, false, d) case *map[int]int8: - if v2, changed2 := fastpathTV.DecMapIntInt8V(*v, true, d); changed2 { + var v2 map[int]int8 + v2, changed = fastpathTV.DecMapIntInt8V(*v, true, d) + if changed { *v = v2 } - case map[int]int16: fastpathTV.DecMapIntInt16V(v, false, d) case *map[int]int16: - if v2, changed2 := fastpathTV.DecMapIntInt16V(*v, true, d); changed2 { + var v2 map[int]int16 + v2, changed = fastpathTV.DecMapIntInt16V(*v, true, d) + if changed { *v = v2 } - case map[int]int32: fastpathTV.DecMapIntInt32V(v, false, d) case *map[int]int32: - if v2, changed2 := fastpathTV.DecMapIntInt32V(*v, true, d); changed2 { + var v2 map[int]int32 + v2, changed = fastpathTV.DecMapIntInt32V(*v, true, d) + if changed { *v = v2 } - case map[int]int64: fastpathTV.DecMapIntInt64V(v, false, d) case *map[int]int64: - if v2, changed2 := fastpathTV.DecMapIntInt64V(*v, true, d); changed2 { + var v2 map[int]int64 + v2, changed = fastpathTV.DecMapIntInt64V(*v, true, d) + if changed { *v = v2 } - case map[int]float32: fastpathTV.DecMapIntFloat32V(v, false, d) case *map[int]float32: - if v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, true, d); changed2 { + var v2 map[int]float32 + v2, changed = fastpathTV.DecMapIntFloat32V(*v, true, d) + if changed { *v = v2 } - case map[int]float64: fastpathTV.DecMapIntFloat64V(v, false, d) case *map[int]float64: - if v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, true, d); changed2 { + var v2 map[int]float64 + v2, changed = fastpathTV.DecMapIntFloat64V(*v, true, d) + if changed { *v = v2 } - case map[int]bool: fastpathTV.DecMapIntBoolV(v, false, d) case *map[int]bool: - if v2, changed2 := fastpathTV.DecMapIntBoolV(*v, true, d); changed2 { + var v2 map[int]bool + v2, changed = fastpathTV.DecMapIntBoolV(*v, true, d) + if changed { *v = v2 } - - case []int8: - fastpathTV.DecSliceInt8V(v, false, d) - case *[]int8: - if v2, changed2 := fastpathTV.DecSliceInt8V(*v, true, d); changed2 { - *v = v2 - } - case map[int8]interface{}: fastpathTV.DecMapInt8IntfV(v, false, d) case *map[int8]interface{}: - if v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, true, d); changed2 { + var v2 map[int8]interface{} + v2, changed = fastpathTV.DecMapInt8IntfV(*v, true, d) + if changed { *v = v2 } - case map[int8]string: fastpathTV.DecMapInt8StringV(v, false, d) case *map[int8]string: - if v2, changed2 := fastpathTV.DecMapInt8StringV(*v, true, d); changed2 { + var v2 map[int8]string + v2, changed = fastpathTV.DecMapInt8StringV(*v, true, d) + if changed { *v = v2 } - case map[int8]uint: fastpathTV.DecMapInt8UintV(v, false, d) case *map[int8]uint: - if v2, changed2 := fastpathTV.DecMapInt8UintV(*v, true, d); changed2 { + var v2 map[int8]uint + v2, changed = fastpathTV.DecMapInt8UintV(*v, true, d) + if changed { *v = v2 } - case map[int8]uint8: fastpathTV.DecMapInt8Uint8V(v, false, d) case *map[int8]uint8: - if v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, true, d); changed2 { + var v2 map[int8]uint8 + v2, changed = fastpathTV.DecMapInt8Uint8V(*v, true, d) + if changed { *v = v2 } - case map[int8]uint16: fastpathTV.DecMapInt8Uint16V(v, false, d) case *map[int8]uint16: - if v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, true, d); changed2 { + var v2 map[int8]uint16 + v2, changed = fastpathTV.DecMapInt8Uint16V(*v, true, d) + if changed { *v = v2 } - case map[int8]uint32: fastpathTV.DecMapInt8Uint32V(v, false, d) case *map[int8]uint32: - if v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, true, d); changed2 { + var v2 map[int8]uint32 + v2, changed = fastpathTV.DecMapInt8Uint32V(*v, true, d) + if changed { *v = v2 } - case map[int8]uint64: fastpathTV.DecMapInt8Uint64V(v, false, d) case *map[int8]uint64: - if v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, true, d); changed2 { + var v2 map[int8]uint64 + v2, changed = fastpathTV.DecMapInt8Uint64V(*v, true, d) + if changed { *v = v2 } - case map[int8]uintptr: fastpathTV.DecMapInt8UintptrV(v, false, d) case *map[int8]uintptr: - if v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, true, d); changed2 { + var v2 map[int8]uintptr + v2, changed = fastpathTV.DecMapInt8UintptrV(*v, true, d) + if changed { *v = v2 } - case map[int8]int: fastpathTV.DecMapInt8IntV(v, false, d) case *map[int8]int: - if v2, changed2 := fastpathTV.DecMapInt8IntV(*v, true, d); changed2 { + var v2 map[int8]int + v2, changed = fastpathTV.DecMapInt8IntV(*v, true, d) + if changed { *v = v2 } - case map[int8]int8: fastpathTV.DecMapInt8Int8V(v, false, d) case *map[int8]int8: - if v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, true, d); changed2 { + var v2 map[int8]int8 + v2, changed = fastpathTV.DecMapInt8Int8V(*v, true, d) + if changed { *v = v2 } - case map[int8]int16: fastpathTV.DecMapInt8Int16V(v, false, d) case *map[int8]int16: - if v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, true, d); changed2 { + var v2 map[int8]int16 + v2, changed = fastpathTV.DecMapInt8Int16V(*v, true, d) + if changed { *v = v2 } - case map[int8]int32: fastpathTV.DecMapInt8Int32V(v, false, d) case *map[int8]int32: - if v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, true, d); changed2 { + var v2 map[int8]int32 + v2, changed = fastpathTV.DecMapInt8Int32V(*v, true, d) + if changed { *v = v2 } - case map[int8]int64: fastpathTV.DecMapInt8Int64V(v, false, d) case *map[int8]int64: - if v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, true, d); changed2 { + var v2 map[int8]int64 + v2, changed = fastpathTV.DecMapInt8Int64V(*v, true, d) + if changed { *v = v2 } - case map[int8]float32: fastpathTV.DecMapInt8Float32V(v, false, d) case *map[int8]float32: - if v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, true, d); changed2 { + var v2 map[int8]float32 + v2, changed = fastpathTV.DecMapInt8Float32V(*v, true, d) + if changed { *v = v2 } - case map[int8]float64: fastpathTV.DecMapInt8Float64V(v, false, d) case *map[int8]float64: - if v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, true, d); changed2 { + var v2 map[int8]float64 + v2, changed = fastpathTV.DecMapInt8Float64V(*v, true, d) + if changed { *v = v2 } - case map[int8]bool: fastpathTV.DecMapInt8BoolV(v, false, d) case *map[int8]bool: - if v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, true, d); changed2 { + var v2 map[int8]bool + v2, changed = fastpathTV.DecMapInt8BoolV(*v, true, d) + if changed { *v = v2 } - - case []int16: - fastpathTV.DecSliceInt16V(v, false, d) - case *[]int16: - if v2, changed2 := fastpathTV.DecSliceInt16V(*v, true, d); changed2 { - *v = v2 - } - case map[int16]interface{}: fastpathTV.DecMapInt16IntfV(v, false, d) case *map[int16]interface{}: - if v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, true, d); changed2 { + var v2 map[int16]interface{} + v2, changed = fastpathTV.DecMapInt16IntfV(*v, true, d) + if changed { *v = v2 } - case map[int16]string: fastpathTV.DecMapInt16StringV(v, false, d) case *map[int16]string: - if v2, changed2 := fastpathTV.DecMapInt16StringV(*v, true, d); changed2 { + var v2 map[int16]string + v2, changed = fastpathTV.DecMapInt16StringV(*v, true, d) + if changed { *v = v2 } - case map[int16]uint: fastpathTV.DecMapInt16UintV(v, false, d) case *map[int16]uint: - if v2, changed2 := fastpathTV.DecMapInt16UintV(*v, true, d); changed2 { + var v2 map[int16]uint + v2, changed = fastpathTV.DecMapInt16UintV(*v, true, d) + if changed { *v = v2 } - case map[int16]uint8: fastpathTV.DecMapInt16Uint8V(v, false, d) case *map[int16]uint8: - if v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, true, d); changed2 { + var v2 map[int16]uint8 + v2, changed = fastpathTV.DecMapInt16Uint8V(*v, true, d) + if changed { *v = v2 } - case map[int16]uint16: fastpathTV.DecMapInt16Uint16V(v, false, d) case *map[int16]uint16: - if v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, true, d); changed2 { + var v2 map[int16]uint16 + v2, changed = fastpathTV.DecMapInt16Uint16V(*v, true, d) + if changed { *v = v2 } - case map[int16]uint32: fastpathTV.DecMapInt16Uint32V(v, false, d) case *map[int16]uint32: - if v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, true, d); changed2 { + var v2 map[int16]uint32 + v2, changed = fastpathTV.DecMapInt16Uint32V(*v, true, d) + if changed { *v = v2 } - case map[int16]uint64: fastpathTV.DecMapInt16Uint64V(v, false, d) case *map[int16]uint64: - if v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, true, d); changed2 { + var v2 map[int16]uint64 + v2, changed = fastpathTV.DecMapInt16Uint64V(*v, true, d) + if changed { *v = v2 } - case map[int16]uintptr: fastpathTV.DecMapInt16UintptrV(v, false, d) case *map[int16]uintptr: - if v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, true, d); changed2 { + var v2 map[int16]uintptr + v2, changed = fastpathTV.DecMapInt16UintptrV(*v, true, d) + if changed { *v = v2 } - case map[int16]int: fastpathTV.DecMapInt16IntV(v, false, d) case *map[int16]int: - if v2, changed2 := fastpathTV.DecMapInt16IntV(*v, true, d); changed2 { + var v2 map[int16]int + v2, changed = fastpathTV.DecMapInt16IntV(*v, true, d) + if changed { *v = v2 } - case map[int16]int8: fastpathTV.DecMapInt16Int8V(v, false, d) case *map[int16]int8: - if v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, true, d); changed2 { + var v2 map[int16]int8 + v2, changed = fastpathTV.DecMapInt16Int8V(*v, true, d) + if changed { *v = v2 } - case map[int16]int16: fastpathTV.DecMapInt16Int16V(v, false, d) case *map[int16]int16: - if v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, true, d); changed2 { + var v2 map[int16]int16 + v2, changed = fastpathTV.DecMapInt16Int16V(*v, true, d) + if changed { *v = v2 } - case map[int16]int32: fastpathTV.DecMapInt16Int32V(v, false, d) case *map[int16]int32: - if v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, true, d); changed2 { + var v2 map[int16]int32 + v2, changed = fastpathTV.DecMapInt16Int32V(*v, true, d) + if changed { *v = v2 } - case map[int16]int64: fastpathTV.DecMapInt16Int64V(v, false, d) case *map[int16]int64: - if v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, true, d); changed2 { + var v2 map[int16]int64 + v2, changed = fastpathTV.DecMapInt16Int64V(*v, true, d) + if changed { *v = v2 } - case map[int16]float32: fastpathTV.DecMapInt16Float32V(v, false, d) case *map[int16]float32: - if v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, true, d); changed2 { + var v2 map[int16]float32 + v2, changed = fastpathTV.DecMapInt16Float32V(*v, true, d) + if changed { *v = v2 } - case map[int16]float64: fastpathTV.DecMapInt16Float64V(v, false, d) case *map[int16]float64: - if v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, true, d); changed2 { + var v2 map[int16]float64 + v2, changed = fastpathTV.DecMapInt16Float64V(*v, true, d) + if changed { *v = v2 } - case map[int16]bool: fastpathTV.DecMapInt16BoolV(v, false, d) case *map[int16]bool: - if v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, true, d); changed2 { + var v2 map[int16]bool + v2, changed = fastpathTV.DecMapInt16BoolV(*v, true, d) + if changed { *v = v2 } - - case []int32: - fastpathTV.DecSliceInt32V(v, false, d) - case *[]int32: - if v2, changed2 := fastpathTV.DecSliceInt32V(*v, true, d); changed2 { - *v = v2 - } - case map[int32]interface{}: fastpathTV.DecMapInt32IntfV(v, false, d) case *map[int32]interface{}: - if v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, true, d); changed2 { + var v2 map[int32]interface{} + v2, changed = fastpathTV.DecMapInt32IntfV(*v, true, d) + if changed { *v = v2 } - case map[int32]string: fastpathTV.DecMapInt32StringV(v, false, d) case *map[int32]string: - if v2, changed2 := fastpathTV.DecMapInt32StringV(*v, true, d); changed2 { + var v2 map[int32]string + v2, changed = fastpathTV.DecMapInt32StringV(*v, true, d) + if changed { *v = v2 } - case map[int32]uint: fastpathTV.DecMapInt32UintV(v, false, d) case *map[int32]uint: - if v2, changed2 := fastpathTV.DecMapInt32UintV(*v, true, d); changed2 { + var v2 map[int32]uint + v2, changed = fastpathTV.DecMapInt32UintV(*v, true, d) + if changed { *v = v2 } - case map[int32]uint8: fastpathTV.DecMapInt32Uint8V(v, false, d) case *map[int32]uint8: - if v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, true, d); changed2 { + var v2 map[int32]uint8 + v2, changed = fastpathTV.DecMapInt32Uint8V(*v, true, d) + if changed { *v = v2 } - case map[int32]uint16: fastpathTV.DecMapInt32Uint16V(v, false, d) case *map[int32]uint16: - if v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, true, d); changed2 { + var v2 map[int32]uint16 + v2, changed = fastpathTV.DecMapInt32Uint16V(*v, true, d) + if changed { *v = v2 } - case map[int32]uint32: fastpathTV.DecMapInt32Uint32V(v, false, d) case *map[int32]uint32: - if v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, true, d); changed2 { + var v2 map[int32]uint32 + v2, changed = fastpathTV.DecMapInt32Uint32V(*v, true, d) + if changed { *v = v2 } - case map[int32]uint64: fastpathTV.DecMapInt32Uint64V(v, false, d) case *map[int32]uint64: - if v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, true, d); changed2 { + var v2 map[int32]uint64 + v2, changed = fastpathTV.DecMapInt32Uint64V(*v, true, d) + if changed { *v = v2 } - case map[int32]uintptr: fastpathTV.DecMapInt32UintptrV(v, false, d) case *map[int32]uintptr: - if v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, true, d); changed2 { + var v2 map[int32]uintptr + v2, changed = fastpathTV.DecMapInt32UintptrV(*v, true, d) + if changed { *v = v2 } - case map[int32]int: fastpathTV.DecMapInt32IntV(v, false, d) case *map[int32]int: - if v2, changed2 := fastpathTV.DecMapInt32IntV(*v, true, d); changed2 { + var v2 map[int32]int + v2, changed = fastpathTV.DecMapInt32IntV(*v, true, d) + if changed { *v = v2 } - case map[int32]int8: fastpathTV.DecMapInt32Int8V(v, false, d) case *map[int32]int8: - if v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, true, d); changed2 { + var v2 map[int32]int8 + v2, changed = fastpathTV.DecMapInt32Int8V(*v, true, d) + if changed { *v = v2 } - case map[int32]int16: fastpathTV.DecMapInt32Int16V(v, false, d) case *map[int32]int16: - if v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, true, d); changed2 { + var v2 map[int32]int16 + v2, changed = fastpathTV.DecMapInt32Int16V(*v, true, d) + if changed { *v = v2 } - case map[int32]int32: fastpathTV.DecMapInt32Int32V(v, false, d) case *map[int32]int32: - if v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, true, d); changed2 { + var v2 map[int32]int32 + v2, changed = fastpathTV.DecMapInt32Int32V(*v, true, d) + if changed { *v = v2 } - case map[int32]int64: fastpathTV.DecMapInt32Int64V(v, false, d) case *map[int32]int64: - if v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, true, d); changed2 { + var v2 map[int32]int64 + v2, changed = fastpathTV.DecMapInt32Int64V(*v, true, d) + if changed { *v = v2 } - case map[int32]float32: fastpathTV.DecMapInt32Float32V(v, false, d) case *map[int32]float32: - if v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, true, d); changed2 { + var v2 map[int32]float32 + v2, changed = fastpathTV.DecMapInt32Float32V(*v, true, d) + if changed { *v = v2 } - case map[int32]float64: fastpathTV.DecMapInt32Float64V(v, false, d) case *map[int32]float64: - if v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, true, d); changed2 { + var v2 map[int32]float64 + v2, changed = fastpathTV.DecMapInt32Float64V(*v, true, d) + if changed { *v = v2 } - case map[int32]bool: fastpathTV.DecMapInt32BoolV(v, false, d) case *map[int32]bool: - if v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, true, d); changed2 { + var v2 map[int32]bool + v2, changed = fastpathTV.DecMapInt32BoolV(*v, true, d) + if changed { *v = v2 } - - case []int64: - fastpathTV.DecSliceInt64V(v, false, d) - case *[]int64: - if v2, changed2 := fastpathTV.DecSliceInt64V(*v, true, d); changed2 { - *v = v2 - } - case map[int64]interface{}: fastpathTV.DecMapInt64IntfV(v, false, d) case *map[int64]interface{}: - if v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, true, d); changed2 { + var v2 map[int64]interface{} + v2, changed = fastpathTV.DecMapInt64IntfV(*v, true, d) + if changed { *v = v2 } - case map[int64]string: fastpathTV.DecMapInt64StringV(v, false, d) case *map[int64]string: - if v2, changed2 := fastpathTV.DecMapInt64StringV(*v, true, d); changed2 { + var v2 map[int64]string + v2, changed = fastpathTV.DecMapInt64StringV(*v, true, d) + if changed { *v = v2 } - case map[int64]uint: fastpathTV.DecMapInt64UintV(v, false, d) case *map[int64]uint: - if v2, changed2 := fastpathTV.DecMapInt64UintV(*v, true, d); changed2 { + var v2 map[int64]uint + v2, changed = fastpathTV.DecMapInt64UintV(*v, true, d) + if changed { *v = v2 } - case map[int64]uint8: fastpathTV.DecMapInt64Uint8V(v, false, d) case *map[int64]uint8: - if v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, true, d); changed2 { + var v2 map[int64]uint8 + v2, changed = fastpathTV.DecMapInt64Uint8V(*v, true, d) + if changed { *v = v2 } - case map[int64]uint16: fastpathTV.DecMapInt64Uint16V(v, false, d) case *map[int64]uint16: - if v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, true, d); changed2 { + var v2 map[int64]uint16 + v2, changed = fastpathTV.DecMapInt64Uint16V(*v, true, d) + if changed { *v = v2 } - case map[int64]uint32: fastpathTV.DecMapInt64Uint32V(v, false, d) case *map[int64]uint32: - if v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, true, d); changed2 { + var v2 map[int64]uint32 + v2, changed = fastpathTV.DecMapInt64Uint32V(*v, true, d) + if changed { *v = v2 } - case map[int64]uint64: fastpathTV.DecMapInt64Uint64V(v, false, d) case *map[int64]uint64: - if v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, true, d); changed2 { + var v2 map[int64]uint64 + v2, changed = fastpathTV.DecMapInt64Uint64V(*v, true, d) + if changed { *v = v2 } - case map[int64]uintptr: fastpathTV.DecMapInt64UintptrV(v, false, d) case *map[int64]uintptr: - if v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, true, d); changed2 { + var v2 map[int64]uintptr + v2, changed = fastpathTV.DecMapInt64UintptrV(*v, true, d) + if changed { *v = v2 } - case map[int64]int: fastpathTV.DecMapInt64IntV(v, false, d) case *map[int64]int: - if v2, changed2 := fastpathTV.DecMapInt64IntV(*v, true, d); changed2 { + var v2 map[int64]int + v2, changed = fastpathTV.DecMapInt64IntV(*v, true, d) + if changed { *v = v2 } - case map[int64]int8: fastpathTV.DecMapInt64Int8V(v, false, d) case *map[int64]int8: - if v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, true, d); changed2 { + var v2 map[int64]int8 + v2, changed = fastpathTV.DecMapInt64Int8V(*v, true, d) + if changed { *v = v2 } - case map[int64]int16: fastpathTV.DecMapInt64Int16V(v, false, d) case *map[int64]int16: - if v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, true, d); changed2 { + var v2 map[int64]int16 + v2, changed = fastpathTV.DecMapInt64Int16V(*v, true, d) + if changed { *v = v2 } - case map[int64]int32: fastpathTV.DecMapInt64Int32V(v, false, d) case *map[int64]int32: - if v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, true, d); changed2 { + var v2 map[int64]int32 + v2, changed = fastpathTV.DecMapInt64Int32V(*v, true, d) + if changed { *v = v2 } - case map[int64]int64: fastpathTV.DecMapInt64Int64V(v, false, d) case *map[int64]int64: - if v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, true, d); changed2 { + var v2 map[int64]int64 + v2, changed = fastpathTV.DecMapInt64Int64V(*v, true, d) + if changed { *v = v2 } - case map[int64]float32: fastpathTV.DecMapInt64Float32V(v, false, d) case *map[int64]float32: - if v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, true, d); changed2 { + var v2 map[int64]float32 + v2, changed = fastpathTV.DecMapInt64Float32V(*v, true, d) + if changed { *v = v2 } - case map[int64]float64: fastpathTV.DecMapInt64Float64V(v, false, d) case *map[int64]float64: - if v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, true, d); changed2 { + var v2 map[int64]float64 + v2, changed = fastpathTV.DecMapInt64Float64V(*v, true, d) + if changed { *v = v2 } - case map[int64]bool: fastpathTV.DecMapInt64BoolV(v, false, d) case *map[int64]bool: - if v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, true, d); changed2 { + var v2 map[int64]bool + v2, changed = fastpathTV.DecMapInt64BoolV(*v, true, d) + if changed { *v = v2 } - - case []bool: - fastpathTV.DecSliceBoolV(v, false, d) - case *[]bool: - if v2, changed2 := fastpathTV.DecSliceBoolV(*v, true, d); changed2 { - *v = v2 - } - case map[bool]interface{}: fastpathTV.DecMapBoolIntfV(v, false, d) case *map[bool]interface{}: - if v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, true, d); changed2 { + var v2 map[bool]interface{} + v2, changed = fastpathTV.DecMapBoolIntfV(*v, true, d) + if changed { *v = v2 } - case map[bool]string: fastpathTV.DecMapBoolStringV(v, false, d) case *map[bool]string: - if v2, changed2 := fastpathTV.DecMapBoolStringV(*v, true, d); changed2 { + var v2 map[bool]string + v2, changed = fastpathTV.DecMapBoolStringV(*v, true, d) + if changed { *v = v2 } - case map[bool]uint: fastpathTV.DecMapBoolUintV(v, false, d) case *map[bool]uint: - if v2, changed2 := fastpathTV.DecMapBoolUintV(*v, true, d); changed2 { + var v2 map[bool]uint + v2, changed = fastpathTV.DecMapBoolUintV(*v, true, d) + if changed { *v = v2 } - case map[bool]uint8: fastpathTV.DecMapBoolUint8V(v, false, d) case *map[bool]uint8: - if v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, true, d); changed2 { + var v2 map[bool]uint8 + v2, changed = fastpathTV.DecMapBoolUint8V(*v, true, d) + if changed { *v = v2 } - case map[bool]uint16: fastpathTV.DecMapBoolUint16V(v, false, d) case *map[bool]uint16: - if v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, true, d); changed2 { + var v2 map[bool]uint16 + v2, changed = fastpathTV.DecMapBoolUint16V(*v, true, d) + if changed { *v = v2 } - case map[bool]uint32: fastpathTV.DecMapBoolUint32V(v, false, d) case *map[bool]uint32: - if v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, true, d); changed2 { + var v2 map[bool]uint32 + v2, changed = fastpathTV.DecMapBoolUint32V(*v, true, d) + if changed { *v = v2 } - case map[bool]uint64: fastpathTV.DecMapBoolUint64V(v, false, d) case *map[bool]uint64: - if v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, true, d); changed2 { + var v2 map[bool]uint64 + v2, changed = fastpathTV.DecMapBoolUint64V(*v, true, d) + if changed { *v = v2 } - case map[bool]uintptr: fastpathTV.DecMapBoolUintptrV(v, false, d) case *map[bool]uintptr: - if v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, true, d); changed2 { + var v2 map[bool]uintptr + v2, changed = fastpathTV.DecMapBoolUintptrV(*v, true, d) + if changed { *v = v2 } - case map[bool]int: fastpathTV.DecMapBoolIntV(v, false, d) case *map[bool]int: - if v2, changed2 := fastpathTV.DecMapBoolIntV(*v, true, d); changed2 { + var v2 map[bool]int + v2, changed = fastpathTV.DecMapBoolIntV(*v, true, d) + if changed { *v = v2 } - case map[bool]int8: fastpathTV.DecMapBoolInt8V(v, false, d) case *map[bool]int8: - if v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, true, d); changed2 { + var v2 map[bool]int8 + v2, changed = fastpathTV.DecMapBoolInt8V(*v, true, d) + if changed { *v = v2 } - case map[bool]int16: fastpathTV.DecMapBoolInt16V(v, false, d) case *map[bool]int16: - if v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, true, d); changed2 { + var v2 map[bool]int16 + v2, changed = fastpathTV.DecMapBoolInt16V(*v, true, d) + if changed { *v = v2 } - case map[bool]int32: fastpathTV.DecMapBoolInt32V(v, false, d) case *map[bool]int32: - if v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, true, d); changed2 { + var v2 map[bool]int32 + v2, changed = fastpathTV.DecMapBoolInt32V(*v, true, d) + if changed { *v = v2 } - case map[bool]int64: fastpathTV.DecMapBoolInt64V(v, false, d) case *map[bool]int64: - if v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, true, d); changed2 { + var v2 map[bool]int64 + v2, changed = fastpathTV.DecMapBoolInt64V(*v, true, d) + if changed { *v = v2 } - case map[bool]float32: fastpathTV.DecMapBoolFloat32V(v, false, d) case *map[bool]float32: - if v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, true, d); changed2 { + var v2 map[bool]float32 + v2, changed = fastpathTV.DecMapBoolFloat32V(*v, true, d) + if changed { *v = v2 } - case map[bool]float64: fastpathTV.DecMapBoolFloat64V(v, false, d) case *map[bool]float64: - if v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, true, d); changed2 { + var v2 map[bool]float64 + v2, changed = fastpathTV.DecMapBoolFloat64V(*v, true, d) + if changed { *v = v2 } - case map[bool]bool: fastpathTV.DecMapBoolBoolV(v, false, d) case *map[bool]bool: - if v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, true, d); changed2 { + var v2 map[bool]bool + v2, changed = fastpathTV.DecMapBoolBoolV(*v, true, d) + if changed { *v = v2 } - default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true } -func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { +func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { switch v := iv.(type) { case *[]interface{}: *v = nil - - case *map[interface{}]interface{}: - *v = nil - - case *map[interface{}]string: - *v = nil - - case *map[interface{}]uint: - *v = nil - - case *map[interface{}]uint8: - *v = nil - - case *map[interface{}]uint16: - *v = nil - - case *map[interface{}]uint32: - *v = nil - - case *map[interface{}]uint64: - *v = nil - - case *map[interface{}]uintptr: - *v = nil - - case *map[interface{}]int: - *v = nil - - case *map[interface{}]int8: - *v = nil - - case *map[interface{}]int16: - *v = nil - - case *map[interface{}]int32: - *v = nil - - case *map[interface{}]int64: - *v = nil - - case *map[interface{}]float32: - *v = nil - - case *map[interface{}]float64: - *v = nil - - case *map[interface{}]bool: - *v = nil - case *[]string: *v = nil - - case *map[string]interface{}: - *v = nil - - case *map[string]string: - *v = nil - - case *map[string]uint: - *v = nil - - case *map[string]uint8: - *v = nil - - case *map[string]uint16: - *v = nil - - case *map[string]uint32: - *v = nil - - case *map[string]uint64: - *v = nil - - case *map[string]uintptr: - *v = nil - - case *map[string]int: - *v = nil - - case *map[string]int8: - *v = nil - - case *map[string]int16: - *v = nil - - case *map[string]int32: - *v = nil - - case *map[string]int64: - *v = nil - - case *map[string]float32: - *v = nil - - case *map[string]float64: - *v = nil - - case *map[string]bool: - *v = nil - case *[]float32: *v = nil - - case *map[float32]interface{}: - *v = nil - - case *map[float32]string: - *v = nil - - case *map[float32]uint: - *v = nil - - case *map[float32]uint8: - *v = nil - - case *map[float32]uint16: - *v = nil - - case *map[float32]uint32: - *v = nil - - case *map[float32]uint64: - *v = nil - - case *map[float32]uintptr: - *v = nil - - case *map[float32]int: - *v = nil - - case *map[float32]int8: - *v = nil - - case *map[float32]int16: - *v = nil - - case *map[float32]int32: - *v = nil - - case *map[float32]int64: - *v = nil - - case *map[float32]float32: - *v = nil - - case *map[float32]float64: - *v = nil - - case *map[float32]bool: - *v = nil - case *[]float64: *v = nil - - case *map[float64]interface{}: - *v = nil - - case *map[float64]string: - *v = nil - - case *map[float64]uint: - *v = nil - - case *map[float64]uint8: - *v = nil - - case *map[float64]uint16: - *v = nil - - case *map[float64]uint32: - *v = nil - - case *map[float64]uint64: - *v = nil - - case *map[float64]uintptr: - *v = nil - - case *map[float64]int: - *v = nil - - case *map[float64]int8: - *v = nil - - case *map[float64]int16: - *v = nil - - case *map[float64]int32: - *v = nil - - case *map[float64]int64: - *v = nil - - case *map[float64]float32: - *v = nil - - case *map[float64]float64: - *v = nil - - case *map[float64]bool: - *v = nil - case *[]uint: *v = nil - - case *map[uint]interface{}: + case *[]uint8: *v = nil - - case *map[uint]string: - *v = nil - - case *map[uint]uint: - *v = nil - - case *map[uint]uint8: - *v = nil - - case *map[uint]uint16: - *v = nil - - case *map[uint]uint32: - *v = nil - - case *map[uint]uint64: - *v = nil - - case *map[uint]uintptr: - *v = nil - - case *map[uint]int: - *v = nil - - case *map[uint]int8: - *v = nil - - case *map[uint]int16: - *v = nil - - case *map[uint]int32: - *v = nil - - case *map[uint]int64: - *v = nil - - case *map[uint]float32: - *v = nil - - case *map[uint]float64: - *v = nil - - case *map[uint]bool: - *v = nil - - case *map[uint8]interface{}: - *v = nil - - case *map[uint8]string: - *v = nil - - case *map[uint8]uint: - *v = nil - - case *map[uint8]uint8: - *v = nil - - case *map[uint8]uint16: - *v = nil - - case *map[uint8]uint32: - *v = nil - - case *map[uint8]uint64: - *v = nil - - case *map[uint8]uintptr: - *v = nil - - case *map[uint8]int: - *v = nil - - case *map[uint8]int8: - *v = nil - - case *map[uint8]int16: - *v = nil - - case *map[uint8]int32: - *v = nil - - case *map[uint8]int64: - *v = nil - - case *map[uint8]float32: - *v = nil - - case *map[uint8]float64: - *v = nil - - case *map[uint8]bool: - *v = nil - case *[]uint16: *v = nil - - case *map[uint16]interface{}: - *v = nil - - case *map[uint16]string: - *v = nil - - case *map[uint16]uint: - *v = nil - - case *map[uint16]uint8: - *v = nil - - case *map[uint16]uint16: - *v = nil - - case *map[uint16]uint32: - *v = nil - - case *map[uint16]uint64: - *v = nil - - case *map[uint16]uintptr: - *v = nil - - case *map[uint16]int: - *v = nil - - case *map[uint16]int8: - *v = nil - - case *map[uint16]int16: - *v = nil - - case *map[uint16]int32: - *v = nil - - case *map[uint16]int64: - *v = nil - - case *map[uint16]float32: - *v = nil - - case *map[uint16]float64: - *v = nil - - case *map[uint16]bool: - *v = nil - case *[]uint32: *v = nil - - case *map[uint32]interface{}: - *v = nil - - case *map[uint32]string: - *v = nil - - case *map[uint32]uint: - *v = nil - - case *map[uint32]uint8: - *v = nil - - case *map[uint32]uint16: - *v = nil - - case *map[uint32]uint32: - *v = nil - - case *map[uint32]uint64: - *v = nil - - case *map[uint32]uintptr: - *v = nil - - case *map[uint32]int: - *v = nil - - case *map[uint32]int8: - *v = nil - - case *map[uint32]int16: - *v = nil - - case *map[uint32]int32: - *v = nil - - case *map[uint32]int64: - *v = nil - - case *map[uint32]float32: - *v = nil - - case *map[uint32]float64: - *v = nil - - case *map[uint32]bool: - *v = nil - case *[]uint64: *v = nil - - case *map[uint64]interface{}: - *v = nil - - case *map[uint64]string: - *v = nil - - case *map[uint64]uint: - *v = nil - - case *map[uint64]uint8: - *v = nil - - case *map[uint64]uint16: - *v = nil - - case *map[uint64]uint32: - *v = nil - - case *map[uint64]uint64: - *v = nil - - case *map[uint64]uintptr: - *v = nil - - case *map[uint64]int: - *v = nil - - case *map[uint64]int8: - *v = nil - - case *map[uint64]int16: - *v = nil - - case *map[uint64]int32: - *v = nil - - case *map[uint64]int64: - *v = nil - - case *map[uint64]float32: - *v = nil - - case *map[uint64]float64: - *v = nil - - case *map[uint64]bool: - *v = nil - case *[]uintptr: *v = nil - - case *map[uintptr]interface{}: - *v = nil - - case *map[uintptr]string: - *v = nil - - case *map[uintptr]uint: - *v = nil - - case *map[uintptr]uint8: - *v = nil - - case *map[uintptr]uint16: - *v = nil - - case *map[uintptr]uint32: - *v = nil - - case *map[uintptr]uint64: - *v = nil - - case *map[uintptr]uintptr: - *v = nil - - case *map[uintptr]int: - *v = nil - - case *map[uintptr]int8: - *v = nil - - case *map[uintptr]int16: - *v = nil - - case *map[uintptr]int32: - *v = nil - - case *map[uintptr]int64: - *v = nil - - case *map[uintptr]float32: - *v = nil - - case *map[uintptr]float64: - *v = nil - - case *map[uintptr]bool: - *v = nil - case *[]int: *v = nil - - case *map[int]interface{}: - *v = nil - - case *map[int]string: - *v = nil - - case *map[int]uint: - *v = nil - - case *map[int]uint8: - *v = nil - - case *map[int]uint16: - *v = nil - - case *map[int]uint32: - *v = nil - - case *map[int]uint64: - *v = nil - - case *map[int]uintptr: - *v = nil - - case *map[int]int: - *v = nil - - case *map[int]int8: - *v = nil - - case *map[int]int16: - *v = nil - - case *map[int]int32: - *v = nil - - case *map[int]int64: - *v = nil - - case *map[int]float32: - *v = nil - - case *map[int]float64: - *v = nil - - case *map[int]bool: - *v = nil - case *[]int8: *v = nil - - case *map[int8]interface{}: - *v = nil - - case *map[int8]string: - *v = nil - - case *map[int8]uint: - *v = nil - - case *map[int8]uint8: - *v = nil - - case *map[int8]uint16: - *v = nil - - case *map[int8]uint32: - *v = nil - - case *map[int8]uint64: - *v = nil - - case *map[int8]uintptr: - *v = nil - - case *map[int8]int: - *v = nil - - case *map[int8]int8: - *v = nil - - case *map[int8]int16: - *v = nil - - case *map[int8]int32: - *v = nil - - case *map[int8]int64: - *v = nil - - case *map[int8]float32: - *v = nil - - case *map[int8]float64: - *v = nil - - case *map[int8]bool: - *v = nil - case *[]int16: *v = nil - - case *map[int16]interface{}: - *v = nil - - case *map[int16]string: - *v = nil - - case *map[int16]uint: - *v = nil - - case *map[int16]uint8: - *v = nil - - case *map[int16]uint16: - *v = nil - - case *map[int16]uint32: - *v = nil - - case *map[int16]uint64: - *v = nil - - case *map[int16]uintptr: - *v = nil - - case *map[int16]int: - *v = nil - - case *map[int16]int8: - *v = nil - - case *map[int16]int16: - *v = nil - - case *map[int16]int32: - *v = nil - - case *map[int16]int64: - *v = nil - - case *map[int16]float32: - *v = nil - - case *map[int16]float64: - *v = nil - - case *map[int16]bool: - *v = nil - case *[]int32: *v = nil - - case *map[int32]interface{}: - *v = nil - - case *map[int32]string: - *v = nil - - case *map[int32]uint: - *v = nil - - case *map[int32]uint8: - *v = nil - - case *map[int32]uint16: - *v = nil - - case *map[int32]uint32: - *v = nil - - case *map[int32]uint64: - *v = nil - - case *map[int32]uintptr: - *v = nil - - case *map[int32]int: - *v = nil - - case *map[int32]int8: - *v = nil - - case *map[int32]int16: - *v = nil - - case *map[int32]int32: - *v = nil - - case *map[int32]int64: - *v = nil - - case *map[int32]float32: - *v = nil - - case *map[int32]float64: - *v = nil - - case *map[int32]bool: - *v = nil - case *[]int64: *v = nil - - case *map[int64]interface{}: - *v = nil - - case *map[int64]string: - *v = nil - - case *map[int64]uint: - *v = nil - - case *map[int64]uint8: - *v = nil - - case *map[int64]uint16: - *v = nil - - case *map[int64]uint32: - *v = nil - - case *map[int64]uint64: - *v = nil - - case *map[int64]uintptr: - *v = nil - - case *map[int64]int: - *v = nil - - case *map[int64]int8: - *v = nil - - case *map[int64]int16: - *v = nil - - case *map[int64]int32: - *v = nil - - case *map[int64]int64: - *v = nil - - case *map[int64]float32: - *v = nil - - case *map[int64]float64: - *v = nil - - case *map[int64]bool: - *v = nil - case *[]bool: *v = nil + case *map[interface{}]interface{}: + *v = nil + case *map[interface{}]string: + *v = nil + case *map[interface{}]uint: + *v = nil + case *map[interface{}]uint8: + *v = nil + case *map[interface{}]uint16: + *v = nil + case *map[interface{}]uint32: + *v = nil + case *map[interface{}]uint64: + *v = nil + case *map[interface{}]uintptr: + *v = nil + case *map[interface{}]int: + *v = nil + case *map[interface{}]int8: + *v = nil + case *map[interface{}]int16: + *v = nil + case *map[interface{}]int32: + *v = nil + case *map[interface{}]int64: + *v = nil + case *map[interface{}]float32: + *v = nil + case *map[interface{}]float64: + *v = nil + case *map[interface{}]bool: + *v = nil + case *map[string]interface{}: + *v = nil + case *map[string]string: + *v = nil + case *map[string]uint: + *v = nil + case *map[string]uint8: + *v = nil + case *map[string]uint16: + *v = nil + case *map[string]uint32: + *v = nil + case *map[string]uint64: + *v = nil + case *map[string]uintptr: + *v = nil + case *map[string]int: + *v = nil + case *map[string]int8: + *v = nil + case *map[string]int16: + *v = nil + case *map[string]int32: + *v = nil + case *map[string]int64: + *v = nil + case *map[string]float32: + *v = nil + case *map[string]float64: + *v = nil + case *map[string]bool: + *v = nil + case *map[float32]interface{}: + *v = nil + case *map[float32]string: + *v = nil + case *map[float32]uint: + *v = nil + case *map[float32]uint8: + *v = nil + case *map[float32]uint16: + *v = nil + case *map[float32]uint32: + *v = nil + case *map[float32]uint64: + *v = nil + case *map[float32]uintptr: + *v = nil + case *map[float32]int: + *v = nil + case *map[float32]int8: + *v = nil + case *map[float32]int16: + *v = nil + case *map[float32]int32: + *v = nil + case *map[float32]int64: + *v = nil + case *map[float32]float32: + *v = nil + case *map[float32]float64: + *v = nil + case *map[float32]bool: + *v = nil + case *map[float64]interface{}: + *v = nil + case *map[float64]string: + *v = nil + case *map[float64]uint: + *v = nil + case *map[float64]uint8: + *v = nil + case *map[float64]uint16: + *v = nil + case *map[float64]uint32: + *v = nil + case *map[float64]uint64: + *v = nil + case *map[float64]uintptr: + *v = nil + case *map[float64]int: + *v = nil + case *map[float64]int8: + *v = nil + case *map[float64]int16: + *v = nil + case *map[float64]int32: + *v = nil + case *map[float64]int64: + *v = nil + case *map[float64]float32: + *v = nil + case *map[float64]float64: + *v = nil + case *map[float64]bool: + *v = nil + case *map[uint]interface{}: + *v = nil + case *map[uint]string: + *v = nil + case *map[uint]uint: + *v = nil + case *map[uint]uint8: + *v = nil + case *map[uint]uint16: + *v = nil + case *map[uint]uint32: + *v = nil + case *map[uint]uint64: + *v = nil + case *map[uint]uintptr: + *v = nil + case *map[uint]int: + *v = nil + case *map[uint]int8: + *v = nil + case *map[uint]int16: + *v = nil + case *map[uint]int32: + *v = nil + case *map[uint]int64: + *v = nil + case *map[uint]float32: + *v = nil + case *map[uint]float64: + *v = nil + case *map[uint]bool: + *v = nil + case *map[uint8]interface{}: + *v = nil + case *map[uint8]string: + *v = nil + case *map[uint8]uint: + *v = nil + case *map[uint8]uint8: + *v = nil + case *map[uint8]uint16: + *v = nil + case *map[uint8]uint32: + *v = nil + case *map[uint8]uint64: + *v = nil + case *map[uint8]uintptr: + *v = nil + case *map[uint8]int: + *v = nil + case *map[uint8]int8: + *v = nil + case *map[uint8]int16: + *v = nil + case *map[uint8]int32: + *v = nil + case *map[uint8]int64: + *v = nil + case *map[uint8]float32: + *v = nil + case *map[uint8]float64: + *v = nil + case *map[uint8]bool: + *v = nil + case *map[uint16]interface{}: + *v = nil + case *map[uint16]string: + *v = nil + case *map[uint16]uint: + *v = nil + case *map[uint16]uint8: + *v = nil + case *map[uint16]uint16: + *v = nil + case *map[uint16]uint32: + *v = nil + case *map[uint16]uint64: + *v = nil + case *map[uint16]uintptr: + *v = nil + case *map[uint16]int: + *v = nil + case *map[uint16]int8: + *v = nil + case *map[uint16]int16: + *v = nil + case *map[uint16]int32: + *v = nil + case *map[uint16]int64: + *v = nil + case *map[uint16]float32: + *v = nil + case *map[uint16]float64: + *v = nil + case *map[uint16]bool: + *v = nil + case *map[uint32]interface{}: + *v = nil + case *map[uint32]string: + *v = nil + case *map[uint32]uint: + *v = nil + case *map[uint32]uint8: + *v = nil + case *map[uint32]uint16: + *v = nil + case *map[uint32]uint32: + *v = nil + case *map[uint32]uint64: + *v = nil + case *map[uint32]uintptr: + *v = nil + case *map[uint32]int: + *v = nil + case *map[uint32]int8: + *v = nil + case *map[uint32]int16: + *v = nil + case *map[uint32]int32: + *v = nil + case *map[uint32]int64: + *v = nil + case *map[uint32]float32: + *v = nil + case *map[uint32]float64: + *v = nil + case *map[uint32]bool: + *v = nil + case *map[uint64]interface{}: + *v = nil + case *map[uint64]string: + *v = nil + case *map[uint64]uint: + *v = nil + case *map[uint64]uint8: + *v = nil + case *map[uint64]uint16: + *v = nil + case *map[uint64]uint32: + *v = nil + case *map[uint64]uint64: + *v = nil + case *map[uint64]uintptr: + *v = nil + case *map[uint64]int: + *v = nil + case *map[uint64]int8: + *v = nil + case *map[uint64]int16: + *v = nil + case *map[uint64]int32: + *v = nil + case *map[uint64]int64: + *v = nil + case *map[uint64]float32: + *v = nil + case *map[uint64]float64: + *v = nil + case *map[uint64]bool: + *v = nil + case *map[uintptr]interface{}: + *v = nil + case *map[uintptr]string: + *v = nil + case *map[uintptr]uint: + *v = nil + case *map[uintptr]uint8: + *v = nil + case *map[uintptr]uint16: + *v = nil + case *map[uintptr]uint32: + *v = nil + case *map[uintptr]uint64: + *v = nil + case *map[uintptr]uintptr: + *v = nil + case *map[uintptr]int: + *v = nil + case *map[uintptr]int8: + *v = nil + case *map[uintptr]int16: + *v = nil + case *map[uintptr]int32: + *v = nil + case *map[uintptr]int64: + *v = nil + case *map[uintptr]float32: + *v = nil + case *map[uintptr]float64: + *v = nil + case *map[uintptr]bool: + *v = nil + case *map[int]interface{}: + *v = nil + case *map[int]string: + *v = nil + case *map[int]uint: + *v = nil + case *map[int]uint8: + *v = nil + case *map[int]uint16: + *v = nil + case *map[int]uint32: + *v = nil + case *map[int]uint64: + *v = nil + case *map[int]uintptr: + *v = nil + case *map[int]int: + *v = nil + case *map[int]int8: + *v = nil + case *map[int]int16: + *v = nil + case *map[int]int32: + *v = nil + case *map[int]int64: + *v = nil + case *map[int]float32: + *v = nil + case *map[int]float64: + *v = nil + case *map[int]bool: + *v = nil + case *map[int8]interface{}: + *v = nil + case *map[int8]string: + *v = nil + case *map[int8]uint: + *v = nil + case *map[int8]uint8: + *v = nil + case *map[int8]uint16: + *v = nil + case *map[int8]uint32: + *v = nil + case *map[int8]uint64: + *v = nil + case *map[int8]uintptr: + *v = nil + case *map[int8]int: + *v = nil + case *map[int8]int8: + *v = nil + case *map[int8]int16: + *v = nil + case *map[int8]int32: + *v = nil + case *map[int8]int64: + *v = nil + case *map[int8]float32: + *v = nil + case *map[int8]float64: + *v = nil + case *map[int8]bool: + *v = nil + case *map[int16]interface{}: + *v = nil + case *map[int16]string: + *v = nil + case *map[int16]uint: + *v = nil + case *map[int16]uint8: + *v = nil + case *map[int16]uint16: + *v = nil + case *map[int16]uint32: + *v = nil + case *map[int16]uint64: + *v = nil + case *map[int16]uintptr: + *v = nil + case *map[int16]int: + *v = nil + case *map[int16]int8: + *v = nil + case *map[int16]int16: + *v = nil + case *map[int16]int32: + *v = nil + case *map[int16]int64: + *v = nil + case *map[int16]float32: + *v = nil + case *map[int16]float64: + *v = nil + case *map[int16]bool: + *v = nil + case *map[int32]interface{}: + *v = nil + case *map[int32]string: + *v = nil + case *map[int32]uint: + *v = nil + case *map[int32]uint8: + *v = nil + case *map[int32]uint16: + *v = nil + case *map[int32]uint32: + *v = nil + case *map[int32]uint64: + *v = nil + case *map[int32]uintptr: + *v = nil + case *map[int32]int: + *v = nil + case *map[int32]int8: + *v = nil + case *map[int32]int16: + *v = nil + case *map[int32]int32: + *v = nil + case *map[int32]int64: + *v = nil + case *map[int32]float32: + *v = nil + case *map[int32]float64: + *v = nil + case *map[int32]bool: + *v = nil + case *map[int64]interface{}: + *v = nil + case *map[int64]string: + *v = nil + case *map[int64]uint: + *v = nil + case *map[int64]uint8: + *v = nil + case *map[int64]uint16: + *v = nil + case *map[int64]uint32: + *v = nil + case *map[int64]uint64: + *v = nil + case *map[int64]uintptr: + *v = nil + case *map[int64]int: + *v = nil + case *map[int64]int8: + *v = nil + case *map[int64]int16: + *v = nil + case *map[int64]int32: + *v = nil + case *map[int64]int64: + *v = nil + case *map[int64]float32: + *v = nil + case *map[int64]float64: + *v = nil + case *map[int64]bool: + *v = nil case *map[bool]interface{}: *v = nil - case *map[bool]string: *v = nil - case *map[bool]uint: *v = nil - case *map[bool]uint8: *v = nil - case *map[bool]uint16: *v = nil - case *map[bool]uint32: *v = nil - case *map[bool]uint64: *v = nil - case *map[bool]uintptr: *v = nil - case *map[bool]int: *v = nil - case *map[bool]int8: *v = nil - case *map[bool]int16: *v = nil - case *map[bool]int32: *v = nil - case *map[bool]int64: *v = nil - case *map[bool]float32: *v = nil - case *map[bool]float64: *v = nil - case *map[bool]bool: *v = nil - default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true @@ -16390,22 +17723,27 @@ func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { func (d *Decoder) fastpathDecSliceIntfR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]interface{}) - if v, changed := fastpathTV.DecSliceIntfV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]interface{}) + v, changed := fastpathTV.DecSliceIntfV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceIntfV(rv2i(rv).([]interface{}), !array, d) + v := rv2i(rv).([]interface{}) + v2, changed := fastpathTV.DecSliceIntfV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceIntfX(vp *[]interface{}, d *Decoder) { - if v, changed := f.DecSliceIntfV(*vp, true, d); changed { + v, changed := f.DecSliceIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ []interface{}, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16419,7 +17757,6 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16438,7 +17775,7 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) } else { @@ -16461,6 +17798,8 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = nil } else { d.decode(&v[j]) } @@ -16480,22 +17819,27 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, canChange bool, d *Decoder) (_ func (d *Decoder) fastpathDecSliceStringR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]string) - if v, changed := fastpathTV.DecSliceStringV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]string) + v, changed := fastpathTV.DecSliceStringV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceStringV(rv2i(rv).([]string), !array, d) + v := rv2i(rv).([]string) + v2, changed := fastpathTV.DecSliceStringV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceStringX(vp *[]string, d *Decoder) { - if v, changed := f.DecSliceStringV(*vp, true, d); changed { + v, changed := f.DecSliceStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ []string, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16509,7 +17853,6 @@ func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ [] slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16528,7 +17871,7 @@ func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ [] } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) } else { @@ -16551,6 +17894,8 @@ func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ [] slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = "" } else { v[j] = dd.DecodeString() } @@ -16570,22 +17915,27 @@ func (_ fastpathT) DecSliceStringV(v []string, canChange bool, d *Decoder) (_ [] func (d *Decoder) fastpathDecSliceFloat32R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]float32) - if v, changed := fastpathTV.DecSliceFloat32V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]float32) + v, changed := fastpathTV.DecSliceFloat32V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceFloat32V(rv2i(rv).([]float32), !array, d) + v := rv2i(rv).([]float32) + v2, changed := fastpathTV.DecSliceFloat32V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceFloat32X(vp *[]float32, d *Decoder) { - if v, changed := f.DecSliceFloat32V(*vp, true, d); changed { + v, changed := f.DecSliceFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ []float32, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16599,7 +17949,6 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16618,7 +17967,7 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) } else { @@ -16641,8 +17990,10 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = float32(dd.DecodeFloat(true)) + v[j] = float32(chkOvf.Float32V(dd.DecodeFloat64())) } } if canChange { @@ -16660,22 +18011,27 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, canChange bool, d *Decoder) (_ func (d *Decoder) fastpathDecSliceFloat64R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]float64) - if v, changed := fastpathTV.DecSliceFloat64V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]float64) + v, changed := fastpathTV.DecSliceFloat64V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceFloat64V(rv2i(rv).([]float64), !array, d) + v := rv2i(rv).([]float64) + v2, changed := fastpathTV.DecSliceFloat64V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceFloat64X(vp *[]float64, d *Decoder) { - if v, changed := f.DecSliceFloat64V(*vp, true, d); changed { + v, changed := f.DecSliceFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ []float64, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16689,7 +18045,6 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16708,7 +18063,7 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -16731,8 +18086,10 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = dd.DecodeFloat(false) + v[j] = dd.DecodeFloat64() } } if canChange { @@ -16750,22 +18107,27 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ func (d *Decoder) fastpathDecSliceUintR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]uint) - if v, changed := fastpathTV.DecSliceUintV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]uint) + v, changed := fastpathTV.DecSliceUintV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceUintV(rv2i(rv).([]uint), !array, d) + v := rv2i(rv).([]uint) + v2, changed := fastpathTV.DecSliceUintV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceUintX(vp *[]uint, d *Decoder) { - if v, changed := f.DecSliceUintV(*vp, true, d); changed { + v, changed := f.DecSliceUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16779,7 +18141,6 @@ func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16798,7 +18159,7 @@ func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -16821,8 +18182,10 @@ func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = uint(dd.DecodeUint(uintBitsize)) + v[j] = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) } } if canChange { @@ -16838,24 +18201,125 @@ func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint return v, changed } -func (d *Decoder) fastpathDecSliceUint16R(f *codecFnInfo, rv reflect.Value) { +func (d *Decoder) fastpathDecSliceUint8R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]uint16) - if v, changed := fastpathTV.DecSliceUint16V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]uint8) + v, changed := fastpathTV.DecSliceUint8V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceUint16V(rv2i(rv).([]uint16), !array, d) + v := rv2i(rv).([]uint8) + v2, changed := fastpathTV.DecSliceUint8V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } + } +} +func (f fastpathT) DecSliceUint8X(vp *[]uint8, d *Decoder) { + v, changed := f.DecSliceUint8V(*vp, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint8V(v []uint8, canChange bool, d *Decoder) (_ []uint8, changed bool) { + dd := d.d + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + hasLen := containerLenS > 0 + var xlen int + if hasLen && canChange { + if containerLenS > cap(v) { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint8, xlen) + } + changed = true + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { + if j == 0 && len(v) == 0 && canChange { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) + } else { + xlen = 8 + } + v = make([]uint8, xlen) + changed = true + } + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + decodeIntoBlank = true + } + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 + } else { + v[j] = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) + } + } + if canChange { + if j < len(v) { + v = v[:j] + changed = true + } else if j == 0 && v == nil { + v = make([]uint8, 0) + changed = true + } + } + slh.End() + return v, changed +} + +func (d *Decoder) fastpathDecSliceUint16R(f *codecFnInfo, rv reflect.Value) { + if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { + vp := rv2i(rv).(*[]uint16) + v, changed := fastpathTV.DecSliceUint16V(*vp, !array, d) + if changed { + *vp = v + } + } else { + v := rv2i(rv).([]uint16) + v2, changed := fastpathTV.DecSliceUint16V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceUint16X(vp *[]uint16, d *Decoder) { - if v, changed := f.DecSliceUint16V(*vp, true, d); changed { + v, changed := f.DecSliceUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ []uint16, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16869,7 +18333,6 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ [] slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16888,7 +18351,7 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ [] } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) } else { @@ -16911,8 +18374,10 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ [] slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = uint16(dd.DecodeUint(16)) + v[j] = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) } } if canChange { @@ -16930,22 +18395,27 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ [] func (d *Decoder) fastpathDecSliceUint32R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]uint32) - if v, changed := fastpathTV.DecSliceUint32V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]uint32) + v, changed := fastpathTV.DecSliceUint32V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceUint32V(rv2i(rv).([]uint32), !array, d) + v := rv2i(rv).([]uint32) + v2, changed := fastpathTV.DecSliceUint32V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceUint32X(vp *[]uint32, d *Decoder) { - if v, changed := f.DecSliceUint32V(*vp, true, d); changed { + v, changed := f.DecSliceUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ []uint32, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -16959,7 +18429,6 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ [] slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -16978,7 +18447,7 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ [] } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) } else { @@ -17001,8 +18470,10 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ [] slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = uint32(dd.DecodeUint(32)) + v[j] = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) } } if canChange { @@ -17020,22 +18491,27 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ [] func (d *Decoder) fastpathDecSliceUint64R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]uint64) - if v, changed := fastpathTV.DecSliceUint64V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]uint64) + v, changed := fastpathTV.DecSliceUint64V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceUint64V(rv2i(rv).([]uint64), !array, d) + v := rv2i(rv).([]uint64) + v2, changed := fastpathTV.DecSliceUint64V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceUint64X(vp *[]uint64, d *Decoder) { - if v, changed := f.DecSliceUint64V(*vp, true, d); changed { + v, changed := f.DecSliceUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ []uint64, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17049,7 +18525,6 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ [] slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17068,7 +18543,7 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ [] } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -17091,8 +18566,10 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ [] slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = dd.DecodeUint(64) + v[j] = dd.DecodeUint64() } } if canChange { @@ -17110,22 +18587,27 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ [] func (d *Decoder) fastpathDecSliceUintptrR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]uintptr) - if v, changed := fastpathTV.DecSliceUintptrV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]uintptr) + v, changed := fastpathTV.DecSliceUintptrV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceUintptrV(rv2i(rv).([]uintptr), !array, d) + v := rv2i(rv).([]uintptr) + v2, changed := fastpathTV.DecSliceUintptrV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, d *Decoder) { - if v, changed := f.DecSliceUintptrV(*vp, true, d); changed { + v, changed := f.DecSliceUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ []uintptr, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17139,7 +18621,6 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17158,7 +18639,7 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -17181,8 +18662,10 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = uintptr(dd.DecodeUint(uintBitsize)) + v[j] = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) } } if canChange { @@ -17200,22 +18683,27 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ func (d *Decoder) fastpathDecSliceIntR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]int) - if v, changed := fastpathTV.DecSliceIntV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]int) + v, changed := fastpathTV.DecSliceIntV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceIntV(rv2i(rv).([]int), !array, d) + v := rv2i(rv).([]int) + v2, changed := fastpathTV.DecSliceIntV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceIntX(vp *[]int, d *Decoder) { - if v, changed := f.DecSliceIntV(*vp, true, d); changed { + v, changed := f.DecSliceIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17229,7 +18717,6 @@ func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, c slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17248,7 +18735,7 @@ func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, c } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -17271,8 +18758,10 @@ func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, c slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = int(dd.DecodeInt(intBitsize)) + v[j] = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) } } if canChange { @@ -17290,22 +18779,27 @@ func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, c func (d *Decoder) fastpathDecSliceInt8R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]int8) - if v, changed := fastpathTV.DecSliceInt8V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]int8) + v, changed := fastpathTV.DecSliceInt8V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceInt8V(rv2i(rv).([]int8), !array, d) + v := rv2i(rv).([]int8) + v2, changed := fastpathTV.DecSliceInt8V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceInt8X(vp *[]int8, d *Decoder) { - if v, changed := f.DecSliceInt8V(*vp, true, d); changed { + v, changed := f.DecSliceInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17319,7 +18813,6 @@ func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8 slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17338,7 +18831,7 @@ func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8 } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) } else { @@ -17361,8 +18854,10 @@ func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8 slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = int8(dd.DecodeInt(8)) + v[j] = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) } } if canChange { @@ -17380,22 +18875,27 @@ func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8 func (d *Decoder) fastpathDecSliceInt16R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]int16) - if v, changed := fastpathTV.DecSliceInt16V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]int16) + v, changed := fastpathTV.DecSliceInt16V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceInt16V(rv2i(rv).([]int16), !array, d) + v := rv2i(rv).([]int16) + v2, changed := fastpathTV.DecSliceInt16V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceInt16X(vp *[]int16, d *Decoder) { - if v, changed := f.DecSliceInt16V(*vp, true, d); changed { + v, changed := f.DecSliceInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []int16, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17409,7 +18909,6 @@ func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []in slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17428,7 +18927,7 @@ func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []in } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2) } else { @@ -17451,8 +18950,10 @@ func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []in slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = int16(dd.DecodeInt(16)) + v[j] = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) } } if canChange { @@ -17470,22 +18971,27 @@ func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []in func (d *Decoder) fastpathDecSliceInt32R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]int32) - if v, changed := fastpathTV.DecSliceInt32V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]int32) + v, changed := fastpathTV.DecSliceInt32V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceInt32V(rv2i(rv).([]int32), !array, d) + v := rv2i(rv).([]int32) + v2, changed := fastpathTV.DecSliceInt32V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceInt32X(vp *[]int32, d *Decoder) { - if v, changed := f.DecSliceInt32V(*vp, true, d); changed { + v, changed := f.DecSliceInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []int32, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17499,7 +19005,6 @@ func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []in slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17518,7 +19023,7 @@ func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []in } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4) } else { @@ -17541,8 +19046,10 @@ func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []in slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = int32(dd.DecodeInt(32)) + v[j] = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) } } if canChange { @@ -17560,22 +19067,27 @@ func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []in func (d *Decoder) fastpathDecSliceInt64R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]int64) - if v, changed := fastpathTV.DecSliceInt64V(*vp, !array, d); changed { + vp := rv2i(rv).(*[]int64) + v, changed := fastpathTV.DecSliceInt64V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceInt64V(rv2i(rv).([]int64), !array, d) + v := rv2i(rv).([]int64) + v2, changed := fastpathTV.DecSliceInt64V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceInt64X(vp *[]int64, d *Decoder) { - if v, changed := f.DecSliceInt64V(*vp, true, d); changed { + v, changed := f.DecSliceInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []int64, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17589,7 +19101,6 @@ func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []in slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17608,7 +19119,7 @@ func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []in } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8) } else { @@ -17631,8 +19142,10 @@ func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []in slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = 0 } else { - v[j] = dd.DecodeInt(64) + v[j] = dd.DecodeInt64() } } if canChange { @@ -17650,22 +19163,27 @@ func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []in func (d *Decoder) fastpathDecSliceBoolR(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]bool) - if v, changed := fastpathTV.DecSliceBoolV(*vp, !array, d); changed { + vp := rv2i(rv).(*[]bool) + v, changed := fastpathTV.DecSliceBoolV(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.DecSliceBoolV(rv2i(rv).([]bool), !array, d) + v := rv2i(rv).([]bool) + v2, changed := fastpathTV.DecSliceBoolV(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) DecSliceBoolX(vp *[]bool, d *Decoder) { - if v, changed := f.DecSliceBoolV(*vp, true, d); changed { + v, changed := f.DecSliceBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool, changed bool) { dd := d.d - slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -17679,7 +19197,6 @@ func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -17698,7 +19215,7 @@ func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1) } else { @@ -17721,6 +19238,8 @@ func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = false } else { v[j] = dd.DecodeBool() } @@ -17741,22 +19260,23 @@ func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool func (d *Decoder) fastpathDecMapIntfIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]interface{}) - if v, changed := fastpathTV.DecMapIntfIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), false, d) } - fastpathTV.DecMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), false, d) } func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, d *Decoder) { - if v, changed := f.DecMapIntfIntfV(*vp, true, d); changed { + v, changed := f.DecMapIntfIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool, d *Decoder) (_ map[interface{}]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -17767,7 +19287,7 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk interface{} var mv interface{} hasLen := containerLen > 0 @@ -17784,7 +19304,8 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -17808,22 +19329,23 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool func (d *Decoder) fastpathDecMapIntfStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]string) - if v, changed := fastpathTV.DecMapIntfStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfStringV(rv2i(rv).(map[interface{}]string), false, d) } - fastpathTV.DecMapIntfStringV(rv2i(rv).(map[interface{}]string), false, d) } func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, d *Decoder) { - if v, changed := f.DecMapIntfStringV(*vp, true, d); changed { + v, changed := f.DecMapIntfStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, d *Decoder) (_ map[interface{}]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -17834,7 +19356,6 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv string hasLen := containerLen > 0 @@ -17851,7 +19372,8 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -17870,22 +19392,23 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, func (d *Decoder) fastpathDecMapIntfUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uint) - if v, changed := fastpathTV.DecMapIntfUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUintV(rv2i(rv).(map[interface{}]uint), false, d) } - fastpathTV.DecMapIntfUintV(rv2i(rv).(map[interface{}]uint), false, d) } func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, d *Decoder) { - if v, changed := f.DecMapIntfUintV(*vp, true, d); changed { + v, changed := f.DecMapIntfUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, d *Decoder) (_ map[interface{}]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -17896,7 +19419,6 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uint hasLen := containerLen > 0 @@ -17913,14 +19435,15 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -17932,22 +19455,23 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, func (d *Decoder) fastpathDecMapIntfUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uint8) - if v, changed := fastpathTV.DecMapIntfUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), false, d) } - fastpathTV.DecMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), false, d) } func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, d *Decoder) { - if v, changed := f.DecMapIntfUint8V(*vp, true, d); changed { + v, changed := f.DecMapIntfUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, d *Decoder) (_ map[interface{}]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -17958,7 +19482,6 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uint8 hasLen := containerLen > 0 @@ -17975,14 +19498,15 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -17994,22 +19518,23 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, func (d *Decoder) fastpathDecMapIntfUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uint16) - if v, changed := fastpathTV.DecMapIntfUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), false, d) } - fastpathTV.DecMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), false, d) } func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, d *Decoder) { - if v, changed := f.DecMapIntfUint16V(*vp, true, d); changed { + v, changed := f.DecMapIntfUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, d *Decoder) (_ map[interface{}]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -18020,7 +19545,6 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uint16 hasLen := containerLen > 0 @@ -18037,14 +19561,15 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -18056,22 +19581,23 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, func (d *Decoder) fastpathDecMapIntfUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uint32) - if v, changed := fastpathTV.DecMapIntfUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), false, d) } - fastpathTV.DecMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), false, d) } func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, d *Decoder) { - if v, changed := f.DecMapIntfUint32V(*vp, true, d); changed { + v, changed := f.DecMapIntfUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, d *Decoder) (_ map[interface{}]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -18082,7 +19608,6 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uint32 hasLen := containerLen > 0 @@ -18099,14 +19624,15 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -18118,22 +19644,23 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, func (d *Decoder) fastpathDecMapIntfUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uint64) - if v, changed := fastpathTV.DecMapIntfUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), false, d) } - fastpathTV.DecMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), false, d) } func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, d *Decoder) { - if v, changed := f.DecMapIntfUint64V(*vp, true, d); changed { + v, changed := f.DecMapIntfUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, d *Decoder) (_ map[interface{}]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18144,7 +19671,6 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uint64 hasLen := containerLen > 0 @@ -18161,14 +19687,15 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -18180,22 +19707,23 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, func (d *Decoder) fastpathDecMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]uintptr) - if v, changed := fastpathTV.DecMapIntfUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), false, d) } - fastpathTV.DecMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), false, d) } func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, d *Decoder) { - if v, changed := f.DecMapIntfUintptrV(*vp, true, d); changed { + v, changed := f.DecMapIntfUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, d *Decoder) (_ map[interface{}]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18206,7 +19734,6 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv uintptr hasLen := containerLen > 0 @@ -18223,14 +19750,15 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -18242,22 +19770,23 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, func (d *Decoder) fastpathDecMapIntfIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]int) - if v, changed := fastpathTV.DecMapIntfIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfIntV(rv2i(rv).(map[interface{}]int), false, d) } - fastpathTV.DecMapIntfIntV(rv2i(rv).(map[interface{}]int), false, d) } func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, d *Decoder) { - if v, changed := f.DecMapIntfIntV(*vp, true, d); changed { + v, changed := f.DecMapIntfIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, d *Decoder) (_ map[interface{}]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18268,7 +19797,6 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv int hasLen := containerLen > 0 @@ -18285,14 +19813,15 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -18304,22 +19833,23 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, func (d *Decoder) fastpathDecMapIntfInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]int8) - if v, changed := fastpathTV.DecMapIntfInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfInt8V(rv2i(rv).(map[interface{}]int8), false, d) } - fastpathTV.DecMapIntfInt8V(rv2i(rv).(map[interface{}]int8), false, d) } func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, d *Decoder) { - if v, changed := f.DecMapIntfInt8V(*vp, true, d); changed { + v, changed := f.DecMapIntfInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, d *Decoder) (_ map[interface{}]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -18330,7 +19860,6 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv int8 hasLen := containerLen > 0 @@ -18347,14 +19876,15 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -18366,22 +19896,23 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, func (d *Decoder) fastpathDecMapIntfInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]int16) - if v, changed := fastpathTV.DecMapIntfInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfInt16V(rv2i(rv).(map[interface{}]int16), false, d) } - fastpathTV.DecMapIntfInt16V(rv2i(rv).(map[interface{}]int16), false, d) } func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, d *Decoder) { - if v, changed := f.DecMapIntfInt16V(*vp, true, d); changed { + v, changed := f.DecMapIntfInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, d *Decoder) (_ map[interface{}]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -18392,7 +19923,6 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv int16 hasLen := containerLen > 0 @@ -18409,14 +19939,15 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -18428,22 +19959,23 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, func (d *Decoder) fastpathDecMapIntfInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]int32) - if v, changed := fastpathTV.DecMapIntfInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfInt32V(rv2i(rv).(map[interface{}]int32), false, d) } - fastpathTV.DecMapIntfInt32V(rv2i(rv).(map[interface{}]int32), false, d) } func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, d *Decoder) { - if v, changed := f.DecMapIntfInt32V(*vp, true, d); changed { + v, changed := f.DecMapIntfInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, d *Decoder) (_ map[interface{}]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -18454,7 +19986,6 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv int32 hasLen := containerLen > 0 @@ -18471,14 +20002,15 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -18490,22 +20022,23 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, func (d *Decoder) fastpathDecMapIntfInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]int64) - if v, changed := fastpathTV.DecMapIntfInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfInt64V(rv2i(rv).(map[interface{}]int64), false, d) } - fastpathTV.DecMapIntfInt64V(rv2i(rv).(map[interface{}]int64), false, d) } func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, d *Decoder) { - if v, changed := f.DecMapIntfInt64V(*vp, true, d); changed { + v, changed := f.DecMapIntfInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, d *Decoder) (_ map[interface{}]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18516,7 +20049,6 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv int64 hasLen := containerLen > 0 @@ -18533,14 +20065,15 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -18552,22 +20085,23 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, func (d *Decoder) fastpathDecMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]float32) - if v, changed := fastpathTV.DecMapIntfFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), false, d) } - fastpathTV.DecMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), false, d) } func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, d *Decoder) { - if v, changed := f.DecMapIntfFloat32V(*vp, true, d); changed { + v, changed := f.DecMapIntfFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, d *Decoder) (_ map[interface{}]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -18578,7 +20112,6 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv float32 hasLen := containerLen > 0 @@ -18595,14 +20128,15 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -18614,22 +20148,23 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, func (d *Decoder) fastpathDecMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]float64) - if v, changed := fastpathTV.DecMapIntfFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), false, d) } - fastpathTV.DecMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), false, d) } func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, d *Decoder) { - if v, changed := f.DecMapIntfFloat64V(*vp, true, d); changed { + v, changed := f.DecMapIntfFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, d *Decoder) (_ map[interface{}]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18640,7 +20175,6 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv float64 hasLen := containerLen > 0 @@ -18657,14 +20191,15 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -18676,22 +20211,23 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, func (d *Decoder) fastpathDecMapIntfBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[interface{}]bool) - if v, changed := fastpathTV.DecMapIntfBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntfBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntfBoolV(rv2i(rv).(map[interface{}]bool), false, d) } - fastpathTV.DecMapIntfBoolV(rv2i(rv).(map[interface{}]bool), false, d) } func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, d *Decoder) { - if v, changed := f.DecMapIntfBoolV(*vp, true, d); changed { + v, changed := f.DecMapIntfBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, d *Decoder) (_ map[interface{}]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -18702,7 +20238,6 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk interface{} var mv bool hasLen := containerLen > 0 @@ -18719,7 +20254,8 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -18738,22 +20274,23 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, func (d *Decoder) fastpathDecMapStringIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]interface{}) - if v, changed := fastpathTV.DecMapStringIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringIntfV(rv2i(rv).(map[string]interface{}), false, d) } - fastpathTV.DecMapStringIntfV(rv2i(rv).(map[string]interface{}), false, d) } func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) { - if v, changed := f.DecMapStringIntfV(*vp, true, d); changed { + v, changed := f.DecMapStringIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, d *Decoder) (_ map[string]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -18764,7 +20301,7 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk string var mv interface{} hasLen := containerLen > 0 @@ -18777,7 +20314,8 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -18801,22 +20339,23 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, func (d *Decoder) fastpathDecMapStringStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]string) - if v, changed := fastpathTV.DecMapStringStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringStringV(rv2i(rv).(map[string]string), false, d) } - fastpathTV.DecMapStringStringV(rv2i(rv).(map[string]string), false, d) } func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) { - if v, changed := f.DecMapStringStringV(*vp, true, d); changed { + v, changed := f.DecMapStringStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, d *Decoder) (_ map[string]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -18827,7 +20366,6 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv string hasLen := containerLen > 0 @@ -18840,7 +20378,8 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -18859,22 +20398,23 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, func (d *Decoder) fastpathDecMapStringUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uint) - if v, changed := fastpathTV.DecMapStringUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUintV(rv2i(rv).(map[string]uint), false, d) } - fastpathTV.DecMapStringUintV(rv2i(rv).(map[string]uint), false, d) } func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) { - if v, changed := f.DecMapStringUintV(*vp, true, d); changed { + v, changed := f.DecMapStringUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, d *Decoder) (_ map[string]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -18885,7 +20425,6 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uint hasLen := containerLen > 0 @@ -18898,14 +20437,15 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -18917,22 +20457,23 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, func (d *Decoder) fastpathDecMapStringUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uint8) - if v, changed := fastpathTV.DecMapStringUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUint8V(rv2i(rv).(map[string]uint8), false, d) } - fastpathTV.DecMapStringUint8V(rv2i(rv).(map[string]uint8), false, d) } func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) { - if v, changed := f.DecMapStringUint8V(*vp, true, d); changed { + v, changed := f.DecMapStringUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, d *Decoder) (_ map[string]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -18943,7 +20484,6 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uint8 hasLen := containerLen > 0 @@ -18956,14 +20496,15 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -18975,22 +20516,23 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, func (d *Decoder) fastpathDecMapStringUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uint16) - if v, changed := fastpathTV.DecMapStringUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUint16V(rv2i(rv).(map[string]uint16), false, d) } - fastpathTV.DecMapStringUint16V(rv2i(rv).(map[string]uint16), false, d) } func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, d *Decoder) { - if v, changed := f.DecMapStringUint16V(*vp, true, d); changed { + v, changed := f.DecMapStringUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, d *Decoder) (_ map[string]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -19001,7 +20543,6 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uint16 hasLen := containerLen > 0 @@ -19014,14 +20555,15 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -19033,22 +20575,23 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, func (d *Decoder) fastpathDecMapStringUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uint32) - if v, changed := fastpathTV.DecMapStringUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUint32V(rv2i(rv).(map[string]uint32), false, d) } - fastpathTV.DecMapStringUint32V(rv2i(rv).(map[string]uint32), false, d) } func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, d *Decoder) { - if v, changed := f.DecMapStringUint32V(*vp, true, d); changed { + v, changed := f.DecMapStringUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, d *Decoder) (_ map[string]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -19059,7 +20602,6 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uint32 hasLen := containerLen > 0 @@ -19072,14 +20614,15 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -19091,22 +20634,23 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, func (d *Decoder) fastpathDecMapStringUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uint64) - if v, changed := fastpathTV.DecMapStringUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUint64V(rv2i(rv).(map[string]uint64), false, d) } - fastpathTV.DecMapStringUint64V(rv2i(rv).(map[string]uint64), false, d) } func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) { - if v, changed := f.DecMapStringUint64V(*vp, true, d); changed { + v, changed := f.DecMapStringUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, d *Decoder) (_ map[string]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19117,7 +20661,6 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uint64 hasLen := containerLen > 0 @@ -19130,14 +20673,15 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -19149,22 +20693,23 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, func (d *Decoder) fastpathDecMapStringUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]uintptr) - if v, changed := fastpathTV.DecMapStringUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringUintptrV(rv2i(rv).(map[string]uintptr), false, d) } - fastpathTV.DecMapStringUintptrV(rv2i(rv).(map[string]uintptr), false, d) } func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, d *Decoder) { - if v, changed := f.DecMapStringUintptrV(*vp, true, d); changed { + v, changed := f.DecMapStringUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, d *Decoder) (_ map[string]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19175,7 +20720,6 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv uintptr hasLen := containerLen > 0 @@ -19188,14 +20732,15 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -19207,22 +20752,23 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, func (d *Decoder) fastpathDecMapStringIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]int) - if v, changed := fastpathTV.DecMapStringIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringIntV(rv2i(rv).(map[string]int), false, d) } - fastpathTV.DecMapStringIntV(rv2i(rv).(map[string]int), false, d) } func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) { - if v, changed := f.DecMapStringIntV(*vp, true, d); changed { + v, changed := f.DecMapStringIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, d *Decoder) (_ map[string]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19233,7 +20779,6 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv int hasLen := containerLen > 0 @@ -19246,14 +20791,15 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -19265,22 +20811,23 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, func (d *Decoder) fastpathDecMapStringInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]int8) - if v, changed := fastpathTV.DecMapStringInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringInt8V(rv2i(rv).(map[string]int8), false, d) } - fastpathTV.DecMapStringInt8V(rv2i(rv).(map[string]int8), false, d) } func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, d *Decoder) { - if v, changed := f.DecMapStringInt8V(*vp, true, d); changed { + v, changed := f.DecMapStringInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, d *Decoder) (_ map[string]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -19291,7 +20838,6 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv int8 hasLen := containerLen > 0 @@ -19304,14 +20850,15 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -19323,22 +20870,23 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, func (d *Decoder) fastpathDecMapStringInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]int16) - if v, changed := fastpathTV.DecMapStringInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringInt16V(rv2i(rv).(map[string]int16), false, d) } - fastpathTV.DecMapStringInt16V(rv2i(rv).(map[string]int16), false, d) } func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, d *Decoder) { - if v, changed := f.DecMapStringInt16V(*vp, true, d); changed { + v, changed := f.DecMapStringInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, d *Decoder) (_ map[string]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -19349,7 +20897,6 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv int16 hasLen := containerLen > 0 @@ -19362,14 +20909,15 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -19381,22 +20929,23 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, func (d *Decoder) fastpathDecMapStringInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]int32) - if v, changed := fastpathTV.DecMapStringInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringInt32V(rv2i(rv).(map[string]int32), false, d) } - fastpathTV.DecMapStringInt32V(rv2i(rv).(map[string]int32), false, d) } func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, d *Decoder) { - if v, changed := f.DecMapStringInt32V(*vp, true, d); changed { + v, changed := f.DecMapStringInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, d *Decoder) (_ map[string]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -19407,7 +20956,6 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv int32 hasLen := containerLen > 0 @@ -19420,14 +20968,15 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -19439,22 +20988,23 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, func (d *Decoder) fastpathDecMapStringInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]int64) - if v, changed := fastpathTV.DecMapStringInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringInt64V(rv2i(rv).(map[string]int64), false, d) } - fastpathTV.DecMapStringInt64V(rv2i(rv).(map[string]int64), false, d) } func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) { - if v, changed := f.DecMapStringInt64V(*vp, true, d); changed { + v, changed := f.DecMapStringInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, d *Decoder) (_ map[string]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19465,7 +21015,6 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv int64 hasLen := containerLen > 0 @@ -19478,14 +21027,15 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -19497,22 +21047,23 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, func (d *Decoder) fastpathDecMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]float32) - if v, changed := fastpathTV.DecMapStringFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringFloat32V(rv2i(rv).(map[string]float32), false, d) } - fastpathTV.DecMapStringFloat32V(rv2i(rv).(map[string]float32), false, d) } func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) { - if v, changed := f.DecMapStringFloat32V(*vp, true, d); changed { + v, changed := f.DecMapStringFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, d *Decoder) (_ map[string]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -19523,7 +21074,6 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv float32 hasLen := containerLen > 0 @@ -19536,14 +21086,15 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -19555,22 +21106,23 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, func (d *Decoder) fastpathDecMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]float64) - if v, changed := fastpathTV.DecMapStringFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringFloat64V(rv2i(rv).(map[string]float64), false, d) } - fastpathTV.DecMapStringFloat64V(rv2i(rv).(map[string]float64), false, d) } func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) { - if v, changed := f.DecMapStringFloat64V(*vp, true, d); changed { + v, changed := f.DecMapStringFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, d *Decoder) (_ map[string]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19581,7 +21133,6 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv float64 hasLen := containerLen > 0 @@ -19594,14 +21145,15 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -19613,22 +21165,23 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, func (d *Decoder) fastpathDecMapStringBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[string]bool) - if v, changed := fastpathTV.DecMapStringBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapStringBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapStringBoolV(rv2i(rv).(map[string]bool), false, d) } - fastpathTV.DecMapStringBoolV(rv2i(rv).(map[string]bool), false, d) } func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) { - if v, changed := f.DecMapStringBoolV(*vp, true, d); changed { + v, changed := f.DecMapStringBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, d *Decoder) (_ map[string]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -19639,7 +21192,6 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk string var mv bool hasLen := containerLen > 0 @@ -19652,7 +21204,8 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -19671,22 +21224,23 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, func (d *Decoder) fastpathDecMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]interface{}) - if v, changed := fastpathTV.DecMapFloat32IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), false, d) } - fastpathTV.DecMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), false, d) } func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, d *Decoder) { - if v, changed := f.DecMapFloat32IntfV(*vp, true, d); changed { + v, changed := f.DecMapFloat32IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, d *Decoder) (_ map[float32]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -19697,7 +21251,7 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk float32 var mv interface{} hasLen := containerLen > 0 @@ -19705,12 +21259,13 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -19734,22 +21289,23 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, func (d *Decoder) fastpathDecMapFloat32StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]string) - if v, changed := fastpathTV.DecMapFloat32StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32StringV(rv2i(rv).(map[float32]string), false, d) } - fastpathTV.DecMapFloat32StringV(rv2i(rv).(map[float32]string), false, d) } func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, d *Decoder) { - if v, changed := f.DecMapFloat32StringV(*vp, true, d); changed { + v, changed := f.DecMapFloat32StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, d *Decoder) (_ map[float32]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -19760,7 +21316,6 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv string hasLen := containerLen > 0 @@ -19768,12 +21323,13 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -19792,22 +21348,23 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, func (d *Decoder) fastpathDecMapFloat32UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uint) - if v, changed := fastpathTV.DecMapFloat32UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32UintV(rv2i(rv).(map[float32]uint), false, d) } - fastpathTV.DecMapFloat32UintV(rv2i(rv).(map[float32]uint), false, d) } func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, d *Decoder) { - if v, changed := f.DecMapFloat32UintV(*vp, true, d); changed { + v, changed := f.DecMapFloat32UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, d *Decoder) (_ map[float32]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -19818,7 +21375,6 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uint hasLen := containerLen > 0 @@ -19826,19 +21382,20 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -19850,22 +21407,23 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, func (d *Decoder) fastpathDecMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uint8) - if v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), false, d) } - fastpathTV.DecMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), false, d) } func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, d *Decoder) { - if v, changed := f.DecMapFloat32Uint8V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, d *Decoder) (_ map[float32]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -19876,7 +21434,6 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uint8 hasLen := containerLen > 0 @@ -19884,19 +21441,20 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -19908,22 +21466,23 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, func (d *Decoder) fastpathDecMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uint16) - if v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), false, d) } - fastpathTV.DecMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), false, d) } func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, d *Decoder) { - if v, changed := f.DecMapFloat32Uint16V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, d *Decoder) (_ map[float32]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -19934,7 +21493,6 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uint16 hasLen := containerLen > 0 @@ -19942,19 +21500,20 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -19966,22 +21525,23 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, func (d *Decoder) fastpathDecMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uint32) - if v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), false, d) } - fastpathTV.DecMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), false, d) } func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, d *Decoder) { - if v, changed := f.DecMapFloat32Uint32V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, d *Decoder) (_ map[float32]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -19992,7 +21552,6 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uint32 hasLen := containerLen > 0 @@ -20000,19 +21559,20 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -20024,22 +21584,23 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, func (d *Decoder) fastpathDecMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uint64) - if v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), false, d) } - fastpathTV.DecMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), false, d) } func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, d *Decoder) { - if v, changed := f.DecMapFloat32Uint64V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, d *Decoder) (_ map[float32]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20050,7 +21611,6 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uint64 hasLen := containerLen > 0 @@ -20058,19 +21618,20 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -20082,22 +21643,23 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, func (d *Decoder) fastpathDecMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]uintptr) - if v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), false, d) } - fastpathTV.DecMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), false, d) } func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, d *Decoder) { - if v, changed := f.DecMapFloat32UintptrV(*vp, true, d); changed { + v, changed := f.DecMapFloat32UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, d *Decoder) (_ map[float32]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20108,7 +21670,6 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv uintptr hasLen := containerLen > 0 @@ -20116,19 +21677,20 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -20140,22 +21702,23 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, func (d *Decoder) fastpathDecMapFloat32IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]int) - if v, changed := fastpathTV.DecMapFloat32IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32IntV(rv2i(rv).(map[float32]int), false, d) } - fastpathTV.DecMapFloat32IntV(rv2i(rv).(map[float32]int), false, d) } func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, d *Decoder) { - if v, changed := f.DecMapFloat32IntV(*vp, true, d); changed { + v, changed := f.DecMapFloat32IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, d *Decoder) (_ map[float32]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20166,7 +21729,6 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv int hasLen := containerLen > 0 @@ -20174,19 +21736,20 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -20198,22 +21761,23 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, func (d *Decoder) fastpathDecMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]int8) - if v, changed := fastpathTV.DecMapFloat32Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Int8V(rv2i(rv).(map[float32]int8), false, d) } - fastpathTV.DecMapFloat32Int8V(rv2i(rv).(map[float32]int8), false, d) } func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, d *Decoder) { - if v, changed := f.DecMapFloat32Int8V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, d *Decoder) (_ map[float32]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -20224,7 +21788,6 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv int8 hasLen := containerLen > 0 @@ -20232,19 +21795,20 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -20256,22 +21820,23 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, func (d *Decoder) fastpathDecMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]int16) - if v, changed := fastpathTV.DecMapFloat32Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Int16V(rv2i(rv).(map[float32]int16), false, d) } - fastpathTV.DecMapFloat32Int16V(rv2i(rv).(map[float32]int16), false, d) } func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, d *Decoder) { - if v, changed := f.DecMapFloat32Int16V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, d *Decoder) (_ map[float32]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -20282,7 +21847,6 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv int16 hasLen := containerLen > 0 @@ -20290,19 +21854,20 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -20314,22 +21879,23 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, func (d *Decoder) fastpathDecMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]int32) - if v, changed := fastpathTV.DecMapFloat32Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Int32V(rv2i(rv).(map[float32]int32), false, d) } - fastpathTV.DecMapFloat32Int32V(rv2i(rv).(map[float32]int32), false, d) } func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, d *Decoder) { - if v, changed := f.DecMapFloat32Int32V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, d *Decoder) (_ map[float32]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -20340,7 +21906,6 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv int32 hasLen := containerLen > 0 @@ -20348,19 +21913,20 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -20372,22 +21938,23 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, func (d *Decoder) fastpathDecMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]int64) - if v, changed := fastpathTV.DecMapFloat32Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Int64V(rv2i(rv).(map[float32]int64), false, d) } - fastpathTV.DecMapFloat32Int64V(rv2i(rv).(map[float32]int64), false, d) } func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, d *Decoder) { - if v, changed := f.DecMapFloat32Int64V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, d *Decoder) (_ map[float32]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20398,7 +21965,6 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv int64 hasLen := containerLen > 0 @@ -20406,19 +21972,20 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -20430,22 +21997,23 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, func (d *Decoder) fastpathDecMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]float32) - if v, changed := fastpathTV.DecMapFloat32Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Float32V(rv2i(rv).(map[float32]float32), false, d) } - fastpathTV.DecMapFloat32Float32V(rv2i(rv).(map[float32]float32), false, d) } func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, d *Decoder) { - if v, changed := f.DecMapFloat32Float32V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, d *Decoder) (_ map[float32]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -20456,7 +22024,6 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv float32 hasLen := containerLen > 0 @@ -20464,19 +22031,20 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -20488,22 +22056,23 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, func (d *Decoder) fastpathDecMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]float64) - if v, changed := fastpathTV.DecMapFloat32Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32Float64V(rv2i(rv).(map[float32]float64), false, d) } - fastpathTV.DecMapFloat32Float64V(rv2i(rv).(map[float32]float64), false, d) } func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, d *Decoder) { - if v, changed := f.DecMapFloat32Float64V(*vp, true, d); changed { + v, changed := f.DecMapFloat32Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, d *Decoder) (_ map[float32]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20514,7 +22083,6 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv float64 hasLen := containerLen > 0 @@ -20522,19 +22090,20 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -20546,22 +22115,23 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, func (d *Decoder) fastpathDecMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float32]bool) - if v, changed := fastpathTV.DecMapFloat32BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat32BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat32BoolV(rv2i(rv).(map[float32]bool), false, d) } - fastpathTV.DecMapFloat32BoolV(rv2i(rv).(map[float32]bool), false, d) } func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, d *Decoder) { - if v, changed := f.DecMapFloat32BoolV(*vp, true, d); changed { + v, changed := f.DecMapFloat32BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, d *Decoder) (_ map[float32]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -20572,7 +22142,6 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float32 var mv bool hasLen := containerLen > 0 @@ -20580,12 +22149,13 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = float32(dd.DecodeFloat(true)) + mk = float32(chkOvf.Float32V(dd.DecodeFloat64())) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -20604,22 +22174,23 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, func (d *Decoder) fastpathDecMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]interface{}) - if v, changed := fastpathTV.DecMapFloat64IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), false, d) } - fastpathTV.DecMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), false, d) } func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, d *Decoder) { - if v, changed := f.DecMapFloat64IntfV(*vp, true, d); changed { + v, changed := f.DecMapFloat64IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, d *Decoder) (_ map[float64]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20630,7 +22201,7 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk float64 var mv interface{} hasLen := containerLen > 0 @@ -20638,12 +22209,13 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -20667,22 +22239,23 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, func (d *Decoder) fastpathDecMapFloat64StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]string) - if v, changed := fastpathTV.DecMapFloat64StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64StringV(rv2i(rv).(map[float64]string), false, d) } - fastpathTV.DecMapFloat64StringV(rv2i(rv).(map[float64]string), false, d) } func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, d *Decoder) { - if v, changed := f.DecMapFloat64StringV(*vp, true, d); changed { + v, changed := f.DecMapFloat64StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, d *Decoder) (_ map[float64]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20693,7 +22266,6 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv string hasLen := containerLen > 0 @@ -20701,12 +22273,13 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -20725,22 +22298,23 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, func (d *Decoder) fastpathDecMapFloat64UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uint) - if v, changed := fastpathTV.DecMapFloat64UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64UintV(rv2i(rv).(map[float64]uint), false, d) } - fastpathTV.DecMapFloat64UintV(rv2i(rv).(map[float64]uint), false, d) } func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, d *Decoder) { - if v, changed := f.DecMapFloat64UintV(*vp, true, d); changed { + v, changed := f.DecMapFloat64UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, d *Decoder) (_ map[float64]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -20751,7 +22325,6 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uint hasLen := containerLen > 0 @@ -20759,19 +22332,20 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -20783,22 +22357,23 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, func (d *Decoder) fastpathDecMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uint8) - if v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), false, d) } - fastpathTV.DecMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), false, d) } func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, d *Decoder) { - if v, changed := f.DecMapFloat64Uint8V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, d *Decoder) (_ map[float64]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -20809,7 +22384,6 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uint8 hasLen := containerLen > 0 @@ -20817,19 +22391,20 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -20841,22 +22416,23 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, func (d *Decoder) fastpathDecMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uint16) - if v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), false, d) } - fastpathTV.DecMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), false, d) } func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, d *Decoder) { - if v, changed := f.DecMapFloat64Uint16V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, d *Decoder) (_ map[float64]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -20867,7 +22443,6 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uint16 hasLen := containerLen > 0 @@ -20875,19 +22450,20 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -20899,22 +22475,23 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, func (d *Decoder) fastpathDecMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uint32) - if v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), false, d) } - fastpathTV.DecMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), false, d) } func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, d *Decoder) { - if v, changed := f.DecMapFloat64Uint32V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, d *Decoder) (_ map[float64]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -20925,7 +22502,6 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uint32 hasLen := containerLen > 0 @@ -20933,19 +22509,20 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -20957,22 +22534,23 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, func (d *Decoder) fastpathDecMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uint64) - if v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), false, d) } - fastpathTV.DecMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), false, d) } func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, d *Decoder) { - if v, changed := f.DecMapFloat64Uint64V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, d *Decoder) (_ map[float64]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -20983,7 +22561,6 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uint64 hasLen := containerLen > 0 @@ -20991,19 +22568,20 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -21015,22 +22593,23 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, func (d *Decoder) fastpathDecMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]uintptr) - if v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), false, d) } - fastpathTV.DecMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), false, d) } func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, d *Decoder) { - if v, changed := f.DecMapFloat64UintptrV(*vp, true, d); changed { + v, changed := f.DecMapFloat64UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, d *Decoder) (_ map[float64]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21041,7 +22620,6 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv uintptr hasLen := containerLen > 0 @@ -21049,19 +22627,20 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -21073,22 +22652,23 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, func (d *Decoder) fastpathDecMapFloat64IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]int) - if v, changed := fastpathTV.DecMapFloat64IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64IntV(rv2i(rv).(map[float64]int), false, d) } - fastpathTV.DecMapFloat64IntV(rv2i(rv).(map[float64]int), false, d) } func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, d *Decoder) { - if v, changed := f.DecMapFloat64IntV(*vp, true, d); changed { + v, changed := f.DecMapFloat64IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, d *Decoder) (_ map[float64]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21099,7 +22679,6 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv int hasLen := containerLen > 0 @@ -21107,19 +22686,20 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -21131,22 +22711,23 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, func (d *Decoder) fastpathDecMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]int8) - if v, changed := fastpathTV.DecMapFloat64Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Int8V(rv2i(rv).(map[float64]int8), false, d) } - fastpathTV.DecMapFloat64Int8V(rv2i(rv).(map[float64]int8), false, d) } func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, d *Decoder) { - if v, changed := f.DecMapFloat64Int8V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, d *Decoder) (_ map[float64]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -21157,7 +22738,6 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv int8 hasLen := containerLen > 0 @@ -21165,19 +22745,20 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -21189,22 +22770,23 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, func (d *Decoder) fastpathDecMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]int16) - if v, changed := fastpathTV.DecMapFloat64Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Int16V(rv2i(rv).(map[float64]int16), false, d) } - fastpathTV.DecMapFloat64Int16V(rv2i(rv).(map[float64]int16), false, d) } func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, d *Decoder) { - if v, changed := f.DecMapFloat64Int16V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, d *Decoder) (_ map[float64]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -21215,7 +22797,6 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv int16 hasLen := containerLen > 0 @@ -21223,19 +22804,20 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -21247,22 +22829,23 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, func (d *Decoder) fastpathDecMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]int32) - if v, changed := fastpathTV.DecMapFloat64Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Int32V(rv2i(rv).(map[float64]int32), false, d) } - fastpathTV.DecMapFloat64Int32V(rv2i(rv).(map[float64]int32), false, d) } func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, d *Decoder) { - if v, changed := f.DecMapFloat64Int32V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, d *Decoder) (_ map[float64]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -21273,7 +22856,6 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv int32 hasLen := containerLen > 0 @@ -21281,19 +22863,20 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -21305,22 +22888,23 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, func (d *Decoder) fastpathDecMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]int64) - if v, changed := fastpathTV.DecMapFloat64Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Int64V(rv2i(rv).(map[float64]int64), false, d) } - fastpathTV.DecMapFloat64Int64V(rv2i(rv).(map[float64]int64), false, d) } func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, d *Decoder) { - if v, changed := f.DecMapFloat64Int64V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, d *Decoder) (_ map[float64]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21331,7 +22915,6 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv int64 hasLen := containerLen > 0 @@ -21339,19 +22922,20 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -21363,22 +22947,23 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, func (d *Decoder) fastpathDecMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]float32) - if v, changed := fastpathTV.DecMapFloat64Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Float32V(rv2i(rv).(map[float64]float32), false, d) } - fastpathTV.DecMapFloat64Float32V(rv2i(rv).(map[float64]float32), false, d) } func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, d *Decoder) { - if v, changed := f.DecMapFloat64Float32V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, d *Decoder) (_ map[float64]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -21389,7 +22974,6 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv float32 hasLen := containerLen > 0 @@ -21397,19 +22981,20 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -21421,22 +23006,23 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, func (d *Decoder) fastpathDecMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]float64) - if v, changed := fastpathTV.DecMapFloat64Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64Float64V(rv2i(rv).(map[float64]float64), false, d) } - fastpathTV.DecMapFloat64Float64V(rv2i(rv).(map[float64]float64), false, d) } func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, d *Decoder) { - if v, changed := f.DecMapFloat64Float64V(*vp, true, d); changed { + v, changed := f.DecMapFloat64Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, d *Decoder) (_ map[float64]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21447,7 +23033,6 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv float64 hasLen := containerLen > 0 @@ -21455,19 +23040,20 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -21479,22 +23065,23 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, func (d *Decoder) fastpathDecMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[float64]bool) - if v, changed := fastpathTV.DecMapFloat64BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapFloat64BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapFloat64BoolV(rv2i(rv).(map[float64]bool), false, d) } - fastpathTV.DecMapFloat64BoolV(rv2i(rv).(map[float64]bool), false, d) } func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, d *Decoder) { - if v, changed := f.DecMapFloat64BoolV(*vp, true, d); changed { + v, changed := f.DecMapFloat64BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, d *Decoder) (_ map[float64]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -21505,7 +23092,6 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk float64 var mv bool hasLen := containerLen > 0 @@ -21513,12 +23099,13 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeFloat(false) + mk = dd.DecodeFloat64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -21537,22 +23124,23 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, func (d *Decoder) fastpathDecMapUintIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]interface{}) - if v, changed := fastpathTV.DecMapUintIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintIntfV(rv2i(rv).(map[uint]interface{}), false, d) } - fastpathTV.DecMapUintIntfV(rv2i(rv).(map[uint]interface{}), false, d) } func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) { - if v, changed := f.DecMapUintIntfV(*vp, true, d); changed { + v, changed := f.DecMapUintIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, d *Decoder) (_ map[uint]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21563,7 +23151,7 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uint var mv interface{} hasLen := containerLen > 0 @@ -21571,12 +23159,13 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -21600,22 +23189,23 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUintStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]string) - if v, changed := fastpathTV.DecMapUintStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintStringV(rv2i(rv).(map[uint]string), false, d) } - fastpathTV.DecMapUintStringV(rv2i(rv).(map[uint]string), false, d) } func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) { - if v, changed := f.DecMapUintStringV(*vp, true, d); changed { + v, changed := f.DecMapUintStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, d *Decoder) (_ map[uint]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21626,7 +23216,6 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv string hasLen := containerLen > 0 @@ -21634,12 +23223,13 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -21658,22 +23248,23 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, func (d *Decoder) fastpathDecMapUintUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uint) - if v, changed := fastpathTV.DecMapUintUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUintV(rv2i(rv).(map[uint]uint), false, d) } - fastpathTV.DecMapUintUintV(rv2i(rv).(map[uint]uint), false, d) } func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) { - if v, changed := f.DecMapUintUintV(*vp, true, d); changed { + v, changed := f.DecMapUintUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, d *Decoder) (_ map[uint]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21684,7 +23275,6 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uint hasLen := containerLen > 0 @@ -21692,19 +23282,20 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -21716,22 +23307,23 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, func (d *Decoder) fastpathDecMapUintUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uint8) - if v, changed := fastpathTV.DecMapUintUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUint8V(rv2i(rv).(map[uint]uint8), false, d) } - fastpathTV.DecMapUintUint8V(rv2i(rv).(map[uint]uint8), false, d) } func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) { - if v, changed := f.DecMapUintUint8V(*vp, true, d); changed { + v, changed := f.DecMapUintUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, d *Decoder) (_ map[uint]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -21742,7 +23334,6 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uint8 hasLen := containerLen > 0 @@ -21750,19 +23341,20 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -21774,22 +23366,23 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, func (d *Decoder) fastpathDecMapUintUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uint16) - if v, changed := fastpathTV.DecMapUintUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUint16V(rv2i(rv).(map[uint]uint16), false, d) } - fastpathTV.DecMapUintUint16V(rv2i(rv).(map[uint]uint16), false, d) } func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, d *Decoder) { - if v, changed := f.DecMapUintUint16V(*vp, true, d); changed { + v, changed := f.DecMapUintUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, d *Decoder) (_ map[uint]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -21800,7 +23393,6 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uint16 hasLen := containerLen > 0 @@ -21808,19 +23400,20 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -21832,22 +23425,23 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, func (d *Decoder) fastpathDecMapUintUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uint32) - if v, changed := fastpathTV.DecMapUintUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUint32V(rv2i(rv).(map[uint]uint32), false, d) } - fastpathTV.DecMapUintUint32V(rv2i(rv).(map[uint]uint32), false, d) } func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, d *Decoder) { - if v, changed := f.DecMapUintUint32V(*vp, true, d); changed { + v, changed := f.DecMapUintUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, d *Decoder) (_ map[uint]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -21858,7 +23452,6 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uint32 hasLen := containerLen > 0 @@ -21866,19 +23459,20 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -21890,22 +23484,23 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, func (d *Decoder) fastpathDecMapUintUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uint64) - if v, changed := fastpathTV.DecMapUintUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUint64V(rv2i(rv).(map[uint]uint64), false, d) } - fastpathTV.DecMapUintUint64V(rv2i(rv).(map[uint]uint64), false, d) } func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) { - if v, changed := f.DecMapUintUint64V(*vp, true, d); changed { + v, changed := f.DecMapUintUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, d *Decoder) (_ map[uint]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21916,7 +23511,6 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uint64 hasLen := containerLen > 0 @@ -21924,19 +23518,20 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -21948,22 +23543,23 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, func (d *Decoder) fastpathDecMapUintUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]uintptr) - if v, changed := fastpathTV.DecMapUintUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintUintptrV(rv2i(rv).(map[uint]uintptr), false, d) } - fastpathTV.DecMapUintUintptrV(rv2i(rv).(map[uint]uintptr), false, d) } func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, d *Decoder) { - if v, changed := f.DecMapUintUintptrV(*vp, true, d); changed { + v, changed := f.DecMapUintUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, d *Decoder) (_ map[uint]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -21974,7 +23570,6 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv uintptr hasLen := containerLen > 0 @@ -21982,19 +23577,20 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -22006,22 +23602,23 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUintIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]int) - if v, changed := fastpathTV.DecMapUintIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintIntV(rv2i(rv).(map[uint]int), false, d) } - fastpathTV.DecMapUintIntV(rv2i(rv).(map[uint]int), false, d) } func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) { - if v, changed := f.DecMapUintIntV(*vp, true, d); changed { + v, changed := f.DecMapUintIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, d *Decoder) (_ map[uint]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -22032,7 +23629,6 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv int hasLen := containerLen > 0 @@ -22040,19 +23636,20 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -22064,22 +23661,23 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, func (d *Decoder) fastpathDecMapUintInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]int8) - if v, changed := fastpathTV.DecMapUintInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintInt8V(rv2i(rv).(map[uint]int8), false, d) } - fastpathTV.DecMapUintInt8V(rv2i(rv).(map[uint]int8), false, d) } func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, d *Decoder) { - if v, changed := f.DecMapUintInt8V(*vp, true, d); changed { + v, changed := f.DecMapUintInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, d *Decoder) (_ map[uint]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22090,7 +23688,6 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv int8 hasLen := containerLen > 0 @@ -22098,19 +23695,20 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -22122,22 +23720,23 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, func (d *Decoder) fastpathDecMapUintInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]int16) - if v, changed := fastpathTV.DecMapUintInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintInt16V(rv2i(rv).(map[uint]int16), false, d) } - fastpathTV.DecMapUintInt16V(rv2i(rv).(map[uint]int16), false, d) } func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, d *Decoder) { - if v, changed := f.DecMapUintInt16V(*vp, true, d); changed { + v, changed := f.DecMapUintInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, d *Decoder) (_ map[uint]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -22148,7 +23747,6 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv int16 hasLen := containerLen > 0 @@ -22156,19 +23754,20 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -22180,22 +23779,23 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, func (d *Decoder) fastpathDecMapUintInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]int32) - if v, changed := fastpathTV.DecMapUintInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintInt32V(rv2i(rv).(map[uint]int32), false, d) } - fastpathTV.DecMapUintInt32V(rv2i(rv).(map[uint]int32), false, d) } func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, d *Decoder) { - if v, changed := f.DecMapUintInt32V(*vp, true, d); changed { + v, changed := f.DecMapUintInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, d *Decoder) (_ map[uint]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22206,7 +23806,6 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv int32 hasLen := containerLen > 0 @@ -22214,19 +23813,20 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -22238,22 +23838,23 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, func (d *Decoder) fastpathDecMapUintInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]int64) - if v, changed := fastpathTV.DecMapUintInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintInt64V(rv2i(rv).(map[uint]int64), false, d) } - fastpathTV.DecMapUintInt64V(rv2i(rv).(map[uint]int64), false, d) } func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) { - if v, changed := f.DecMapUintInt64V(*vp, true, d); changed { + v, changed := f.DecMapUintInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, d *Decoder) (_ map[uint]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -22264,7 +23865,6 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv int64 hasLen := containerLen > 0 @@ -22272,19 +23872,20 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -22296,22 +23897,23 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, func (d *Decoder) fastpathDecMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]float32) - if v, changed := fastpathTV.DecMapUintFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintFloat32V(rv2i(rv).(map[uint]float32), false, d) } - fastpathTV.DecMapUintFloat32V(rv2i(rv).(map[uint]float32), false, d) } func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) { - if v, changed := f.DecMapUintFloat32V(*vp, true, d); changed { + v, changed := f.DecMapUintFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, d *Decoder) (_ map[uint]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22322,7 +23924,6 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv float32 hasLen := containerLen > 0 @@ -22330,19 +23931,20 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -22354,22 +23956,23 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, func (d *Decoder) fastpathDecMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]float64) - if v, changed := fastpathTV.DecMapUintFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintFloat64V(rv2i(rv).(map[uint]float64), false, d) } - fastpathTV.DecMapUintFloat64V(rv2i(rv).(map[uint]float64), false, d) } func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) { - if v, changed := f.DecMapUintFloat64V(*vp, true, d); changed { + v, changed := f.DecMapUintFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, d *Decoder) (_ map[uint]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -22380,7 +23983,6 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv float64 hasLen := containerLen > 0 @@ -22388,19 +23990,20 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -22412,22 +24015,23 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, func (d *Decoder) fastpathDecMapUintBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint]bool) - if v, changed := fastpathTV.DecMapUintBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintBoolV(rv2i(rv).(map[uint]bool), false, d) } - fastpathTV.DecMapUintBoolV(rv2i(rv).(map[uint]bool), false, d) } func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) { - if v, changed := f.DecMapUintBoolV(*vp, true, d); changed { + v, changed := f.DecMapUintBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, d *Decoder) (_ map[uint]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22438,7 +24042,6 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint var mv bool hasLen := containerLen > 0 @@ -22446,12 +24049,13 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint(dd.DecodeUint(uintBitsize)) + mk = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -22470,22 +24074,23 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, func (d *Decoder) fastpathDecMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]interface{}) - if v, changed := fastpathTV.DecMapUint8IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), false, d) } - fastpathTV.DecMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), false, d) } func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) { - if v, changed := f.DecMapUint8IntfV(*vp, true, d); changed { + v, changed := f.DecMapUint8IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, d *Decoder) (_ map[uint8]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -22496,7 +24101,7 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uint8 var mv interface{} hasLen := containerLen > 0 @@ -22504,12 +24109,13 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -22533,22 +24139,23 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUint8StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]string) - if v, changed := fastpathTV.DecMapUint8StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8StringV(rv2i(rv).(map[uint8]string), false, d) } - fastpathTV.DecMapUint8StringV(rv2i(rv).(map[uint8]string), false, d) } func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) { - if v, changed := f.DecMapUint8StringV(*vp, true, d); changed { + v, changed := f.DecMapUint8StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, d *Decoder) (_ map[uint8]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -22559,7 +24166,6 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv string hasLen := containerLen > 0 @@ -22567,12 +24173,13 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -22591,22 +24198,23 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, func (d *Decoder) fastpathDecMapUint8UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uint) - if v, changed := fastpathTV.DecMapUint8UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8UintV(rv2i(rv).(map[uint8]uint), false, d) } - fastpathTV.DecMapUint8UintV(rv2i(rv).(map[uint8]uint), false, d) } func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) { - if v, changed := f.DecMapUint8UintV(*vp, true, d); changed { + v, changed := f.DecMapUint8UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, d *Decoder) (_ map[uint8]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22617,7 +24225,6 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uint hasLen := containerLen > 0 @@ -22625,19 +24232,20 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -22649,22 +24257,23 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, func (d *Decoder) fastpathDecMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uint8) - if v, changed := fastpathTV.DecMapUint8Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), false, d) } - fastpathTV.DecMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), false, d) } func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) { - if v, changed := f.DecMapUint8Uint8V(*vp, true, d); changed { + v, changed := f.DecMapUint8Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, d *Decoder) (_ map[uint8]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -22675,7 +24284,6 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uint8 hasLen := containerLen > 0 @@ -22683,19 +24291,20 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -22707,22 +24316,23 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, func (d *Decoder) fastpathDecMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uint16) - if v, changed := fastpathTV.DecMapUint8Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), false, d) } - fastpathTV.DecMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), false, d) } func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, d *Decoder) { - if v, changed := f.DecMapUint8Uint16V(*vp, true, d); changed { + v, changed := f.DecMapUint8Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, d *Decoder) (_ map[uint8]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -22733,7 +24343,6 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uint16 hasLen := containerLen > 0 @@ -22741,19 +24350,20 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -22765,22 +24375,23 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, func (d *Decoder) fastpathDecMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uint32) - if v, changed := fastpathTV.DecMapUint8Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), false, d) } - fastpathTV.DecMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), false, d) } func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, d *Decoder) { - if v, changed := f.DecMapUint8Uint32V(*vp, true, d); changed { + v, changed := f.DecMapUint8Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, d *Decoder) (_ map[uint8]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -22791,7 +24402,6 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uint32 hasLen := containerLen > 0 @@ -22799,19 +24409,20 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -22823,22 +24434,23 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, func (d *Decoder) fastpathDecMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uint64) - if v, changed := fastpathTV.DecMapUint8Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), false, d) } - fastpathTV.DecMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), false, d) } func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) { - if v, changed := f.DecMapUint8Uint64V(*vp, true, d); changed { + v, changed := f.DecMapUint8Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, d *Decoder) (_ map[uint8]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22849,7 +24461,6 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uint64 hasLen := containerLen > 0 @@ -22857,19 +24468,20 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -22881,22 +24493,23 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, func (d *Decoder) fastpathDecMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]uintptr) - if v, changed := fastpathTV.DecMapUint8UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), false, d) } - fastpathTV.DecMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), false, d) } func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, d *Decoder) { - if v, changed := f.DecMapUint8UintptrV(*vp, true, d); changed { + v, changed := f.DecMapUint8UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, d *Decoder) (_ map[uint8]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22907,7 +24520,6 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv uintptr hasLen := containerLen > 0 @@ -22915,19 +24527,20 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -22939,22 +24552,23 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUint8IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]int) - if v, changed := fastpathTV.DecMapUint8IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8IntV(rv2i(rv).(map[uint8]int), false, d) } - fastpathTV.DecMapUint8IntV(rv2i(rv).(map[uint8]int), false, d) } func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) { - if v, changed := f.DecMapUint8IntV(*vp, true, d); changed { + v, changed := f.DecMapUint8IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, d *Decoder) (_ map[uint8]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -22965,7 +24579,6 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv int hasLen := containerLen > 0 @@ -22973,19 +24586,20 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -22997,22 +24611,23 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, func (d *Decoder) fastpathDecMapUint8Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]int8) - if v, changed := fastpathTV.DecMapUint8Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Int8V(rv2i(rv).(map[uint8]int8), false, d) } - fastpathTV.DecMapUint8Int8V(rv2i(rv).(map[uint8]int8), false, d) } func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, d *Decoder) { - if v, changed := f.DecMapUint8Int8V(*vp, true, d); changed { + v, changed := f.DecMapUint8Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, d *Decoder) (_ map[uint8]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -23023,7 +24638,6 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv int8 hasLen := containerLen > 0 @@ -23031,19 +24645,20 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -23055,22 +24670,23 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, func (d *Decoder) fastpathDecMapUint8Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]int16) - if v, changed := fastpathTV.DecMapUint8Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Int16V(rv2i(rv).(map[uint8]int16), false, d) } - fastpathTV.DecMapUint8Int16V(rv2i(rv).(map[uint8]int16), false, d) } func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, d *Decoder) { - if v, changed := f.DecMapUint8Int16V(*vp, true, d); changed { + v, changed := f.DecMapUint8Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, d *Decoder) (_ map[uint8]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -23081,7 +24697,6 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv int16 hasLen := containerLen > 0 @@ -23089,19 +24704,20 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -23113,22 +24729,23 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, func (d *Decoder) fastpathDecMapUint8Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]int32) - if v, changed := fastpathTV.DecMapUint8Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Int32V(rv2i(rv).(map[uint8]int32), false, d) } - fastpathTV.DecMapUint8Int32V(rv2i(rv).(map[uint8]int32), false, d) } func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, d *Decoder) { - if v, changed := f.DecMapUint8Int32V(*vp, true, d); changed { + v, changed := f.DecMapUint8Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, d *Decoder) (_ map[uint8]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -23139,7 +24756,6 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv int32 hasLen := containerLen > 0 @@ -23147,19 +24763,20 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -23171,22 +24788,23 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, func (d *Decoder) fastpathDecMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]int64) - if v, changed := fastpathTV.DecMapUint8Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Int64V(rv2i(rv).(map[uint8]int64), false, d) } - fastpathTV.DecMapUint8Int64V(rv2i(rv).(map[uint8]int64), false, d) } func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) { - if v, changed := f.DecMapUint8Int64V(*vp, true, d); changed { + v, changed := f.DecMapUint8Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, d *Decoder) (_ map[uint8]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -23197,7 +24815,6 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv int64 hasLen := containerLen > 0 @@ -23205,19 +24822,20 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -23229,22 +24847,23 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, func (d *Decoder) fastpathDecMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]float32) - if v, changed := fastpathTV.DecMapUint8Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Float32V(rv2i(rv).(map[uint8]float32), false, d) } - fastpathTV.DecMapUint8Float32V(rv2i(rv).(map[uint8]float32), false, d) } func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) { - if v, changed := f.DecMapUint8Float32V(*vp, true, d); changed { + v, changed := f.DecMapUint8Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, d *Decoder) (_ map[uint8]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -23255,7 +24874,6 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv float32 hasLen := containerLen > 0 @@ -23263,19 +24881,20 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -23287,22 +24906,23 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, func (d *Decoder) fastpathDecMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]float64) - if v, changed := fastpathTV.DecMapUint8Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8Float64V(rv2i(rv).(map[uint8]float64), false, d) } - fastpathTV.DecMapUint8Float64V(rv2i(rv).(map[uint8]float64), false, d) } func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) { - if v, changed := f.DecMapUint8Float64V(*vp, true, d); changed { + v, changed := f.DecMapUint8Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, d *Decoder) (_ map[uint8]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -23313,7 +24933,6 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv float64 hasLen := containerLen > 0 @@ -23321,19 +24940,20 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -23345,22 +24965,23 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, func (d *Decoder) fastpathDecMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint8]bool) - if v, changed := fastpathTV.DecMapUint8BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint8BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint8BoolV(rv2i(rv).(map[uint8]bool), false, d) } - fastpathTV.DecMapUint8BoolV(rv2i(rv).(map[uint8]bool), false, d) } func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) { - if v, changed := f.DecMapUint8BoolV(*vp, true, d); changed { + v, changed := f.DecMapUint8BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, d *Decoder) (_ map[uint8]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -23371,7 +24992,6 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint8 var mv bool hasLen := containerLen > 0 @@ -23379,12 +24999,13 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint8(dd.DecodeUint(8)) + mk = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -23403,22 +25024,23 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, func (d *Decoder) fastpathDecMapUint16IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]interface{}) - if v, changed := fastpathTV.DecMapUint16IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), false, d) } - fastpathTV.DecMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), false, d) } func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, d *Decoder) { - if v, changed := f.DecMapUint16IntfV(*vp, true, d); changed { + v, changed := f.DecMapUint16IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, d *Decoder) (_ map[uint16]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -23429,7 +25051,7 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uint16 var mv interface{} hasLen := containerLen > 0 @@ -23437,12 +25059,13 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -23466,22 +25089,23 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUint16StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]string) - if v, changed := fastpathTV.DecMapUint16StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16StringV(rv2i(rv).(map[uint16]string), false, d) } - fastpathTV.DecMapUint16StringV(rv2i(rv).(map[uint16]string), false, d) } func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, d *Decoder) { - if v, changed := f.DecMapUint16StringV(*vp, true, d); changed { + v, changed := f.DecMapUint16StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, d *Decoder) (_ map[uint16]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -23492,7 +25116,6 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv string hasLen := containerLen > 0 @@ -23500,12 +25123,13 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -23524,22 +25148,23 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, func (d *Decoder) fastpathDecMapUint16UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uint) - if v, changed := fastpathTV.DecMapUint16UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16UintV(rv2i(rv).(map[uint16]uint), false, d) } - fastpathTV.DecMapUint16UintV(rv2i(rv).(map[uint16]uint), false, d) } func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, d *Decoder) { - if v, changed := f.DecMapUint16UintV(*vp, true, d); changed { + v, changed := f.DecMapUint16UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, d *Decoder) (_ map[uint16]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23550,7 +25175,6 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uint hasLen := containerLen > 0 @@ -23558,19 +25182,20 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -23582,22 +25207,23 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, func (d *Decoder) fastpathDecMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uint8) - if v, changed := fastpathTV.DecMapUint16Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), false, d) } - fastpathTV.DecMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), false, d) } func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, d *Decoder) { - if v, changed := f.DecMapUint16Uint8V(*vp, true, d); changed { + v, changed := f.DecMapUint16Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, d *Decoder) (_ map[uint16]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -23608,7 +25234,6 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uint8 hasLen := containerLen > 0 @@ -23616,19 +25241,20 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -23640,22 +25266,23 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, func (d *Decoder) fastpathDecMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uint16) - if v, changed := fastpathTV.DecMapUint16Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), false, d) } - fastpathTV.DecMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), false, d) } func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, d *Decoder) { - if v, changed := f.DecMapUint16Uint16V(*vp, true, d); changed { + v, changed := f.DecMapUint16Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, d *Decoder) (_ map[uint16]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -23666,7 +25293,6 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uint16 hasLen := containerLen > 0 @@ -23674,19 +25300,20 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -23698,22 +25325,23 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, func (d *Decoder) fastpathDecMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uint32) - if v, changed := fastpathTV.DecMapUint16Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), false, d) } - fastpathTV.DecMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), false, d) } func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, d *Decoder) { - if v, changed := f.DecMapUint16Uint32V(*vp, true, d); changed { + v, changed := f.DecMapUint16Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, d *Decoder) (_ map[uint16]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -23724,7 +25352,6 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uint32 hasLen := containerLen > 0 @@ -23732,19 +25359,20 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -23756,22 +25384,23 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, func (d *Decoder) fastpathDecMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uint64) - if v, changed := fastpathTV.DecMapUint16Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), false, d) } - fastpathTV.DecMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), false, d) } func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, d *Decoder) { - if v, changed := f.DecMapUint16Uint64V(*vp, true, d); changed { + v, changed := f.DecMapUint16Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, d *Decoder) (_ map[uint16]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23782,7 +25411,6 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uint64 hasLen := containerLen > 0 @@ -23790,19 +25418,20 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -23814,22 +25443,23 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, func (d *Decoder) fastpathDecMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]uintptr) - if v, changed := fastpathTV.DecMapUint16UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), false, d) } - fastpathTV.DecMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), false, d) } func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, d *Decoder) { - if v, changed := f.DecMapUint16UintptrV(*vp, true, d); changed { + v, changed := f.DecMapUint16UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, d *Decoder) (_ map[uint16]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23840,7 +25470,6 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv uintptr hasLen := containerLen > 0 @@ -23848,19 +25477,20 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -23872,22 +25502,23 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUint16IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]int) - if v, changed := fastpathTV.DecMapUint16IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16IntV(rv2i(rv).(map[uint16]int), false, d) } - fastpathTV.DecMapUint16IntV(rv2i(rv).(map[uint16]int), false, d) } func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, d *Decoder) { - if v, changed := f.DecMapUint16IntV(*vp, true, d); changed { + v, changed := f.DecMapUint16IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, d *Decoder) (_ map[uint16]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23898,7 +25529,6 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv int hasLen := containerLen > 0 @@ -23906,19 +25536,20 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -23930,22 +25561,23 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, func (d *Decoder) fastpathDecMapUint16Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]int8) - if v, changed := fastpathTV.DecMapUint16Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Int8V(rv2i(rv).(map[uint16]int8), false, d) } - fastpathTV.DecMapUint16Int8V(rv2i(rv).(map[uint16]int8), false, d) } func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, d *Decoder) { - if v, changed := f.DecMapUint16Int8V(*vp, true, d); changed { + v, changed := f.DecMapUint16Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, d *Decoder) (_ map[uint16]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -23956,7 +25588,6 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv int8 hasLen := containerLen > 0 @@ -23964,19 +25595,20 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -23988,22 +25620,23 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, func (d *Decoder) fastpathDecMapUint16Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]int16) - if v, changed := fastpathTV.DecMapUint16Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Int16V(rv2i(rv).(map[uint16]int16), false, d) } - fastpathTV.DecMapUint16Int16V(rv2i(rv).(map[uint16]int16), false, d) } func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, d *Decoder) { - if v, changed := f.DecMapUint16Int16V(*vp, true, d); changed { + v, changed := f.DecMapUint16Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, d *Decoder) (_ map[uint16]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -24014,7 +25647,6 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv int16 hasLen := containerLen > 0 @@ -24022,19 +25654,20 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -24046,22 +25679,23 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, func (d *Decoder) fastpathDecMapUint16Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]int32) - if v, changed := fastpathTV.DecMapUint16Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Int32V(rv2i(rv).(map[uint16]int32), false, d) } - fastpathTV.DecMapUint16Int32V(rv2i(rv).(map[uint16]int32), false, d) } func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, d *Decoder) { - if v, changed := f.DecMapUint16Int32V(*vp, true, d); changed { + v, changed := f.DecMapUint16Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, d *Decoder) (_ map[uint16]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -24072,7 +25706,6 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv int32 hasLen := containerLen > 0 @@ -24080,19 +25713,20 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -24104,22 +25738,23 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, func (d *Decoder) fastpathDecMapUint16Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]int64) - if v, changed := fastpathTV.DecMapUint16Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Int64V(rv2i(rv).(map[uint16]int64), false, d) } - fastpathTV.DecMapUint16Int64V(rv2i(rv).(map[uint16]int64), false, d) } func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, d *Decoder) { - if v, changed := f.DecMapUint16Int64V(*vp, true, d); changed { + v, changed := f.DecMapUint16Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, d *Decoder) (_ map[uint16]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -24130,7 +25765,6 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv int64 hasLen := containerLen > 0 @@ -24138,19 +25772,20 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -24162,22 +25797,23 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, func (d *Decoder) fastpathDecMapUint16Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]float32) - if v, changed := fastpathTV.DecMapUint16Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Float32V(rv2i(rv).(map[uint16]float32), false, d) } - fastpathTV.DecMapUint16Float32V(rv2i(rv).(map[uint16]float32), false, d) } func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, d *Decoder) { - if v, changed := f.DecMapUint16Float32V(*vp, true, d); changed { + v, changed := f.DecMapUint16Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, d *Decoder) (_ map[uint16]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -24188,7 +25824,6 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv float32 hasLen := containerLen > 0 @@ -24196,19 +25831,20 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -24220,22 +25856,23 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, func (d *Decoder) fastpathDecMapUint16Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]float64) - if v, changed := fastpathTV.DecMapUint16Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16Float64V(rv2i(rv).(map[uint16]float64), false, d) } - fastpathTV.DecMapUint16Float64V(rv2i(rv).(map[uint16]float64), false, d) } func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, d *Decoder) { - if v, changed := f.DecMapUint16Float64V(*vp, true, d); changed { + v, changed := f.DecMapUint16Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, d *Decoder) (_ map[uint16]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -24246,7 +25883,6 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv float64 hasLen := containerLen > 0 @@ -24254,19 +25890,20 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -24278,22 +25915,23 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, func (d *Decoder) fastpathDecMapUint16BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint16]bool) - if v, changed := fastpathTV.DecMapUint16BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint16BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint16BoolV(rv2i(rv).(map[uint16]bool), false, d) } - fastpathTV.DecMapUint16BoolV(rv2i(rv).(map[uint16]bool), false, d) } func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, d *Decoder) { - if v, changed := f.DecMapUint16BoolV(*vp, true, d); changed { + v, changed := f.DecMapUint16BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, d *Decoder) (_ map[uint16]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -24304,7 +25942,6 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint16 var mv bool hasLen := containerLen > 0 @@ -24312,12 +25949,13 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint16(dd.DecodeUint(16)) + mk = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -24336,22 +25974,23 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, func (d *Decoder) fastpathDecMapUint32IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]interface{}) - if v, changed := fastpathTV.DecMapUint32IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), false, d) } - fastpathTV.DecMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), false, d) } func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, d *Decoder) { - if v, changed := f.DecMapUint32IntfV(*vp, true, d); changed { + v, changed := f.DecMapUint32IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, d *Decoder) (_ map[uint32]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -24362,7 +26001,7 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uint32 var mv interface{} hasLen := containerLen > 0 @@ -24370,12 +26009,13 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -24399,22 +26039,23 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUint32StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]string) - if v, changed := fastpathTV.DecMapUint32StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32StringV(rv2i(rv).(map[uint32]string), false, d) } - fastpathTV.DecMapUint32StringV(rv2i(rv).(map[uint32]string), false, d) } func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, d *Decoder) { - if v, changed := f.DecMapUint32StringV(*vp, true, d); changed { + v, changed := f.DecMapUint32StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, d *Decoder) (_ map[uint32]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -24425,7 +26066,6 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv string hasLen := containerLen > 0 @@ -24433,12 +26073,13 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -24457,22 +26098,23 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, func (d *Decoder) fastpathDecMapUint32UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uint) - if v, changed := fastpathTV.DecMapUint32UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32UintV(rv2i(rv).(map[uint32]uint), false, d) } - fastpathTV.DecMapUint32UintV(rv2i(rv).(map[uint32]uint), false, d) } func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, d *Decoder) { - if v, changed := f.DecMapUint32UintV(*vp, true, d); changed { + v, changed := f.DecMapUint32UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, d *Decoder) (_ map[uint32]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24483,7 +26125,6 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uint hasLen := containerLen > 0 @@ -24491,19 +26132,20 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -24515,22 +26157,23 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, func (d *Decoder) fastpathDecMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uint8) - if v, changed := fastpathTV.DecMapUint32Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), false, d) } - fastpathTV.DecMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), false, d) } func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, d *Decoder) { - if v, changed := f.DecMapUint32Uint8V(*vp, true, d); changed { + v, changed := f.DecMapUint32Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, d *Decoder) (_ map[uint32]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -24541,7 +26184,6 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uint8 hasLen := containerLen > 0 @@ -24549,19 +26191,20 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -24573,22 +26216,23 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, func (d *Decoder) fastpathDecMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uint16) - if v, changed := fastpathTV.DecMapUint32Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), false, d) } - fastpathTV.DecMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), false, d) } func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, d *Decoder) { - if v, changed := f.DecMapUint32Uint16V(*vp, true, d); changed { + v, changed := f.DecMapUint32Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, d *Decoder) (_ map[uint32]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -24599,7 +26243,6 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uint16 hasLen := containerLen > 0 @@ -24607,19 +26250,20 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -24631,22 +26275,23 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, func (d *Decoder) fastpathDecMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uint32) - if v, changed := fastpathTV.DecMapUint32Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), false, d) } - fastpathTV.DecMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), false, d) } func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, d *Decoder) { - if v, changed := f.DecMapUint32Uint32V(*vp, true, d); changed { + v, changed := f.DecMapUint32Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, d *Decoder) (_ map[uint32]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -24657,7 +26302,6 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uint32 hasLen := containerLen > 0 @@ -24665,19 +26309,20 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -24689,22 +26334,23 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, func (d *Decoder) fastpathDecMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uint64) - if v, changed := fastpathTV.DecMapUint32Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), false, d) } - fastpathTV.DecMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), false, d) } func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, d *Decoder) { - if v, changed := f.DecMapUint32Uint64V(*vp, true, d); changed { + v, changed := f.DecMapUint32Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, d *Decoder) (_ map[uint32]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24715,7 +26361,6 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uint64 hasLen := containerLen > 0 @@ -24723,19 +26368,20 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -24747,22 +26393,23 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, func (d *Decoder) fastpathDecMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]uintptr) - if v, changed := fastpathTV.DecMapUint32UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), false, d) } - fastpathTV.DecMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), false, d) } func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, d *Decoder) { - if v, changed := f.DecMapUint32UintptrV(*vp, true, d); changed { + v, changed := f.DecMapUint32UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, d *Decoder) (_ map[uint32]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24773,7 +26420,6 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv uintptr hasLen := containerLen > 0 @@ -24781,19 +26427,20 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -24805,22 +26452,23 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUint32IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]int) - if v, changed := fastpathTV.DecMapUint32IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32IntV(rv2i(rv).(map[uint32]int), false, d) } - fastpathTV.DecMapUint32IntV(rv2i(rv).(map[uint32]int), false, d) } func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, d *Decoder) { - if v, changed := f.DecMapUint32IntV(*vp, true, d); changed { + v, changed := f.DecMapUint32IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, d *Decoder) (_ map[uint32]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24831,7 +26479,6 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv int hasLen := containerLen > 0 @@ -24839,19 +26486,20 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -24863,22 +26511,23 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, func (d *Decoder) fastpathDecMapUint32Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]int8) - if v, changed := fastpathTV.DecMapUint32Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Int8V(rv2i(rv).(map[uint32]int8), false, d) } - fastpathTV.DecMapUint32Int8V(rv2i(rv).(map[uint32]int8), false, d) } func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, d *Decoder) { - if v, changed := f.DecMapUint32Int8V(*vp, true, d); changed { + v, changed := f.DecMapUint32Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, d *Decoder) (_ map[uint32]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -24889,7 +26538,6 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv int8 hasLen := containerLen > 0 @@ -24897,19 +26545,20 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -24921,22 +26570,23 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, func (d *Decoder) fastpathDecMapUint32Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]int16) - if v, changed := fastpathTV.DecMapUint32Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Int16V(rv2i(rv).(map[uint32]int16), false, d) } - fastpathTV.DecMapUint32Int16V(rv2i(rv).(map[uint32]int16), false, d) } func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, d *Decoder) { - if v, changed := f.DecMapUint32Int16V(*vp, true, d); changed { + v, changed := f.DecMapUint32Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, d *Decoder) (_ map[uint32]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -24947,7 +26597,6 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv int16 hasLen := containerLen > 0 @@ -24955,19 +26604,20 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -24979,22 +26629,23 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, func (d *Decoder) fastpathDecMapUint32Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]int32) - if v, changed := fastpathTV.DecMapUint32Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Int32V(rv2i(rv).(map[uint32]int32), false, d) } - fastpathTV.DecMapUint32Int32V(rv2i(rv).(map[uint32]int32), false, d) } func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, d *Decoder) { - if v, changed := f.DecMapUint32Int32V(*vp, true, d); changed { + v, changed := f.DecMapUint32Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, d *Decoder) (_ map[uint32]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -25005,7 +26656,6 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv int32 hasLen := containerLen > 0 @@ -25013,19 +26663,20 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -25037,22 +26688,23 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, func (d *Decoder) fastpathDecMapUint32Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]int64) - if v, changed := fastpathTV.DecMapUint32Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Int64V(rv2i(rv).(map[uint32]int64), false, d) } - fastpathTV.DecMapUint32Int64V(rv2i(rv).(map[uint32]int64), false, d) } func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, d *Decoder) { - if v, changed := f.DecMapUint32Int64V(*vp, true, d); changed { + v, changed := f.DecMapUint32Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, d *Decoder) (_ map[uint32]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -25063,7 +26715,6 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv int64 hasLen := containerLen > 0 @@ -25071,19 +26722,20 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -25095,22 +26747,23 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, func (d *Decoder) fastpathDecMapUint32Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]float32) - if v, changed := fastpathTV.DecMapUint32Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Float32V(rv2i(rv).(map[uint32]float32), false, d) } - fastpathTV.DecMapUint32Float32V(rv2i(rv).(map[uint32]float32), false, d) } func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, d *Decoder) { - if v, changed := f.DecMapUint32Float32V(*vp, true, d); changed { + v, changed := f.DecMapUint32Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, d *Decoder) (_ map[uint32]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -25121,7 +26774,6 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv float32 hasLen := containerLen > 0 @@ -25129,19 +26781,20 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -25153,22 +26806,23 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, func (d *Decoder) fastpathDecMapUint32Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]float64) - if v, changed := fastpathTV.DecMapUint32Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32Float64V(rv2i(rv).(map[uint32]float64), false, d) } - fastpathTV.DecMapUint32Float64V(rv2i(rv).(map[uint32]float64), false, d) } func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, d *Decoder) { - if v, changed := f.DecMapUint32Float64V(*vp, true, d); changed { + v, changed := f.DecMapUint32Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, d *Decoder) (_ map[uint32]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -25179,7 +26833,6 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv float64 hasLen := containerLen > 0 @@ -25187,19 +26840,20 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -25211,22 +26865,23 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, func (d *Decoder) fastpathDecMapUint32BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint32]bool) - if v, changed := fastpathTV.DecMapUint32BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint32BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint32BoolV(rv2i(rv).(map[uint32]bool), false, d) } - fastpathTV.DecMapUint32BoolV(rv2i(rv).(map[uint32]bool), false, d) } func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, d *Decoder) { - if v, changed := f.DecMapUint32BoolV(*vp, true, d); changed { + v, changed := f.DecMapUint32BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, d *Decoder) (_ map[uint32]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -25237,7 +26892,6 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint32 var mv bool hasLen := containerLen > 0 @@ -25245,12 +26899,13 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uint32(dd.DecodeUint(32)) + mk = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -25269,22 +26924,23 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, func (d *Decoder) fastpathDecMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]interface{}) - if v, changed := fastpathTV.DecMapUint64IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), false, d) } - fastpathTV.DecMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), false, d) } func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) { - if v, changed := f.DecMapUint64IntfV(*vp, true, d); changed { + v, changed := f.DecMapUint64IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, d *Decoder) (_ map[uint64]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -25295,7 +26951,7 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uint64 var mv interface{} hasLen := containerLen > 0 @@ -25303,12 +26959,13 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -25332,22 +26989,23 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUint64StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]string) - if v, changed := fastpathTV.DecMapUint64StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64StringV(rv2i(rv).(map[uint64]string), false, d) } - fastpathTV.DecMapUint64StringV(rv2i(rv).(map[uint64]string), false, d) } func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) { - if v, changed := f.DecMapUint64StringV(*vp, true, d); changed { + v, changed := f.DecMapUint64StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, d *Decoder) (_ map[uint64]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -25358,7 +27016,6 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv string hasLen := containerLen > 0 @@ -25366,12 +27023,13 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -25390,22 +27048,23 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, func (d *Decoder) fastpathDecMapUint64UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uint) - if v, changed := fastpathTV.DecMapUint64UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64UintV(rv2i(rv).(map[uint64]uint), false, d) } - fastpathTV.DecMapUint64UintV(rv2i(rv).(map[uint64]uint), false, d) } func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) { - if v, changed := f.DecMapUint64UintV(*vp, true, d); changed { + v, changed := f.DecMapUint64UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, d *Decoder) (_ map[uint64]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -25416,7 +27075,6 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uint hasLen := containerLen > 0 @@ -25424,19 +27082,20 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -25448,22 +27107,23 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, func (d *Decoder) fastpathDecMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uint8) - if v, changed := fastpathTV.DecMapUint64Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), false, d) } - fastpathTV.DecMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), false, d) } func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) { - if v, changed := f.DecMapUint64Uint8V(*vp, true, d); changed { + v, changed := f.DecMapUint64Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, d *Decoder) (_ map[uint64]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25474,7 +27134,6 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uint8 hasLen := containerLen > 0 @@ -25482,19 +27141,20 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -25506,22 +27166,23 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, func (d *Decoder) fastpathDecMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uint16) - if v, changed := fastpathTV.DecMapUint64Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), false, d) } - fastpathTV.DecMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), false, d) } func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, d *Decoder) { - if v, changed := f.DecMapUint64Uint16V(*vp, true, d); changed { + v, changed := f.DecMapUint64Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, d *Decoder) (_ map[uint64]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -25532,7 +27193,6 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uint16 hasLen := containerLen > 0 @@ -25540,19 +27200,20 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -25564,22 +27225,23 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, func (d *Decoder) fastpathDecMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uint32) - if v, changed := fastpathTV.DecMapUint64Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), false, d) } - fastpathTV.DecMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), false, d) } func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, d *Decoder) { - if v, changed := f.DecMapUint64Uint32V(*vp, true, d); changed { + v, changed := f.DecMapUint64Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, d *Decoder) (_ map[uint64]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -25590,7 +27252,6 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uint32 hasLen := containerLen > 0 @@ -25598,19 +27259,20 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -25622,22 +27284,23 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, func (d *Decoder) fastpathDecMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uint64) - if v, changed := fastpathTV.DecMapUint64Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), false, d) } - fastpathTV.DecMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), false, d) } func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) { - if v, changed := f.DecMapUint64Uint64V(*vp, true, d); changed { + v, changed := f.DecMapUint64Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, d *Decoder) (_ map[uint64]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -25648,7 +27311,6 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uint64 hasLen := containerLen > 0 @@ -25656,19 +27318,20 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -25680,22 +27343,23 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, func (d *Decoder) fastpathDecMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]uintptr) - if v, changed := fastpathTV.DecMapUint64UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), false, d) } - fastpathTV.DecMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), false, d) } func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, d *Decoder) { - if v, changed := f.DecMapUint64UintptrV(*vp, true, d); changed { + v, changed := f.DecMapUint64UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, d *Decoder) (_ map[uint64]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -25706,7 +27370,6 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv uintptr hasLen := containerLen > 0 @@ -25714,19 +27377,20 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -25738,22 +27402,23 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUint64IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]int) - if v, changed := fastpathTV.DecMapUint64IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64IntV(rv2i(rv).(map[uint64]int), false, d) } - fastpathTV.DecMapUint64IntV(rv2i(rv).(map[uint64]int), false, d) } func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) { - if v, changed := f.DecMapUint64IntV(*vp, true, d); changed { + v, changed := f.DecMapUint64IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, d *Decoder) (_ map[uint64]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -25764,7 +27429,6 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv int hasLen := containerLen > 0 @@ -25772,19 +27436,20 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -25796,22 +27461,23 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, func (d *Decoder) fastpathDecMapUint64Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]int8) - if v, changed := fastpathTV.DecMapUint64Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Int8V(rv2i(rv).(map[uint64]int8), false, d) } - fastpathTV.DecMapUint64Int8V(rv2i(rv).(map[uint64]int8), false, d) } func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, d *Decoder) { - if v, changed := f.DecMapUint64Int8V(*vp, true, d); changed { + v, changed := f.DecMapUint64Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, d *Decoder) (_ map[uint64]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25822,7 +27488,6 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv int8 hasLen := containerLen > 0 @@ -25830,19 +27495,20 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -25854,22 +27520,23 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, func (d *Decoder) fastpathDecMapUint64Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]int16) - if v, changed := fastpathTV.DecMapUint64Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Int16V(rv2i(rv).(map[uint64]int16), false, d) } - fastpathTV.DecMapUint64Int16V(rv2i(rv).(map[uint64]int16), false, d) } func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, d *Decoder) { - if v, changed := f.DecMapUint64Int16V(*vp, true, d); changed { + v, changed := f.DecMapUint64Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, d *Decoder) (_ map[uint64]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -25880,7 +27547,6 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv int16 hasLen := containerLen > 0 @@ -25888,19 +27554,20 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -25912,22 +27579,23 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, func (d *Decoder) fastpathDecMapUint64Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]int32) - if v, changed := fastpathTV.DecMapUint64Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Int32V(rv2i(rv).(map[uint64]int32), false, d) } - fastpathTV.DecMapUint64Int32V(rv2i(rv).(map[uint64]int32), false, d) } func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, d *Decoder) { - if v, changed := f.DecMapUint64Int32V(*vp, true, d); changed { + v, changed := f.DecMapUint64Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, d *Decoder) (_ map[uint64]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -25938,7 +27606,6 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv int32 hasLen := containerLen > 0 @@ -25946,19 +27613,20 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -25970,22 +27638,23 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, func (d *Decoder) fastpathDecMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]int64) - if v, changed := fastpathTV.DecMapUint64Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Int64V(rv2i(rv).(map[uint64]int64), false, d) } - fastpathTV.DecMapUint64Int64V(rv2i(rv).(map[uint64]int64), false, d) } func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) { - if v, changed := f.DecMapUint64Int64V(*vp, true, d); changed { + v, changed := f.DecMapUint64Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, d *Decoder) (_ map[uint64]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -25996,7 +27665,6 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv int64 hasLen := containerLen > 0 @@ -26004,19 +27672,20 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -26028,22 +27697,23 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, func (d *Decoder) fastpathDecMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]float32) - if v, changed := fastpathTV.DecMapUint64Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Float32V(rv2i(rv).(map[uint64]float32), false, d) } - fastpathTV.DecMapUint64Float32V(rv2i(rv).(map[uint64]float32), false, d) } func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) { - if v, changed := f.DecMapUint64Float32V(*vp, true, d); changed { + v, changed := f.DecMapUint64Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, d *Decoder) (_ map[uint64]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -26054,7 +27724,6 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv float32 hasLen := containerLen > 0 @@ -26062,19 +27731,20 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -26086,22 +27756,23 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, func (d *Decoder) fastpathDecMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]float64) - if v, changed := fastpathTV.DecMapUint64Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64Float64V(rv2i(rv).(map[uint64]float64), false, d) } - fastpathTV.DecMapUint64Float64V(rv2i(rv).(map[uint64]float64), false, d) } func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) { - if v, changed := f.DecMapUint64Float64V(*vp, true, d); changed { + v, changed := f.DecMapUint64Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, d *Decoder) (_ map[uint64]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26112,7 +27783,6 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv float64 hasLen := containerLen > 0 @@ -26120,19 +27790,20 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -26144,22 +27815,23 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, func (d *Decoder) fastpathDecMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uint64]bool) - if v, changed := fastpathTV.DecMapUint64BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUint64BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUint64BoolV(rv2i(rv).(map[uint64]bool), false, d) } - fastpathTV.DecMapUint64BoolV(rv2i(rv).(map[uint64]bool), false, d) } func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) { - if v, changed := f.DecMapUint64BoolV(*vp, true, d); changed { + v, changed := f.DecMapUint64BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, d *Decoder) (_ map[uint64]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -26170,7 +27842,6 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uint64 var mv bool hasLen := containerLen > 0 @@ -26178,12 +27849,13 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeUint(64) + mk = dd.DecodeUint64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -26202,22 +27874,23 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, func (d *Decoder) fastpathDecMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]interface{}) - if v, changed := fastpathTV.DecMapUintptrIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), false, d) } - fastpathTV.DecMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), false, d) } func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, d *Decoder) { - if v, changed := f.DecMapUintptrIntfV(*vp, true, d); changed { + v, changed := f.DecMapUintptrIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, d *Decoder) (_ map[uintptr]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -26228,7 +27901,7 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk uintptr var mv interface{} hasLen := containerLen > 0 @@ -26236,12 +27909,13 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -26265,22 +27939,23 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, func (d *Decoder) fastpathDecMapUintptrStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]string) - if v, changed := fastpathTV.DecMapUintptrStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrStringV(rv2i(rv).(map[uintptr]string), false, d) } - fastpathTV.DecMapUintptrStringV(rv2i(rv).(map[uintptr]string), false, d) } func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, d *Decoder) { - if v, changed := f.DecMapUintptrStringV(*vp, true, d); changed { + v, changed := f.DecMapUintptrStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, d *Decoder) (_ map[uintptr]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -26291,7 +27966,6 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv string hasLen := containerLen > 0 @@ -26299,12 +27973,13 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -26323,22 +27998,23 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, func (d *Decoder) fastpathDecMapUintptrUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uint) - if v, changed := fastpathTV.DecMapUintptrUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUintV(rv2i(rv).(map[uintptr]uint), false, d) } - fastpathTV.DecMapUintptrUintV(rv2i(rv).(map[uintptr]uint), false, d) } func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, d *Decoder) { - if v, changed := f.DecMapUintptrUintV(*vp, true, d); changed { + v, changed := f.DecMapUintptrUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, d *Decoder) (_ map[uintptr]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26349,7 +28025,6 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uint hasLen := containerLen > 0 @@ -26357,19 +28032,20 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -26381,22 +28057,23 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, func (d *Decoder) fastpathDecMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uint8) - if v, changed := fastpathTV.DecMapUintptrUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), false, d) } - fastpathTV.DecMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), false, d) } func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, d *Decoder) { - if v, changed := f.DecMapUintptrUint8V(*vp, true, d); changed { + v, changed := f.DecMapUintptrUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, d *Decoder) (_ map[uintptr]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -26407,7 +28084,6 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uint8 hasLen := containerLen > 0 @@ -26415,19 +28091,20 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -26439,22 +28116,23 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, func (d *Decoder) fastpathDecMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uint16) - if v, changed := fastpathTV.DecMapUintptrUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), false, d) } - fastpathTV.DecMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), false, d) } func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, d *Decoder) { - if v, changed := f.DecMapUintptrUint16V(*vp, true, d); changed { + v, changed := f.DecMapUintptrUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, d *Decoder) (_ map[uintptr]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26465,7 +28143,6 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uint16 hasLen := containerLen > 0 @@ -26473,19 +28150,20 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -26497,22 +28175,23 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, func (d *Decoder) fastpathDecMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uint32) - if v, changed := fastpathTV.DecMapUintptrUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), false, d) } - fastpathTV.DecMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), false, d) } func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, d *Decoder) { - if v, changed := f.DecMapUintptrUint32V(*vp, true, d); changed { + v, changed := f.DecMapUintptrUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, d *Decoder) (_ map[uintptr]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -26523,7 +28202,6 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uint32 hasLen := containerLen > 0 @@ -26531,19 +28209,20 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -26555,22 +28234,23 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, func (d *Decoder) fastpathDecMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uint64) - if v, changed := fastpathTV.DecMapUintptrUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), false, d) } - fastpathTV.DecMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), false, d) } func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, d *Decoder) { - if v, changed := f.DecMapUintptrUint64V(*vp, true, d); changed { + v, changed := f.DecMapUintptrUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, d *Decoder) (_ map[uintptr]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26581,7 +28261,6 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uint64 hasLen := containerLen > 0 @@ -26589,19 +28268,20 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -26613,22 +28293,23 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, func (d *Decoder) fastpathDecMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]uintptr) - if v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), false, d) } - fastpathTV.DecMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), false, d) } func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, d *Decoder) { - if v, changed := f.DecMapUintptrUintptrV(*vp, true, d); changed { + v, changed := f.DecMapUintptrUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, d *Decoder) (_ map[uintptr]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26639,7 +28320,6 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv uintptr hasLen := containerLen > 0 @@ -26647,19 +28327,20 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -26671,22 +28352,23 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, func (d *Decoder) fastpathDecMapUintptrIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]int) - if v, changed := fastpathTV.DecMapUintptrIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrIntV(rv2i(rv).(map[uintptr]int), false, d) } - fastpathTV.DecMapUintptrIntV(rv2i(rv).(map[uintptr]int), false, d) } func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, d *Decoder) { - if v, changed := f.DecMapUintptrIntV(*vp, true, d); changed { + v, changed := f.DecMapUintptrIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, d *Decoder) (_ map[uintptr]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26697,7 +28379,6 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv int hasLen := containerLen > 0 @@ -26705,19 +28386,20 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -26729,22 +28411,23 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, func (d *Decoder) fastpathDecMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]int8) - if v, changed := fastpathTV.DecMapUintptrInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), false, d) } - fastpathTV.DecMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), false, d) } func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, d *Decoder) { - if v, changed := f.DecMapUintptrInt8V(*vp, true, d); changed { + v, changed := f.DecMapUintptrInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, d *Decoder) (_ map[uintptr]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -26755,7 +28438,6 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv int8 hasLen := containerLen > 0 @@ -26763,19 +28445,20 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -26787,22 +28470,23 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, func (d *Decoder) fastpathDecMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]int16) - if v, changed := fastpathTV.DecMapUintptrInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), false, d) } - fastpathTV.DecMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), false, d) } func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, d *Decoder) { - if v, changed := f.DecMapUintptrInt16V(*vp, true, d); changed { + v, changed := f.DecMapUintptrInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, d *Decoder) (_ map[uintptr]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26813,7 +28497,6 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv int16 hasLen := containerLen > 0 @@ -26821,19 +28504,20 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -26845,22 +28529,23 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, func (d *Decoder) fastpathDecMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]int32) - if v, changed := fastpathTV.DecMapUintptrInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), false, d) } - fastpathTV.DecMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), false, d) } func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, d *Decoder) { - if v, changed := f.DecMapUintptrInt32V(*vp, true, d); changed { + v, changed := f.DecMapUintptrInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, d *Decoder) (_ map[uintptr]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -26871,7 +28556,6 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv int32 hasLen := containerLen > 0 @@ -26879,19 +28563,20 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -26903,22 +28588,23 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, func (d *Decoder) fastpathDecMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]int64) - if v, changed := fastpathTV.DecMapUintptrInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), false, d) } - fastpathTV.DecMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), false, d) } func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, d *Decoder) { - if v, changed := f.DecMapUintptrInt64V(*vp, true, d); changed { + v, changed := f.DecMapUintptrInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, d *Decoder) (_ map[uintptr]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -26929,7 +28615,6 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv int64 hasLen := containerLen > 0 @@ -26937,19 +28622,20 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -26961,22 +28647,23 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, func (d *Decoder) fastpathDecMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]float32) - if v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), false, d) } - fastpathTV.DecMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), false, d) } func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, d *Decoder) { - if v, changed := f.DecMapUintptrFloat32V(*vp, true, d); changed { + v, changed := f.DecMapUintptrFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, d *Decoder) (_ map[uintptr]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -26987,7 +28674,6 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv float32 hasLen := containerLen > 0 @@ -26995,19 +28681,20 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -27019,22 +28706,23 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, func (d *Decoder) fastpathDecMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]float64) - if v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), false, d) } - fastpathTV.DecMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), false, d) } func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, d *Decoder) { - if v, changed := f.DecMapUintptrFloat64V(*vp, true, d); changed { + v, changed := f.DecMapUintptrFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, d *Decoder) (_ map[uintptr]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27045,7 +28733,6 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv float64 hasLen := containerLen > 0 @@ -27053,19 +28740,20 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -27077,22 +28765,23 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, func (d *Decoder) fastpathDecMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[uintptr]bool) - if v, changed := fastpathTV.DecMapUintptrBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapUintptrBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), false, d) } - fastpathTV.DecMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), false, d) } func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, d *Decoder) { - if v, changed := f.DecMapUintptrBoolV(*vp, true, d); changed { + v, changed := f.DecMapUintptrBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, d *Decoder) (_ map[uintptr]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -27103,7 +28792,6 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk uintptr var mv bool hasLen := containerLen > 0 @@ -27111,12 +28799,13 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = uintptr(dd.DecodeUint(uintBitsize)) + mk = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -27135,22 +28824,23 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, func (d *Decoder) fastpathDecMapIntIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]interface{}) - if v, changed := fastpathTV.DecMapIntIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntIntfV(rv2i(rv).(map[int]interface{}), false, d) } - fastpathTV.DecMapIntIntfV(rv2i(rv).(map[int]interface{}), false, d) } func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) { - if v, changed := f.DecMapIntIntfV(*vp, true, d); changed { + v, changed := f.DecMapIntIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, d *Decoder) (_ map[int]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -27161,7 +28851,7 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk int var mv interface{} hasLen := containerLen > 0 @@ -27169,12 +28859,13 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -27198,22 +28889,23 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, func (d *Decoder) fastpathDecMapIntStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]string) - if v, changed := fastpathTV.DecMapIntStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntStringV(rv2i(rv).(map[int]string), false, d) } - fastpathTV.DecMapIntStringV(rv2i(rv).(map[int]string), false, d) } func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) { - if v, changed := f.DecMapIntStringV(*vp, true, d); changed { + v, changed := f.DecMapIntStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, d *Decoder) (_ map[int]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -27224,7 +28916,6 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv string hasLen := containerLen > 0 @@ -27232,12 +28923,13 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -27256,22 +28948,23 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, func (d *Decoder) fastpathDecMapIntUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uint) - if v, changed := fastpathTV.DecMapIntUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUintV(rv2i(rv).(map[int]uint), false, d) } - fastpathTV.DecMapIntUintV(rv2i(rv).(map[int]uint), false, d) } func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) { - if v, changed := f.DecMapIntUintV(*vp, true, d); changed { + v, changed := f.DecMapIntUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, d *Decoder) (_ map[int]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27282,7 +28975,6 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uint hasLen := containerLen > 0 @@ -27290,19 +28982,20 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -27314,22 +29007,23 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, func (d *Decoder) fastpathDecMapIntUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uint8) - if v, changed := fastpathTV.DecMapIntUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUint8V(rv2i(rv).(map[int]uint8), false, d) } - fastpathTV.DecMapIntUint8V(rv2i(rv).(map[int]uint8), false, d) } func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) { - if v, changed := f.DecMapIntUint8V(*vp, true, d); changed { + v, changed := f.DecMapIntUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, d *Decoder) (_ map[int]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -27340,7 +29034,6 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uint8 hasLen := containerLen > 0 @@ -27348,19 +29041,20 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -27372,22 +29066,23 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, func (d *Decoder) fastpathDecMapIntUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uint16) - if v, changed := fastpathTV.DecMapIntUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUint16V(rv2i(rv).(map[int]uint16), false, d) } - fastpathTV.DecMapIntUint16V(rv2i(rv).(map[int]uint16), false, d) } func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, d *Decoder) { - if v, changed := f.DecMapIntUint16V(*vp, true, d); changed { + v, changed := f.DecMapIntUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, d *Decoder) (_ map[int]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -27398,7 +29093,6 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uint16 hasLen := containerLen > 0 @@ -27406,19 +29100,20 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -27430,22 +29125,23 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, func (d *Decoder) fastpathDecMapIntUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uint32) - if v, changed := fastpathTV.DecMapIntUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUint32V(rv2i(rv).(map[int]uint32), false, d) } - fastpathTV.DecMapIntUint32V(rv2i(rv).(map[int]uint32), false, d) } func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, d *Decoder) { - if v, changed := f.DecMapIntUint32V(*vp, true, d); changed { + v, changed := f.DecMapIntUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, d *Decoder) (_ map[int]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27456,7 +29152,6 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uint32 hasLen := containerLen > 0 @@ -27464,19 +29159,20 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -27488,22 +29184,23 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, func (d *Decoder) fastpathDecMapIntUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uint64) - if v, changed := fastpathTV.DecMapIntUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUint64V(rv2i(rv).(map[int]uint64), false, d) } - fastpathTV.DecMapIntUint64V(rv2i(rv).(map[int]uint64), false, d) } func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) { - if v, changed := f.DecMapIntUint64V(*vp, true, d); changed { + v, changed := f.DecMapIntUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, d *Decoder) (_ map[int]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27514,7 +29211,6 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uint64 hasLen := containerLen > 0 @@ -27522,19 +29218,20 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -27546,22 +29243,23 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, func (d *Decoder) fastpathDecMapIntUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]uintptr) - if v, changed := fastpathTV.DecMapIntUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntUintptrV(rv2i(rv).(map[int]uintptr), false, d) } - fastpathTV.DecMapIntUintptrV(rv2i(rv).(map[int]uintptr), false, d) } func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, d *Decoder) { - if v, changed := f.DecMapIntUintptrV(*vp, true, d); changed { + v, changed := f.DecMapIntUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, d *Decoder) (_ map[int]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27572,7 +29270,6 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv uintptr hasLen := containerLen > 0 @@ -27580,19 +29277,20 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -27604,22 +29302,23 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, func (d *Decoder) fastpathDecMapIntIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]int) - if v, changed := fastpathTV.DecMapIntIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntIntV(rv2i(rv).(map[int]int), false, d) } - fastpathTV.DecMapIntIntV(rv2i(rv).(map[int]int), false, d) } func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) { - if v, changed := f.DecMapIntIntV(*vp, true, d); changed { + v, changed := f.DecMapIntIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, d *Decoder) (_ map[int]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27630,7 +29329,6 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv int hasLen := containerLen > 0 @@ -27638,19 +29336,20 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -27662,22 +29361,23 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, func (d *Decoder) fastpathDecMapIntInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]int8) - if v, changed := fastpathTV.DecMapIntInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntInt8V(rv2i(rv).(map[int]int8), false, d) } - fastpathTV.DecMapIntInt8V(rv2i(rv).(map[int]int8), false, d) } func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, d *Decoder) { - if v, changed := f.DecMapIntInt8V(*vp, true, d); changed { + v, changed := f.DecMapIntInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, d *Decoder) (_ map[int]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -27688,7 +29388,6 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv int8 hasLen := containerLen > 0 @@ -27696,19 +29395,20 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -27720,22 +29420,23 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, func (d *Decoder) fastpathDecMapIntInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]int16) - if v, changed := fastpathTV.DecMapIntInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntInt16V(rv2i(rv).(map[int]int16), false, d) } - fastpathTV.DecMapIntInt16V(rv2i(rv).(map[int]int16), false, d) } func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, d *Decoder) { - if v, changed := f.DecMapIntInt16V(*vp, true, d); changed { + v, changed := f.DecMapIntInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, d *Decoder) (_ map[int]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -27746,7 +29447,6 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv int16 hasLen := containerLen > 0 @@ -27754,19 +29454,20 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -27778,22 +29479,23 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, func (d *Decoder) fastpathDecMapIntInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]int32) - if v, changed := fastpathTV.DecMapIntInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntInt32V(rv2i(rv).(map[int]int32), false, d) } - fastpathTV.DecMapIntInt32V(rv2i(rv).(map[int]int32), false, d) } func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, d *Decoder) { - if v, changed := f.DecMapIntInt32V(*vp, true, d); changed { + v, changed := f.DecMapIntInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, d *Decoder) (_ map[int]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27804,7 +29506,6 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv int32 hasLen := containerLen > 0 @@ -27812,19 +29513,20 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -27836,22 +29538,23 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, func (d *Decoder) fastpathDecMapIntInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]int64) - if v, changed := fastpathTV.DecMapIntInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntInt64V(rv2i(rv).(map[int]int64), false, d) } - fastpathTV.DecMapIntInt64V(rv2i(rv).(map[int]int64), false, d) } func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) { - if v, changed := f.DecMapIntInt64V(*vp, true, d); changed { + v, changed := f.DecMapIntInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, d *Decoder) (_ map[int]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27862,7 +29565,6 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv int64 hasLen := containerLen > 0 @@ -27870,19 +29572,20 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -27894,22 +29597,23 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, func (d *Decoder) fastpathDecMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]float32) - if v, changed := fastpathTV.DecMapIntFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntFloat32V(rv2i(rv).(map[int]float32), false, d) } - fastpathTV.DecMapIntFloat32V(rv2i(rv).(map[int]float32), false, d) } func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) { - if v, changed := f.DecMapIntFloat32V(*vp, true, d); changed { + v, changed := f.DecMapIntFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, d *Decoder) (_ map[int]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27920,7 +29624,6 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv float32 hasLen := containerLen > 0 @@ -27928,19 +29631,20 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -27952,22 +29656,23 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, func (d *Decoder) fastpathDecMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]float64) - if v, changed := fastpathTV.DecMapIntFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntFloat64V(rv2i(rv).(map[int]float64), false, d) } - fastpathTV.DecMapIntFloat64V(rv2i(rv).(map[int]float64), false, d) } func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) { - if v, changed := f.DecMapIntFloat64V(*vp, true, d); changed { + v, changed := f.DecMapIntFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, d *Decoder) (_ map[int]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -27978,7 +29683,6 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv float64 hasLen := containerLen > 0 @@ -27986,19 +29690,20 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -28010,22 +29715,23 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, func (d *Decoder) fastpathDecMapIntBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int]bool) - if v, changed := fastpathTV.DecMapIntBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapIntBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapIntBoolV(rv2i(rv).(map[int]bool), false, d) } - fastpathTV.DecMapIntBoolV(rv2i(rv).(map[int]bool), false, d) } func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) { - if v, changed := f.DecMapIntBoolV(*vp, true, d); changed { + v, changed := f.DecMapIntBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, d *Decoder) (_ map[int]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28036,7 +29742,6 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int var mv bool hasLen := containerLen > 0 @@ -28044,12 +29749,13 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int(dd.DecodeInt(intBitsize)) + mk = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -28068,22 +29774,23 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, func (d *Decoder) fastpathDecMapInt8IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]interface{}) - if v, changed := fastpathTV.DecMapInt8IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8IntfV(rv2i(rv).(map[int8]interface{}), false, d) } - fastpathTV.DecMapInt8IntfV(rv2i(rv).(map[int8]interface{}), false, d) } func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, d *Decoder) { - if v, changed := f.DecMapInt8IntfV(*vp, true, d); changed { + v, changed := f.DecMapInt8IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, d *Decoder) (_ map[int8]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -28094,7 +29801,7 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk int8 var mv interface{} hasLen := containerLen > 0 @@ -28102,12 +29809,13 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -28131,22 +29839,23 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, func (d *Decoder) fastpathDecMapInt8StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]string) - if v, changed := fastpathTV.DecMapInt8StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8StringV(rv2i(rv).(map[int8]string), false, d) } - fastpathTV.DecMapInt8StringV(rv2i(rv).(map[int8]string), false, d) } func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, d *Decoder) { - if v, changed := f.DecMapInt8StringV(*vp, true, d); changed { + v, changed := f.DecMapInt8StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, d *Decoder) (_ map[int8]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -28157,7 +29866,6 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv string hasLen := containerLen > 0 @@ -28165,12 +29873,13 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -28189,22 +29898,23 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, func (d *Decoder) fastpathDecMapInt8UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uint) - if v, changed := fastpathTV.DecMapInt8UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8UintV(rv2i(rv).(map[int8]uint), false, d) } - fastpathTV.DecMapInt8UintV(rv2i(rv).(map[int8]uint), false, d) } func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, d *Decoder) { - if v, changed := f.DecMapInt8UintV(*vp, true, d); changed { + v, changed := f.DecMapInt8UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, d *Decoder) (_ map[int8]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28215,7 +29925,6 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uint hasLen := containerLen > 0 @@ -28223,19 +29932,20 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -28247,22 +29957,23 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, func (d *Decoder) fastpathDecMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uint8) - if v, changed := fastpathTV.DecMapInt8Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Uint8V(rv2i(rv).(map[int8]uint8), false, d) } - fastpathTV.DecMapInt8Uint8V(rv2i(rv).(map[int8]uint8), false, d) } func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, d *Decoder) { - if v, changed := f.DecMapInt8Uint8V(*vp, true, d); changed { + v, changed := f.DecMapInt8Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, d *Decoder) (_ map[int8]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -28273,7 +29984,6 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uint8 hasLen := containerLen > 0 @@ -28281,19 +29991,20 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -28305,22 +30016,23 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, func (d *Decoder) fastpathDecMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uint16) - if v, changed := fastpathTV.DecMapInt8Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Uint16V(rv2i(rv).(map[int8]uint16), false, d) } - fastpathTV.DecMapInt8Uint16V(rv2i(rv).(map[int8]uint16), false, d) } func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, d *Decoder) { - if v, changed := f.DecMapInt8Uint16V(*vp, true, d); changed { + v, changed := f.DecMapInt8Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, d *Decoder) (_ map[int8]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -28331,7 +30043,6 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uint16 hasLen := containerLen > 0 @@ -28339,19 +30050,20 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -28363,22 +30075,23 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, func (d *Decoder) fastpathDecMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uint32) - if v, changed := fastpathTV.DecMapInt8Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Uint32V(rv2i(rv).(map[int8]uint32), false, d) } - fastpathTV.DecMapInt8Uint32V(rv2i(rv).(map[int8]uint32), false, d) } func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, d *Decoder) { - if v, changed := f.DecMapInt8Uint32V(*vp, true, d); changed { + v, changed := f.DecMapInt8Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, d *Decoder) (_ map[int8]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -28389,7 +30102,6 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uint32 hasLen := containerLen > 0 @@ -28397,19 +30109,20 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -28421,22 +30134,23 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, func (d *Decoder) fastpathDecMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uint64) - if v, changed := fastpathTV.DecMapInt8Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Uint64V(rv2i(rv).(map[int8]uint64), false, d) } - fastpathTV.DecMapInt8Uint64V(rv2i(rv).(map[int8]uint64), false, d) } func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, d *Decoder) { - if v, changed := f.DecMapInt8Uint64V(*vp, true, d); changed { + v, changed := f.DecMapInt8Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, d *Decoder) (_ map[int8]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28447,7 +30161,6 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uint64 hasLen := containerLen > 0 @@ -28455,19 +30168,20 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -28479,22 +30193,23 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, func (d *Decoder) fastpathDecMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]uintptr) - if v, changed := fastpathTV.DecMapInt8UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), false, d) } - fastpathTV.DecMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), false, d) } func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, d *Decoder) { - if v, changed := f.DecMapInt8UintptrV(*vp, true, d); changed { + v, changed := f.DecMapInt8UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, d *Decoder) (_ map[int8]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28505,7 +30220,6 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv uintptr hasLen := containerLen > 0 @@ -28513,19 +30227,20 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -28537,22 +30252,23 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, func (d *Decoder) fastpathDecMapInt8IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]int) - if v, changed := fastpathTV.DecMapInt8IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8IntV(rv2i(rv).(map[int8]int), false, d) } - fastpathTV.DecMapInt8IntV(rv2i(rv).(map[int8]int), false, d) } func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, d *Decoder) { - if v, changed := f.DecMapInt8IntV(*vp, true, d); changed { + v, changed := f.DecMapInt8IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, d *Decoder) (_ map[int8]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28563,7 +30279,6 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv int hasLen := containerLen > 0 @@ -28571,19 +30286,20 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -28595,22 +30311,23 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, func (d *Decoder) fastpathDecMapInt8Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]int8) - if v, changed := fastpathTV.DecMapInt8Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Int8V(rv2i(rv).(map[int8]int8), false, d) } - fastpathTV.DecMapInt8Int8V(rv2i(rv).(map[int8]int8), false, d) } func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, d *Decoder) { - if v, changed := f.DecMapInt8Int8V(*vp, true, d); changed { + v, changed := f.DecMapInt8Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, d *Decoder) (_ map[int8]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -28621,7 +30338,6 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv int8 hasLen := containerLen > 0 @@ -28629,19 +30345,20 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -28653,22 +30370,23 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, func (d *Decoder) fastpathDecMapInt8Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]int16) - if v, changed := fastpathTV.DecMapInt8Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Int16V(rv2i(rv).(map[int8]int16), false, d) } - fastpathTV.DecMapInt8Int16V(rv2i(rv).(map[int8]int16), false, d) } func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, d *Decoder) { - if v, changed := f.DecMapInt8Int16V(*vp, true, d); changed { + v, changed := f.DecMapInt8Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, d *Decoder) (_ map[int8]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -28679,7 +30397,6 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv int16 hasLen := containerLen > 0 @@ -28687,19 +30404,20 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -28711,22 +30429,23 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, func (d *Decoder) fastpathDecMapInt8Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]int32) - if v, changed := fastpathTV.DecMapInt8Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Int32V(rv2i(rv).(map[int8]int32), false, d) } - fastpathTV.DecMapInt8Int32V(rv2i(rv).(map[int8]int32), false, d) } func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, d *Decoder) { - if v, changed := f.DecMapInt8Int32V(*vp, true, d); changed { + v, changed := f.DecMapInt8Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, d *Decoder) (_ map[int8]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -28737,7 +30456,6 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv int32 hasLen := containerLen > 0 @@ -28745,19 +30463,20 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -28769,22 +30488,23 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, func (d *Decoder) fastpathDecMapInt8Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]int64) - if v, changed := fastpathTV.DecMapInt8Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Int64V(rv2i(rv).(map[int8]int64), false, d) } - fastpathTV.DecMapInt8Int64V(rv2i(rv).(map[int8]int64), false, d) } func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, d *Decoder) { - if v, changed := f.DecMapInt8Int64V(*vp, true, d); changed { + v, changed := f.DecMapInt8Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, d *Decoder) (_ map[int8]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28795,7 +30515,6 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv int64 hasLen := containerLen > 0 @@ -28803,19 +30522,20 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -28827,22 +30547,23 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, func (d *Decoder) fastpathDecMapInt8Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]float32) - if v, changed := fastpathTV.DecMapInt8Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Float32V(rv2i(rv).(map[int8]float32), false, d) } - fastpathTV.DecMapInt8Float32V(rv2i(rv).(map[int8]float32), false, d) } func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, d *Decoder) { - if v, changed := f.DecMapInt8Float32V(*vp, true, d); changed { + v, changed := f.DecMapInt8Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, d *Decoder) (_ map[int8]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -28853,7 +30574,6 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv float32 hasLen := containerLen > 0 @@ -28861,19 +30581,20 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -28885,22 +30606,23 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, func (d *Decoder) fastpathDecMapInt8Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]float64) - if v, changed := fastpathTV.DecMapInt8Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8Float64V(rv2i(rv).(map[int8]float64), false, d) } - fastpathTV.DecMapInt8Float64V(rv2i(rv).(map[int8]float64), false, d) } func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, d *Decoder) { - if v, changed := f.DecMapInt8Float64V(*vp, true, d); changed { + v, changed := f.DecMapInt8Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, d *Decoder) (_ map[int8]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28911,7 +30633,6 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv float64 hasLen := containerLen > 0 @@ -28919,19 +30640,20 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -28943,22 +30665,23 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, func (d *Decoder) fastpathDecMapInt8BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int8]bool) - if v, changed := fastpathTV.DecMapInt8BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt8BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt8BoolV(rv2i(rv).(map[int8]bool), false, d) } - fastpathTV.DecMapInt8BoolV(rv2i(rv).(map[int8]bool), false, d) } func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, d *Decoder) { - if v, changed := f.DecMapInt8BoolV(*vp, true, d); changed { + v, changed := f.DecMapInt8BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, d *Decoder) (_ map[int8]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -28969,7 +30692,6 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int8 var mv bool hasLen := containerLen > 0 @@ -28977,12 +30699,13 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int8(dd.DecodeInt(8)) + mk = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -29001,22 +30724,23 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, func (d *Decoder) fastpathDecMapInt16IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]interface{}) - if v, changed := fastpathTV.DecMapInt16IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16IntfV(rv2i(rv).(map[int16]interface{}), false, d) } - fastpathTV.DecMapInt16IntfV(rv2i(rv).(map[int16]interface{}), false, d) } func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, d *Decoder) { - if v, changed := f.DecMapInt16IntfV(*vp, true, d); changed { + v, changed := f.DecMapInt16IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, d *Decoder) (_ map[int16]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -29027,7 +30751,7 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk int16 var mv interface{} hasLen := containerLen > 0 @@ -29035,12 +30759,13 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -29064,22 +30789,23 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, func (d *Decoder) fastpathDecMapInt16StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]string) - if v, changed := fastpathTV.DecMapInt16StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16StringV(rv2i(rv).(map[int16]string), false, d) } - fastpathTV.DecMapInt16StringV(rv2i(rv).(map[int16]string), false, d) } func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, d *Decoder) { - if v, changed := f.DecMapInt16StringV(*vp, true, d); changed { + v, changed := f.DecMapInt16StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, d *Decoder) (_ map[int16]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -29090,7 +30816,6 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv string hasLen := containerLen > 0 @@ -29098,12 +30823,13 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -29122,22 +30848,23 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, func (d *Decoder) fastpathDecMapInt16UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uint) - if v, changed := fastpathTV.DecMapInt16UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16UintV(rv2i(rv).(map[int16]uint), false, d) } - fastpathTV.DecMapInt16UintV(rv2i(rv).(map[int16]uint), false, d) } func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, d *Decoder) { - if v, changed := f.DecMapInt16UintV(*vp, true, d); changed { + v, changed := f.DecMapInt16UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, d *Decoder) (_ map[int16]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29148,7 +30875,6 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uint hasLen := containerLen > 0 @@ -29156,19 +30882,20 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -29180,22 +30907,23 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, func (d *Decoder) fastpathDecMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uint8) - if v, changed := fastpathTV.DecMapInt16Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Uint8V(rv2i(rv).(map[int16]uint8), false, d) } - fastpathTV.DecMapInt16Uint8V(rv2i(rv).(map[int16]uint8), false, d) } func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, d *Decoder) { - if v, changed := f.DecMapInt16Uint8V(*vp, true, d); changed { + v, changed := f.DecMapInt16Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, d *Decoder) (_ map[int16]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -29206,7 +30934,6 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uint8 hasLen := containerLen > 0 @@ -29214,19 +30941,20 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -29238,22 +30966,23 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, func (d *Decoder) fastpathDecMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uint16) - if v, changed := fastpathTV.DecMapInt16Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Uint16V(rv2i(rv).(map[int16]uint16), false, d) } - fastpathTV.DecMapInt16Uint16V(rv2i(rv).(map[int16]uint16), false, d) } func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, d *Decoder) { - if v, changed := f.DecMapInt16Uint16V(*vp, true, d); changed { + v, changed := f.DecMapInt16Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, d *Decoder) (_ map[int16]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -29264,7 +30993,6 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uint16 hasLen := containerLen > 0 @@ -29272,19 +31000,20 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -29296,22 +31025,23 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, func (d *Decoder) fastpathDecMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uint32) - if v, changed := fastpathTV.DecMapInt16Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Uint32V(rv2i(rv).(map[int16]uint32), false, d) } - fastpathTV.DecMapInt16Uint32V(rv2i(rv).(map[int16]uint32), false, d) } func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, d *Decoder) { - if v, changed := f.DecMapInt16Uint32V(*vp, true, d); changed { + v, changed := f.DecMapInt16Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, d *Decoder) (_ map[int16]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -29322,7 +31052,6 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uint32 hasLen := containerLen > 0 @@ -29330,19 +31059,20 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -29354,22 +31084,23 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, func (d *Decoder) fastpathDecMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uint64) - if v, changed := fastpathTV.DecMapInt16Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Uint64V(rv2i(rv).(map[int16]uint64), false, d) } - fastpathTV.DecMapInt16Uint64V(rv2i(rv).(map[int16]uint64), false, d) } func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, d *Decoder) { - if v, changed := f.DecMapInt16Uint64V(*vp, true, d); changed { + v, changed := f.DecMapInt16Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, d *Decoder) (_ map[int16]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29380,7 +31111,6 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uint64 hasLen := containerLen > 0 @@ -29388,19 +31118,20 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -29412,22 +31143,23 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, func (d *Decoder) fastpathDecMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]uintptr) - if v, changed := fastpathTV.DecMapInt16UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), false, d) } - fastpathTV.DecMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), false, d) } func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, d *Decoder) { - if v, changed := f.DecMapInt16UintptrV(*vp, true, d); changed { + v, changed := f.DecMapInt16UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, d *Decoder) (_ map[int16]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29438,7 +31170,6 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv uintptr hasLen := containerLen > 0 @@ -29446,19 +31177,20 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -29470,22 +31202,23 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, func (d *Decoder) fastpathDecMapInt16IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]int) - if v, changed := fastpathTV.DecMapInt16IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16IntV(rv2i(rv).(map[int16]int), false, d) } - fastpathTV.DecMapInt16IntV(rv2i(rv).(map[int16]int), false, d) } func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, d *Decoder) { - if v, changed := f.DecMapInt16IntV(*vp, true, d); changed { + v, changed := f.DecMapInt16IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, d *Decoder) (_ map[int16]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29496,7 +31229,6 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv int hasLen := containerLen > 0 @@ -29504,19 +31236,20 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -29528,22 +31261,23 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, func (d *Decoder) fastpathDecMapInt16Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]int8) - if v, changed := fastpathTV.DecMapInt16Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Int8V(rv2i(rv).(map[int16]int8), false, d) } - fastpathTV.DecMapInt16Int8V(rv2i(rv).(map[int16]int8), false, d) } func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, d *Decoder) { - if v, changed := f.DecMapInt16Int8V(*vp, true, d); changed { + v, changed := f.DecMapInt16Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, d *Decoder) (_ map[int16]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -29554,7 +31288,6 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv int8 hasLen := containerLen > 0 @@ -29562,19 +31295,20 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -29586,22 +31320,23 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, func (d *Decoder) fastpathDecMapInt16Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]int16) - if v, changed := fastpathTV.DecMapInt16Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Int16V(rv2i(rv).(map[int16]int16), false, d) } - fastpathTV.DecMapInt16Int16V(rv2i(rv).(map[int16]int16), false, d) } func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, d *Decoder) { - if v, changed := f.DecMapInt16Int16V(*vp, true, d); changed { + v, changed := f.DecMapInt16Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, d *Decoder) (_ map[int16]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -29612,7 +31347,6 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv int16 hasLen := containerLen > 0 @@ -29620,19 +31354,20 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -29644,22 +31379,23 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, func (d *Decoder) fastpathDecMapInt16Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]int32) - if v, changed := fastpathTV.DecMapInt16Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Int32V(rv2i(rv).(map[int16]int32), false, d) } - fastpathTV.DecMapInt16Int32V(rv2i(rv).(map[int16]int32), false, d) } func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, d *Decoder) { - if v, changed := f.DecMapInt16Int32V(*vp, true, d); changed { + v, changed := f.DecMapInt16Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, d *Decoder) (_ map[int16]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -29670,7 +31406,6 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv int32 hasLen := containerLen > 0 @@ -29678,19 +31413,20 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -29702,22 +31438,23 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, func (d *Decoder) fastpathDecMapInt16Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]int64) - if v, changed := fastpathTV.DecMapInt16Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Int64V(rv2i(rv).(map[int16]int64), false, d) } - fastpathTV.DecMapInt16Int64V(rv2i(rv).(map[int16]int64), false, d) } func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, d *Decoder) { - if v, changed := f.DecMapInt16Int64V(*vp, true, d); changed { + v, changed := f.DecMapInt16Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, d *Decoder) (_ map[int16]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29728,7 +31465,6 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv int64 hasLen := containerLen > 0 @@ -29736,19 +31472,20 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -29760,22 +31497,23 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, func (d *Decoder) fastpathDecMapInt16Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]float32) - if v, changed := fastpathTV.DecMapInt16Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Float32V(rv2i(rv).(map[int16]float32), false, d) } - fastpathTV.DecMapInt16Float32V(rv2i(rv).(map[int16]float32), false, d) } func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, d *Decoder) { - if v, changed := f.DecMapInt16Float32V(*vp, true, d); changed { + v, changed := f.DecMapInt16Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, d *Decoder) (_ map[int16]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -29786,7 +31524,6 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv float32 hasLen := containerLen > 0 @@ -29794,19 +31531,20 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -29818,22 +31556,23 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, func (d *Decoder) fastpathDecMapInt16Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]float64) - if v, changed := fastpathTV.DecMapInt16Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16Float64V(rv2i(rv).(map[int16]float64), false, d) } - fastpathTV.DecMapInt16Float64V(rv2i(rv).(map[int16]float64), false, d) } func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, d *Decoder) { - if v, changed := f.DecMapInt16Float64V(*vp, true, d); changed { + v, changed := f.DecMapInt16Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, d *Decoder) (_ map[int16]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29844,7 +31583,6 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv float64 hasLen := containerLen > 0 @@ -29852,19 +31590,20 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -29876,22 +31615,23 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, func (d *Decoder) fastpathDecMapInt16BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int16]bool) - if v, changed := fastpathTV.DecMapInt16BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt16BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt16BoolV(rv2i(rv).(map[int16]bool), false, d) } - fastpathTV.DecMapInt16BoolV(rv2i(rv).(map[int16]bool), false, d) } func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, d *Decoder) { - if v, changed := f.DecMapInt16BoolV(*vp, true, d); changed { + v, changed := f.DecMapInt16BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, d *Decoder) (_ map[int16]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -29902,7 +31642,6 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int16 var mv bool hasLen := containerLen > 0 @@ -29910,12 +31649,13 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int16(dd.DecodeInt(16)) + mk = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -29934,22 +31674,23 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, func (d *Decoder) fastpathDecMapInt32IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]interface{}) - if v, changed := fastpathTV.DecMapInt32IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32IntfV(rv2i(rv).(map[int32]interface{}), false, d) } - fastpathTV.DecMapInt32IntfV(rv2i(rv).(map[int32]interface{}), false, d) } func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, d *Decoder) { - if v, changed := f.DecMapInt32IntfV(*vp, true, d); changed { + v, changed := f.DecMapInt32IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, d *Decoder) (_ map[int32]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -29960,7 +31701,7 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk int32 var mv interface{} hasLen := containerLen > 0 @@ -29968,12 +31709,13 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -29997,22 +31739,23 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, func (d *Decoder) fastpathDecMapInt32StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]string) - if v, changed := fastpathTV.DecMapInt32StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32StringV(rv2i(rv).(map[int32]string), false, d) } - fastpathTV.DecMapInt32StringV(rv2i(rv).(map[int32]string), false, d) } func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, d *Decoder) { - if v, changed := f.DecMapInt32StringV(*vp, true, d); changed { + v, changed := f.DecMapInt32StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, d *Decoder) (_ map[int32]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -30023,7 +31766,6 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv string hasLen := containerLen > 0 @@ -30031,12 +31773,13 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -30055,22 +31798,23 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, func (d *Decoder) fastpathDecMapInt32UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uint) - if v, changed := fastpathTV.DecMapInt32UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32UintV(rv2i(rv).(map[int32]uint), false, d) } - fastpathTV.DecMapInt32UintV(rv2i(rv).(map[int32]uint), false, d) } func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, d *Decoder) { - if v, changed := f.DecMapInt32UintV(*vp, true, d); changed { + v, changed := f.DecMapInt32UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, d *Decoder) (_ map[int32]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30081,7 +31825,6 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uint hasLen := containerLen > 0 @@ -30089,19 +31832,20 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -30113,22 +31857,23 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, func (d *Decoder) fastpathDecMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uint8) - if v, changed := fastpathTV.DecMapInt32Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Uint8V(rv2i(rv).(map[int32]uint8), false, d) } - fastpathTV.DecMapInt32Uint8V(rv2i(rv).(map[int32]uint8), false, d) } func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, d *Decoder) { - if v, changed := f.DecMapInt32Uint8V(*vp, true, d); changed { + v, changed := f.DecMapInt32Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, d *Decoder) (_ map[int32]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -30139,7 +31884,6 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uint8 hasLen := containerLen > 0 @@ -30147,19 +31891,20 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -30171,22 +31916,23 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, func (d *Decoder) fastpathDecMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uint16) - if v, changed := fastpathTV.DecMapInt32Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Uint16V(rv2i(rv).(map[int32]uint16), false, d) } - fastpathTV.DecMapInt32Uint16V(rv2i(rv).(map[int32]uint16), false, d) } func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, d *Decoder) { - if v, changed := f.DecMapInt32Uint16V(*vp, true, d); changed { + v, changed := f.DecMapInt32Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, d *Decoder) (_ map[int32]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -30197,7 +31943,6 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uint16 hasLen := containerLen > 0 @@ -30205,19 +31950,20 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -30229,22 +31975,23 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, func (d *Decoder) fastpathDecMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uint32) - if v, changed := fastpathTV.DecMapInt32Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Uint32V(rv2i(rv).(map[int32]uint32), false, d) } - fastpathTV.DecMapInt32Uint32V(rv2i(rv).(map[int32]uint32), false, d) } func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, d *Decoder) { - if v, changed := f.DecMapInt32Uint32V(*vp, true, d); changed { + v, changed := f.DecMapInt32Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, d *Decoder) (_ map[int32]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -30255,7 +32002,6 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uint32 hasLen := containerLen > 0 @@ -30263,19 +32009,20 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -30287,22 +32034,23 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, func (d *Decoder) fastpathDecMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uint64) - if v, changed := fastpathTV.DecMapInt32Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Uint64V(rv2i(rv).(map[int32]uint64), false, d) } - fastpathTV.DecMapInt32Uint64V(rv2i(rv).(map[int32]uint64), false, d) } func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, d *Decoder) { - if v, changed := f.DecMapInt32Uint64V(*vp, true, d); changed { + v, changed := f.DecMapInt32Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, d *Decoder) (_ map[int32]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30313,7 +32061,6 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uint64 hasLen := containerLen > 0 @@ -30321,19 +32068,20 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -30345,22 +32093,23 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, func (d *Decoder) fastpathDecMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]uintptr) - if v, changed := fastpathTV.DecMapInt32UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), false, d) } - fastpathTV.DecMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), false, d) } func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, d *Decoder) { - if v, changed := f.DecMapInt32UintptrV(*vp, true, d); changed { + v, changed := f.DecMapInt32UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, d *Decoder) (_ map[int32]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30371,7 +32120,6 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv uintptr hasLen := containerLen > 0 @@ -30379,19 +32127,20 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -30403,22 +32152,23 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, func (d *Decoder) fastpathDecMapInt32IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]int) - if v, changed := fastpathTV.DecMapInt32IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32IntV(rv2i(rv).(map[int32]int), false, d) } - fastpathTV.DecMapInt32IntV(rv2i(rv).(map[int32]int), false, d) } func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, d *Decoder) { - if v, changed := f.DecMapInt32IntV(*vp, true, d); changed { + v, changed := f.DecMapInt32IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, d *Decoder) (_ map[int32]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30429,7 +32179,6 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv int hasLen := containerLen > 0 @@ -30437,19 +32186,20 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -30461,22 +32211,23 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, func (d *Decoder) fastpathDecMapInt32Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]int8) - if v, changed := fastpathTV.DecMapInt32Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Int8V(rv2i(rv).(map[int32]int8), false, d) } - fastpathTV.DecMapInt32Int8V(rv2i(rv).(map[int32]int8), false, d) } func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, d *Decoder) { - if v, changed := f.DecMapInt32Int8V(*vp, true, d); changed { + v, changed := f.DecMapInt32Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, d *Decoder) (_ map[int32]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -30487,7 +32238,6 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv int8 hasLen := containerLen > 0 @@ -30495,19 +32245,20 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -30519,22 +32270,23 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, func (d *Decoder) fastpathDecMapInt32Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]int16) - if v, changed := fastpathTV.DecMapInt32Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Int16V(rv2i(rv).(map[int32]int16), false, d) } - fastpathTV.DecMapInt32Int16V(rv2i(rv).(map[int32]int16), false, d) } func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, d *Decoder) { - if v, changed := f.DecMapInt32Int16V(*vp, true, d); changed { + v, changed := f.DecMapInt32Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, d *Decoder) (_ map[int32]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -30545,7 +32297,6 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv int16 hasLen := containerLen > 0 @@ -30553,19 +32304,20 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -30577,22 +32329,23 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, func (d *Decoder) fastpathDecMapInt32Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]int32) - if v, changed := fastpathTV.DecMapInt32Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Int32V(rv2i(rv).(map[int32]int32), false, d) } - fastpathTV.DecMapInt32Int32V(rv2i(rv).(map[int32]int32), false, d) } func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, d *Decoder) { - if v, changed := f.DecMapInt32Int32V(*vp, true, d); changed { + v, changed := f.DecMapInt32Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, d *Decoder) (_ map[int32]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -30603,7 +32356,6 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv int32 hasLen := containerLen > 0 @@ -30611,19 +32363,20 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -30635,22 +32388,23 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, func (d *Decoder) fastpathDecMapInt32Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]int64) - if v, changed := fastpathTV.DecMapInt32Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Int64V(rv2i(rv).(map[int32]int64), false, d) } - fastpathTV.DecMapInt32Int64V(rv2i(rv).(map[int32]int64), false, d) } func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, d *Decoder) { - if v, changed := f.DecMapInt32Int64V(*vp, true, d); changed { + v, changed := f.DecMapInt32Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, d *Decoder) (_ map[int32]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30661,7 +32415,6 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv int64 hasLen := containerLen > 0 @@ -30669,19 +32422,20 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -30693,22 +32447,23 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, func (d *Decoder) fastpathDecMapInt32Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]float32) - if v, changed := fastpathTV.DecMapInt32Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Float32V(rv2i(rv).(map[int32]float32), false, d) } - fastpathTV.DecMapInt32Float32V(rv2i(rv).(map[int32]float32), false, d) } func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, d *Decoder) { - if v, changed := f.DecMapInt32Float32V(*vp, true, d); changed { + v, changed := f.DecMapInt32Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, d *Decoder) (_ map[int32]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -30719,7 +32474,6 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv float32 hasLen := containerLen > 0 @@ -30727,19 +32481,20 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -30751,22 +32506,23 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, func (d *Decoder) fastpathDecMapInt32Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]float64) - if v, changed := fastpathTV.DecMapInt32Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32Float64V(rv2i(rv).(map[int32]float64), false, d) } - fastpathTV.DecMapInt32Float64V(rv2i(rv).(map[int32]float64), false, d) } func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, d *Decoder) { - if v, changed := f.DecMapInt32Float64V(*vp, true, d); changed { + v, changed := f.DecMapInt32Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, d *Decoder) (_ map[int32]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30777,7 +32533,6 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv float64 hasLen := containerLen > 0 @@ -30785,19 +32540,20 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -30809,22 +32565,23 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, func (d *Decoder) fastpathDecMapInt32BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int32]bool) - if v, changed := fastpathTV.DecMapInt32BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt32BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt32BoolV(rv2i(rv).(map[int32]bool), false, d) } - fastpathTV.DecMapInt32BoolV(rv2i(rv).(map[int32]bool), false, d) } func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, d *Decoder) { - if v, changed := f.DecMapInt32BoolV(*vp, true, d); changed { + v, changed := f.DecMapInt32BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, d *Decoder) (_ map[int32]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -30835,7 +32592,6 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int32 var mv bool hasLen := containerLen > 0 @@ -30843,12 +32599,13 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = int32(dd.DecodeInt(32)) + mk = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -30867,22 +32624,23 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, func (d *Decoder) fastpathDecMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]interface{}) - if v, changed := fastpathTV.DecMapInt64IntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64IntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64IntfV(rv2i(rv).(map[int64]interface{}), false, d) } - fastpathTV.DecMapInt64IntfV(rv2i(rv).(map[int64]interface{}), false, d) } func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) { - if v, changed := f.DecMapInt64IntfV(*vp, true, d); changed { + v, changed := f.DecMapInt64IntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, d *Decoder) (_ map[int64]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -30893,7 +32651,7 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk int64 var mv interface{} hasLen := containerLen > 0 @@ -30901,12 +32659,13 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -30930,22 +32689,23 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, func (d *Decoder) fastpathDecMapInt64StringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]string) - if v, changed := fastpathTV.DecMapInt64StringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64StringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64StringV(rv2i(rv).(map[int64]string), false, d) } - fastpathTV.DecMapInt64StringV(rv2i(rv).(map[int64]string), false, d) } func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) { - if v, changed := f.DecMapInt64StringV(*vp, true, d); changed { + v, changed := f.DecMapInt64StringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, d *Decoder) (_ map[int64]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -30956,7 +32716,6 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv string hasLen := containerLen > 0 @@ -30964,12 +32723,13 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -30988,22 +32748,23 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, func (d *Decoder) fastpathDecMapInt64UintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uint) - if v, changed := fastpathTV.DecMapInt64UintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64UintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64UintV(rv2i(rv).(map[int64]uint), false, d) } - fastpathTV.DecMapInt64UintV(rv2i(rv).(map[int64]uint), false, d) } func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) { - if v, changed := f.DecMapInt64UintV(*vp, true, d); changed { + v, changed := f.DecMapInt64UintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, d *Decoder) (_ map[int64]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31014,7 +32775,6 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uint hasLen := containerLen > 0 @@ -31022,19 +32782,20 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -31046,22 +32807,23 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, func (d *Decoder) fastpathDecMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uint8) - if v, changed := fastpathTV.DecMapInt64Uint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Uint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Uint8V(rv2i(rv).(map[int64]uint8), false, d) } - fastpathTV.DecMapInt64Uint8V(rv2i(rv).(map[int64]uint8), false, d) } func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) { - if v, changed := f.DecMapInt64Uint8V(*vp, true, d); changed { + v, changed := f.DecMapInt64Uint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, d *Decoder) (_ map[int64]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31072,7 +32834,6 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uint8 hasLen := containerLen > 0 @@ -31080,19 +32841,20 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -31104,22 +32866,23 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, func (d *Decoder) fastpathDecMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uint16) - if v, changed := fastpathTV.DecMapInt64Uint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Uint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Uint16V(rv2i(rv).(map[int64]uint16), false, d) } - fastpathTV.DecMapInt64Uint16V(rv2i(rv).(map[int64]uint16), false, d) } func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, d *Decoder) { - if v, changed := f.DecMapInt64Uint16V(*vp, true, d); changed { + v, changed := f.DecMapInt64Uint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, d *Decoder) (_ map[int64]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -31130,7 +32893,6 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uint16 hasLen := containerLen > 0 @@ -31138,19 +32900,20 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -31162,22 +32925,23 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, func (d *Decoder) fastpathDecMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uint32) - if v, changed := fastpathTV.DecMapInt64Uint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Uint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Uint32V(rv2i(rv).(map[int64]uint32), false, d) } - fastpathTV.DecMapInt64Uint32V(rv2i(rv).(map[int64]uint32), false, d) } func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, d *Decoder) { - if v, changed := f.DecMapInt64Uint32V(*vp, true, d); changed { + v, changed := f.DecMapInt64Uint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, d *Decoder) (_ map[int64]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -31188,7 +32952,6 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uint32 hasLen := containerLen > 0 @@ -31196,19 +32959,20 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -31220,22 +32984,23 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, func (d *Decoder) fastpathDecMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uint64) - if v, changed := fastpathTV.DecMapInt64Uint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Uint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Uint64V(rv2i(rv).(map[int64]uint64), false, d) } - fastpathTV.DecMapInt64Uint64V(rv2i(rv).(map[int64]uint64), false, d) } func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) { - if v, changed := f.DecMapInt64Uint64V(*vp, true, d); changed { + v, changed := f.DecMapInt64Uint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, d *Decoder) (_ map[int64]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31246,7 +33011,6 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uint64 hasLen := containerLen > 0 @@ -31254,19 +33018,20 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -31278,22 +33043,23 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, func (d *Decoder) fastpathDecMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]uintptr) - if v, changed := fastpathTV.DecMapInt64UintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64UintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), false, d) } - fastpathTV.DecMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), false, d) } func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, d *Decoder) { - if v, changed := f.DecMapInt64UintptrV(*vp, true, d); changed { + v, changed := f.DecMapInt64UintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, d *Decoder) (_ map[int64]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31304,7 +33070,6 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv uintptr hasLen := containerLen > 0 @@ -31312,19 +33077,20 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -31336,22 +33102,23 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, func (d *Decoder) fastpathDecMapInt64IntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]int) - if v, changed := fastpathTV.DecMapInt64IntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64IntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64IntV(rv2i(rv).(map[int64]int), false, d) } - fastpathTV.DecMapInt64IntV(rv2i(rv).(map[int64]int), false, d) } func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) { - if v, changed := f.DecMapInt64IntV(*vp, true, d); changed { + v, changed := f.DecMapInt64IntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, d *Decoder) (_ map[int64]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31362,7 +33129,6 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv int hasLen := containerLen > 0 @@ -31370,19 +33136,20 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -31394,22 +33161,23 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, func (d *Decoder) fastpathDecMapInt64Int8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]int8) - if v, changed := fastpathTV.DecMapInt64Int8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Int8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Int8V(rv2i(rv).(map[int64]int8), false, d) } - fastpathTV.DecMapInt64Int8V(rv2i(rv).(map[int64]int8), false, d) } func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, d *Decoder) { - if v, changed := f.DecMapInt64Int8V(*vp, true, d); changed { + v, changed := f.DecMapInt64Int8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, d *Decoder) (_ map[int64]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31420,7 +33188,6 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv int8 hasLen := containerLen > 0 @@ -31428,19 +33195,20 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -31452,22 +33220,23 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, func (d *Decoder) fastpathDecMapInt64Int16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]int16) - if v, changed := fastpathTV.DecMapInt64Int16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Int16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Int16V(rv2i(rv).(map[int64]int16), false, d) } - fastpathTV.DecMapInt64Int16V(rv2i(rv).(map[int64]int16), false, d) } func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, d *Decoder) { - if v, changed := f.DecMapInt64Int16V(*vp, true, d); changed { + v, changed := f.DecMapInt64Int16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, d *Decoder) (_ map[int64]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -31478,7 +33247,6 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv int16 hasLen := containerLen > 0 @@ -31486,19 +33254,20 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -31510,22 +33279,23 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, func (d *Decoder) fastpathDecMapInt64Int32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]int32) - if v, changed := fastpathTV.DecMapInt64Int32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Int32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Int32V(rv2i(rv).(map[int64]int32), false, d) } - fastpathTV.DecMapInt64Int32V(rv2i(rv).(map[int64]int32), false, d) } func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, d *Decoder) { - if v, changed := f.DecMapInt64Int32V(*vp, true, d); changed { + v, changed := f.DecMapInt64Int32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, d *Decoder) (_ map[int64]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -31536,7 +33306,6 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv int32 hasLen := containerLen > 0 @@ -31544,19 +33313,20 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -31568,22 +33338,23 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, func (d *Decoder) fastpathDecMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]int64) - if v, changed := fastpathTV.DecMapInt64Int64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Int64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Int64V(rv2i(rv).(map[int64]int64), false, d) } - fastpathTV.DecMapInt64Int64V(rv2i(rv).(map[int64]int64), false, d) } func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) { - if v, changed := f.DecMapInt64Int64V(*vp, true, d); changed { + v, changed := f.DecMapInt64Int64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, d *Decoder) (_ map[int64]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31594,7 +33365,6 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv int64 hasLen := containerLen > 0 @@ -31602,19 +33372,20 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -31626,22 +33397,23 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, func (d *Decoder) fastpathDecMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]float32) - if v, changed := fastpathTV.DecMapInt64Float32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Float32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Float32V(rv2i(rv).(map[int64]float32), false, d) } - fastpathTV.DecMapInt64Float32V(rv2i(rv).(map[int64]float32), false, d) } func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) { - if v, changed := f.DecMapInt64Float32V(*vp, true, d); changed { + v, changed := f.DecMapInt64Float32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, d *Decoder) (_ map[int64]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -31652,7 +33424,6 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv float32 hasLen := containerLen > 0 @@ -31660,19 +33431,20 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -31684,22 +33456,23 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, func (d *Decoder) fastpathDecMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]float64) - if v, changed := fastpathTV.DecMapInt64Float64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64Float64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64Float64V(rv2i(rv).(map[int64]float64), false, d) } - fastpathTV.DecMapInt64Float64V(rv2i(rv).(map[int64]float64), false, d) } func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) { - if v, changed := f.DecMapInt64Float64V(*vp, true, d); changed { + v, changed := f.DecMapInt64Float64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, d *Decoder) (_ map[int64]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -31710,7 +33483,6 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv float64 hasLen := containerLen > 0 @@ -31718,19 +33490,20 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -31742,22 +33515,23 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, func (d *Decoder) fastpathDecMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[int64]bool) - if v, changed := fastpathTV.DecMapInt64BoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapInt64BoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapInt64BoolV(rv2i(rv).(map[int64]bool), false, d) } - fastpathTV.DecMapInt64BoolV(rv2i(rv).(map[int64]bool), false, d) } func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) { - if v, changed := f.DecMapInt64BoolV(*vp, true, d); changed { + v, changed := f.DecMapInt64BoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, d *Decoder) (_ map[int64]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31768,7 +33542,6 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk int64 var mv bool hasLen := containerLen > 0 @@ -31776,12 +33549,13 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, if esep { dd.ReadMapElemKey() } - mk = dd.DecodeInt(64) + mk = dd.DecodeInt64() if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false @@ -31800,22 +33574,23 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, func (d *Decoder) fastpathDecMapBoolIntfR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]interface{}) - if v, changed := fastpathTV.DecMapBoolIntfV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolIntfV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolIntfV(rv2i(rv).(map[bool]interface{}), false, d) } - fastpathTV.DecMapBoolIntfV(rv2i(rv).(map[bool]interface{}), false, d) } func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, d *Decoder) { - if v, changed := f.DecMapBoolIntfV(*vp, true, d); changed { + v, changed := f.DecMapBoolIntfV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, d *Decoder) (_ map[bool]interface{}, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -31826,7 +33601,7 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, dd.ReadMapEnd() return v, changed } - mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset var mk bool var mv interface{} hasLen := containerLen > 0 @@ -31839,7 +33614,8 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = nil @@ -31863,22 +33639,23 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, func (d *Decoder) fastpathDecMapBoolStringR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]string) - if v, changed := fastpathTV.DecMapBoolStringV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolStringV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolStringV(rv2i(rv).(map[bool]string), false, d) } - fastpathTV.DecMapBoolStringV(rv2i(rv).(map[bool]string), false, d) } func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, d *Decoder) { - if v, changed := f.DecMapBoolStringV(*vp, true, d); changed { + v, changed := f.DecMapBoolStringV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, d *Decoder) (_ map[bool]string, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -31889,7 +33666,6 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv string hasLen := containerLen > 0 @@ -31902,7 +33678,8 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = "" @@ -31921,22 +33698,23 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, func (d *Decoder) fastpathDecMapBoolUintR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uint) - if v, changed := fastpathTV.DecMapBoolUintV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUintV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUintV(rv2i(rv).(map[bool]uint), false, d) } - fastpathTV.DecMapBoolUintV(rv2i(rv).(map[bool]uint), false, d) } func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, d *Decoder) { - if v, changed := f.DecMapBoolUintV(*vp, true, d); changed { + v, changed := f.DecMapBoolUintV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, d *Decoder) (_ map[bool]uint, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31947,7 +33725,6 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uint hasLen := containerLen > 0 @@ -31960,14 +33737,15 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint(dd.DecodeUint(uintBitsize)) + mv = uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -31979,22 +33757,23 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, func (d *Decoder) fastpathDecMapBoolUint8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uint8) - if v, changed := fastpathTV.DecMapBoolUint8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUint8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUint8V(rv2i(rv).(map[bool]uint8), false, d) } - fastpathTV.DecMapBoolUint8V(rv2i(rv).(map[bool]uint8), false, d) } func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, d *Decoder) { - if v, changed := f.DecMapBoolUint8V(*vp, true, d); changed { + v, changed := f.DecMapBoolUint8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, d *Decoder) (_ map[bool]uint8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -32005,7 +33784,6 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uint8 hasLen := containerLen > 0 @@ -32018,14 +33796,15 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint8(dd.DecodeUint(8)) + mv = uint8(chkOvf.UintV(dd.DecodeUint64(), 8)) if v != nil { v[mk] = mv } @@ -32037,22 +33816,23 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, func (d *Decoder) fastpathDecMapBoolUint16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uint16) - if v, changed := fastpathTV.DecMapBoolUint16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUint16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUint16V(rv2i(rv).(map[bool]uint16), false, d) } - fastpathTV.DecMapBoolUint16V(rv2i(rv).(map[bool]uint16), false, d) } func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, d *Decoder) { - if v, changed := f.DecMapBoolUint16V(*vp, true, d); changed { + v, changed := f.DecMapBoolUint16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, d *Decoder) (_ map[bool]uint16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -32063,7 +33843,6 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uint16 hasLen := containerLen > 0 @@ -32076,14 +33855,15 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint16(dd.DecodeUint(16)) + mv = uint16(chkOvf.UintV(dd.DecodeUint64(), 16)) if v != nil { v[mk] = mv } @@ -32095,22 +33875,23 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, func (d *Decoder) fastpathDecMapBoolUint32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uint32) - if v, changed := fastpathTV.DecMapBoolUint32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUint32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUint32V(rv2i(rv).(map[bool]uint32), false, d) } - fastpathTV.DecMapBoolUint32V(rv2i(rv).(map[bool]uint32), false, d) } func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, d *Decoder) { - if v, changed := f.DecMapBoolUint32V(*vp, true, d); changed { + v, changed := f.DecMapBoolUint32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, d *Decoder) (_ map[bool]uint32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -32121,7 +33902,6 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uint32 hasLen := containerLen > 0 @@ -32134,14 +33914,15 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uint32(dd.DecodeUint(32)) + mv = uint32(chkOvf.UintV(dd.DecodeUint64(), 32)) if v != nil { v[mk] = mv } @@ -32153,22 +33934,23 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, func (d *Decoder) fastpathDecMapBoolUint64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uint64) - if v, changed := fastpathTV.DecMapBoolUint64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUint64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUint64V(rv2i(rv).(map[bool]uint64), false, d) } - fastpathTV.DecMapBoolUint64V(rv2i(rv).(map[bool]uint64), false, d) } func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, d *Decoder) { - if v, changed := f.DecMapBoolUint64V(*vp, true, d); changed { + v, changed := f.DecMapBoolUint64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, d *Decoder) (_ map[bool]uint64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -32179,7 +33961,6 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uint64 hasLen := containerLen > 0 @@ -32192,14 +33973,15 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeUint(64) + mv = dd.DecodeUint64() if v != nil { v[mk] = mv } @@ -32211,22 +33993,23 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, func (d *Decoder) fastpathDecMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]uintptr) - if v, changed := fastpathTV.DecMapBoolUintptrV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolUintptrV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), false, d) } - fastpathTV.DecMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), false, d) } func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, d *Decoder) { - if v, changed := f.DecMapBoolUintptrV(*vp, true, d); changed { + v, changed := f.DecMapBoolUintptrV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, d *Decoder) (_ map[bool]uintptr, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -32237,7 +34020,6 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv uintptr hasLen := containerLen > 0 @@ -32250,14 +34032,15 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = uintptr(dd.DecodeUint(uintBitsize)) + mv = uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize)) if v != nil { v[mk] = mv } @@ -32269,22 +34052,23 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, func (d *Decoder) fastpathDecMapBoolIntR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]int) - if v, changed := fastpathTV.DecMapBoolIntV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolIntV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolIntV(rv2i(rv).(map[bool]int), false, d) } - fastpathTV.DecMapBoolIntV(rv2i(rv).(map[bool]int), false, d) } func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, d *Decoder) { - if v, changed := f.DecMapBoolIntV(*vp, true, d); changed { + v, changed := f.DecMapBoolIntV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, d *Decoder) (_ map[bool]int, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -32295,7 +34079,6 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv int hasLen := containerLen > 0 @@ -32308,14 +34091,15 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int(dd.DecodeInt(intBitsize)) + mv = int(chkOvf.IntV(dd.DecodeInt64(), intBitsize)) if v != nil { v[mk] = mv } @@ -32327,22 +34111,23 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, func (d *Decoder) fastpathDecMapBoolInt8R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]int8) - if v, changed := fastpathTV.DecMapBoolInt8V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolInt8V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolInt8V(rv2i(rv).(map[bool]int8), false, d) } - fastpathTV.DecMapBoolInt8V(rv2i(rv).(map[bool]int8), false, d) } func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, d *Decoder) { - if v, changed := f.DecMapBoolInt8V(*vp, true, d); changed { + v, changed := f.DecMapBoolInt8V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, d *Decoder) (_ map[bool]int8, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -32353,7 +34138,6 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv int8 hasLen := containerLen > 0 @@ -32366,14 +34150,15 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int8(dd.DecodeInt(8)) + mv = int8(chkOvf.IntV(dd.DecodeInt64(), 8)) if v != nil { v[mk] = mv } @@ -32385,22 +34170,23 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, func (d *Decoder) fastpathDecMapBoolInt16R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]int16) - if v, changed := fastpathTV.DecMapBoolInt16V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolInt16V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolInt16V(rv2i(rv).(map[bool]int16), false, d) } - fastpathTV.DecMapBoolInt16V(rv2i(rv).(map[bool]int16), false, d) } func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, d *Decoder) { - if v, changed := f.DecMapBoolInt16V(*vp, true, d); changed { + v, changed := f.DecMapBoolInt16V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, d *Decoder) (_ map[bool]int16, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -32411,7 +34197,6 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv int16 hasLen := containerLen > 0 @@ -32424,14 +34209,15 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int16(dd.DecodeInt(16)) + mv = int16(chkOvf.IntV(dd.DecodeInt64(), 16)) if v != nil { v[mk] = mv } @@ -32443,22 +34229,23 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, func (d *Decoder) fastpathDecMapBoolInt32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]int32) - if v, changed := fastpathTV.DecMapBoolInt32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolInt32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolInt32V(rv2i(rv).(map[bool]int32), false, d) } - fastpathTV.DecMapBoolInt32V(rv2i(rv).(map[bool]int32), false, d) } func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, d *Decoder) { - if v, changed := f.DecMapBoolInt32V(*vp, true, d); changed { + v, changed := f.DecMapBoolInt32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, d *Decoder) (_ map[bool]int32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -32469,7 +34256,6 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv int32 hasLen := containerLen > 0 @@ -32482,14 +34268,15 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = int32(dd.DecodeInt(32)) + mv = int32(chkOvf.IntV(dd.DecodeInt64(), 32)) if v != nil { v[mk] = mv } @@ -32501,22 +34288,23 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, func (d *Decoder) fastpathDecMapBoolInt64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]int64) - if v, changed := fastpathTV.DecMapBoolInt64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolInt64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolInt64V(rv2i(rv).(map[bool]int64), false, d) } - fastpathTV.DecMapBoolInt64V(rv2i(rv).(map[bool]int64), false, d) } func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, d *Decoder) { - if v, changed := f.DecMapBoolInt64V(*vp, true, d); changed { + v, changed := f.DecMapBoolInt64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, d *Decoder) (_ map[bool]int64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -32527,7 +34315,6 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv int64 hasLen := containerLen > 0 @@ -32540,14 +34327,15 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeInt(64) + mv = dd.DecodeInt64() if v != nil { v[mk] = mv } @@ -32559,22 +34347,23 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, func (d *Decoder) fastpathDecMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]float32) - if v, changed := fastpathTV.DecMapBoolFloat32V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolFloat32V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolFloat32V(rv2i(rv).(map[bool]float32), false, d) } - fastpathTV.DecMapBoolFloat32V(rv2i(rv).(map[bool]float32), false, d) } func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, d *Decoder) { - if v, changed := f.DecMapBoolFloat32V(*vp, true, d); changed { + v, changed := f.DecMapBoolFloat32V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, d *Decoder) (_ map[bool]float32, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -32585,7 +34374,6 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv float32 hasLen := containerLen > 0 @@ -32598,14 +34386,15 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = float32(dd.DecodeFloat(true)) + mv = float32(chkOvf.Float32V(dd.DecodeFloat64())) if v != nil { v[mk] = mv } @@ -32617,22 +34406,23 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, func (d *Decoder) fastpathDecMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]float64) - if v, changed := fastpathTV.DecMapBoolFloat64V(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolFloat64V(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolFloat64V(rv2i(rv).(map[bool]float64), false, d) } - fastpathTV.DecMapBoolFloat64V(rv2i(rv).(map[bool]float64), false, d) } func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, d *Decoder) { - if v, changed := f.DecMapBoolFloat64V(*vp, true, d); changed { + v, changed := f.DecMapBoolFloat64V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, d *Decoder) (_ map[bool]float64, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -32643,7 +34433,6 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv float64 hasLen := containerLen > 0 @@ -32656,14 +34445,15 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = 0 } continue } - mv = dd.DecodeFloat(false) + mv = dd.DecodeFloat64() if v != nil { v[mk] = mv } @@ -32675,22 +34465,23 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, func (d *Decoder) fastpathDecMapBoolBoolR(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[bool]bool) - if v, changed := fastpathTV.DecMapBoolBoolV(*vp, true, d); changed { + v, changed := fastpathTV.DecMapBoolBoolV(*vp, true, d) + if changed { *vp = v } - return + } else { + fastpathTV.DecMapBoolBoolV(rv2i(rv).(map[bool]bool), false, d) } - fastpathTV.DecMapBoolBoolV(rv2i(rv).(map[bool]bool), false, d) } func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, d *Decoder) { - if v, changed := f.DecMapBoolBoolV(*vp, true, d); changed { + v, changed := f.DecMapBoolBoolV(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, d *Decoder) (_ map[bool]bool, changed bool) { dd, esep := d.d, d.hh.hasElemSeparators() - containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -32701,7 +34492,6 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, dd.ReadMapEnd() return v, changed } - var mk bool var mv bool hasLen := containerLen > 0 @@ -32714,7 +34504,8 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { + if v == nil { + } else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = false diff --git a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl index 73ed332..2023e05 100644 --- a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl +++ b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl -// ************************************************************ +// Code generated from fast-path.go.tmpl - DO NOT EDIT. package codec @@ -18,19 +15,19 @@ package codec // This file can be omitted without causing a build failure. // // The advantage of fast paths is: -// - Many calls bypass reflection altogether +// - Many calls bypass reflection altogether // // Currently support -// - slice of all builtin types, -// - map of all builtin types to string or interface value -// - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symmetrical maps of all builtin types (e.g. str-str, uint8-uint8) // This should provide adequate "typical" implementations. // // Note that fast track decode functions must handle values for which an address cannot be obtained. // For example: -// m2 := map[string]int{} -// p2 := []interface{}{m2} -// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. // import ( @@ -80,26 +77,19 @@ var fastpathAV fastpathA // due to possible initialization loop error, make fastpath in an init() func init() { - if useLookupRecognizedTypes && recognizedRtidsLoaded { - panic("recognizedRtidsLoaded = true - cannot happen") - } i := 0 fn := func(v interface{}, fe func(*Encoder, *codecFnInfo, reflect.Value), fd func(*Decoder, *codecFnInfo, reflect.Value)) (f fastpathE) { xrt := reflect.TypeOf(v) xptr := rt2id(xrt) - if useLookupRecognizedTypes { - recognizedRtids = append(recognizedRtids, xptr) - recognizedRtidPtrs = append(recognizedRtidPtrs, rt2id(reflect.PtrTo(xrt))) - } fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} i++ return } - - {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} - fn([]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + {{/* do not register []uint8 in fast-path */}} + {{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8"}} + fn([]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}}{{end}} {{range .Values}}{{if not .Primitive}}{{if .MapKey }} fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} @@ -112,22 +102,37 @@ func init() { // -- -- fast path type switch func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} - case []{{ .Elem }}:{{else}} - case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e){{if not .MapKey }} - case *[]{{ .Elem }}:{{else}} - case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) -{{end}}{{end}} + +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8"}} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) + case *[]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e){{/* +*/}}{{end}}{{end}}{{end}}{{end}} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) + case *map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e){{/* +*/}}{{end}}{{end}}{{end}} + default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true } -{{/* **** removing this block, as they are never called directly **** +{{/* +**** removing this block, as they are never called directly **** + + + +**** removing this block, as they are never called directly **** + + + func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { switch v := iv.(type) { {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} @@ -137,7 +142,7 @@ func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) {{end}}{{end}}{{end}} default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true @@ -152,16 +157,23 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) {{end}}{{end}}{{end}} default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true } + + + +**** removing this block, as they are never called directly **** + + + +**** removing this block, as they are never called directly **** */}} // -- -- fast path functions {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} - func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv2i(rv).([]{{ .Elem }}), e) @@ -173,13 +185,22 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, e *Encoder if v == nil { e.e.EncodeNil(); return } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteArrayStart(len(v)) + if esep { + for _, v2 := range v { + ee.WriteArrayElem() + {{ encmd .Elem "v2"}} + } + } else { + for _, v2 := range v { + {{ encmd .Elem "v2"}} + } + } {{/* for _, v2 := range v { if esep { ee.WriteArrayElem() } {{ encmd .Elem "v2"}} - } + } */}} ee.WriteArrayEnd() } - func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *Encoder) { ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { @@ -187,6 +208,20 @@ func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *En return } ee.WriteMapStart(len(v) / 2) + if esep { + for j, v2 := range v { + if j%2 == 0 { + ee.WriteMapElemKey() + } else { + ee.WriteMapElemValue() + } + {{ encmd .Elem "v2"}} + } + } else { + for _, v2 := range v { + {{ encmd .Elem "v2"}} + } + } {{/* for j, v2 := range v { if esep { if j%2 == 0 { @@ -196,14 +231,12 @@ func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *En } } {{ encmd .Elem "v2"}} - } + } */}} ee.WriteMapEnd() } - {{end}}{{end}}{{end}} {{range .Values}}{{if not .Primitive}}{{if .MapKey }} - func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), e) } @@ -211,8 +244,7 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Ele if v == nil { e.e.EncodeNil(); return } ee, esep := e.e, e.hh.hasElemSeparators() ee.WriteMapStart(len(v)) - {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - {{end}}if e.h.Canonical { + if e.h.Canonical { {{if eq .MapKey "interface{}"}}{{/* out of band */}}var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -228,76 +260,126 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Ele i++ } sort.Sort(bytesISlice(v2)) + if esep { + for j := range v2 { + ee.WriteMapElemKey() + e.asis(v2[j].v) + ee.WriteMapElemValue() + e.encode(v[v2[j].i]) + } + } else { + for j := range v2 { + e.asis(v2[j].v) + e.encode(v[v2[j].i]) + } + } {{/* for j := range v2 { if esep { ee.WriteMapElemKey() } e.asis(v2[j].v) if esep { ee.WriteMapElemValue() } e.encode(v[v2[j].i]) - } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) + } */}} {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) var i int for k, _ := range v { v2[i] = {{ $x }}(k) i++ } sort.Sort({{ sorttype .MapKey false}}(v2)) + if esep { + for _, k2 := range v2 { + ee.WriteMapElemKey() + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + ee.WriteMapElemValue() + {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} + } + } else { + for _, k2 := range v2 { + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} + } + } {{/* for _, k2 := range v2 { if esep { ee.WriteMapElemKey() } - {{if eq .MapKey "string"}}if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - }{{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} if esep { ee.WriteMapElemValue() } {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} - } {{end}} + } */}} {{end}} } else { + if esep { + for k2, v2 := range v { + ee.WriteMapElemKey() + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ encmd .MapKey "k2"}}{{end}} + ee.WriteMapElemValue() + {{ encmd .Elem "v2"}} + } + } else { + for k2, v2 := range v { + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ encmd .MapKey "k2"}}{{end}} + {{ encmd .Elem "v2"}} + } + } {{/* for k2, v2 := range v { if esep { ee.WriteMapElemKey() } - {{if eq .MapKey "string"}}if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - }{{else}}{{ encmd .MapKey "k2"}}{{end}} + {{if eq .MapKey "string"}}ee.EncodeString(cUTF8, k2){{else}}{{ encmd .MapKey "k2"}}{{end}} if esep { ee.WriteMapElemValue() } {{ encmd .Elem "v2"}} - } + } */}} } ee.WriteMapEnd() } - {{end}}{{end}}{{end}} // -- decode // -- -- fast path type switch func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + var changed bool switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} - case []{{ .Elem }}:{{else}} - case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, false, d){{if not .MapKey }} - case *[]{{ .Elem }}: {{else}} - case *map[{{ .MapKey }}]{{ .Elem }}: {{end}} - if v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, true, d); changed2 { - *v = v2 +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }}{{if ne .Elem "uint8"}} + case []{{ .Elem }}: + var v2 []{{ .Elem }} + v2, changed = fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, false, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) } -{{end}}{{end}} + case *[]{{ .Elem }}: + var v2 []{{ .Elem }} + v2, changed = fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, true, d) + if changed { + *v = v2 + }{{/* +*/}}{{end}}{{end}}{{end}}{{end}} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }}{{/* +// maps only change if nil, and in that case, there's no point copying +*/}} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, false, d) + case *map[{{ .MapKey }}]{{ .Elem }}: + var v2 map[{{ .MapKey }}]{{ .Elem }} + v2, changed = fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, true, d) + if changed { + *v = v2 + }{{/* +*/}}{{end}}{{end}}{{end}} default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true } -func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { +func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { switch v := iv.(type) { {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} - case *[]{{ .Elem }}: {{else}} - case *map[{{ .MapKey }}]{{ .Elem }}: {{end}} - *v = nil -{{end}}{{end}} + case *[]{{ .Elem }}: + *v = nil {{/* +*/}}{{end}}{{end}}{{end}} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + case *map[{{ .MapKey }}]{{ .Elem }}: + *v = nil {{/* +*/}}{{end}}{{end}}{{end}} default: - _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + _ = v // workaround https://github.com/golang/go/issues/12927 seen in go1.4 return false } return true @@ -311,38 +393,36 @@ Slices can change if they - are addressable (from a ptr) - are settable (e.g. contained in an interface{}) */}} -func (d *Decoder) {{ .MethodNamePfx "fastpathDec" false }}R(f *codecFnInfo, rv reflect.Value) { +func (d *Decoder) {{ .MethodNamePfx "fastpathDec" false }}R(f *codecFnInfo, rv reflect.Value) { if array := f.seq == seqTypeArray; !array && rv.Kind() == reflect.Ptr { - var vp = rv2i(rv).(*[]{{ .Elem }}) - if v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, !array, d); changed { - *vp = v - } + vp := rv2i(rv).(*[]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, !array, d) + if changed { *vp = v } } else { - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(rv2i(rv).([]{{ .Elem }}), !array, d) + v := rv2i(rv).([]{{ .Elem }}) + v2, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, !array, d) + if changed && len(v) > 0 && len(v2) > 0 && !(len(v2) == len(v) && &v2[0] == &v[0]) { + copy(v, v2) + } } } func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, d *Decoder) { - if v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d); changed { - *vp = v - } + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { - dd := d.d - {{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}} + dd := d.d{{/* + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + */}} slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { - if v == nil { - v = []{{ .Elem }}{} - } else if len(v) != 0 { - v = v[:0] - } + if v == nil { v = []{{ .Elem }}{} } else if len(v) != 0 { v = v[:0] } changed = true } slh.End() return v, changed } - hasLen := containerLenS > 0 var xlen int if hasLen && canChange { @@ -361,7 +441,7 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, canChange } j := 0 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { - if j == 0 && len(v) == 0 { + if j == 0 && len(v) == 0 && canChange { if hasLen { xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) } else { @@ -380,10 +460,12 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, canChange d.arrayCannotExpand(len(v), j+1) decodeIntoBlank = true } - } + } slh.ElemContainerState(j) if decodeIntoBlank { d.swallow() + } else if dd.TryDecodeAsNil() { + v[j] = {{ zerocmd .Elem }} } else { {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} } @@ -400,10 +482,8 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, canChange slh.End() return v, changed } - {{end}}{{end}}{{end}} - {{range .Values}}{{if not .Primitive}}{{if .MapKey }} {{/* Maps can change if they are @@ -413,22 +493,21 @@ Maps can change if they are func (d *Decoder) {{ .MethodNamePfx "fastpathDec" false }}R(f *codecFnInfo, rv reflect.Value) { if rv.Kind() == reflect.Ptr { vp := rv2i(rv).(*map[{{ .MapKey }}]{{ .Elem }}) - if v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d); changed { - *vp = v - } - return - } - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), false, d) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d); + if changed { *vp = v } + } else { + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), false, d) + } } func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, d *Decoder) { - if v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d); changed { - *vp = v - } + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, true, d) + if changed { *vp = v } } func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, canChange bool, d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { - dd, esep := d.d, d.hh.hasElemSeparators() - {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} + dd, esep := d.d, d.hh.hasElemSeparators(){{/* + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + */}} containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }}) @@ -439,8 +518,8 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele dd.ReadMapEnd() return v, changed } - {{ if eq .Elem "interface{}" }}mapGet := !d.h.MapValueReset && !d.h.InterfaceReset{{end}} - var mk {{ .MapKey }} + {{ if eq .Elem "interface{}" }}mapGet := v != nil && !d.h.MapValueReset && !d.h.InterfaceReset + {{end}}var mk {{ .MapKey }} var mv {{ .Elem }} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { @@ -452,17 +531,14 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele }{{ else }}mk = {{ decmd .MapKey }}{{ end }} if esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { - if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = {{ zerocmd .Elem }} } + if v == nil {} else if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = {{ zerocmd .Elem }} } continue } {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} - if v != nil { - v[mk] = mv - } + if v != nil { v[mk] = mv } } dd.ReadMapEnd() return v, changed } - {{end}}{{end}}{{end}} diff --git a/vendor/github.com/ugorji/go/codec/fast-path.not.go b/vendor/github.com/ugorji/go/codec/fast-path.not.go index 9c7eb24..f11b467 100644 --- a/vendor/github.com/ugorji/go/codec/fast-path.not.go +++ b/vendor/github.com/ugorji/go/codec/fast-path.not.go @@ -1,3 +1,6 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + // +build notfastpath package codec @@ -14,11 +17,11 @@ const fastpathEnabled = false // This tag disables fastpath during build, allowing for faster build, test execution, // short-program runs, etc. -func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } -func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } -func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } -func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } -func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { return false } +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } +func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { return false } type fastpathT struct{} type fastpathE struct { @@ -31,6 +34,12 @@ type fastpathA [0]fastpathE func (x fastpathA) index(rtid uintptr) int { return -1 } +func (_ fastpathT) DecSliceUint8V(v []uint8, canChange bool, d *Decoder) (_ []uint8, changed bool) { + fn := d.cfer().get(uint8SliceTyp, true, true) + d.kSlice(&fn.i, reflect.ValueOf(&v).Elem()) + return v, true +} + var fastpathAV fastpathA var fastpathTV fastpathT diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl index d9940c0..fbe802e 100644 --- a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl +++ b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -43,7 +43,7 @@ if {{var "l"}} == 0 { {{var "c"}} = true }{{end}} {{var "h"}}.ElemContainerState({{var "j"}}) - // {{var "dn"}} = r.TryDecodeAsNil() + {{/* {{var "dn"}} = r.TryDecodeAsNil() */}} {{if isChan}}{{ $x := printf "%[1]vv%[2]v" .TempVar .Rand }}var {{var $x}} {{ .Typ }} {{ decLineVar $x }} {{var "v"}} <- {{ $x }} diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go index c89a14d..917d282 100644 --- a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go +++ b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl -// ************************************************************ +// Code generated from gen-helper.go.tmpl - DO NOT EDIT. package codec @@ -31,25 +28,73 @@ const GenVersion = 8 // GenHelperEncoder is exported so that it can be used externally by codecgen. // // Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. -func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { - return genHelperEncoder{e: e}, e.e +func GenHelperEncoder(e *Encoder) (ge genHelperEncoder, ee genHelperEncDriver) { + ge = genHelperEncoder{e: e} + ee = genHelperEncDriver{encDriver: e.e} + return } // GenHelperDecoder is exported so that it can be used externally by codecgen. // // Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. -func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { - return genHelperDecoder{d: d}, d.d +func GenHelperDecoder(d *Decoder) (gd genHelperDecoder, dd genHelperDecDriver) { + gd = genHelperDecoder{d: d} + dd = genHelperDecDriver{decDriver: d.d} + return +} + +type genHelperEncDriver struct { + encDriver +} + +func (x genHelperEncDriver) EncodeBuiltin(rt uintptr, v interface{}) {} +func (x genHelperEncDriver) EncStructFieldKey(keyType valueType, s string) { + encStructFieldKey(x.encDriver, keyType, s) +} +func (x genHelperEncDriver) EncodeSymbol(s string) { + x.encDriver.EncodeString(cUTF8, s) +} + +type genHelperDecDriver struct { + decDriver + C checkOverflow +} + +func (x genHelperDecDriver) DecodeBuiltin(rt uintptr, v interface{}) {} +func (x genHelperDecDriver) DecStructFieldKey(keyType valueType, buf *[decScratchByteArrayLen]byte) []byte { + return decStructFieldKey(x.decDriver, keyType, buf) +} +func (x genHelperDecDriver) DecodeInt(bitsize uint8) (i int64) { + return x.C.IntV(x.decDriver.DecodeInt64(), bitsize) +} +func (x genHelperDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + return x.C.UintV(x.decDriver.DecodeUint64(), bitsize) +} +func (x genHelperDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + f = x.DecodeFloat64() + if chkOverflow32 && chkOvf.Float32(f) { + panicv.errorf("float32 overflow: %v", f) + } + return +} +func (x genHelperDecDriver) DecodeFloat32As64() (f float64) { + f = x.DecodeFloat64() + if chkOvf.Float32(f) { + panicv.errorf("float32 overflow: %v", f) + } + return } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperEncoder struct { + M must e *Encoder F fastpathT } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperDecoder struct { + C checkOverflow d *Decoder F fastpathT } @@ -61,7 +106,12 @@ func (f genHelperEncoder) EncBasicHandle() *BasicHandle { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncBinary() bool { - return f.e.cf.be // f.e.hh.isBinaryEncoding() + return f.e.be // f.e.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -74,52 +124,65 @@ func (f genHelperEncoder) EncFallback(iv interface{}) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { bs, fnerr := iv.MarshalText() - f.e.marshal(bs, fnerr, false, c_UTF8) + f.e.marshal(bs, fnerr, false, cUTF8) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { bs, fnerr := iv.MarshalJSON() - f.e.marshal(bs, fnerr, true, c_UTF8) + f.e.marshal(bs, fnerr, true, cUTF8) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { bs, fnerr := iv.MarshalBinary() - f.e.marshal(bs, fnerr, false, c_RAW) + f.e.marshal(bs, fnerr, false, cRAW) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) EncRaw(iv Raw) { - f.e.rawBytes(iv) +func (f genHelperEncoder) EncRaw(iv Raw) { f.e.rawBytes(iv) } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: builtin no longer supported - so we make this method a no-op, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperEncoder) TimeRtidIfBinc() (v uintptr) { return } + +// func (f genHelperEncoder) TimeRtidIfBinc() uintptr { +// if _, ok := f.e.hh.(*BincHandle); ok { +// return timeTypId +// } +// } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) TimeRtidIfBinc() uintptr { - if _, ok := f.e.hh.(*BincHandle); ok { - return timeTypId - } - return 0 +func (f genHelperEncoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.e.h.getExt(rtid) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) IsJSONHandle() bool { - return f.e.cf.js +func (f genHelperEncoder) EncExtension(v interface{}, xfFn *extTypeTagFn) { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperEncoder) HasExtensions() bool { return len(f.e.h.extHandle) != 0 } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperEncoder) EncExt(v interface{}) (r bool) { - rt := reflect.TypeOf(v) - if rt.Kind() == reflect.Ptr { - rt = rt.Elem() - } - rtid := rt2id(rt) - if xfFn := f.e.h.getExt(rtid); xfFn != nil { + if xfFn := f.e.h.getExt(i2rtid(v)); xfFn != nil { f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) return true } @@ -139,15 +202,18 @@ func (f genHelperDecoder) DecBinary() bool { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecSwallow() { - f.d.swallow() -} +func (f genHelperDecoder) DecSwallow() { f.d.swallow() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecScratchBuffer() []byte { return f.d.b[:] } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchArrayBuffer() *[decScratchByteArrayLen]byte { + return &f.d.b +} + // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { // println(">>>>>>>>> DecFallback") @@ -155,7 +221,7 @@ func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { if chkPtr { rv = f.d.ensureDecodeable(rv) } - f.d.decodeValue(rv, nil, false, false) + f.d.decodeValue(rv, nil, false) // f.d.decodeValueFallback(rv) } @@ -201,17 +267,21 @@ func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecRaw() []byte { - return f.d.rawBytes() -} +func (f genHelperDecoder) DecRaw() []byte { return f.d.rawBytes() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) TimeRtidIfBinc() uintptr { - if _, ok := f.d.hh.(*BincHandle); ok { - return timeTypId - } - return 0 -} +// +// Deprecated: builtin no longer supported - so we make this method a no-op, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperDecoder) TimeRtidIfBinc() (v uintptr) { return } + +// func (f genHelperDecoder) TimeRtidIfBinc() uintptr { +// // Note: builtin is no longer supported - so make this a no-op +// if _, ok := f.d.hh.(*BincHandle); ok { +// return timeTypId +// } +// return 0 +// } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) IsJSONHandle() bool { @@ -219,15 +289,34 @@ func (f genHelperDecoder) IsJSONHandle() bool { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.d.h.getExt(rtid) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExtension(v interface{}, xfFn *extTypeTagFn) { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperDecoder) HasExtensions() bool { return len(f.d.h.extHandle) != 0 } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperDecoder) DecExt(v interface{}) (r bool) { - rt := reflect.TypeOf(v).Elem() - rtid := rt2id(rt) - if xfFn := f.d.h.getExt(rtid); xfFn != nil { + if xfFn := f.d.h.getExt(i2rtid(v)); xfFn != nil { f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) return true } @@ -240,6 +329,7 @@ func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) StringView(v []byte) string { - return stringView(v) -} +// +// Deprecated: no longer used, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl index 79b6145..6aeb856 100644 --- a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl +++ b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl -// ************************************************************ +// Code generated from gen-helper.go.tmpl - DO NOT EDIT. package codec @@ -21,35 +18,83 @@ const GenVersion = {{ .Version }} // This file is used to generate helper code for codecgen. // The values here i.e. genHelper(En|De)coder are not to be used directly by // library users. They WILL change continuously and without notice. -// +// // To help enforce this, we create an unexported type with exported members. // The only way to get the type is via the one exported type that we control (somewhat). -// +// // When static codecs are created for types, they will use this value // to perform encoding or decoding of primitives or known slice or map types. // GenHelperEncoder is exported so that it can be used externally by codecgen. -// +// // Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. -func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { - return genHelperEncoder{e:e}, e.e +func GenHelperEncoder(e *Encoder) (ge genHelperEncoder, ee genHelperEncDriver) { + ge = genHelperEncoder{e: e} + ee = genHelperEncDriver{encDriver: e.e} + return } // GenHelperDecoder is exported so that it can be used externally by codecgen. -// +// // Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. -func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { - return genHelperDecoder{d:d}, d.d +func GenHelperDecoder(d *Decoder) (gd genHelperDecoder, dd genHelperDecDriver) { + gd = genHelperDecoder{d: d} + dd = genHelperDecDriver{decDriver: d.d} + return +} + +type genHelperEncDriver struct { + encDriver +} + +func (x genHelperEncDriver) EncodeBuiltin(rt uintptr, v interface{}) {} +func (x genHelperEncDriver) EncStructFieldKey(keyType valueType, s string) { + encStructFieldKey(x.encDriver, keyType, s) +} +func (x genHelperEncDriver) EncodeSymbol(s string) { + x.encDriver.EncodeString(cUTF8, s) +} + +type genHelperDecDriver struct { + decDriver + C checkOverflow +} + +func (x genHelperDecDriver) DecodeBuiltin(rt uintptr, v interface{}) {} +func (x genHelperDecDriver) DecStructFieldKey(keyType valueType, buf *[decScratchByteArrayLen]byte) []byte { + return decStructFieldKey(x.decDriver, keyType, buf) +} +func (x genHelperDecDriver) DecodeInt(bitsize uint8) (i int64) { + return x.C.IntV(x.decDriver.DecodeInt64(), bitsize) +} +func (x genHelperDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + return x.C.UintV(x.decDriver.DecodeUint64(), bitsize) +} +func (x genHelperDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + f = x.DecodeFloat64() + if chkOverflow32 && chkOvf.Float32(f) { + panicv.errorf("float32 overflow: %v", f) + } + return +} +func (x genHelperDecDriver) DecodeFloat32As64() (f float64) { + f = x.DecodeFloat64() + if chkOvf.Float32(f) { + panicv.errorf("float32 overflow: %v", f) + } + return } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperEncoder struct { + M must e *Encoder F fastpathT } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperDecoder struct { + C checkOverflow d *Decoder F fastpathT } @@ -58,10 +103,13 @@ type genHelperDecoder struct { func (f genHelperEncoder) EncBasicHandle() *BasicHandle { return f.e.h } - // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncBinary() bool { - return f.e.cf.be // f.e.hh.isBinaryEncoding() + return f.e.be // f.e.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncFallback(iv interface{}) { @@ -72,45 +120,56 @@ func (f genHelperEncoder) EncFallback(iv interface{}) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { bs, fnerr := iv.MarshalText() - f.e.marshal(bs, fnerr, false, c_UTF8) + f.e.marshal(bs, fnerr, false, cUTF8) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { bs, fnerr := iv.MarshalJSON() - f.e.marshal(bs, fnerr, true, c_UTF8) + f.e.marshal(bs, fnerr, true, cUTF8) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { bs, fnerr := iv.MarshalBinary() - f.e.marshal(bs, fnerr, false, c_RAW) + f.e.marshal(bs, fnerr, false, cRAW) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) EncRaw(iv Raw) { - f.e.rawBytes(iv) +func (f genHelperEncoder) EncRaw(iv Raw) { f.e.rawBytes(iv) } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: builtin no longer supported - so we make this method a no-op, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperEncoder) TimeRtidIfBinc() (v uintptr) { return } +// func (f genHelperEncoder) TimeRtidIfBinc() uintptr { +// if _, ok := f.e.hh.(*BincHandle); ok { +// return timeTypId +// } +// } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) TimeRtidIfBinc() uintptr { - if _, ok := f.e.hh.(*BincHandle); ok { - return timeTypId - } - return 0 +func (f genHelperEncoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.e.h.getExt(rtid) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) IsJSONHandle() bool { - return f.e.cf.js +func (f genHelperEncoder) EncExtension(v interface{}, xfFn *extTypeTagFn) { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperEncoder) HasExtensions() bool { return len(f.e.h.extHandle) != 0 } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperEncoder) EncExt(v interface{}) (r bool) { - rt := reflect.TypeOf(v) - if rt.Kind() == reflect.Ptr { - rt = rt.Elem() - } - rtid := rt2id(rt) - if xfFn := f.e.h.getExt(rtid); xfFn != nil { + if xfFn := f.e.h.getExt(i2rtid(v)); xfFn != nil { f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) return true } @@ -128,21 +187,23 @@ func (f genHelperDecoder) DecBinary() bool { return f.d.be // f.d.hh.isBinaryEncoding() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecSwallow() { - f.d.swallow() -} +func (f genHelperDecoder) DecSwallow() { f.d.swallow() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecScratchBuffer() []byte { return f.d.b[:] } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchArrayBuffer() *[decScratchByteArrayLen]byte { + return &f.d.b +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { // println(">>>>>>>>> DecFallback") rv := reflect.ValueOf(iv) if chkPtr { rv = f.d.ensureDecodeable(rv) } - f.d.decodeValue(rv, nil, false, false) + f.d.decodeValue(rv, nil, false) // f.d.decodeValueFallback(rv) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -181,29 +242,49 @@ func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { } } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecRaw() []byte { - return f.d.rawBytes() -} +func (f genHelperDecoder) DecRaw() []byte { return f.d.rawBytes() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) TimeRtidIfBinc() uintptr { - if _, ok := f.d.hh.(*BincHandle); ok { - return timeTypId - } - return 0 -} +// +// Deprecated: builtin no longer supported - so we make this method a no-op, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperDecoder) TimeRtidIfBinc() (v uintptr) { return } +// func (f genHelperDecoder) TimeRtidIfBinc() uintptr { +// // Note: builtin is no longer supported - so make this a no-op +// if _, ok := f.d.hh.(*BincHandle); ok { +// return timeTypId +// } +// return 0 +// } + // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) IsJSONHandle() bool { return f.d.js } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) I2Rtid(v interface{}) uintptr { + return i2rtid(v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) Extension(rtid uintptr) (xfn *extTypeTagFn) { + return f.d.h.getExt(rtid) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExtension(v interface{}, xfFn *extTypeTagFn) { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperDecoder) HasExtensions() bool { return len(f.d.h.extHandle) != 0 } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +// +// Deprecated: No longer used, +// but leave in-place so that old generated files continue to work without regeneration. func (f genHelperDecoder) DecExt(v interface{}) (r bool) { - rt := reflect.TypeOf(v).Elem() - rtid := rt2id(rt) - if xfFn := f.d.h.getExt(rtid); xfFn != nil { + if xfFn := f.d.h.getExt(i2rtid(v)); xfFn != nil { f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) return true } @@ -214,7 +295,8 @@ func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { return decInferLen(clen, maxlen, unit) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) StringView(v []byte) string { - return stringView(v) -} +// +// Deprecated: no longer used, +// but leave in-place so that old generated files continue to work without regeneration. +func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } diff --git a/vendor/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/ugorji/go/codec/gen.generated.go index b50a602..799bc76 100644 --- a/vendor/github.com/ugorji/go/codec/gen.generated.go +++ b/vendor/github.com/ugorji/go/codec/gen.generated.go @@ -1,3 +1,5 @@ +// +build codecgen.exec + // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. @@ -96,7 +98,7 @@ if {{var "l"}} == 0 { {{var "c"}} = true }{{end}} {{var "h"}}.ElemContainerState({{var "j"}}) - // {{var "dn"}} = r.TryDecodeAsNil() + {{/* {{var "dn"}} = r.TryDecodeAsNil() */}} {{if isChan}}{{ $x := printf "%[1]vv%[2]v" .TempVar .Rand }}var {{var $x}} {{ .Typ }} {{ decLineVar $x }} {{var "v"}} <- {{ $x }} @@ -129,4 +131,3 @@ if {{var "l"}} == 0 { }{{end}} ` - diff --git a/vendor/github.com/ugorji/go/codec/gen.go b/vendor/github.com/ugorji/go/codec/gen.go index 59b7cd2..d1dcdab 100644 --- a/vendor/github.com/ugorji/go/codec/gen.go +++ b/vendor/github.com/ugorji/go/codec/gen.go @@ -1,6 +1,6 @@ // +build codecgen.exec -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -30,7 +30,6 @@ import ( // codecgen supports the full cycle of reflection-based codec: // - RawExt // - Raw -// - Builtins // - Extensions // - (Binary|Text|JSON)(Unm|M)arshal // - generic by-kind @@ -101,6 +100,8 @@ import ( // v4: Removed separator support from (en|de)cDriver, and refactored codec(gen) // v5: changes to support faster json decoding. Let encoder/decoder maintain state of collections. // v6: removed unsafe from gen, and now uses codecgen.exec tag +// v7: +// v8: current - we now maintain compatibility with old generated code. const genVersion = 8 const ( @@ -129,12 +130,27 @@ const ( ) var ( - genAllTypesSamePkgErr = errors.New("All types must be in the same package") - genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice") - genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__") - genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`) + errGenAllTypesSamePkg = errors.New("All types must be in the same package") + errGenExpectArrayOrMap = errors.New("unexpected type. Expecting array/map/slice") + + genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__") + genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`) ) +type genBuf struct { + buf []byte +} + +func (x *genBuf) s(s string) *genBuf { x.buf = append(x.buf, s...); return x } +func (x *genBuf) b(s []byte) *genBuf { x.buf = append(x.buf, s...); return x } +func (x *genBuf) v() string { return string(x.buf) } +func (x *genBuf) f(s string, args ...interface{}) { x.s(fmt.Sprintf(s, args...)) } +func (x *genBuf) reset() { + if x.buf != nil { + x.buf = x.buf[:0] + } +} + // genRunner holds some state used during a Gen run. type genRunner struct { w io.Writer // output @@ -170,7 +186,7 @@ type genRunner struct { // Gen will write a complete go file containing Selfer implementations for each // type passed. All the types must be in the same package. // -// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINUOUSLY WITHOUT NOTICE. func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, ti *TypeInfos, typ ...reflect.Type) { // All types passed to this method do not have a codec.Selfer method implemented directly. @@ -209,7 +225,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, for _, t := range typ { // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) if genImportPath(t) != x.bp { - panic(genAllTypesSamePkgErr) + panic(errGenAllTypesSamePkg) } x.genRefPkgs(t) } @@ -219,10 +235,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, } x.line(` -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED BY codecgen. -// ************************************************************ +// Code generated by codecgen - DO NOT EDIT. `) x.line("package " + pkgName) @@ -234,15 +247,19 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, } // use a sorted set of im keys, so that we can get consistent output imKeys := make([]string, 0, len(x.im)) - for k, _ := range x.im { + for k := range x.im { imKeys = append(imKeys, k) } sort.Strings(imKeys) for _, k := range imKeys { // for k, _ := range x.im { - x.linef("%s \"%s\"", x.imn[k], k) + if k == x.imn[k] { + x.linef("\"%s\"", k) + } else { + x.linef("%s \"%s\"", x.imn[k], k) + } } // add required packages - for _, k := range [...]string{"reflect", "runtime", "fmt", "errors"} { + for _, k := range [...]string{"runtime", "errors", "strconv"} { // "reflect", "fmt" if _, ok := x.im[k]; !ok { x.line("\"" + k + "\"") } @@ -252,21 +269,19 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, x.line("const (") x.linef("// ----- content types ----") - x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8)) - x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW)) + x.linef("codecSelferCcUTF8%s = %v", x.xs, int64(cUTF8)) + x.linef("codecSelferCcRAW%s = %v", x.xs, int64(cRAW)) x.linef("// ----- value types used ----") - x.linef("codecSelferValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) - x.linef("codecSelferValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) - x.linef("// ----- containerStateValues ----") - x.linef("codecSelfer_containerMapKey%s = %v", x.xs, int64(containerMapKey)) - x.linef("codecSelfer_containerMapValue%s = %v", x.xs, int64(containerMapValue)) - x.linef("codecSelfer_containerMapEnd%s = %v", x.xs, int64(containerMapEnd)) - x.linef("codecSelfer_containerArrayElem%s = %v", x.xs, int64(containerArrayElem)) - x.linef("codecSelfer_containerArrayEnd%s = %v", x.xs, int64(containerArrayEnd)) + for _, vt := range [...]valueType{ + valueTypeArray, valueTypeMap, valueTypeString, + valueTypeInt, valueTypeUint, valueTypeFloat} { + x.linef("codecSelferValueType%s%s = %v", vt.String(), x.xs, int64(vt)) + } + + x.linef("codecSelferBitsize%s = uint8(32 << (^uint(0) >> 63))", x.xs) x.line(")") x.line("var (") - x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())") - x.line("codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") + x.line("errCodecSelferOnlyMapOrArrayEncodeToStruct" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") x.line(")") x.line("") @@ -278,11 +293,12 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, x.line("func init() {") x.linef("if %sGenVersion != %v {", x.cpfx, genVersion) x.line("_, file, _, _ := runtime.Caller(0)") - x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) - x.linef(`%v, %sGenVersion, file)`, genVersion, x.cpfx) - x.line("panic(err)") + x.outf(`panic("codecgen version mismatch: current: %v, need " + strconv.FormatInt(int64(%sGenVersion), 10) + ". Re-generate file: " + file)`, genVersion, x.cpfx) + // x.out(`panic(fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) + // x.linef(`%v, %sGenVersion, file))`, genVersion, x.cpfx) x.linef("}") x.line("if false { // reference the types, but skip this branch at build/run time") + // x.line("_ = strconv.ParseInt") var n int // for k, t := range x.im { for _, k := range imKeys { @@ -323,7 +339,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, case reflect.Map: x.encMapFallback("v", t) default: - panic(genExpectArrayOrMapErr) + panic(errGenExpectArrayOrMap) } x.line("}") x.line("") @@ -338,7 +354,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, noExtensions bool, case reflect.Map: x.decMapFallback("v", rtid, t) default: - panic(genExpectArrayOrMapErr) + panic(errGenExpectArrayOrMap) } x.line("}") x.line("") @@ -374,7 +390,6 @@ func (x *genRunner) genRefPkgs(t reflect.Type) { if _, ok := x.is[t]; ok { return } - // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) x.is[t] = struct{}{} tpkg, tname := genImportPath(t), t.Name() if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' { @@ -403,13 +418,6 @@ func (x *genRunner) genRefPkgs(t reflect.Type) { } } -func (x *genRunner) line(s string) { - x.out(s) - if len(s) == 0 || s[len(s)-1] != '\n' { - x.out("\n") - } -} - func (x *genRunner) varsfx() string { x.c++ return strconv.FormatUint(x.c, 10) @@ -420,17 +428,31 @@ func (x *genRunner) varsfxreset() { } func (x *genRunner) out(s string) { - if _, err := io.WriteString(x.w, s); err != nil { + _, err := io.WriteString(x.w, s) + if err != nil { panic(err) } } -func (x *genRunner) linef(s string, params ...interface{}) { - x.line(fmt.Sprintf(s, params...)) +func (x *genRunner) outf(s string, params ...interface{}) { + _, err := fmt.Fprintf(x.w, s, params...) + if err != nil { + panic(err) + } } -func (x *genRunner) outf(s string, params ...interface{}) { - x.out(fmt.Sprintf(s, params...)) +func (x *genRunner) line(s string) { + x.out(s) + if len(s) == 0 || s[len(s)-1] != '\n' { + x.out("\n") + } +} + +func (x *genRunner) linef(s string, params ...interface{}) { + x.outf(s, params...) + if len(s) == 0 || s[len(s)-1] != '\n' { + x.out("\n") + } } func (x *genRunner) genTypeName(t reflect.Type) (n string) { @@ -503,16 +525,17 @@ func (x *genRunner) selfer(encode bool) { t := x.tc t0 := t // always make decode use a pointer receiver, - // and structs always use a ptr receiver (encode|decode) - isptr := !encode || (t.Kind() == reflect.Struct || t.Kind() == reflect.Array) + // and structs/arrays always use a ptr receiver (encode|decode) + isptr := !encode || t.Kind() == reflect.Array || (t.Kind() == reflect.Struct && t != timeTyp) x.varsfxreset() - fnSigPfx := "func (x " + + fnSigPfx := "func (" + genTopLevelVarName + " " if isptr { fnSigPfx += "*" } fnSigPfx += x.genTypeName(t) - x.out(fnSigPfx) + if isptr { t = reflect.PtrTo(t) } @@ -528,7 +551,7 @@ func (x *genRunner) selfer(encode bool) { // or way to elegantly handle that, and also setting it to a // non-nil value doesn't affect the pointer passed. // x.decVar(genTopLevelVarName, t, false) - x.dec(genTopLevelVarName, t0) + x.dec(genTopLevelVarName, t0, true) } x.line("}") x.line("") @@ -572,11 +595,17 @@ func (x *genRunner) selfer(encode bool) { } // used for chan, array, slice, map -func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) { - if encode { - x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname) +func (x *genRunner) xtraSM(varname string, t reflect.Type, encode, isptr bool) { + var ptrPfx, addrPfx string + if isptr { + ptrPfx = "*" } else { - x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname) + addrPfx = "&" + } + if encode { + x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), ptrPfx, x.genTypeName(t), varname) + } else { + x.linef("h.dec%s((*%s)(%s%s), d)", x.genMethodNameT(t), x.genTypeName(t), addrPfx, varname) } x.registerXtraT(t) } @@ -615,17 +644,23 @@ func (x *genRunner) encVar(varname string, t reflect.Type) { if checkNil { x.linef("if %s == nil { r.EncodeNil() } else { ", varname) } + switch t.Kind() { case reflect.Ptr: - switch t.Elem().Kind() { - case reflect.Struct, reflect.Array: + telem := t.Elem() + tek := telem.Kind() + if tek == reflect.Array || (tek == reflect.Struct && t != timeTyp) { x.enc(varname, genNonPtr(t)) - default: - i := x.varsfx() - x.line(genTempVarPfx + i + " := *" + varname) - x.enc(genTempVarPfx+i, genNonPtr(t)) + break } + i := x.varsfx() + x.line(genTempVarPfx + i + " := *" + varname) + x.enc(genTempVarPfx+i, genNonPtr(t)) case reflect.Struct, reflect.Array: + if t == timeTyp { + x.enc(varname, t) + break + } i := x.varsfx() x.line(genTempVarPfx + i + " := &" + varname) x.enc(genTempVarPfx+i, t) @@ -639,29 +674,33 @@ func (x *genRunner) encVar(varname string, t reflect.Type) { } -// enc will encode a variable (varname) of type t, -// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type ptrTo(T) (to prevent copying) +// enc will encode a variable (varname) of type t, where t represents T. +// if t is !time.Time and t is of kind reflect.Struct or reflect.Array, varname is of type *T +// (to prevent copying), +// else t is of type T func (x *genRunner) enc(varname string, t reflect.Type) { rtid := rt2id(t) + ti2 := x.ti.get(rtid, t) // We call CodecEncodeSelf if one of the following are honored: // - the type already implements Selfer, call that // - the type has a Selfer implementation just created, use that // - the type is in the list of the ones we will generate for, but it is not currently being generated mi := x.varsfx() - tptr := reflect.PtrTo(t) + // tptr := reflect.PtrTo(t) tk := t.Kind() if x.checkForSelfer(t, varname) { - if tk == reflect.Array || tk == reflect.Struct { // varname is of type *T - if tptr.Implements(selferTyp) || t.Implements(selferTyp) { + if tk == reflect.Array || (tk == reflect.Struct && rtid != timeTypId) { // varname is of type *T + // if tptr.Implements(selferTyp) || t.Implements(selferTyp) { + if ti2.isFlag(typeInfoFlagIsZeroerPtr) || ti2.isFlag(typeInfoFlagIsZeroer) { x.line(varname + ".CodecEncodeSelf(e)") return } } else { // varname is of type T - if t.Implements(selferTyp) { + if ti2.cs { // t.Implements(selferTyp) { x.line(varname + ".CodecEncodeSelf(e)") return - } else if tptr.Implements(selferTyp) { + } else if ti2.csp { // tptr.Implements(selferTyp) { x.linef("%ssf%s := &%s", genTempVarPfx, mi, varname) x.linef("%ssf%s.CodecEncodeSelf(e)", genTempVarPfx, mi) return @@ -693,57 +732,53 @@ func (x *genRunner) enc(varname string, t reflect.Type) { } // check if - // - type is RawExt, Raw + // - type is time.Time, RawExt, Raw // - the type implements (Text|JSON|Binary)(Unm|M)arshal - x.linef("%sm%s := z.EncBinary()", genTempVarPfx, mi) - x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block defer func() { x.line("}") }() //end if block + if t == timeTyp { + x.linef("} else { r.EncodeTime(%s)", varname) + return + } if t == rawTyp { - x.linef("} else { z.EncRaw(%v)", varname) + x.linef("} else { z.EncRaw(%s)", varname) return } if t == rawExtTyp { - x.linef("} else { r.EncodeRawExt(%v, e)", varname) + x.linef("} else { r.EncodeRawExt(%s, e)", varname) return } - // HACK: Support for Builtins. - // Currently, only Binc supports builtins, and the only builtin type is time.Time. - // Have a method that returns the rtid for time.Time if Handle is Binc. - if t == timeTyp { - vrtid := genTempVarPfx + "m" + x.varsfx() - x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) - x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) - } // only check for extensions if the type is named, and has a packagePath. + var arrayOrStruct = tk == reflect.Array || tk == reflect.Struct // meaning varname if of type *T if !x.nx && genImportPath(t) != "" && t.Name() != "" { - // first check if extensions are configued, before doing the interface conversion - x.linef("} else if z.HasExtensions() && z.EncExt(%s) {", varname) + yy := fmt.Sprintf("%sxt%s", genTempVarPfx, mi) + x.linef("} else if %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.EncExtension(%s, %s) ", yy, varname, yy, varname, yy) } - if tk == reflect.Array || tk == reflect.Struct { // varname is of type *T - if t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { - x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) + if arrayOrStruct { // varname is of type *T + if ti2.bm || ti2.bmp { // t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(%v) ", varname) } - if t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { - x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) - } else if t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { - x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) + if ti2.jm || ti2.jmp { // t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", varname) + } else if ti2.tm || ti2.tmp { // t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { + x.linef("} else if !z.EncBinary() { z.EncTextMarshal(%v) ", varname) } } else { // varname is of type T - if t.Implements(binaryMarshalerTyp) { - x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) - } else if tptr.Implements(binaryMarshalerTyp) { - x.linef("} else if %sm%s { z.EncBinaryMarshal(&%v) ", genTempVarPfx, mi, varname) + if ti2.bm { // t.Implements(binaryMarshalerTyp) { + x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(%v) ", varname) + } else if ti2.bmp { // tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if z.EncBinary() { z.EncBinaryMarshal(&%v) ", varname) } - if t.Implements(jsonMarshalerTyp) { - x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) - } else if tptr.Implements(jsonMarshalerTyp) { - x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(&%v) ", genTempVarPfx, mi, varname) - } else if t.Implements(textMarshalerTyp) { - x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) - } else if tptr.Implements(textMarshalerTyp) { - x.linef("} else if !%sm%s { z.EncTextMarshal(&%v) ", genTempVarPfx, mi, varname) + if ti2.jm { // t.Implements(jsonMarshalerTyp) { + x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", varname) + } else if ti2.jmp { // tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(&%v) ", varname) + } else if ti2.tm { // t.Implements(textMarshalerTyp) { + x.linef("} else if !z.EncBinary() { z.EncTextMarshal(%v) ", varname) + } else if ti2.tmp { // tptr.Implements(textMarshalerTyp) { + x.linef("} else if !z.EncBinary() { z.EncTextMarshal(&%v) ", varname) } } x.line("} else {") @@ -760,12 +795,12 @@ func (x *genRunner) enc(varname string, t reflect.Type) { case reflect.Bool: x.line("r.EncodeBool(bool(" + varname + "))") case reflect.String: - x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(" + varname + "))") + x.line("r.EncodeString(codecSelferCcUTF8" + x.xs + ", string(" + varname + "))") case reflect.Chan: - x.xtraSM(varname, true, t) + x.xtraSM(varname, t, true, false) // x.encListFallback(varname, rtid, t) case reflect.Array: - x.xtraSM(varname, true, t) + x.xtraSM(varname, t, true, true) case reflect.Slice: // if nil, call dedicated function // if a []uint8, call dedicated function @@ -774,12 +809,12 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. if rtid == uint8SliceTypId { - x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") + x.line("r.EncodeStringBytes(codecSelferCcRAW" + x.xs + ", []byte(" + varname + "))") } else if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { - x.xtraSM(varname, true, t) + x.xtraSM(varname, t, true, false) // x.encListFallback(varname, rtid, t) } case reflect.Map: @@ -793,7 +828,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { - x.xtraSM(varname, true, t) + x.xtraSM(varname, t, true, false) // x.encMapFallback(varname, rtid, t) } case reflect.Struct: @@ -824,12 +859,53 @@ func (x *genRunner) encZero(t reflect.Type) { case reflect.Bool: x.line("r.EncodeBool(false)") case reflect.String: - x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + `, "")`) + x.line("r.EncodeString(codecSelferCcUTF8" + x.xs + `, "")`) default: x.line("r.EncodeNil()") } } +func (x *genRunner) encOmitEmptyLine(t2 reflect.StructField, varname string, buf *genBuf) { + // smartly check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. + // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) + varname2 := varname + "." + t2.Name + switch t2.Type.Kind() { + case reflect.Struct: + rtid2 := rt2id(t2.Type) + ti2 := x.ti.get(rtid2, t2.Type) + // fmt.Printf(">>>> structfield: omitempty: type: %s, field: %s\n", t2.Type.Name(), t2.Name) + if ti2.rtid == timeTypId { + buf.s("!(").s(varname2).s(".IsZero())") + break + } + if ti2.isFlag(typeInfoFlagIsZeroerPtr) || ti2.isFlag(typeInfoFlagIsZeroer) { + buf.s("!(").s(varname2).s(".IsZero())") + break + } + if ti2.isFlag(typeInfoFlagComparable) { + buf.s(varname2).s(" != ").s(x.genZeroValueR(t2.Type)) + break + } + // buf.s("(") + buf.s("false") + for i, n := 0, t2.Type.NumField(); i < n; i++ { + f := t2.Type.Field(i) + if f.PkgPath != "" { // unexported + continue + } + buf.s(" || ") + x.encOmitEmptyLine(f, varname2, buf) + } + //buf.s(")") + case reflect.Bool: + buf.s(varname2) + case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan: + buf.s("len(").s(varname2).s(") != 0") + default: + buf.s(varname2).s(" != ").s(x.genZeroValueR(t2.Type)) + } +} + func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { // Use knowledge from structfieldinfo (mbs, encodable fields. Ignore omitempty. ) // replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it @@ -844,29 +920,34 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.line(sepVarname + " := !z.EncBinary()") x.linef("%s := z.EncBasicHandle().StructToArray", struct2arrvar) - tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.linef("_, _ = %s, %s", sepVarname, struct2arrvar) + x.linef("const %s bool = %v // struct tag has 'toArray'", ti2arrayvar, ti.toArray) + + tisfi := ti.sfiSrc // always use sequence from file. decStruct expects same thing. + + // var nn int // due to omitEmpty, we need to calculate the // number of non-empty things we write out first. // This is required as we need to pre-determine the size of the container, // to support length-prefixing. if ti.anyOmitEmpty { - x.linef("var %s [%v]bool", numfieldsvar, len(tisfi)) - x.linef("_ = %s", numfieldsvar) - } - x.linef("_, _ = %s, %s", sepVarname, struct2arrvar) - x.linef("const %s bool = %v", ti2arrayvar, ti.toArray) - var nn int - if ti.anyOmitEmpty { + x.linef("var %s = [%v]bool{ // should field at this index be written?", numfieldsvar, len(tisfi)) + for j, si := range tisfi { - if !si.omitEmpty { - nn++ + _ = j + if !si.omitEmpty() { + // x.linef("%s[%v] = true // %s", numfieldsvar, j, si.fieldName) + x.linef("true, // %s", si.fieldName) + // nn++ continue } var t2 reflect.StructField - var omitline string + var omitline genBuf { t2typ := t varname3 := varname + // go through the loop, record the t2 field explicitly, + // and gather the omit line if embedded in pointers. for ij, ix := range si.is { if uint8(ij) == si.nis { break @@ -877,30 +958,27 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { t2 = t2typ.Field(int(ix)) t2typ = t2.Type varname3 = varname3 + "." + t2.Name - if t2typ.Kind() == reflect.Ptr { - omitline += varname3 + " != nil && " + // do not include actual field in the omit line. + // that is done subsequently (right after - below). + if uint8(ij+1) < si.nis && t2typ.Kind() == reflect.Ptr { + omitline.s(varname3).s(" != nil && ") } } } - // never check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. - // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) - switch t2.Type.Kind() { - case reflect.Struct: - omitline += " true" - case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan: - omitline += "len(" + varname + "." + t2.Name + ") != 0" - default: - omitline += varname + "." + t2.Name + " != " + x.genZeroValueR(t2.Type) - } - x.linef("%s[%v] = %s", numfieldsvar, j, omitline) + x.encOmitEmptyLine(t2, varname, &omitline) + x.linef("%s, // %s", omitline.v(), si.fieldName) } + x.line("}") + x.linef("_ = %s", numfieldsvar) } // x.linef("var %snn%s int", genTempVarPfx, i) x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { x.linef("r.WriteArrayStart(%d)", len(tisfi)) x.linef("} else {") // if not ti.toArray if ti.anyOmitEmpty { - x.linef("var %snn%s = %v", genTempVarPfx, i, nn) + // nn = 0 + // x.linef("var %snn%s = %v", genTempVarPfx, i, nn) + x.linef("var %snn%s int", genTempVarPfx, i) x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) x.linef("r.WriteMapStart(%snn%s)", genTempVarPfx, i) x.linef("%snn%s = %v", genTempVarPfx, i, 0) @@ -921,7 +999,6 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { if uint8(ij) == si.nis { break } - // fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix) for t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } @@ -949,14 +1026,13 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray if labelUsed { x.linef("if %s { r.WriteArrayElem(); r.EncodeNil() } else { ", isNilVarName) - // x.linef("if %s { z.EncSendContainerState(codecSelfer_containerArrayElem%s); r.EncodeNil() } else { ", isNilVarName, x.xs) } - x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) - if si.omitEmpty { + x.line("r.WriteArrayElem()") + if si.omitEmpty() { x.linef("if %s[%v] {", numfieldsvar, j) } x.encVar(varname+"."+t2.Name, t2.Type) - if si.omitEmpty { + if si.omitEmpty() { x.linef("} else {") x.encZero(t2.Type) x.linef("}") @@ -967,12 +1043,25 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("} else {") // if not ti.toArray - if si.omitEmpty { + if si.omitEmpty() { x.linef("if %s[%v] {", numfieldsvar, j) } - x.line("r.WriteMapElemKey()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) - x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") - x.line("r.WriteMapElemValue()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.WriteMapElemKey()") + + // x.line("r.EncodeString(codecSelferCcUTF8" + x.xs + ", `" + si.encName + "`)") + // emulate EncStructFieldKey + switch ti.keyType { + case valueTypeInt: + x.linef("r.EncodeInt(z.M.Int(strconv.ParseInt(`%s`, 10, 64)))", si.encName) + case valueTypeUint: + x.linef("r.EncodeUint(z.M.Uint(strconv.ParseUint(`%s`, 10, 64)))", si.encName) + case valueTypeFloat: + x.linef("r.EncodeFloat64(z.M.Float(strconv.ParseFloat(`%s`, 64)))", si.encName) + default: // string + x.linef("r.EncodeString(codecSelferCcUTF8%s, `%s`)", x.xs, si.encName) + } + // x.linef("r.EncStructFieldKey(codecSelferValueType%s%s, `%s`)", ti.keyType.String(), x.xs, si.encName) + x.line("r.WriteMapElemValue()") if labelUsed { x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") x.encVar(varname+"."+t2.Name, t2.Type) @@ -980,26 +1069,26 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { } else { x.encVar(varname+"."+t2.Name, t2.Type) } - if si.omitEmpty { + if si.omitEmpty() { x.line("}") } x.linef("} ") // end if/else ti.toArray } x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.line("r.WriteArrayEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.WriteArrayEnd()") x.line("} else {") - x.line("r.WriteMapEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.WriteMapEnd()") x.line("}") } func (x *genRunner) encListFallback(varname string, t reflect.Type) { if t.AssignableTo(uint8SliceTyp) { - x.linef("r.EncodeStringBytes(codecSelferC_RAW%s, []byte(%s))", x.xs, varname) + x.linef("r.EncodeStringBytes(codecSelferCcRAW%s, []byte(%s))", x.xs, varname) return } if t.Kind() == reflect.Array && t.Elem().Kind() == reflect.Uint8 { - x.linef("r.EncodeStringBytes(codecSelferC_RAW%s, ((*[%d]byte)(%s))[:])", x.xs, t.Len(), varname) + x.linef("r.EncodeStringBytes(codecSelferCcRAW%s, ((*[%d]byte)(%s))[:])", x.xs, t.Len(), varname) return } i := x.varsfx() @@ -1007,16 +1096,15 @@ func (x *genRunner) encListFallback(varname string, t reflect.Type) { x.line("r.WriteArrayStart(len(" + varname + "))") if t.Kind() == reflect.Chan { x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) - x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.WriteArrayElem()") x.linef("%sv%s := <-%s", g, i, varname) } else { - // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) - x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.WriteArrayElem()") } x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.WriteArrayEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.WriteArrayEnd()") } func (x *genRunner) encMapFallback(varname string, t reflect.Type) { @@ -1024,94 +1112,154 @@ func (x *genRunner) encMapFallback(varname string, t reflect.Type) { i := x.varsfx() x.line("r.WriteMapStart(len(" + varname + "))") x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) - // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") - x.line("r.WriteMapElemKey()") // f("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.WriteMapElemKey()") x.encVar(genTempVarPfx+"k"+i, t.Key()) - x.line("r.WriteMapElemValue()") // f("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.WriteMapElemValue()") x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.WriteMapEnd()") // f("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.WriteMapEnd()") } -func (x *genRunner) decVar(varname, decodedNilVarname string, t reflect.Type, canBeNil bool) { +func (x *genRunner) decVarInitPtr(varname, nilvar string, t reflect.Type, si *structFieldInfo, + newbuf, nilbuf *genBuf) (t2 reflect.StructField) { + //we must accommodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + t2kind := t2typ.Kind() + var nilbufed bool + if si != nil { + for ij, ix := range si.is { + if uint8(ij) == si.nis { + break + } + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(int(ix)) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + t2kind = t2typ.Kind() + if t2kind != reflect.Ptr { + continue + } + if newbuf != nil { + newbuf.f("if %s == nil { %s = new(%s) }\n", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + if nilbuf != nil { + if !nilbufed { + nilbuf.s("if true") + nilbufed = true + } + nilbuf.s(" && ").s(varname3).s(" != nil") + } + } + } + // if t2typ.Kind() == reflect.Ptr { + // varname3 = varname3 + t2.Name + // } + if nilbuf != nil { + if nilbufed { + nilbuf.s(" { ") + } + if nilvar != "" { + nilbuf.s(nilvar).s(" = true") + } else if tk := t2typ.Kind(); tk == reflect.Ptr { + if strings.IndexByte(varname3, '.') != -1 || strings.IndexByte(varname3, '[') != -1 { + nilbuf.s(varname3).s(" = nil") + } else { + nilbuf.s("*").s(varname3).s(" = ").s(x.genZeroValueR(t2typ.Elem())) + } + } else { + nilbuf.s(varname3).s(" = ").s(x.genZeroValueR(t2typ)) + } + if nilbufed { + nilbuf.s("}") + } + } + return t2 +} + +// decVar takes a variable called varname, of type t +func (x *genRunner) decVarMain(varname, rand string, t reflect.Type, checkNotNil bool) { // We only encode as nil if a nillable value. // This removes some of the wasted checks for TryDecodeAsNil. // We need to think about this more, to see what happens if omitempty, etc // cause a nil value to be stored when something is expected. // This could happen when decoding from a struct encoded as an array. // For that, decVar should be called with canNil=true, to force true as its value. - i := x.varsfx() - if !canBeNil { - canBeNil = genAnythingCanBeNil || !genIsImmutable(t) - } - if canBeNil { - x.line("if r.TryDecodeAsNil() {") - if decodedNilVarname != "" { - x.line(decodedNilVarname + " = true") - } else if t.Kind() == reflect.Ptr { - x.line("if " + varname + " != nil { ") - - // if varname is a field of a struct (has a dot in it), - // then just set it to nil - if strings.IndexByte(varname, '.') != -1 { - x.line(varname + " = nil") - } else { - x.line("*" + varname + " = " + x.genZeroValueR(t.Elem())) - } - x.line("}") - } else { - x.line(varname + " = " + x.genZeroValueR(t)) - } - x.line("} else {") - } else { - x.line("// cannot be nil") - } + var varname2 string if t.Kind() != reflect.Ptr { - if x.decTryAssignPrimitive(varname, t) { - x.line(genTempVarPfx + "v" + i + " := &" + varname) - x.dec(genTempVarPfx+"v"+i, t) + if t.PkgPath() != "" || !x.decTryAssignPrimitive(varname, t, false) { + x.dec(varname, t, false) } } else { - x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem())) + if checkNotNil { + x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem())) + } // Ensure we set underlying ptr to a non-nil value (so we can deref to it later). // There's a chance of a **T in here which is nil. var ptrPfx string for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() { ptrPfx += "*" - x.linef("if %s%s == nil { %s%s = new(%s)}", - ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) - } - // if varname has [ in it, then create temp variable for this ptr thingie - if strings.Index(varname, "[") >= 0 { - varname2 := genTempVarPfx + "w" + i - x.line(varname2 + " := " + varname) - varname = varname2 + if checkNotNil { + x.linef("if %s%s == nil { %s%s = new(%s)}", + ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) + } } + // Should we create temp var if a slice/map indexing? No. dec(...) can now handle it. if ptrPfx == "" { - x.dec(varname, t) + x.dec(varname, t, true) } else { - x.line(genTempVarPfx + "z" + i + " := " + ptrPfx + varname) - x.dec(genTempVarPfx+"z"+i, t) + varname2 = genTempVarPfx + "z" + rand + x.line(varname2 + " := " + ptrPfx + varname) + x.dec(varname2, t, true) } - } +} + +// decVar takes a variable called varname, of type t +func (x *genRunner) decVar(varname, nilvar string, t reflect.Type, canBeNil, checkNotNil bool) { + i := x.varsfx() + + // We only encode as nil if a nillable value. + // This removes some of the wasted checks for TryDecodeAsNil. + // We need to think about this more, to see what happens if omitempty, etc + // cause a nil value to be stored when something is expected. + // This could happen when decoding from a struct encoded as an array. + // For that, decVar should be called with canNil=true, to force true as its value. + + if !canBeNil { + canBeNil = genAnythingCanBeNil || !genIsImmutable(t) + } + + if canBeNil { + var buf genBuf + x.decVarInitPtr(varname, nilvar, t, nil, nil, &buf) + x.linef("if r.TryDecodeAsNil() { %s } else {", buf.buf) + } else { + x.line("// cannot be nil") + } + + x.decVarMain(varname, i, t, checkNotNil) if canBeNil { x.line("} ") } } -// dec will decode a variable (varname) of type ptrTo(t). +// dec will decode a variable (varname) of type t or ptrTo(t) if isptr==true. // t is always a basetype (i.e. not of kind reflect.Ptr). -func (x *genRunner) dec(varname string, t reflect.Type) { +func (x *genRunner) dec(varname string, t reflect.Type, isptr bool) { // assumptions: // - the varname is to a pointer already. No need to take address of it // - t is always a baseType T (not a *T, etc). rtid := rt2id(t) - tptr := reflect.PtrTo(t) + ti2 := x.ti.get(rtid, t) + // tptr := reflect.PtrTo(t) if x.checkForSelfer(t, varname) { - if t.Implements(selferTyp) || tptr.Implements(selferTyp) { + if ti2.cs || ti2.csp { // t.Implements(selferTyp) || tptr.Implements(selferTyp) { x.line(varname + ".CodecDecodeSelf(d)") return } @@ -1140,100 +1288,61 @@ func (x *genRunner) dec(varname string, t reflect.Type) { } // check if - // - type is Raw, RawExt + // - type is time.Time, Raw, RawExt // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() - x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) - x.linef("_ = %sm%s", genTempVarPfx, mi) + // x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) + // x.linef("_ = %sm%s", genTempVarPfx, mi) x.line("if false {") //start if block defer func() { x.line("}") }() //end if block - if t == rawTyp { - x.linef("} else { *%v = z.DecRaw()", varname) + var ptrPfx, addrPfx string + if isptr { + ptrPfx = "*" + } else { + addrPfx = "&" + } + if t == timeTyp { + x.linef("} else { %s%v = r.DecodeTime()", ptrPfx, varname) return } - if t == rawExtTyp { - x.linef("} else { r.DecodeExt(%v, 0, nil)", varname) + if t == rawTyp { + x.linef("} else { %s%v = z.DecRaw()", ptrPfx, varname) return } - // HACK: Support for Builtins. - // Currently, only Binc supports builtins, and the only builtin type is time.Time. - // Have a method that returns the rtid for time.Time if Handle is Binc. - if t == timeTyp { - vrtid := genTempVarPfx + "m" + x.varsfx() - x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) - x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) + if t == rawExtTyp { + x.linef("} else { r.DecodeExt(%s%v, 0, nil)", addrPfx, varname) + return } + // only check for extensions if the type is named, and has a packagePath. if !x.nx && genImportPath(t) != "" && t.Name() != "" { // first check if extensions are configued, before doing the interface conversion - x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) + // x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) + yy := fmt.Sprintf("%sxt%s", genTempVarPfx, mi) + x.linef("} else if %s := z.Extension(z.I2Rtid(%s)); %s != nil { z.DecExtension(%s, %s) ", yy, varname, yy, varname, yy) } - if t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { - x.linef("} else if %sm%s { z.DecBinaryUnmarshal(%v) ", genTempVarPfx, mi, varname) + if ti2.bu || ti2.bup { // t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { + x.linef("} else if z.DecBinary() { z.DecBinaryUnmarshal(%s%v) ", addrPfx, varname) } - if t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { - x.linef("} else if !%sm%s && z.IsJSONHandle() { z.DecJSONUnmarshal(%v)", genTempVarPfx, mi, varname) - } else if t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { - x.linef("} else if !%sm%s { z.DecTextUnmarshal(%v)", genTempVarPfx, mi, varname) + if ti2.ju || ti2.jup { // t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { + x.linef("} else if !z.DecBinary() && z.IsJSONHandle() { z.DecJSONUnmarshal(%s%v)", addrPfx, varname) + } else if ti2.tu || ti2.tup { // t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { + x.linef("} else if !z.DecBinary() { z.DecTextUnmarshal(%s%v)", addrPfx, varname) } x.line("} else {") - // Since these are pointers, we cannot share, and have to use them one by one + if x.decTryAssignPrimitive(varname, t, isptr) { + return + } + switch t.Kind() { - case reflect.Int: - x.line("*((*int)(" + varname + ")) = int(r.DecodeInt(codecSelferBitsize" + x.xs + "))") - // x.line("z.DecInt((*int)(" + varname + "))") - case reflect.Int8: - x.line("*((*int8)(" + varname + ")) = int8(r.DecodeInt(8))") - // x.line("z.DecInt8((*int8)(" + varname + "))") - case reflect.Int16: - x.line("*((*int16)(" + varname + ")) = int16(r.DecodeInt(16))") - // x.line("z.DecInt16((*int16)(" + varname + "))") - case reflect.Int32: - x.line("*((*int32)(" + varname + ")) = int32(r.DecodeInt(32))") - // x.line("z.DecInt32((*int32)(" + varname + "))") - case reflect.Int64: - x.line("*((*int64)(" + varname + ")) = int64(r.DecodeInt(64))") - // x.line("z.DecInt64((*int64)(" + varname + "))") - - case reflect.Uint: - x.line("*((*uint)(" + varname + ")) = uint(r.DecodeUint(codecSelferBitsize" + x.xs + "))") - // x.line("z.DecUint((*uint)(" + varname + "))") - case reflect.Uint8: - x.line("*((*uint8)(" + varname + ")) = uint8(r.DecodeUint(8))") - // x.line("z.DecUint8((*uint8)(" + varname + "))") - case reflect.Uint16: - x.line("*((*uint16)(" + varname + ")) = uint16(r.DecodeUint(16))") - //x.line("z.DecUint16((*uint16)(" + varname + "))") - case reflect.Uint32: - x.line("*((*uint32)(" + varname + ")) = uint32(r.DecodeUint(32))") - //x.line("z.DecUint32((*uint32)(" + varname + "))") - case reflect.Uint64: - x.line("*((*uint64)(" + varname + ")) = uint64(r.DecodeUint(64))") - //x.line("z.DecUint64((*uint64)(" + varname + "))") - case reflect.Uintptr: - x.line("*((*uintptr)(" + varname + ")) = uintptr(r.DecodeUint(codecSelferBitsize" + x.xs + "))") - - case reflect.Float32: - x.line("*((*float32)(" + varname + ")) = float32(r.DecodeFloat(true))") - //x.line("z.DecFloat32((*float32)(" + varname + "))") - case reflect.Float64: - x.line("*((*float64)(" + varname + ")) = float64(r.DecodeFloat(false))") - // x.line("z.DecFloat64((*float64)(" + varname + "))") - - case reflect.Bool: - x.line("*((*bool)(" + varname + ")) = r.DecodeBool()") - // x.line("z.DecBool((*bool)(" + varname + "))") - case reflect.String: - x.line("*((*string)(" + varname + ")) = r.DecodeString()") - // x.line("z.DecString((*string)(" + varname + "))") case reflect.Array, reflect.Chan: - x.xtraSM(varname, false, t) - // x.decListFallback(varname, rtid, true, t) + x.xtraSM(varname, t, false, isptr) case reflect.Slice: // if a []uint8, call dedicated function // if a known fastpath slice, call dedicated function @@ -1241,12 +1350,13 @@ func (x *genRunner) dec(varname string, t reflect.Type) { // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. if rtid == uint8SliceTypId { - x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false)") + x.linef("%s%s = r.DecodeBytes(%s(%s[]byte)(%s), false)", + ptrPfx, varname, ptrPfx, ptrPfx, varname) } else if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) - x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", d)") + x.linef("z.F.%sX(%s%s, d)", g.MethodNamePfx("Dec", false), addrPfx, varname) } else { - x.xtraSM(varname, false, t) + x.xtraSM(varname, t, false, isptr) // x.decListFallback(varname, rtid, false, t) } case reflect.Map: @@ -1256,74 +1366,80 @@ func (x *genRunner) dec(varname string, t reflect.Type) { // - else call Encoder.encode(XXX) on it. if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) - x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", d)") + x.linef("z.F.%sX(%s%s, d)", g.MethodNamePfx("Dec", false), addrPfx, varname) } else { - x.xtraSM(varname, false, t) + x.xtraSM(varname, t, false, isptr) // x.decMapFallback(varname, rtid, t) } case reflect.Struct: if inlist { - x.decStruct(varname, rtid, t) + // no need to create temp variable if isptr, or x.F or x[F] + if isptr || strings.IndexByte(varname, '.') != -1 || strings.IndexByte(varname, '[') != -1 { + x.decStruct(varname, rtid, t) + } else { + varname2 := genTempVarPfx + "j" + mi + x.line(varname2 + " := &" + varname) + x.decStruct(varname2, rtid, t) + } } else { // delete(x.td, rtid) - x.line("z.DecFallback(" + varname + ", false)") + x.line("z.DecFallback(" + addrPfx + varname + ", false)") } default: if rtidAdded { delete(x.te, rtid) } - x.line("z.DecFallback(" + varname + ", true)") + x.line("z.DecFallback(" + addrPfx + varname + ", true)") } } -func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAsPtr bool) { +func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type, isptr bool) (done bool) { // This should only be used for exact primitives (ie un-named types). // Named types may be implementations of Selfer, Unmarshaler, etc. // They should be handled by dec(...) - if t.Name() != "" { - tryAsPtr = true - return + var ptr string + if isptr { + ptr = "*" } - switch t.Kind() { case reflect.Int: - x.linef("%s = r.DecodeInt(codecSelferBitsize%s)", varname, x.xs) + x.linef("%s%s = (%s)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize%s))", ptr, varname, x.genTypeName(t), x.xs) case reflect.Int8: - x.linef("%s = r.DecodeInt(8)", varname) + x.linef("%s%s = (%s)(z.C.IntV(r.DecodeInt64(), 8))", ptr, varname, x.genTypeName(t)) case reflect.Int16: - x.linef("%s = r.DecodeInt(16)", varname) + x.linef("%s%s = (%s)(z.C.IntV(r.DecodeInt64(), 16))", ptr, varname, x.genTypeName(t)) case reflect.Int32: - x.linef("%s = r.DecodeInt(32)", varname) + x.linef("%s%s = (%s)(z.C.IntV(r.DecodeInt64(), 32))", ptr, varname, x.genTypeName(t)) case reflect.Int64: - x.linef("%s = r.DecodeInt(64)", varname) + x.linef("%s%s = (%s)(r.DecodeInt64())", ptr, varname, x.genTypeName(t)) case reflect.Uint: - x.linef("%s = r.DecodeUint(codecSelferBitsize%s)", varname, x.xs) + x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize%s))", ptr, varname, x.genTypeName(t), x.xs) case reflect.Uint8: - x.linef("%s = r.DecodeUint(8)", varname) + x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), 8))", ptr, varname, x.genTypeName(t)) case reflect.Uint16: - x.linef("%s = r.DecodeUint(16)", varname) + x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), 16))", ptr, varname, x.genTypeName(t)) case reflect.Uint32: - x.linef("%s = r.DecodeUint(32)", varname) + x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), 32))", ptr, varname, x.genTypeName(t)) case reflect.Uint64: - x.linef("%s = r.DecodeUint(64)", varname) + x.linef("%s%s = (%s)(r.DecodeUint64())", ptr, varname, x.genTypeName(t)) case reflect.Uintptr: - x.linef("%s = r.DecodeUint(codecSelferBitsize%s)", varname, x.xs) + x.linef("%s%s = (%s)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize%s))", ptr, varname, x.genTypeName(t), x.xs) case reflect.Float32: - x.linef("%s = r.DecodeFloat(true)", varname) + x.linef("%s%s = (%s)(r.DecodeFloat32As64())", ptr, varname, x.genTypeName(t)) case reflect.Float64: - x.linef("%s = r.DecodeFloat(false)", varname) + x.linef("%s%s = (%s)(r.DecodeFloat64())", ptr, varname, x.genTypeName(t)) case reflect.Bool: - x.linef("%s = r.DecodeBool()", varname) + x.linef("%s%s = (%s)(r.DecodeBool())", ptr, varname, x.genTypeName(t)) case reflect.String: - x.linef("%s = r.DecodeString()", varname) + x.linef("%s%s = (%s)(r.DecodeString())", ptr, varname, x.genTypeName(t)) default: - tryAsPtr = true + return false } - return + return true } func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) { @@ -1350,13 +1466,9 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type funcs := make(template.FuncMap) funcs["decLineVar"] = func(varname string) string { - x.decVar(varname, "", telem, false) + x.decVar(varname, "", telem, false, true) return "" } - // funcs["decLine"] = func(pfx string) string { - // x.decVar(ts.TempVar+pfx+ts.Rand, "", reflect.PtrTo(telem), false) - // return "" - // } funcs["var"] = func(s string) string { return ts.TempVar + s + ts.Rand } @@ -1412,21 +1524,13 @@ func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) return telem.Kind() == reflect.Interface } funcs["decLineVarK"] = func(varname string) string { - x.decVar(varname, "", tkey, false) + x.decVar(varname, "", tkey, false, true) return "" } funcs["decLineVar"] = func(varname, decodedNilVarname string) string { - x.decVar(varname, decodedNilVarname, telem, false) + x.decVar(varname, decodedNilVarname, telem, false, true) return "" } - // funcs["decLineK"] = func(pfx string) string { - // x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(tkey), false) - // return "" - // } - // funcs["decLine"] = func(pfx string) string { - // x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) - // return "" - // } funcs["var"] = func(s string) string { return ts.TempVar + s + ts.Rand } @@ -1442,32 +1546,17 @@ func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) { ti := x.ti.get(rtid, t) - tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + tisfi := ti.sfiSrc // always use sequence from file. decStruct expects same thing. x.line("switch (" + kName + ") {") + var newbuf, nilbuf genBuf for _, si := range tisfi { x.line("case \"" + si.encName + "\":") - var t2 reflect.StructField - { - //we must accommodate anonymous fields, where the embedded field is a nil pointer in the value. - // t2 = t.FieldByIndex(si.is) - t2typ := t - varname3 := varname - for ij, ix := range si.is { - if uint8(ij) == si.nis { - break - } - for t2typ.Kind() == reflect.Ptr { - t2typ = t2typ.Elem() - } - t2 = t2typ.Field(int(ix)) - t2typ = t2.Type - varname3 = varname3 + "." + t2.Name - if t2typ.Kind() == reflect.Ptr { - x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) - } - } - } - x.decVar(varname+"."+t2.Name, "", t2.Type, false) + newbuf.reset() + nilbuf.reset() + t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) + x.linef("if r.TryDecodeAsNil() { %s } else { %s", nilbuf.buf, newbuf.buf) + x.decVarMain(varname+"."+t2.Name, x.varsfx(), t2.Type, false) + x.line("}") } x.line("default:") // pass the slice here, so that the string will not escape, and maybe save allocation @@ -1477,16 +1566,10 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style genStructMapStyle) { tpfx := genTempVarPfx + ti := x.ti.get(rtid, t) i := x.varsfx() kName := tpfx + "s" + i - // x.line("var " + kName + "Arr = [32]byte{} // default string to decode into") - // x.line("var " + kName + "Slc = " + kName + "Arr[:] // default slice to decode into") - // use the scratch buffer to avoid allocation (most field names are < 32). - - x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into") - - x.line("_ = " + kName + "Slc") switch style { case genStructMapStyleLenPrefix: x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) @@ -1498,55 +1581,49 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) x.line("} else { if r.CheckBreak() { break }; }") } - x.line("r.ReadMapElemKey()") // f("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) - x.line(kName + "Slc = r.DecodeStringAsBytes()") - // let string be scoped to this loop alone, so it doesn't escape. - x.line(kName + " := string(" + kName + "Slc)") - x.line("r.ReadMapElemValue()") // f("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.ReadMapElemKey()") + + // emulate decstructfieldkey + switch ti.keyType { + case valueTypeInt: + x.linef("%s := z.StringView(strconv.AppendInt(z.DecScratchArrayBuffer()[:0], r.DecodeInt64(), 10))", kName) + case valueTypeUint: + x.linef("%s := z.StringView(strconv.AppendUint(z.DecScratchArrayBuffer()[:0], r.DecodeUint64(), 10))", kName) + case valueTypeFloat: + x.linef("%s := z.StringView(strconv.AppendFloat(z.DecScratchArrayBuffer()[:0], r.DecodeFloat64(), 'f', -1, 64))", kName) + default: // string + x.linef("%s := z.StringView(r.DecodeStringAsBytes())", kName) + } + // x.linef("%s := z.StringView(r.DecStructFieldKey(codecSelferValueType%s%s, z.DecScratchArrayBuffer()))", kName, ti.keyType.String(), x.xs) + + x.line("r.ReadMapElemValue()") x.decStructMapSwitch(kName, varname, rtid, t) x.line("} // end for " + tpfx + "j" + i) - x.line("r.ReadMapEnd()") // f("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.ReadMapEnd()") } func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { tpfx := genTempVarPfx i := x.varsfx() ti := x.ti.get(rtid, t) - tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + tisfi := ti.sfiSrc // always use sequence from file. decStruct expects same thing. x.linef("var %sj%s int", tpfx, i) x.linef("var %sb%s bool", tpfx, i) // break x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + var newbuf, nilbuf genBuf for _, si := range tisfi { - var t2 reflect.StructField - { - //we must accommodate anonymous fields, where the embedded field is a nil pointer in the value. - // t2 = t.FieldByIndex(si.is) - t2typ := t - varname3 := varname - for ij, ix := range si.is { - if uint8(ij) == si.nis { - break - } - for t2typ.Kind() == reflect.Ptr { - t2typ = t2typ.Elem() - } - t2 = t2typ.Field(int(ix)) - t2typ = t2.Type - varname3 = varname3 + "." + t2.Name - if t2typ.Kind() == reflect.Ptr { - x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) - } - } - } - x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) x.linef("if %sb%s { r.ReadArrayEnd(); %s }", tpfx, i, breakString) - // x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", tpfx, i, x.xs, breakString) - x.line("r.ReadArrayElem()") // f("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) - x.decVar(varname+"."+t2.Name, "", t2.Type, true) + x.line("r.ReadArrayElem()") + newbuf.reset() + nilbuf.reset() + t2 := x.decVarInitPtr(varname, "", t, si, &newbuf, &nilbuf) + x.linef("if r.TryDecodeAsNil() { %s } else { %s", nilbuf.buf, newbuf.buf) + x.decVarMain(varname+"."+t2.Name, x.varsfx(), t2.Type, false) + x.line("}") } // read remaining values and throw away. x.line("for {") @@ -1554,28 +1631,28 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) x.linef("if %sb%s { break }", tpfx, i) - x.line("r.ReadArrayElem()") // f("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.ReadArrayElem()") x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) x.line("}") - x.line("r.ReadArrayEnd()") // f("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.ReadArrayEnd()") } func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { - // if container is map + // varname MUST be a ptr, or a struct field or a slice element. i := x.varsfx() x.linef("%sct%s := r.ContainerType()", genTempVarPfx, i) x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadMapEnd()") // f("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.ReadMapEnd()") if genUseOneFunctionForDecStructMap { x.line("} else { ") - x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) + x.linef("%s.codecDecodeSelfFromMap(%sl%s, d)", varname, genTempVarPfx, i) } else { x.line("} else if " + genTempVarPfx + "l" + i + " > 0 { ") - x.line("x.codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)") + x.line(varname + ".codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)") x.line("} else {") - x.line("x.codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") + x.line(varname + ".codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") } x.line("}") @@ -1583,13 +1660,13 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadArrayEnd()") // f("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.ReadArrayEnd()") x.line("} else { ") - x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) + x.linef("%s.codecDecodeSelfFromArray(%sl%s, d)", varname, genTempVarPfx, i) x.line("}") // else panic x.line("} else { ") - x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")") + x.line("panic(errCodecSelferOnlyMapOrArrayEncodeToStruct" + x.xs + ")") x.line("} ") } @@ -1649,7 +1726,7 @@ func genImportPath(t reflect.Type) (s string) { s = t.PkgPath() if genCheckVendor { // HACK: always handle vendoring. It should be typically on in go 1.6, 1.7 - s = stripVendor(s) + s = genStripVendor(s) } return } @@ -1777,7 +1854,7 @@ type genInternal struct { func (x genInternal) FastpathLen() (l int) { for _, v := range x.Values { - if v.Primitive == "" { + if v.Primitive == "" && !(v.MapKey == "" && v.Elem == "uint8") { l++ } } @@ -1797,18 +1874,29 @@ func genInternalZeroValue(s string) string { } } +var genInternalNonZeroValueIdx [5]uint64 +var genInternalNonZeroValueStrs = [2][5]string{ + {`"string-is-an-interface"`, "true", `"some-string"`, "11.1", "33"}, + {`"string-is-an-interface-2"`, "true", `"some-string-2"`, "22.2", "44"}, +} + func genInternalNonZeroValue(s string) string { switch s { case "interface{}", "interface {}": - return `"string-is-an-interface"` // return string, to remove ambiguity + genInternalNonZeroValueIdx[0]++ + return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[0]%2][0] // return string, to remove ambiguity case "bool": - return "true" + genInternalNonZeroValueIdx[1]++ + return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[1]%2][1] case "string": - return `"some-string"` + genInternalNonZeroValueIdx[2]++ + return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[2]%2][2] case "float32", "float64", "float", "double": - return "10.1" + genInternalNonZeroValueIdx[3]++ + return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[3]%2][3] default: - return "10" + genInternalNonZeroValueIdx[4]++ + return genInternalNonZeroValueStrs[genInternalNonZeroValueIdx[4]%2][4] } } @@ -1819,15 +1907,15 @@ func genInternalEncCommandAsString(s string, vname string) string { case "int", "int8", "int16", "int32", "int64": return "ee.EncodeInt(int64(" + vname + "))" case "string": - return "ee.EncodeString(c_UTF8, " + vname + ")" + return "ee.EncodeString(cUTF8, " + vname + ")" case "float32": return "ee.EncodeFloat32(" + vname + ")" case "float64": return "ee.EncodeFloat64(" + vname + ")" case "bool": return "ee.EncodeBool(" + vname + ")" - case "symbol": - return "ee.EncodeSymbol(" + vname + ")" + // case "symbol": + // return "ee.EncodeSymbol(" + vname + ")" default: return "e.encode(" + vname + ")" } @@ -1836,34 +1924,34 @@ func genInternalEncCommandAsString(s string, vname string) string { func genInternalDecCommandAsString(s string) string { switch s { case "uint": - return "uint(dd.DecodeUint(uintBitsize))" + return "uint(chkOvf.UintV(dd.DecodeUint64(), uintBitsize))" case "uint8": - return "uint8(dd.DecodeUint(8))" + return "uint8(chkOvf.UintV(dd.DecodeUint64(), 8))" case "uint16": - return "uint16(dd.DecodeUint(16))" + return "uint16(chkOvf.UintV(dd.DecodeUint64(), 16))" case "uint32": - return "uint32(dd.DecodeUint(32))" + return "uint32(chkOvf.UintV(dd.DecodeUint64(), 32))" case "uint64": - return "dd.DecodeUint(64)" + return "dd.DecodeUint64()" case "uintptr": - return "uintptr(dd.DecodeUint(uintBitsize))" + return "uintptr(chkOvf.UintV(dd.DecodeUint64(), uintBitsize))" case "int": - return "int(dd.DecodeInt(intBitsize))" + return "int(chkOvf.IntV(dd.DecodeInt64(), intBitsize))" case "int8": - return "int8(dd.DecodeInt(8))" + return "int8(chkOvf.IntV(dd.DecodeInt64(), 8))" case "int16": - return "int16(dd.DecodeInt(16))" + return "int16(chkOvf.IntV(dd.DecodeInt64(), 16))" case "int32": - return "int32(dd.DecodeInt(32))" + return "int32(chkOvf.IntV(dd.DecodeInt64(), 32))" case "int64": - return "dd.DecodeInt(64)" + return "dd.DecodeInt64()" case "string": return "dd.DecodeString()" case "float32": - return "float32(dd.DecodeFloat(true))" + return "float32(chkOvf.Float32V(dd.DecodeFloat64()))" case "float64": - return "dd.DecodeFloat(false)" + return "dd.DecodeFloat64()" case "bool": return "dd.DecodeBool()" default: @@ -1887,7 +1975,7 @@ func genInternalSortType(s string, elem bool) string { panic("sorttype: unexpected type: " + s) } -func stripVendor(s string) string { +func genStripVendor(s string) string { // HACK: Misbehaviour occurs in go 1.5. May have to re-visit this later. // if s contains /vendor/ OR startsWith vendor/, then return everything after it. const vendorStart = "vendor/" @@ -1969,9 +2057,10 @@ func genInternalInit() { // For each slice or map type, there must be a (symmetrical) Encode and Decode fast-path function for _, s := range types { gt.Values = append(gt.Values, genV{Primitive: s, Size: mapvaltypes2[s]}) - if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. - gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) - } + // if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. + // gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) + // } + gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) if _, ok := mapvaltypes2[s]; !ok { gt.Values = append(gt.Values, genV{MapKey: s, Elem: s, Size: 2 * mapvaltypes2[s]}) } diff --git a/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go b/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go index 7567e2c..9ddbe20 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go +++ b/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build go1.5 diff --git a/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go b/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go index ec94bd0..c5fcd66 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go +++ b/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build !go1.5 diff --git a/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go b/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go index 51fe40e..bc39d6b 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go +++ b/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build go1.9 diff --git a/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go b/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go index d4b9c2c..cde4cd3 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go +++ b/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build !go1.9 diff --git a/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go b/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go new file mode 100644 index 0000000..794133a --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go @@ -0,0 +1,8 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build go1.10 + +package codec + +const allowSetUnexportedEmbeddedPtr = false diff --git a/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go b/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go new file mode 100644 index 0000000..fd92ede --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go @@ -0,0 +1,8 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build !go1.10 + +package codec + +const allowSetUnexportedEmbeddedPtr = true diff --git a/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go b/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go index dcd8c3d..8debfa6 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go +++ b/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build !go1.4 diff --git a/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go index 68626e1..0f1bb01 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go +++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build go1.5,!go1.6 diff --git a/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go index 344f596..2fb4b05 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go +++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build go1.6,!go1.7 diff --git a/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go index de91d29..c5b8155 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go +++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build go1.7 diff --git a/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go index 9d007bf..837cf24 100644 --- a/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go +++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build !go1.5 diff --git a/vendor/github.com/ugorji/go/codec/helper.go b/vendor/github.com/ugorji/go/codec/helper.go index 6c58674..e6994a9 100644 --- a/vendor/github.com/ugorji/go/codec/helper.go +++ b/vendor/github.com/ugorji/go/codec/helper.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -102,8 +102,8 @@ import ( "encoding/binary" "errors" "fmt" + "io" "math" - "os" "reflect" "sort" "strconv" @@ -128,42 +128,14 @@ const ( // allowing zero-alloc initialization. arrayCacheLen = 8 - // We tried an optimization, where we detect if a type is one of the known types - // we optimized for (e.g. int, []uint64, etc). - // - // However, we notice some worse performance when using this optimization. - // So we hide it behind a flag, to turn on if needed. - useLookupRecognizedTypes = false + // size of the cacheline: defaulting to value for archs: amd64, arm64, 386 + // should use "runtime/internal/sys".CacheLineSize, but that is not exposed. + cacheLineSize = 64 - // using recognized allows us to do d.decode(interface{}) instead of d.decodeValue(reflect.Value) - // when we can infer that the kind of the interface{} is one of the ones hard-coded in the - // type switch for known types or the ones defined by fast-path. - // - // However, it seems we get better performance when we don't recognize, and just let - // reflection handle it. - // - // Reasoning is as below: - // typeswitch is a binary search with a branch to a code-point. - // getdecfn is a binary search with a call to a function pointer. - // - // both are about the same. - // - // so: why prefer typeswitch? - // - // is recognized does the following: - // - lookup rtid - // - check if in sorted list - // - calls decode(type switch) - // - 1 or 2 binary search to a point in code - // - branch there - // - // vs getdecfn - // - lookup rtid - // - check in sorted list for a function pointer - // - calls it to decode using reflection (optimized) + wordSizeBits = 32 << (^uint(0) >> 63) // strconv.IntSize + wordSize = wordSizeBits / 8 - // always set xDebug = false before releasing software - xDebug = true + maxLevelsEmbedding = 15 // use this, so structFieldInfo fits into 8 bytes ) var ( @@ -172,8 +144,8 @@ var ( ) var refBitset bitset32 - var pool pooler +var panicv panicHdl func init() { pool.init() @@ -184,23 +156,15 @@ func init() { refBitset.set(byte(reflect.Chan)) } -// type findCodecFnMode uint8 - -// const ( -// findCodecFnModeMap findCodecFnMode = iota -// findCodecFnModeBinarySearch -// findCodecFnModeLinearSearch -// ) - type charEncoding uint8 const ( - c_RAW charEncoding = iota - c_UTF8 - c_UTF16LE - c_UTF16BE - c_UTF32LE - c_UTF32BE + cRAW charEncoding = iota + cUTF8 + cUTF16LE + cUTF16BE + cUTF32LE + cUTF32BE ) // valueType is the stream type @@ -218,38 +182,31 @@ const ( valueTypeBytes valueTypeMap valueTypeArray - valueTypeTimestamp + valueTypeTime valueTypeExt // valueTypeInvalid = 0xff ) +var valueTypeStrings = [...]string{ + "Unset", + "Nil", + "Int", + "Uint", + "Float", + "Bool", + "String", + "Symbol", + "Bytes", + "Map", + "Array", + "Timestamp", + "Ext", +} + func (x valueType) String() string { - switch x { - case valueTypeNil: - return "Nil" - case valueTypeInt: - return "Int" - case valueTypeUint: - return "Uint" - case valueTypeFloat: - return "Float" - case valueTypeBool: - return "Bool" - case valueTypeString: - return "String" - case valueTypeSymbol: - return "Symbol" - case valueTypeBytes: - return "Bytes" - case valueTypeMap: - return "Map" - case valueTypeArray: - return "Array" - case valueTypeTimestamp: - return "Timestamp" - case valueTypeExt: - return "Ext" + if int(x) < len(valueTypeStrings) { + return valueTypeStrings[x] } return strconv.FormatInt(int64(x), 10) } @@ -279,11 +236,11 @@ const ( containerArrayEnd ) -// sfiIdx used for tracking where a (field/enc)Name is seen in a []*structFieldInfo -type sfiIdx struct { - name string - index int -} +// // sfiIdx used for tracking where a (field/enc)Name is seen in a []*structFieldInfo +// type sfiIdx struct { +// name string +// index int +// } // do not recurse if a containing type refers to an embedded type // which refers back to its containing type (via a pointer). @@ -292,30 +249,39 @@ type sfiIdx struct { const rgetMaxRecursion = 2 // Anecdotally, we believe most types have <= 12 fields. -// Java's PMD rules set TooManyFields threshold to 15. -const typeInfoLoadArrayLen = 12 +// - even Java's PMD rules set TooManyFields threshold to 15. +// However, go has embedded fields, which should be regarded as +// top level, allowing structs to possibly double or triple. +// In addition, we don't want to keep creating transient arrays, +// especially for the sfi index tracking, and the evtypes tracking. +// +// So - try to keep typeInfoLoadArray within 2K bytes +const ( + typeInfoLoadArraySfisLen = 16 + typeInfoLoadArraySfiidxLen = 8 * 112 + typeInfoLoadArrayEtypesLen = 12 + typeInfoLoadArrayBLen = 8 * 4 +) type typeInfoLoad struct { - fNames []string - encNames []string - etypes []uintptr - sfis []*structFieldInfo + // fNames []string + // encNames []string + etypes []uintptr + sfis []structFieldInfo } type typeInfoLoadArray struct { - fNames [typeInfoLoadArrayLen]string - encNames [typeInfoLoadArrayLen]string - etypes [typeInfoLoadArrayLen]uintptr - sfis [typeInfoLoadArrayLen]*structFieldInfo - sfiidx [typeInfoLoadArrayLen]sfiIdx + // fNames [typeInfoLoadArrayLen]string + // encNames [typeInfoLoadArrayLen]string + sfis [typeInfoLoadArraySfisLen]structFieldInfo + sfiidx [typeInfoLoadArraySfiidxLen]byte + etypes [typeInfoLoadArrayEtypesLen]uintptr + b [typeInfoLoadArrayBLen]byte // scratch - used for struct field names } -// type containerStateRecv interface { -// sendContainerState(containerState) -// } - // mirror json.Marshaler and json.Unmarshaler here, // so we don't import the encoding/json package + type jsonMarshaler interface { MarshalJSON() ([]byte, error) } @@ -323,6 +289,10 @@ type jsonUnmarshaler interface { UnmarshalJSON([]byte) error } +type isZeroer interface { + IsZero() bool +} + // type byteAccepter func(byte) bool var ( @@ -334,11 +304,17 @@ var ( intfSliceTyp = reflect.TypeOf([]interface{}(nil)) intfTyp = intfSliceTyp.Elem() + reflectValTyp = reflect.TypeOf((*reflect.Value)(nil)).Elem() + stringTyp = reflect.TypeOf("") timeTyp = reflect.TypeOf(time.Time{}) rawExtTyp = reflect.TypeOf(RawExt{}) rawTyp = reflect.TypeOf(Raw{}) + uintptrTyp = reflect.TypeOf(uintptr(0)) + uint8Typ = reflect.TypeOf(uint8(0)) uint8SliceTyp = reflect.TypeOf([]uint8(nil)) + uintTyp = reflect.TypeOf(uint(0)) + intTyp = reflect.TypeOf(int(0)) mapBySliceTyp = reflect.TypeOf((*MapBySlice)(nil)).Elem() @@ -352,7 +328,9 @@ var ( jsonUnmarshalerTyp = reflect.TypeOf((*jsonUnmarshaler)(nil)).Elem() selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem() + iszeroTyp = reflect.TypeOf((*isZeroer)(nil)).Elem() + uint8TypId = rt2id(uint8Typ) uint8SliceTypId = rt2id(uint8SliceTyp) rawExtTypId = rt2id(rawExtTyp) rawTypId = rt2id(rawTyp) @@ -365,15 +343,15 @@ var ( intfSliceTypId = rt2id(intfSliceTyp) // mapBySliceTypId = rt2id(mapBySliceTyp) - intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits()) - uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits()) + intBitsize = uint8(intTyp.Bits()) + uintBitsize = uint8(uintTyp.Bits()) bsAll0x00 = []byte{0, 0, 0, 0, 0, 0, 0, 0} bsAll0xff = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} chkOvf checkOverflow - noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo") + errNoFieldNameToStructFieldInfo = errors.New("no field name passed to parseStructFieldInfo") ) var defTypeInfos = NewTypeInfos([]string{"codec", "json"}) @@ -408,85 +386,6 @@ var immutableKindsSet = [32]bool{ // reflect.UnsafePointer } -var ( - recognizedRtids []uintptr - recognizedRtidPtrs []uintptr - recognizedRtidOrPtrs []uintptr - recognizedRtidsLoaded bool -) - -func init() { - if !useLookupRecognizedTypes { - return - } - if recognizedRtidsLoaded { - panic("recognizedRtidsLoaded = true - cannot happen") - } - for _, v := range [...]interface{}{ - float32(0), - float64(0), - uintptr(0), - uint(0), - uint8(0), - uint16(0), - uint32(0), - uint64(0), - uintptr(0), - int(0), - int8(0), - int16(0), - int32(0), - int64(0), - bool(false), - string(""), - Raw{}, - []byte(nil), - } { - rt := reflect.TypeOf(v) - recognizedRtids = append(recognizedRtids, rt2id(rt)) - recognizedRtidPtrs = append(recognizedRtidPtrs, rt2id(reflect.PtrTo(rt))) - } - - // now sort it. - sort.Sort(uintptrSlice(recognizedRtids)) - sort.Sort(uintptrSlice(recognizedRtidPtrs)) - recognizedRtidOrPtrs = make([]uintptr, len(recognizedRtids)+len(recognizedRtidPtrs)) - copy(recognizedRtidOrPtrs, recognizedRtids) - copy(recognizedRtidOrPtrs[len(recognizedRtids):], recognizedRtidPtrs) - sort.Sort(uintptrSlice(recognizedRtidOrPtrs)) - - recognizedRtidsLoaded = true -} - -func containsU(s []uintptr, v uintptr) bool { - // return false // TODO: REMOVE - h, i, j := 0, 0, len(s) - for i < j { - h = i + (j-i)/2 - if s[h] < v { - i = h + 1 - } else { - j = h - } - } - if i < len(s) && s[i] == v { - return true - } - return false -} - -func isRecognizedRtid(rtid uintptr) bool { - return containsU(recognizedRtids, rtid) -} - -func isRecognizedRtidPtr(rtid uintptr) bool { - return containsU(recognizedRtidPtrs, rtid) -} - -func isRecognizedRtidOrPtr(rtid uintptr) bool { - return containsU(recognizedRtidOrPtrs, rtid) -} - // Selfer defines methods by which a value can encode or decode itself. // // Any type which implements Selfer will be able to encode or decode itself. @@ -497,30 +396,58 @@ type Selfer interface { CodecDecodeSelf(*Decoder) } -// MapBySlice represents a slice which should be encoded as a map in the stream. +// MapBySlice is a tag interface that denotes wrapped slice should encode as a map in the stream. // The slice contains a sequence of key-value pairs. // This affords storing a map in a specific sequence in the stream. // +// Example usage: +// type T1 []string // or []int or []Point or any other "slice" type +// func (_ T1) MapBySlice{} // T1 now implements MapBySlice, and will be encoded as a map +// type T2 struct { KeyValues T1 } +// +// var kvs = []string{"one", "1", "two", "2", "three", "3"} +// var v2 = T2{ KeyValues: T1(kvs) } +// // v2 will be encoded like the map: {"KeyValues": {"one": "1", "two": "2", "three": "3"} } +// // The support of MapBySlice affords the following: // - A slice type which implements MapBySlice will be encoded as a map // - A slice can be decoded from a map in the stream +// - It MUST be a slice type (not a pointer receiver) that implements MapBySlice type MapBySlice interface { MapBySlice() } -// WARNING: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED. -// // BasicHandle encapsulates the common options and extension functions. +// +// Deprecated: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED. type BasicHandle struct { + // BasicHandle is always a part of a different type. + // It doesn't have to fit into it own cache lines. + // TypeInfos is used to get the type info for any type. // // If not configured, the default TypeInfos is used, which uses struct tag keys: codec, json TypeInfos *TypeInfos + // Note: BasicHandle is not comparable, due to these slices here (extHandle, intf2impls). + // If *[]T is used instead, this becomes comparable, at the cost of extra indirection. + // Thses slices are used all the time, so keep as slices (not pointers). + extHandle - EncodeOptions + + intf2impls + + RPCOptions + + // ---- cache line + DecodeOptions - noBuiltInTypeChecker + + // ---- cache line + + EncodeOptions + + // noBuiltInTypeChecker } func (x *BasicHandle) getBasicHandle() *BasicHandle { @@ -540,30 +467,36 @@ func (x *BasicHandle) getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) // and not modified while in use. Such a pre-configured Handle // is safe for concurrent access. type Handle interface { + Name() string getBasicHandle() *BasicHandle + recreateEncDriver(encDriver) bool newEncDriver(w *Encoder) encDriver newDecDriver(r *Decoder) decDriver isBinary() bool hasElemSeparators() bool - IsBuiltinType(rtid uintptr) bool + // IsBuiltinType(rtid uintptr) bool } // Raw represents raw formatted bytes. -// We "blindly" store it during encode and store the raw bytes during decode. -// Note: it is dangerous during encode, so we may gate the behaviour behind an Encode flag which must be explicitly set. +// We "blindly" store it during encode and retrieve the raw bytes during decode. +// Note: it is dangerous during encode, so we may gate the behaviour +// behind an Encode flag which must be explicitly set. type Raw []byte // RawExt represents raw unprocessed extension data. -// Some codecs will decode extension data as a *RawExt if there is no registered extension for the tag. +// Some codecs will decode extension data as a *RawExt +// if there is no registered extension for the tag. // -// Only one of Data or Value is nil. If Data is nil, then the content of the RawExt is in the Value. +// Only one of Data or Value is nil. +// If Data is nil, then the content of the RawExt is in the Value. type RawExt struct { Tag uint64 - // Data is the []byte which represents the raw ext. If Data is nil, ext is exposed in Value. - // Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types + // Data is the []byte which represents the raw ext. If nil, ext is exposed in Value. + // Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of types Data []byte // Value represents the extension, if Data is nil. - // Value is used by codecs (e.g. cbor, json) which use the format to do custom serialization of the types. + // Value is used by codecs (e.g. cbor, json) which leverage the format to do + // custom serialization of the types. Value interface{} } @@ -572,24 +505,30 @@ type RawExt struct { type BytesExt interface { // WriteExt converts a value to a []byte. // - // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + // Note: v is a pointer iff the registered extension type is a struct or array kind. WriteExt(v interface{}) []byte // ReadExt updates a value from a []byte. + // + // Note: dst is always a pointer kind to the registered extension type. ReadExt(dst interface{}, src []byte) } // InterfaceExt handles custom (de)serialization of types to/from another interface{} value. // The Encoder or Decoder will then handle the further (de)serialization of that known type. // -// It is used by codecs (e.g. cbor, json) which use the format to do custom serialization of the types. +// It is used by codecs (e.g. cbor, json) which use the format to do custom serialization of types. type InterfaceExt interface { - // ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64. + // ConvertExt converts a value into a simpler interface for easy encoding + // e.g. convert time.Time to int64. // - // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + // Note: v is a pointer iff the registered extension type is a struct or array kind. ConvertExt(v interface{}) interface{} - // UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time. + // UpdateExt updates a value from a simpler interface for easy decoding + // e.g. convert int64 to time.Time. + // + // Note: dst is always a pointer kind to the registered extension type. UpdateExt(dst interface{}, src interface{}) } @@ -627,69 +566,59 @@ func (x addExtWrapper) UpdateExt(dest interface{}, v interface{}) { x.ReadExt(dest, v.([]byte)) } -type setExtWrapper struct { - b BytesExt - i InterfaceExt +type extWrapper struct { + BytesExt + InterfaceExt } -func (x *setExtWrapper) WriteExt(v interface{}) []byte { - if x.b == nil { - panic("BytesExt.WriteExt is not supported") - } - return x.b.WriteExt(v) +type bytesExtFailer struct{} + +func (bytesExtFailer) WriteExt(v interface{}) []byte { + panicv.errorstr("BytesExt.WriteExt is not supported") + return nil +} +func (bytesExtFailer) ReadExt(v interface{}, bs []byte) { + panicv.errorstr("BytesExt.ReadExt is not supported") } -func (x *setExtWrapper) ReadExt(v interface{}, bs []byte) { - if x.b == nil { - panic("BytesExt.WriteExt is not supported") +type interfaceExtFailer struct{} - } - x.b.ReadExt(v, bs) +func (interfaceExtFailer) ConvertExt(v interface{}) interface{} { + panicv.errorstr("InterfaceExt.ConvertExt is not supported") + return nil } - -func (x *setExtWrapper) ConvertExt(v interface{}) interface{} { - if x.i == nil { - panic("InterfaceExt.ConvertExt is not supported") - - } - return x.i.ConvertExt(v) -} - -func (x *setExtWrapper) UpdateExt(dest interface{}, v interface{}) { - if x.i == nil { - panic("InterfaceExxt.UpdateExt is not supported") - - } - x.i.UpdateExt(dest, v) +func (interfaceExtFailer) UpdateExt(dest interface{}, v interface{}) { + panicv.errorstr("InterfaceExt.UpdateExt is not supported") } type binaryEncodingType struct{} -func (_ binaryEncodingType) isBinary() bool { return true } +func (binaryEncodingType) isBinary() bool { return true } type textEncodingType struct{} -func (_ textEncodingType) isBinary() bool { return false } +func (textEncodingType) isBinary() bool { return false } // noBuiltInTypes is embedded into many types which do not support builtins // e.g. msgpack, simple, cbor. -type noBuiltInTypeChecker struct{} +// type noBuiltInTypeChecker struct{} +// func (noBuiltInTypeChecker) IsBuiltinType(rt uintptr) bool { return false } +// type noBuiltInTypes struct{ noBuiltInTypeChecker } -func (_ noBuiltInTypeChecker) IsBuiltinType(rt uintptr) bool { return false } +type noBuiltInTypes struct{} -type noBuiltInTypes struct{ noBuiltInTypeChecker } - -func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} -func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} +func (noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} +func (noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} // type noStreamingCodec struct{} -// func (_ noStreamingCodec) CheckBreak() bool { return false } -// func (_ noStreamingCodec) hasElemSeparators() bool { return false } +// func (noStreamingCodec) CheckBreak() bool { return false } +// func (noStreamingCodec) hasElemSeparators() bool { return false } type noElemSeparators struct{} -func (_ noElemSeparators) hasElemSeparators() (v bool) { return } +func (noElemSeparators) hasElemSeparators() (v bool) { return } +func (noElemSeparators) recreateEncDriver(e encDriver) (v bool) { return } // bigenHelper. // Users must already slice the x completely, because we will not reslice. @@ -714,90 +643,174 @@ func (z bigenHelper) writeUint64(v uint64) { } type extTypeTagFn struct { - rtid uintptr - rt reflect.Type - tag uint64 - ext Ext + rtid uintptr + rtidptr uintptr + rt reflect.Type + tag uint64 + ext Ext + _ [1]uint64 // padding } type extHandle []extTypeTagFn -// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. -// // AddExt registes an encode and decode function for a reflect.Type. -// AddExt internally calls SetExt. // To deregister an Ext, call AddExt with nil encfn and/or nil decfn. -func (o *extHandle) AddExt( - rt reflect.Type, tag byte, - encfn func(reflect.Value) ([]byte, error), decfn func(reflect.Value, []byte) error, -) (err error) { +// +// Deprecated: Use SetBytesExt or SetInterfaceExt on the Handle instead. +func (o *extHandle) AddExt(rt reflect.Type, tag byte, + encfn func(reflect.Value) ([]byte, error), + decfn func(reflect.Value, []byte) error) (err error) { if encfn == nil || decfn == nil { return o.SetExt(rt, uint64(tag), nil) } return o.SetExt(rt, uint64(tag), addExtWrapper{encfn, decfn}) } -// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. +// SetExt will set the extension for a tag and reflect.Type. +// Note that the type must be a named type, and specifically not a pointer or Interface. +// An error is returned if that is not honored. +// To Deregister an ext, call SetExt with nil Ext. // -// Note that the type must be a named type, and specifically not -// a pointer or Interface. An error is returned if that is not honored. -// -// To Deregister an ext, call SetExt with nil Ext +// Deprecated: Use SetBytesExt or SetInterfaceExt on the Handle instead. func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { // o is a pointer, because we may need to initialize it - if rt.PkgPath() == "" || rt.Kind() == reflect.Interface { - err = fmt.Errorf("codec.Handle.AddExt: Takes named type, not a pointer or interface: %T", - reflect.Zero(rt).Interface()) - return + rk := rt.Kind() + for rk == reflect.Ptr { + rt = rt.Elem() + rk = rt.Kind() + } + + if rt.PkgPath() == "" || rk == reflect.Interface { // || rk == reflect.Ptr { + return fmt.Errorf("codec.Handle.SetExt: Takes named type, not a pointer or interface: %v", rt) } rtid := rt2id(rt) - for _, v := range *o { + switch rtid { + case timeTypId, rawTypId, rawExtTypId: + // all natively supported type, so cannot have an extension + return // TODO: should we silently ignore, or return an error??? + } + // if o == nil { + // return errors.New("codec.Handle.SetExt: extHandle not initialized") + // } + o2 := *o + // if o2 == nil { + // return errors.New("codec.Handle.SetExt: extHandle not initialized") + // } + for i := range o2 { + v := &o2[i] if v.rtid == rtid { v.tag, v.ext = tag, ext return } } - - if *o == nil { - *o = make([]extTypeTagFn, 0, 4) - } - *o = append(*o, extTypeTagFn{rtid, rt, tag, ext}) + rtidptr := rt2id(reflect.PtrTo(rt)) + *o = append(o2, extTypeTagFn{rtid, rtidptr, rt, tag, ext, [1]uint64{}}) return } -func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { - var v *extTypeTagFn +func (o extHandle) getExt(rtid uintptr) (v *extTypeTagFn) { for i := range o { v = &o[i] - if v.rtid == rtid { - return v + if v.rtid == rtid || v.rtidptr == rtid { + return } } return nil } -func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { - var v *extTypeTagFn +func (o extHandle) getExtForTag(tag uint64) (v *extTypeTagFn) { for i := range o { v = &o[i] if v.tag == tag { - return v + return } } return nil } -const maxLevelsEmbedding = 16 +type intf2impl struct { + rtid uintptr // for intf + impl reflect.Type + // _ [1]uint64 // padding // not-needed, as *intf2impl is never returned. +} + +type intf2impls []intf2impl + +// Intf2Impl maps an interface to an implementing type. +// This allows us support infering the concrete type +// and populating it when passed an interface. +// e.g. var v io.Reader can be decoded as a bytes.Buffer, etc. +// +// Passing a nil impl will clear the mapping. +func (o *intf2impls) Intf2Impl(intf, impl reflect.Type) (err error) { + if impl != nil && !impl.Implements(intf) { + return fmt.Errorf("Intf2Impl: %v does not implement %v", impl, intf) + } + rtid := rt2id(intf) + o2 := *o + for i := range o2 { + v := &o2[i] + if v.rtid == rtid { + v.impl = impl + return + } + } + *o = append(o2, intf2impl{rtid, impl}) + return +} + +func (o intf2impls) intf2impl(rtid uintptr) (rv reflect.Value) { + for i := range o { + v := &o[i] + if v.rtid == rtid { + if v.impl == nil { + return + } + if v.impl.Kind() == reflect.Ptr { + return reflect.New(v.impl.Elem()) + } + return reflect.New(v.impl).Elem() + } + } + return +} + +type structFieldInfoFlag uint8 + +const ( + _ structFieldInfoFlag = 1 << iota + structFieldInfoFlagReady + structFieldInfoFlagOmitEmpty +) + +func (x *structFieldInfoFlag) flagSet(f structFieldInfoFlag) { + *x = *x | f +} + +func (x *structFieldInfoFlag) flagClr(f structFieldInfoFlag) { + *x = *x &^ f +} + +func (x structFieldInfoFlag) flagGet(f structFieldInfoFlag) bool { + return x&f != 0 +} + +func (x structFieldInfoFlag) omitEmpty() bool { + return x.flagGet(structFieldInfoFlagOmitEmpty) +} + +func (x structFieldInfoFlag) ready() bool { + return x.flagGet(structFieldInfoFlagReady) +} type structFieldInfo struct { encName string // encode name fieldName string // field name - is [maxLevelsEmbedding]uint16 // (recursive/embedded) field index in struct - nis uint8 // num levels of embedding. if 1, then it's not embedded. - omitEmpty bool - toArray bool // if field is _struct, is the toArray set? + is [maxLevelsEmbedding]uint16 // (recursive/embedded) field index in struct + nis uint8 // num levels of embedding. if 1, then it's not embedded. + structFieldInfoFlag } func (si *structFieldInfo) setToZeroValue(v reflect.Value) { @@ -823,36 +836,63 @@ func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Valu return v, true } -func (si *structFieldInfo) fieldval(v reflect.Value, update bool) reflect.Value { - v, _ = si.field(v, update) - return v -} +// func (si *structFieldInfo) fieldval(v reflect.Value, update bool) reflect.Value { +// v, _ = si.field(v, update) +// return v +// } -func parseStructFieldInfo(fname string, stag string) *structFieldInfo { - // if fname == "" { - // panic(noFieldNameToStructFieldInfoErr) - // } - si := structFieldInfo{ - encName: fname, +func parseStructInfo(stag string) (toArray, omitEmpty bool, keytype valueType) { + keytype = valueTypeString // default + if stag == "" { + return } - - if stag != "" { - for i, s := range strings.Split(stag, ",") { - if i == 0 { - if s != "" { - si.encName = s - } - } else { - if s == "omitempty" { - si.omitEmpty = true - } else if s == "toarray" { - si.toArray = true - } + for i, s := range strings.Split(stag, ",") { + if i == 0 { + } else { + switch s { + case "omitempty": + omitEmpty = true + case "toarray": + toArray = true + case "int": + keytype = valueTypeInt + case "uint": + keytype = valueTypeUint + case "float": + keytype = valueTypeFloat + // case "bool": + // keytype = valueTypeBool + case "string": + keytype = valueTypeString + } + } + } + return +} + +func (si *structFieldInfo) parseTag(stag string) { + // if fname == "" { + // panic(errNoFieldNameToStructFieldInfo) + // } + + if stag == "" { + return + } + for i, s := range strings.Split(stag, ",") { + if i == 0 { + if s != "" { + si.encName = s + } + } else { + switch s { + case "omitempty": + si.flagSet(structFieldInfoFlagOmitEmpty) + // si.omitEmpty = true + // case "toarray": + // si.toArray = true } } } - // si.encNameBs = []byte(si.encName) - return &si } type sfiSortedByEncName []*structFieldInfo @@ -878,7 +918,6 @@ type structFieldNodeCache struct { } func (x *structFieldNodeCache) get(key uint32) (fv reflect.Value, valid bool) { - // defer func() { fmt.Printf(">>>> found in cache2? %v\n", valid) }() for i, k := range &x.idx { if uint8(i) == x.num { return // break @@ -960,6 +999,14 @@ func baseStructRv(v reflect.Value, update bool) (v2 reflect.Value, valid bool) { return v, true } +type typeInfoFlag uint8 + +const ( + typeInfoFlagComparable = 1 << iota + typeInfoFlagIsZeroer + typeInfoFlagIsZeroerPtr +) + // typeInfo keeps information about each (non-ptr) type referenced in the encode/decode sequence. // // During an encode/decode sequence, we work as below: @@ -969,18 +1016,31 @@ func baseStructRv(v reflect.Value, update bool) (v2 reflect.Value, valid bool) { // - If type is text(M/Unm)arshaler, call Text(M/Unm)arshal method // - Else decode appropriately based on the reflect.Kind type typeInfo struct { - sfi []*structFieldInfo // sorted. Used when enc/dec struct to map. - sfip []*structFieldInfo // unsorted. Used when enc/dec struct to array. + rt reflect.Type + elem reflect.Type + pkgpath string - rt reflect.Type rtid uintptr // rv0 reflect.Value // saved zero value, used if immutableKind numMeth uint16 // number of methods + kind uint8 + chandir uint8 - anyOmitEmpty bool + anyOmitEmpty bool // true if a struct, and any of the fields are tagged "omitempty" + toArray bool // whether this (struct) type should be encoded as an array + keyType valueType // if struct, how is the field name stored in a stream? default is string + mbs bool // base type (T or *T) is a MapBySlice - mbs bool // base type (T or *T) is a MapBySlice + // ---- cpu cache line boundary? + sfiSort []*structFieldInfo // sorted. Used when enc/dec struct to map. + sfiSrc []*structFieldInfo // unsorted. Used when enc/dec struct to array. + + key reflect.Type + + // ---- cpu cache line boundary? + // sfis []structFieldInfo // all sfi, in src order, as created. + sfiNamesSort []byte // all names, with indexes into the sfiSort // format of marshal type fields below: [btj][mu]p? OR csp? @@ -992,6 +1052,7 @@ type typeInfo struct { tmp bool // *T is a textMarshaler tu bool // T is a textUnmarshaler tup bool // *T is a textUnmarshaler + jm bool // T is a jsonMarshaler jmp bool // *T is a jsonMarshaler ju bool // T is a jsonUnmarshaler @@ -999,40 +1060,33 @@ type typeInfo struct { cs bool // T is a Selfer csp bool // *T is a Selfer - toArray bool // whether this (struct) type should be encoded as an array + // other flags, with individual bits representing if set. + flags typeInfoFlag + + // _ [2]byte // padding + _ [3]uint64 // padding } -// define length beyond which we do a binary search instead of a linear search. -// From our testing, linear search seems faster than binary search up to 16-field structs. -// However, we set to 8 similar to what python does for hashtables. -const indexForEncNameBinarySearchThreshold = 8 +func (ti *typeInfo) isFlag(f typeInfoFlag) bool { + return ti.flags&f != 0 +} -func (ti *typeInfo) indexForEncName(name string) int { - // NOTE: name may be a stringView, so don't pass it to another function. - //tisfi := ti.sfi - sfilen := len(ti.sfi) - if sfilen < indexForEncNameBinarySearchThreshold { - for i, si := range ti.sfi { - if si.encName == name { - return i - } - } +func (ti *typeInfo) indexForEncName(name []byte) (index int16) { + var sn []byte + if len(name)+2 <= 32 { + var buf [32]byte // should not escape + sn = buf[:len(name)+2] + } else { + sn = make([]byte, len(name)+2) + } + copy(sn[1:], name) + sn[0], sn[len(sn)-1] = tiSep2(name), 0xff + j := bytes.Index(ti.sfiNamesSort, sn) + if j < 0 { return -1 } - // binary search. adapted from sort/search.go. - h, i, j := 0, 0, sfilen - for i < j { - h = i + (j-i)/2 - if ti.sfi[h].encName < name { - i = h + 1 - } else { - j = h - } - } - if i < sfilen && ti.sfi[i].encName == name { - return i - } - return -1 + index = int16(uint16(ti.sfiNamesSort[j+len(sn)+1]) | uint16(ti.sfiNamesSort[j+len(sn)])<<8) + return } type rtid2ti struct { @@ -1045,9 +1099,11 @@ type rtid2ti struct { // It is configured with a set of tag keys, which are used to get // configuration for the type. type TypeInfos struct { - infos atomicTypeInfoSlice // formerly map[uintptr]*typeInfo, now *[]rtid2ti + // infos: formerly map[uintptr]*typeInfo, now *[]rtid2ti, 2 words expected + infos atomicTypeInfoSlice mu sync.Mutex tags []string + _ [2]uint64 // padding } // NewTypeInfos creates a TypeInfos given a set of struct tags keys. @@ -1070,12 +1126,12 @@ func (x *TypeInfos) structTag(t reflect.StructTag) (s string) { return } -func (x *TypeInfos) find(sp *[]rtid2ti, rtid uintptr) (idx int, ti *typeInfo) { +func (x *TypeInfos) find(s []rtid2ti, rtid uintptr) (idx int, ti *typeInfo) { // binary search. adapted from sort/search.go. // if sp == nil { // return -1, nil // } - s := *sp + // s := *sp h, i, j := 0, 0, len(s) for i < j { h = i + (j-i)/2 @@ -1104,14 +1160,15 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { rk := rt.Kind() if rk == reflect.Ptr { // || (rk == reflect.Interface && rtid != intfTypId) { - panic(fmt.Errorf("invalid kind passed to TypeInfos.get: %v - %v", rk, rt)) + panicv.errorf("invalid kind passed to TypeInfos.get: %v - %v", rk, rt) } // do not hold lock while computing this. // it may lead to duplication, but that's ok. - ti := typeInfo{rt: rt, rtid: rtid} + ti := typeInfo{rt: rt, rtid: rtid, kind: uint8(rk), pkgpath: rt.PkgPath()} // ti.rv0 = reflect.Zero(rt) + // ti.comparable = rt.Comparable() ti.numMeth = uint16(rt.NumMethod()) ti.bm, ti.bmp = implIntf(rt, binaryMarshalerTyp) @@ -1121,42 +1178,64 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { ti.jm, ti.jmp = implIntf(rt, jsonMarshalerTyp) ti.ju, ti.jup = implIntf(rt, jsonUnmarshalerTyp) ti.cs, ti.csp = implIntf(rt, selferTyp) - ti.mbs, _ = implIntf(rt, mapBySliceTyp) - if rk == reflect.Struct { + b1, b2 := implIntf(rt, iszeroTyp) + if b1 { + ti.flags |= typeInfoFlagIsZeroer + } + if b2 { + ti.flags |= typeInfoFlagIsZeroerPtr + } + if rt.Comparable() { + ti.flags |= typeInfoFlagComparable + } + + switch rk { + case reflect.Struct: var omitEmpty bool if f, ok := rt.FieldByName(structInfoFieldName); ok { - siInfo := parseStructFieldInfo(structInfoFieldName, x.structTag(f.Tag)) - ti.toArray = siInfo.toArray - omitEmpty = siInfo.omitEmpty + ti.toArray, omitEmpty, ti.keyType = parseStructInfo(x.structTag(f.Tag)) + } else { + ti.keyType = valueTypeString } pp, pi := pool.tiLoad() pv := pi.(*typeInfoLoadArray) pv.etypes[0] = ti.rtid - vv := typeInfoLoad{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} + // vv := typeInfoLoad{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} + vv := typeInfoLoad{pv.etypes[:1], pv.sfis[:0]} x.rget(rt, rtid, omitEmpty, nil, &vv) - ti.sfip, ti.sfi, ti.anyOmitEmpty = rgetResolveSFI(vv.sfis, pv.sfiidx[:0]) + // ti.sfis = vv.sfis + ti.sfiSrc, ti.sfiSort, ti.sfiNamesSort, ti.anyOmitEmpty = rgetResolveSFI(rt, vv.sfis, pv) pp.Put(pi) + case reflect.Map: + ti.elem = rt.Elem() + ti.key = rt.Key() + case reflect.Slice: + ti.mbs, _ = implIntf(rt, mapBySliceTyp) + ti.elem = rt.Elem() + case reflect.Chan: + ti.elem = rt.Elem() + ti.chandir = uint8(rt.ChanDir()) + case reflect.Array, reflect.Ptr: + ti.elem = rt.Elem() } - // sfi = sfip + // sfi = sfiSrc - var vs []rtid2ti x.mu.Lock() sp = x.infos.load() if sp == nil { pti = &ti - vs = []rtid2ti{{rtid, pti}} - x.infos.store(&vs) + vs := []rtid2ti{{rtid, pti}} + x.infos.store(vs) } else { idx, pti = x.find(sp, rtid) if pti == nil { - s := *sp pti = &ti - vs = make([]rtid2ti, len(s)+1) - copy(vs, s[:idx]) + vs := make([]rtid2ti, len(sp)+1) + copy(vs, sp[:idx]) + copy(vs[idx+1:], sp[idx:]) vs[idx] = rtid2ti{rtid, pti} - copy(vs[idx+1:], s[idx:]) - x.infos.store(&vs) + x.infos.store(vs) } } x.mu.Unlock() @@ -1164,8 +1243,7 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { } func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, omitEmpty bool, - indexstack []uint16, pv *typeInfoLoad, -) { + indexstack []uint16, pv *typeInfoLoad) { // Read up fields and store how to access the value. // // It uses go's rules for message selectors, @@ -1176,8 +1254,10 @@ func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, omitEmpty bool, // and iteration using equals is faster than maps there flen := rt.NumField() if flen > (1< %v fields are not supported - has %v fields", + (1< maxLevelsEmbedding-1 { - panic(fmt.Errorf("codec: only supports up to %v depth of embedding - type has %v depth", maxLevelsEmbedding-1, len(indexstack))) + panicv.errorf("codec: only supports up to %v depth of embedding - type has %v depth", + maxLevelsEmbedding-1, len(indexstack)) } si.nis = uint8(len(indexstack)) + 1 copy(si.is[:], indexstack) si.is[len(indexstack)] = j if omitEmpty { - si.omitEmpty = true + si.flagSet(structFieldInfoFlagOmitEmpty) } pv.sfis = append(pv.sfis, si) } } +func tiSep(name string) uint8 { + // (xn[0]%64) // (between 192-255 - outside ascii BMP) + // return 0xfe - (name[0] & 63) + // return 0xfe - (name[0] & 63) - uint8(len(name)) + // return 0xfe - (name[0] & 63) - uint8(len(name)&63) + // return ((0xfe - (name[0] & 63)) & 0xf8) | (uint8(len(name) & 0x07)) + return 0xfe - (name[0] & 63) - uint8(len(name)&63) +} + +func tiSep2(name []byte) uint8 { + return 0xfe - (name[0] & 63) - uint8(len(name)&63) +} + // resolves the struct field info got from a call to rget. // Returns a trimmed, unsorted and sorted []*structFieldInfo. -func rgetResolveSFI(x []*structFieldInfo, pv []sfiIdx) (y, z []*structFieldInfo, anyOmitEmpty bool) { - var n int - for i, v := range x { - xn := v.encName // TODO: fieldName or encName? use encName for now. - var found bool - for j, k := range pv { - if k.name == xn { - // one of them must be reset to nil, and the index updated appropriately to the other one - if v.nis == x[k.index].nis { - } else if v.nis < x[k.index].nis { - pv[j].index = i - if x[k.index] != nil { - x[k.index] = nil - n++ - } - } else { - if x[i] != nil { - x[i] = nil - n++ - } +func rgetResolveSFI(rt reflect.Type, x []structFieldInfo, pv *typeInfoLoadArray) ( + y, z []*structFieldInfo, ss []byte, anyOmitEmpty bool) { + sa := pv.sfiidx[:0] + sn := pv.b[:] + n := len(x) + + var xn string + var ui uint16 + var sep byte + + for i := range x { + ui = uint16(i) + xn = x[i].encName // fieldName or encName? use encName for now. + if len(xn)+2 > cap(pv.b) { + sn = make([]byte, len(xn)+2) + } else { + sn = sn[:len(xn)+2] + } + // use a custom sep, so that misses are less frequent, + // since the sep (first char in search) is as unique as first char in field name. + sep = tiSep(xn) + sn[0], sn[len(sn)-1] = sep, 0xff + copy(sn[1:], xn) + j := bytes.Index(sa, sn) + if j == -1 { + sa = append(sa, sep) + sa = append(sa, xn...) + sa = append(sa, 0xff, byte(ui>>8), byte(ui)) + } else { + index := uint16(sa[j+len(sn)+1]) | uint16(sa[j+len(sn)])<<8 + // one of them must be reset to nil, + // and the index updated appropriately to the other one + if x[i].nis == x[index].nis { + } else if x[i].nis < x[index].nis { + sa[j+len(sn)], sa[j+len(sn)+1] = byte(ui>>8), byte(ui) + if x[index].ready() { + x[index].flagClr(structFieldInfoFlagReady) + n-- + } + } else { + if x[i].ready() { + x[i].flagClr(structFieldInfoFlagReady) + n-- } - found = true - break } } - if !found { - pv = append(pv, sfiIdx{xn, i}) - } + + } + var w []structFieldInfo + sharingArray := len(x) <= typeInfoLoadArraySfisLen // sharing array with typeInfoLoadArray + if sharingArray { + w = make([]structFieldInfo, n) } - // remove all the nils - y = make([]*structFieldInfo, len(x)-n) + // remove all the nils (non-ready) + y = make([]*structFieldInfo, n) n = 0 - for _, v := range x { - if v == nil { + var sslen int + for i := range x { + if !x[i].ready() { continue } - if !anyOmitEmpty && v.omitEmpty { + if !anyOmitEmpty && x[i].omitEmpty() { anyOmitEmpty = true } - y[n] = v + if sharingArray { + w[n] = x[i] + y[n] = &w[n] + } else { + y[n] = &x[i] + } + sslen = sslen + len(x[i].encName) + 4 n++ } + if n != len(y) { + panicv.errorf("failure reading struct %v - expecting %d of %d valid fields, got %d", + rt, len(y), len(x), n) + } z = make([]*structFieldInfo, len(y)) copy(z, y) sort.Sort(sfiSortedByEncName(z)) + + sharingArray = len(sa) <= typeInfoLoadArraySfiidxLen + if sharingArray { + ss = make([]byte, 0, sslen) + } else { + ss = sa[:0] // reuse the newly made sa array if necessary + } + for i := range z { + xn = z[i].encName + sep = tiSep(xn) + ui = uint16(i) + ss = append(ss, sep) + ss = append(ss, xn...) + ss = append(ss, 0xff, byte(ui>>8), byte(ui)) + } return } @@ -1334,58 +1492,102 @@ func implIntf(rt, iTyp reflect.Type) (base bool, indir bool) { return rt.Implements(iTyp), reflect.PtrTo(rt).Implements(iTyp) } -func xprintf(format string, a ...interface{}) { - if xDebug { - fmt.Fprintf(os.Stderr, format, a...) - } -} +// isEmptyStruct is only called from isEmptyValue, and checks if a struct is empty: +// - does it implement IsZero() bool +// - is it comparable, and can i compare directly using == +// - if checkStruct, then walk through the encodable fields +// and check if they are empty or not. +func isEmptyStruct(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) bool { + // v is a struct kind - no need to check again. + // We only check isZero on a struct kind, to reduce the amount of times + // that we lookup the rtid and typeInfo for each type as we walk the tree. -func panicToErr(err *error) { - if recoverPanicToErr { - if x := recover(); x != nil { - // if false && xDebug { - // fmt.Printf("panic'ing with: %v\n", x) - // debug.PrintStack() - // } - panicValToErr(x, err) + vt := v.Type() + rtid := rt2id(vt) + if tinfos == nil { + tinfos = defTypeInfos + } + ti := tinfos.get(rtid, vt) + if ti.rtid == timeTypId { + return rv2i(v).(time.Time).IsZero() + } + if ti.isFlag(typeInfoFlagIsZeroerPtr) && v.CanAddr() { + return rv2i(v.Addr()).(isZeroer).IsZero() + } + if ti.isFlag(typeInfoFlagIsZeroer) { + return rv2i(v).(isZeroer).IsZero() + } + if ti.isFlag(typeInfoFlagComparable) { + return rv2i(v) == rv2i(reflect.Zero(vt)) + } + if !checkStruct { + return false + } + // We only care about what we can encode/decode, + // so that is what we use to check omitEmpty. + for _, si := range ti.sfiSrc { + sfv, valid := si.field(v, false) + if valid && !isEmptyValue(sfv, tinfos, deref, checkStruct) { + return false } } + return true } -func panicToErrs2(err1, err2 *error) { - if recoverPanicToErr { - if x := recover(); x != nil { - panicValToErr(x, err1) - panicValToErr(x, err2) - } - } -} - -// func doPanic(tag string, format string, params ...interface{}) { -// params2 := make([]interface{}, len(params)+1) -// params2[0] = tag -// copy(params2[1:], params) -// panic(fmt.Errorf("%s: "+format, params2...)) +// func roundFloat(x float64) float64 { +// t := math.Trunc(x) +// if math.Abs(x-t) >= 0.5 { +// return t + math.Copysign(1, x) +// } +// return t // } +func panicToErr(h errstrDecorator, err *error) { + if recoverPanicToErr { + if x := recover(); x != nil { + // fmt.Printf("panic'ing with: %v\n", x) + // debug.PrintStack() + panicValToErr(h, x, err) + } + } +} + +func panicToErrs2(h errstrDecorator, err1, err2 *error) { + if recoverPanicToErr { + if x := recover(); x != nil { + panicValToErr(h, x, err1) + panicValToErr(h, x, err2) + } + } +} + +func panicValToErr(h errstrDecorator, v interface{}, err *error) { + switch xerr := v.(type) { + case nil: + case error: + switch xerr { + case nil: + case io.EOF, io.ErrUnexpectedEOF, errEncoderNotInitialized, errDecoderNotInitialized: + // treat as special (bubble up) + *err = xerr + default: + h.wrapErrstr(xerr.Error(), err) + } + case string: + if xerr != "" { + h.wrapErrstr(xerr, err) + } + case fmt.Stringer: + if xerr != nil { + h.wrapErrstr(xerr.String(), err) + } + default: + h.wrapErrstr(v, err) + } +} + func isImmutableKind(k reflect.Kind) (v bool) { return immutableKindsSet[k] - // return false || - // k == reflect.Int || - // k == reflect.Int8 || - // k == reflect.Int16 || - // k == reflect.Int32 || - // k == reflect.Int64 || - // k == reflect.Uint || - // k == reflect.Uint8 || - // k == reflect.Uint16 || - // k == reflect.Uint32 || - // k == reflect.Uint64 || - // k == reflect.Uintptr || - // k == reflect.Float32 || - // k == reflect.Float64 || - // k == reflect.Bool || - // k == reflect.String } // ---- @@ -1396,7 +1598,9 @@ type codecFnInfo struct { xfTag uint64 seq seqType addrD bool + addrF bool // if addrD, this says whether decode function can take a value or a ptr addrE bool + ready bool // ready to use } // codecFn encapsulates the captured variables and the encode function. @@ -1407,91 +1611,100 @@ type codecFn struct { i codecFnInfo fe func(*Encoder, *codecFnInfo, reflect.Value) fd func(*Decoder, *codecFnInfo, reflect.Value) + _ [1]uint64 // padding } type codecRtidFn struct { rtid uintptr - fn codecFn + fn *codecFn } type codecFner struct { - hh Handle + // hh Handle h *BasicHandle - cs [arrayCacheLen]*[arrayCacheLen]codecRtidFn - s []*[arrayCacheLen]codecRtidFn - sn uint32 + s []codecRtidFn be bool js bool - cf [arrayCacheLen]codecRtidFn + _ [6]byte // padding + _ [3]uint64 // padding } func (c *codecFner) reset(hh Handle) { - c.hh = hh - c.h = hh.getBasicHandle() - _, c.js = hh.(*JsonHandle) - c.be = hh.isBinary() + bh := hh.getBasicHandle() + // only reset iff extensions changed or *TypeInfos changed + var hhSame = true && + c.h == bh && c.h.TypeInfos == bh.TypeInfos && + len(c.h.extHandle) == len(bh.extHandle) && + (len(c.h.extHandle) == 0 || &c.h.extHandle[0] == &bh.extHandle[0]) + if !hhSame { + // c.hh = hh + c.h, bh = bh, c.h // swap both + _, c.js = hh.(*JsonHandle) + c.be = hh.isBinary() + for i := range c.s { + c.s[i].fn.i.ready = false + } + } } func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *codecFn) { rtid := rt2id(rt) - var j uint32 - var sn uint32 = c.sn - if sn == 0 { - c.s = c.cs[:1] - c.s[0] = &c.cf - c.cf[0].rtid = rtid - fn = &(c.cf[0].fn) - c.sn = 1 - } else { - LOOP1: - for _, x := range c.s { - for i := range x { - if j == sn { - break LOOP1 - } - if x[i].rtid == rtid { - fn = &(x[i].fn) - return - } - j++ + + for _, x := range c.s { + if x.rtid == rtid { + // if rtid exists, then there's a *codenFn attached (non-nil) + fn = x.fn + if fn.i.ready { + return } + break } - sx, sy := sn/arrayCacheLen, sn%arrayCacheLen - if sy == 0 { - c.s = append(c.s, &[arrayCacheLen]codecRtidFn{}) + } + var ti *typeInfo + if fn == nil { + fn = new(codecFn) + if c.s == nil { + c.s = make([]codecRtidFn, 0, 8) } - c.s[sx][sy].rtid = rtid - fn = &(c.s[sx][sy].fn) - c.sn++ + c.s = append(c.s, codecRtidFn{rtid, fn}) + } else { + ti = fn.i.ti + *fn = codecFn{} + fn.i.ti = ti + // fn.fe, fn.fd = nil, nil + } + fi := &(fn.i) + fi.ready = true + if ti == nil { + ti = c.h.getTypeInfo(rtid, rt) + fi.ti = ti } - ti := c.h.getTypeInfo(rtid, rt) - fi := &(fn.i) - fi.ti = ti - - rk := rt.Kind() + rk := reflect.Kind(ti.kind) if checkCodecSelfer && (ti.cs || ti.csp) { fn.fe = (*Encoder).selferMarshal fn.fd = (*Decoder).selferUnmarshal + fi.addrF = true fi.addrD = ti.csp fi.addrE = ti.csp + } else if rtid == timeTypId { + fn.fe = (*Encoder).kTime + fn.fd = (*Decoder).kTime } else if rtid == rawTypId { fn.fe = (*Encoder).raw fn.fd = (*Decoder).raw } else if rtid == rawExtTypId { fn.fe = (*Encoder).rawExt fn.fd = (*Decoder).rawExt + fi.addrF = true fi.addrD = true fi.addrE = true - } else if c.hh.IsBuiltinType(rtid) { - fn.fe = (*Encoder).builtin - fn.fd = (*Decoder).builtin - fi.addrD = true } else if xfFn := c.h.getExt(rtid); xfFn != nil { fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext fn.fe = (*Encoder).ext fn.fd = (*Decoder).ext + fi.addrF = true fi.addrD = true if rk == reflect.Struct || rk == reflect.Array { fi.addrE = true @@ -1499,34 +1712,38 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( } else if supportMarshalInterfaces && c.be && (ti.bm || ti.bmp) && (ti.bu || ti.bup) { fn.fe = (*Encoder).binaryMarshal fn.fd = (*Decoder).binaryUnmarshal + fi.addrF = true fi.addrD = ti.bup fi.addrE = ti.bmp } else if supportMarshalInterfaces && !c.be && c.js && (ti.jm || ti.jmp) && (ti.ju || ti.jup) { //If JSON, we should check JSONMarshal before textMarshal fn.fe = (*Encoder).jsonMarshal fn.fd = (*Decoder).jsonUnmarshal + fi.addrF = true fi.addrD = ti.jup fi.addrE = ti.jmp } else if supportMarshalInterfaces && !c.be && (ti.tm || ti.tmp) && (ti.tu || ti.tup) { fn.fe = (*Encoder).textMarshal fn.fd = (*Decoder).textUnmarshal + fi.addrF = true fi.addrD = ti.tup fi.addrE = ti.tmp } else { if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { - if rt.PkgPath() == "" { // un-named slice or map + if ti.pkgpath == "" { // un-named slice or map if idx := fastpathAV.index(rtid); idx != -1 { fn.fe = fastpathAV[idx].encfn fn.fd = fastpathAV[idx].decfn fi.addrD = true + fi.addrF = false } } else { // use mapping for underlying type if there var rtu reflect.Type if rk == reflect.Map { - rtu = reflect.MapOf(rt.Key(), rt.Elem()) + rtu = reflect.MapOf(ti.key, ti.elem) } else { - rtu = reflect.SliceOf(rt.Elem()) + rtu = reflect.SliceOf(ti.elem) } rtuid := rt2id(rtu) if idx := fastpathAV.index(rtuid); idx != -1 { @@ -1536,9 +1753,14 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( xfnf(e, xf, xrv.Convert(xrt)) } fi.addrD = true + fi.addrF = false // meaning it can be an address(ptr) or a value xfnf2 := fastpathAV[idx].decfn fn.fd = func(d *Decoder, xf *codecFnInfo, xrv reflect.Value) { - xfnf2(d, xf, xrv.Convert(reflect.PtrTo(xrt))) + if xrv.Kind() == reflect.Ptr { + xfnf2(d, xf, xrv.Convert(reflect.PtrTo(xrt))) + } else { + xfnf2(d, xf, xrv.Convert(xrt)) + } } } } @@ -1581,8 +1803,6 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( case reflect.Uint64: fn.fe = (*Encoder).kUint64 fn.fd = (*Decoder).kUint64 - // case reflect.Ptr: - // fn.fd = (*Decoder).kPtr case reflect.Uintptr: fn.fe = (*Encoder).kUintptr fn.fd = (*Decoder).kUintptr @@ -1606,12 +1826,11 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( case reflect.Array: fi.seq = seqTypeArray fn.fe = (*Encoder).kSlice + fi.addrF = false fi.addrD = false - rt2 := reflect.SliceOf(rt.Elem()) + rt2 := reflect.SliceOf(ti.elem) fn.fd = func(d *Decoder, xf *codecFnInfo, xrv reflect.Value) { - // println(">>>>>> decoding an array ... ") - d.cf.get(rt2, true, false).fd(d, xf, xrv.Slice(0, xrv.Len())) - // println(">>>>>> decoding an array ... DONE") + d.cfer().get(rt2, true, false).fd(d, xf, xrv.Slice(0, xrv.Len())) } // fn.fd = (*Decoder).kArray case reflect.Struct: @@ -1621,11 +1840,6 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( fn.fe = (*Encoder).kStructNoOmitempty } fn.fd = (*Decoder).kStruct - // reflect.Ptr and reflect.Interface are handled already by preEncodeValue - // case reflect.Ptr: - // fn.fe = (*Encoder).kPtr - // case reflect.Interface: - // fn.fe = (*Encoder).kInterface case reflect.Map: fn.fe = (*Encoder).kMap fn.fd = (*Decoder).kMap @@ -1634,28 +1848,62 @@ func (c *codecFner) get(rt reflect.Type, checkFastpath, checkCodecSelfer bool) ( fn.fd = (*Decoder).kInterface fn.fe = (*Encoder).kErr default: + // reflect.Ptr and reflect.Interface are handled already by preEncodeValue fn.fe = (*Encoder).kErr fn.fd = (*Decoder).kErr } } } - return } +type codecFnPooler struct { + cf *codecFner + cfp *sync.Pool + hh Handle +} + +func (d *codecFnPooler) cfer() *codecFner { + if d.cf == nil { + var v interface{} + d.cfp, v = pool.codecFner() + d.cf = v.(*codecFner) + d.cf.reset(d.hh) + } + return d.cf +} + +func (d *codecFnPooler) alwaysAtEnd() { + if d.cf != nil { + d.cfp.Put(d.cf) + d.cf, d.cfp = nil, nil + } +} + // ---- -// these functions must be inlinable, and not call anybody +// these "checkOverflow" functions must be inlinable, and not call anybody. +// Overflow means that the value cannot be represented without wrapping/overflow. +// Overflow=false does not mean that the value can be represented without losing precision +// (especially for floating point). + type checkOverflow struct{} -func (_ checkOverflow) Float32(f float64) (overflow bool) { - if f < 0 { - f = -f - } - return math.MaxFloat32 < f && f <= math.MaxFloat64 -} +// func (checkOverflow) Float16(f float64) (overflow bool) { +// panicv.errorf("unimplemented") +// if f < 0 { +// f = -f +// } +// return math.MaxFloat32 < f && f <= math.MaxFloat64 +// } -func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { +func (checkOverflow) Float32(v float64) (overflow bool) { + if v < 0 { + v = -v + } + return math.MaxFloat32 < v && v <= math.MaxFloat64 +} +func (checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { if bitsize == 0 || bitsize >= 64 || v == 0 { return } @@ -1664,8 +1912,7 @@ func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { } return } - -func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { +func (checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { if bitsize == 0 || bitsize >= 64 || v == 0 { return } @@ -1674,39 +1921,76 @@ func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { } return } - -func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) { +func (checkOverflow) SignedInt(v uint64) (overflow bool) { //e.g. -127 to 128 for int8 pos := (v >> 63) == 0 ui2 := v & 0x7fffffffffffffff if pos { if ui2 > math.MaxInt64 { overflow = true - return } } else { if ui2 > math.MaxInt64-1 { overflow = true - return } } - i = int64(v) return } +func (x checkOverflow) Float32V(v float64) float64 { + if x.Float32(v) { + panicv.errorf("float32 overflow: %v", v) + } + return v +} +func (x checkOverflow) UintV(v uint64, bitsize uint8) uint64 { + if x.Uint(v, bitsize) { + panicv.errorf("uint64 overflow: %v", v) + } + return v +} +func (x checkOverflow) IntV(v int64, bitsize uint8) int64 { + if x.Int(v, bitsize) { + panicv.errorf("int64 overflow: %v", v) + } + return v +} +func (x checkOverflow) SignedIntV(v uint64) int64 { + if x.SignedInt(v) { + panicv.errorf("uint64 to int64 overflow: %v", v) + } + return int64(v) +} + // ------------------ SORT ----------------- func isNaN(f float64) bool { return f != f } // ----------------------- +type ioFlusher interface { + Flush() error +} + +type ioPeeker interface { + Peek(int) ([]byte, error) +} + +type ioBuffered interface { + Buffered() int +} + +// ----------------------- + type intSlice []int64 type uintSlice []uint64 -type uintptrSlice []uintptr + +// type uintptrSlice []uintptr type floatSlice []float64 type boolSlice []bool type stringSlice []string -type bytesSlice [][]byte + +// type bytesSlice [][]byte func (p intSlice) Len() int { return len(p) } func (p intSlice) Less(i, j int) bool { return p[i] < p[j] } @@ -1716,9 +2000,9 @@ func (p uintSlice) Len() int { return len(p) } func (p uintSlice) Less(i, j int) bool { return p[i] < p[j] } func (p uintSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p uintptrSlice) Len() int { return len(p) } -func (p uintptrSlice) Less(i, j int) bool { return p[i] < p[j] } -func (p uintptrSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +// func (p uintptrSlice) Len() int { return len(p) } +// func (p uintptrSlice) Less(i, j int) bool { return p[i] < p[j] } +// func (p uintptrSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } func (p floatSlice) Len() int { return len(p) } func (p floatSlice) Less(i, j int) bool { @@ -1730,9 +2014,9 @@ func (p stringSlice) Len() int { return len(p) } func (p stringSlice) Less(i, j int) bool { return p[i] < p[j] } func (p stringSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p bytesSlice) Len() int { return len(p) } -func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[i], p[j]) == -1 } -func (p bytesSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +// func (p bytesSlice) Len() int { return len(p) } +// func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[i], p[j]) == -1 } +// func (p bytesSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } func (p boolSlice) Len() int { return len(p) } func (p boolSlice) Less(i, j int) bool { return !p[i] && p[j] } @@ -1770,6 +2054,11 @@ type bytesRv struct { r reflect.Value } type bytesRvSlice []bytesRv +type timeRv struct { + v time.Time + r reflect.Value +} +type timeRvSlice []timeRv func (p intRvSlice) Len() int { return len(p) } func (p intRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } @@ -1797,6 +2086,10 @@ func (p boolRvSlice) Len() int { return len(p) } func (p boolRvSlice) Less(i, j int) bool { return !p[i].v && p[j].v } func (p boolRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +func (p timeRvSlice) Len() int { return len(p) } +func (p timeRvSlice) Less(i, j int) bool { return p[i].v.Before(p[j].v) } +func (p timeRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + // ----------------- type bytesI struct { @@ -1888,48 +2181,69 @@ func (s *set) remove(v uintptr) (exists bool) { type bitset256 [32]byte -func (x *bitset256) set(pos byte) { - x[pos>>3] |= (1 << (pos & 7)) -} -func (x *bitset256) unset(pos byte) { - x[pos>>3] &^= (1 << (pos & 7)) -} func (x *bitset256) isset(pos byte) bool { return x[pos>>3]&(1<<(pos&7)) != 0 } +func (x *bitset256) issetv(pos byte) byte { + return x[pos>>3] & (1 << (pos & 7)) +} +func (x *bitset256) set(pos byte) { + x[pos>>3] |= (1 << (pos & 7)) +} + +// func (x *bitset256) unset(pos byte) { +// x[pos>>3] &^= (1 << (pos & 7)) +// } type bitset128 [16]byte -func (x *bitset128) set(pos byte) { - x[pos>>3] |= (1 << (pos & 7)) -} -func (x *bitset128) unset(pos byte) { - x[pos>>3] &^= (1 << (pos & 7)) -} func (x *bitset128) isset(pos byte) bool { return x[pos>>3]&(1<<(pos&7)) != 0 } +func (x *bitset128) set(pos byte) { + x[pos>>3] |= (1 << (pos & 7)) +} + +// func (x *bitset128) unset(pos byte) { +// x[pos>>3] &^= (1 << (pos & 7)) +// } type bitset32 [4]byte -func (x *bitset32) set(pos byte) { - x[pos>>3] |= (1 << (pos & 7)) -} -func (x *bitset32) unset(pos byte) { - x[pos>>3] &^= (1 << (pos & 7)) -} func (x *bitset32) isset(pos byte) bool { return x[pos>>3]&(1<<(pos&7)) != 0 } +func (x *bitset32) set(pos byte) { + x[pos>>3] |= (1 << (pos & 7)) +} + +// func (x *bitset32) unset(pos byte) { +// x[pos>>3] &^= (1 << (pos & 7)) +// } + +// type bit2set256 [64]byte + +// func (x *bit2set256) set(pos byte, v1, v2 bool) { +// var pos2 uint8 = (pos & 3) << 1 // returning 0, 2, 4 or 6 +// if v1 { +// x[pos>>2] |= 1 << (pos2 + 1) +// } +// if v2 { +// x[pos>>2] |= 1 << pos2 +// } +// } +// func (x *bit2set256) get(pos byte) uint8 { +// var pos2 uint8 = (pos & 3) << 1 // returning 0, 2, 4 or 6 +// return x[pos>>2] << (6 - pos2) >> 6 // 11000000 -> 00000011 +// } // ------------ type pooler struct { - // for stringRV - strRv8, strRv16, strRv32, strRv64, strRv128 sync.Pool - // for the decNaked - dn sync.Pool - tiload sync.Pool + dn sync.Pool // for decNaked + cfn sync.Pool // for codecFner + tiload sync.Pool + strRv8, strRv16, strRv32, strRv64, strRv128 sync.Pool // for stringRV } func (p *pooler) init() { @@ -1940,6 +2254,7 @@ func (p *pooler) init() { p.strRv128.New = func() interface{} { return new([128]stringRv) } p.dn.New = func() interface{} { x := new(decNaked); x.init(); return x } p.tiload.New = func() interface{} { return new(typeInfoLoadArray) } + p.cfn.New = func() interface{} { return new(codecFner) } } func (p *pooler) stringRv8() (sp *sync.Pool, v interface{}) { @@ -1960,6 +2275,143 @@ func (p *pooler) stringRv128() (sp *sync.Pool, v interface{}) { func (p *pooler) decNaked() (sp *sync.Pool, v interface{}) { return &p.dn, p.dn.Get() } +func (p *pooler) codecFner() (sp *sync.Pool, v interface{}) { + return &p.cfn, p.cfn.Get() +} func (p *pooler) tiLoad() (sp *sync.Pool, v interface{}) { return &p.tiload, p.tiload.Get() } + +// func (p *pooler) decNaked() (v *decNaked, f func(*decNaked) ) { +// sp := &(p.dn) +// vv := sp.Get() +// return vv.(*decNaked), func(x *decNaked) { sp.Put(vv) } +// } +// func (p *pooler) decNakedGet() (v interface{}) { +// return p.dn.Get() +// } +// func (p *pooler) codecFnerGet() (v interface{}) { +// return p.cfn.Get() +// } +// func (p *pooler) tiLoadGet() (v interface{}) { +// return p.tiload.Get() +// } +// func (p *pooler) decNakedPut(v interface{}) { +// p.dn.Put(v) +// } +// func (p *pooler) codecFnerPut(v interface{}) { +// p.cfn.Put(v) +// } +// func (p *pooler) tiLoadPut(v interface{}) { +// p.tiload.Put(v) +// } + +type panicHdl struct{} + +func (panicHdl) errorv(err error) { + if err != nil { + panic(err) + } +} + +func (panicHdl) errorstr(message string) { + if message != "" { + panic(message) + } +} + +func (panicHdl) errorf(format string, params ...interface{}) { + if format != "" { + if len(params) == 0 { + panic(format) + } else { + panic(fmt.Sprintf(format, params...)) + } + } +} + +type errstrDecorator interface { + wrapErrstr(interface{}, *error) +} + +type errstrDecoratorDef struct{} + +func (errstrDecoratorDef) wrapErrstr(v interface{}, e *error) { *e = fmt.Errorf("%v", v) } + +type must struct{} + +func (must) String(s string, err error) string { + if err != nil { + panicv.errorv(err) + } + return s +} +func (must) Int(s int64, err error) int64 { + if err != nil { + panicv.errorv(err) + } + return s +} +func (must) Uint(s uint64, err error) uint64 { + if err != nil { + panicv.errorv(err) + } + return s +} +func (must) Float(s float64, err error) float64 { + if err != nil { + panicv.errorv(err) + } + return s +} + +// xdebugf prints the message in red on the terminal. +// Use it in place of fmt.Printf (which it calls internally) +func xdebugf(pattern string, args ...interface{}) { + var delim string + if len(pattern) > 0 && pattern[len(pattern)-1] != '\n' { + delim = "\n" + } + fmt.Printf("\033[1;31m"+pattern+delim+"\033[0m", args...) +} + +// func isImmutableKind(k reflect.Kind) (v bool) { +// return false || +// k == reflect.Int || +// k == reflect.Int8 || +// k == reflect.Int16 || +// k == reflect.Int32 || +// k == reflect.Int64 || +// k == reflect.Uint || +// k == reflect.Uint8 || +// k == reflect.Uint16 || +// k == reflect.Uint32 || +// k == reflect.Uint64 || +// k == reflect.Uintptr || +// k == reflect.Float32 || +// k == reflect.Float64 || +// k == reflect.Bool || +// k == reflect.String +// } + +// func timeLocUTCName(tzint int16) string { +// if tzint == 0 { +// return "UTC" +// } +// var tzname = []byte("UTC+00:00") +// //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. +// //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first +// var tzhr, tzmin int16 +// if tzint < 0 { +// tzname[3] = '-' // (TODO: verify. this works here) +// tzhr, tzmin = -tzint/60, (-tzint)%60 +// } else { +// tzhr, tzmin = tzint/60, tzint%60 +// } +// tzname[4] = timeDigits[tzhr/10] +// tzname[5] = timeDigits[tzhr%10] +// tzname[7] = timeDigits[tzmin/10] +// tzname[8] = timeDigits[tzmin%10] +// return string(tzname) +// //return time.FixedZone(string(tzname), int(tzint)*60) +// } diff --git a/vendor/github.com/ugorji/go/codec/helper_internal.go b/vendor/github.com/ugorji/go/codec/helper_internal.go index 5de92ba..0cbd665 100644 --- a/vendor/github.com/ugorji/go/codec/helper_internal.go +++ b/vendor/github.com/ugorji/go/codec/helper_internal.go @@ -6,73 +6,6 @@ package codec // All non-std package dependencies live in this file, // so porting to different environment is easy (just update functions). -import ( - "errors" - "fmt" - "reflect" -) - -func panicValToErr(panicVal interface{}, err *error) { - if panicVal == nil { - return - } - // case nil - switch xerr := panicVal.(type) { - case error: - *err = xerr - case string: - *err = errors.New(xerr) - default: - *err = fmt.Errorf("%v", panicVal) - } - return -} - -func hIsEmptyValue(v reflect.Value, deref, checkStruct bool) bool { - switch v.Kind() { - case reflect.Invalid: - return true - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - if deref { - if v.IsNil() { - return true - } - return hIsEmptyValue(v.Elem(), deref, checkStruct) - } else { - return v.IsNil() - } - case reflect.Struct: - if !checkStruct { - return false - } - // return true if all fields are empty. else return false. - // we cannot use equality check, because some fields may be maps/slices/etc - // and consequently the structs are not comparable. - // return v.Interface() == reflect.Zero(v.Type()).Interface() - for i, n := 0, v.NumField(); i < n; i++ { - if !hIsEmptyValue(v.Field(i), deref, checkStruct) { - return false - } - } - return true - } - return false -} - -func isEmptyValue(v reflect.Value, deref, checkStruct bool) bool { - return hIsEmptyValue(v, deref, checkStruct) -} - func pruneSignExt(v []byte, pos bool) (n int) { if len(v) < 2 { } else if pos && v[0] == 0 { @@ -97,21 +30,20 @@ func halfFloatToFloatBits(yy uint16) (d uint32) { if e == 0 { if m == 0 { // plu or minus 0 return s << 31 - } else { // Denormalized number -- renormalize it - for (m & 0x00000400) == 0 { - m <<= 1 - e -= 1 - } - e += 1 - const zz uint32 = 0x0400 - m &= ^zz } + // Denormalized number -- renormalize it + for (m & 0x00000400) == 0 { + m <<= 1 + e -= 1 + } + e += 1 + const zz uint32 = 0x0400 + m &= ^zz } else if e == 31 { if m == 0 { // Inf return (s << 31) | 0x7f800000 - } else { // NaN - return (s << 31) | 0x7f800000 | (m << 13) } + return (s << 31) | 0x7f800000 | (m << 13) // NaN } e = e + (127 - 15) m = m << 13 diff --git a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go index 8d2cd12..fd52690 100644 --- a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go +++ b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go @@ -1,6 +1,6 @@ // +build !go1.7 safe appengine -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -8,6 +8,7 @@ package codec import ( "reflect" "sync/atomic" + "time" ) const safeMode = true @@ -34,29 +35,10 @@ func bytesView(v string) []byte { func definitelyNil(v interface{}) bool { // this is a best-effort option. - // We just return false, so we don't unneessarily incur the cost of reflection this early. + // We just return false, so we don't unnecessarily incur the cost of reflection this early. return false - // rv := reflect.ValueOf(v) - // switch rv.Kind() { - // case reflect.Invalid: - // return true - // case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Slice, reflect.Map, reflect.Func: - // return rv.IsNil() - // default: - // return false - // } } -// // keepAlive4BytesView maintains a reference to the input parameter for bytesView. -// // -// // Usage: call this at point where done with the bytes view. -// func keepAlive4BytesView(v string) {} - -// // keepAlive4BytesView maintains a reference to the input parameter for stringView. -// // -// // Usage: call this at point where done with the string view. -// func keepAlive4StringView(v []byte) {} - func rv2i(rv reflect.Value) interface{} { return rv.Interface() } @@ -69,28 +51,62 @@ func rv2rtid(rv reflect.Value) uintptr { return reflect.ValueOf(rv.Type()).Pointer() } +func i2rtid(i interface{}) uintptr { + return reflect.ValueOf(reflect.TypeOf(i)).Pointer() +} + +// -------------------------- + +func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) bool { + switch v.Kind() { + case reflect.Invalid: + return true + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + if deref { + if v.IsNil() { + return true + } + return isEmptyValue(v.Elem(), tinfos, deref, checkStruct) + } + return v.IsNil() + case reflect.Struct: + return isEmptyStruct(v, tinfos, deref, checkStruct) + } + return false +} + // -------------------------- // type ptrToRvMap struct{} -// func (_ *ptrToRvMap) init() {} -// func (_ *ptrToRvMap) get(i interface{}) reflect.Value { +// func (*ptrToRvMap) init() {} +// func (*ptrToRvMap) get(i interface{}) reflect.Value { // return reflect.ValueOf(i).Elem() // } // -------------------------- -type atomicTypeInfoSlice struct { +type atomicTypeInfoSlice struct { // expected to be 2 words v atomic.Value } -func (x *atomicTypeInfoSlice) load() *[]rtid2ti { +func (x *atomicTypeInfoSlice) load() []rtid2ti { i := x.v.Load() if i == nil { return nil } - return i.(*[]rtid2ti) + return i.([]rtid2ti) } -func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) { +func (x *atomicTypeInfoSlice) store(p []rtid2ti) { x.v.Store(p) } @@ -107,56 +123,64 @@ func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { rv.SetBool(d.d.DecodeBool()) } +func (d *Decoder) kTime(f *codecFnInfo, rv reflect.Value) { + rv.Set(reflect.ValueOf(d.d.DecodeTime())) +} + func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { - rv.SetFloat(d.d.DecodeFloat(true)) + fv := d.d.DecodeFloat64() + if chkOvf.Float32(fv) { + d.errorf("float32 overflow: %v", fv) + } + rv.SetFloat(fv) } func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { - rv.SetFloat(d.d.DecodeFloat(false)) + rv.SetFloat(d.d.DecodeFloat64()) } func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt(intBitsize)) + rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) } func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt(8)) + rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 8)) } func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt(16)) + rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 16)) } func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt(32)) + rv.SetInt(chkOvf.IntV(d.d.DecodeInt64(), 32)) } func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { - rv.SetInt(d.d.DecodeInt(64)) + rv.SetInt(d.d.DecodeInt64()) } func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(uintBitsize)) + rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) } func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(uintBitsize)) + rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) } func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(8)) + rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 8)) } func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(16)) + rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 16)) } func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(32)) + rv.SetUint(chkOvf.UintV(d.d.DecodeUint64(), 32)) } func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { - rv.SetUint(d.d.DecodeUint(64)) + rv.SetUint(d.d.DecodeUint64()) } // ---------------- @@ -165,8 +189,12 @@ func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { e.e.EncodeBool(rv.Bool()) } +func (e *Encoder) kTime(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeTime(rv2i(rv).(time.Time)) +} + func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { - e.e.EncodeString(c_UTF8, rv.String()) + e.e.EncodeString(cUTF8, rv.String()) } func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { @@ -220,3 +248,25 @@ func (e *Encoder) kUint64(f *codecFnInfo, rv reflect.Value) { func (e *Encoder) kUintptr(f *codecFnInfo, rv reflect.Value) { e.e.EncodeUint(rv.Uint()) } + +// // keepAlive4BytesView maintains a reference to the input parameter for bytesView. +// // +// // Usage: call this at point where done with the bytes view. +// func keepAlive4BytesView(v string) {} + +// // keepAlive4BytesView maintains a reference to the input parameter for stringView. +// // +// // Usage: call this at point where done with the string view. +// func keepAlive4StringView(v []byte) {} + +// func definitelyNil(v interface{}) bool { +// rv := reflect.ValueOf(v) +// switch rv.Kind() { +// case reflect.Invalid: +// return true +// case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Slice, reflect.Map, reflect.Func: +// return rv.IsNil() +// default: +// return false +// } +// } diff --git a/vendor/github.com/ugorji/go/codec/helper_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_unsafe.go index 9a44b9f..21aa4db 100644 --- a/vendor/github.com/ugorji/go/codec/helper_unsafe.go +++ b/vendor/github.com/ugorji/go/codec/helper_unsafe.go @@ -2,7 +2,7 @@ // +build !appengine // +build go1.7 -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -10,6 +10,7 @@ package codec import ( "reflect" "sync/atomic" + "time" "unsafe" ) @@ -22,12 +23,12 @@ const safeMode = false const unsafeFlagIndir = 1 << 7 // keep in sync with GO_ROOT/src/reflect/value.go type unsafeString struct { - Data uintptr + Data unsafe.Pointer Len int } type unsafeSlice struct { - Data uintptr + Data unsafe.Pointer Len int Cap int } @@ -47,20 +48,16 @@ func stringView(v []byte) string { if len(v) == 0 { return "" } - bx := (*unsafeSlice)(unsafe.Pointer(&v)) - sx := unsafeString{bx.Data, bx.Len} - return *(*string)(unsafe.Pointer(&sx)) + return *(*string)(unsafe.Pointer(&unsafeString{bx.Data, bx.Len})) } func bytesView(v string) []byte { if len(v) == 0 { return zeroByteSlice } - sx := (*unsafeString)(unsafe.Pointer(&v)) - bx := unsafeSlice{sx.Data, sx.Len, sx.Len} - return *(*[]byte)(unsafe.Pointer(&bx)) + return *(*[]byte)(unsafe.Pointer(&unsafeSlice{sx.Data, sx.Len, sx.Len})) } func definitelyNil(v interface{}) bool { @@ -68,41 +65,32 @@ func definitelyNil(v interface{}) bool { // For true references (map, ptr, func, chan), you can just look // at the word of the interface. However, for slices, you have to dereference // the word, and get a pointer to the 3-word interface value. + // + // However, the following are cheap calls + // - TypeOf(interface): cheap 2-line call. + // - ValueOf(interface{}): expensive + // - type.Kind: cheap call through an interface + // - Value.Type(): cheap call + // except it's a method value (e.g. r.Read, which implies that it is a Func) - // var ui *unsafeIntf = (*unsafeIntf)(unsafe.Pointer(&v)) - // var word unsafe.Pointer = ui.word - // // fmt.Printf(">>>> definitely nil: isnil: %v, TYPE: \t%T, word: %v, *word: %v, type: %v, nil: %v\n", v == nil, v, word, *((*unsafe.Pointer)(word)), ui.typ, nil) - // return word == nil // || *((*unsafe.Pointer)(word)) == nil return ((*unsafeIntf)(unsafe.Pointer(&v))).word == nil } -// func keepAlive4BytesView(v string) { -// runtime.KeepAlive(v) -// } - -// func keepAlive4StringView(v []byte) { -// runtime.KeepAlive(v) -// } - -// TODO: consider a more generally-known optimization for reflect.Value ==> Interface -// -// Currently, we use this fragile method that taps into implememtation details from -// the source go stdlib reflect/value.go, -// and trims the implementation. func rv2i(rv reflect.Value) interface{} { + // TODO: consider a more generally-known optimization for reflect.Value ==> Interface + // + // Currently, we use this fragile method that taps into implememtation details from + // the source go stdlib reflect/value.go, and trims the implementation. + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) // true references (map, func, chan, ptr - NOT slice) may be double-referenced as flagIndir var ptr unsafe.Pointer - // kk := reflect.Kind(urv.flag & (1<<5 - 1)) - // if (kk == reflect.Map || kk == reflect.Ptr || kk == reflect.Chan || kk == reflect.Func) && urv.flag&unsafeFlagIndir != 0 { if refBitset.isset(byte(urv.flag&(1<<5-1))) && urv.flag&unsafeFlagIndir != 0 { ptr = *(*unsafe.Pointer)(urv.ptr) } else { ptr = urv.ptr } return *(*interface{})(unsafe.Pointer(&unsafeIntf{typ: urv.typ, word: ptr})) - // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) - // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) } func rt2id(rt reflect.Type) uintptr { @@ -113,32 +101,104 @@ func rv2rtid(rv reflect.Value) uintptr { return uintptr((*unsafeReflectValue)(unsafe.Pointer(&rv)).typ) } -// func rv0t(rt reflect.Type) reflect.Value { -// ut := (*unsafeIntf)(unsafe.Pointer(&rt)) -// // we need to determine whether ifaceIndir, and then whether to just pass 0 as the ptr -// uv := unsafeReflectValue{ut.word, &zeroRTv, flag(rt.Kind())} -// return *(*reflect.Value)(unsafe.Pointer(&uv}) -// } +func i2rtid(i interface{}) uintptr { + return uintptr(((*unsafeIntf)(unsafe.Pointer(&i))).typ) +} // -------------------------- -type atomicTypeInfoSlice struct { - v unsafe.Pointer + +func isEmptyValue(v reflect.Value, tinfos *TypeInfos, deref, checkStruct bool) bool { + urv := (*unsafeReflectValue)(unsafe.Pointer(&v)) + if urv.flag == 0 { + return true + } + switch v.Kind() { + case reflect.Invalid: + return true + case reflect.String: + return (*unsafeString)(urv.ptr).Len == 0 + case reflect.Slice: + return (*unsafeSlice)(urv.ptr).Len == 0 + case reflect.Bool: + return !*(*bool)(urv.ptr) + case reflect.Int: + return *(*int)(urv.ptr) == 0 + case reflect.Int8: + return *(*int8)(urv.ptr) == 0 + case reflect.Int16: + return *(*int16)(urv.ptr) == 0 + case reflect.Int32: + return *(*int32)(urv.ptr) == 0 + case reflect.Int64: + return *(*int64)(urv.ptr) == 0 + case reflect.Uint: + return *(*uint)(urv.ptr) == 0 + case reflect.Uint8: + return *(*uint8)(urv.ptr) == 0 + case reflect.Uint16: + return *(*uint16)(urv.ptr) == 0 + case reflect.Uint32: + return *(*uint32)(urv.ptr) == 0 + case reflect.Uint64: + return *(*uint64)(urv.ptr) == 0 + case reflect.Uintptr: + return *(*uintptr)(urv.ptr) == 0 + case reflect.Float32: + return *(*float32)(urv.ptr) == 0 + case reflect.Float64: + return *(*float64)(urv.ptr) == 0 + case reflect.Interface: + isnil := urv.ptr == nil || *(*unsafe.Pointer)(urv.ptr) == nil + if deref { + if isnil { + return true + } + return isEmptyValue(v.Elem(), tinfos, deref, checkStruct) + } + return isnil + case reflect.Ptr: + isnil := urv.ptr == nil + if deref { + if isnil { + return true + } + return isEmptyValue(v.Elem(), tinfos, deref, checkStruct) + } + return isnil + case reflect.Struct: + return isEmptyStruct(v, tinfos, deref, checkStruct) + case reflect.Map, reflect.Array, reflect.Chan: + return v.Len() == 0 + } + return false } -func (x *atomicTypeInfoSlice) load() *[]rtid2ti { - return (*[]rtid2ti)(atomic.LoadPointer(&x.v)) +// -------------------------- + +type atomicTypeInfoSlice struct { // expected to be 2 words + v unsafe.Pointer // data array - Pointer (not uintptr) to maintain GC reference + l int64 // length of the data array } -func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) { - atomic.StorePointer(&x.v, unsafe.Pointer(p)) +func (x *atomicTypeInfoSlice) load() []rtid2ti { + l := int(atomic.LoadInt64(&x.l)) + if l == 0 { + return nil + } + return *(*[]rtid2ti)(unsafe.Pointer(&unsafeSlice{Data: atomic.LoadPointer(&x.v), Len: l, Cap: l})) + // return (*[]rtid2ti)(atomic.LoadPointer(&x.v)) +} + +func (x *atomicTypeInfoSlice) store(p []rtid2ti) { + s := (*unsafeSlice)(unsafe.Pointer(&p)) + atomic.StorePointer(&x.v, s.Data) + atomic.StoreInt64(&x.l, int64(s.Len)) + // atomic.StorePointer(&x.v, unsafe.Pointer(p)) } // -------------------------- func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - // if urv.flag&unsafeFlagIndir != 0 { - // urv.ptr = *(*unsafe.Pointer)(urv.ptr) - // } *(*[]byte)(urv.ptr) = d.rawBytes() } @@ -152,69 +212,78 @@ func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { *(*bool)(urv.ptr) = d.d.DecodeBool() } -func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { +func (d *Decoder) kTime(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float32)(urv.ptr) = float32(d.d.DecodeFloat(true)) + *(*time.Time)(urv.ptr) = d.d.DecodeTime() +} + +func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { + fv := d.d.DecodeFloat64() + if chkOvf.Float32(fv) { + d.errorf("float32 overflow: %v", fv) + } + urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + *(*float32)(urv.ptr) = float32(fv) } func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float64)(urv.ptr) = d.d.DecodeFloat(false) + *(*float64)(urv.ptr) = d.d.DecodeFloat64() } func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int)(urv.ptr) = int(d.d.DecodeInt(intBitsize)) + *(*int)(urv.ptr) = int(chkOvf.IntV(d.d.DecodeInt64(), intBitsize)) } func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int8)(urv.ptr) = int8(d.d.DecodeInt(8)) + *(*int8)(urv.ptr) = int8(chkOvf.IntV(d.d.DecodeInt64(), 8)) } func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int16)(urv.ptr) = int16(d.d.DecodeInt(16)) + *(*int16)(urv.ptr) = int16(chkOvf.IntV(d.d.DecodeInt64(), 16)) } func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int32)(urv.ptr) = int32(d.d.DecodeInt(32)) + *(*int32)(urv.ptr) = int32(chkOvf.IntV(d.d.DecodeInt64(), 32)) } func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int64)(urv.ptr) = d.d.DecodeInt(64) + *(*int64)(urv.ptr) = d.d.DecodeInt64() } func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint)(urv.ptr) = uint(d.d.DecodeUint(uintBitsize)) + *(*uint)(urv.ptr) = uint(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) } func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uintptr)(urv.ptr) = uintptr(d.d.DecodeUint(uintBitsize)) + *(*uintptr)(urv.ptr) = uintptr(chkOvf.UintV(d.d.DecodeUint64(), uintBitsize)) } func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint8)(urv.ptr) = uint8(d.d.DecodeUint(8)) + *(*uint8)(urv.ptr) = uint8(chkOvf.UintV(d.d.DecodeUint64(), 8)) } func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint16)(urv.ptr) = uint16(d.d.DecodeUint(16)) + *(*uint16)(urv.ptr) = uint16(chkOvf.UintV(d.d.DecodeUint64(), 16)) } func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint32)(urv.ptr) = uint32(d.d.DecodeUint(32)) + *(*uint32)(urv.ptr) = uint32(chkOvf.UintV(d.d.DecodeUint64(), 32)) } func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint64)(urv.ptr) = d.d.DecodeUint(64) + *(*uint64)(urv.ptr) = d.d.DecodeUint64() } // ------------ @@ -224,9 +293,14 @@ func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { e.e.EncodeBool(*(*bool)(v.ptr)) } +func (e *Encoder) kTime(f *codecFnInfo, rv reflect.Value) { + v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) + e.e.EncodeTime(*(*time.Time)(v.ptr)) +} + func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { v := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - e.e.EncodeString(c_UTF8, *(*string)(v.ptr)) + e.e.EncodeString(cUTF8, *(*string)(v.ptr)) } func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { @@ -296,6 +370,56 @@ func (e *Encoder) kUintptr(f *codecFnInfo, rv reflect.Value) { // ------------ +// func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { +// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) +// // if urv.flag&unsafeFlagIndir != 0 { +// // urv.ptr = *(*unsafe.Pointer)(urv.ptr) +// // } +// *(*[]byte)(urv.ptr) = d.rawBytes() +// } + +// func rv0t(rt reflect.Type) reflect.Value { +// ut := (*unsafeIntf)(unsafe.Pointer(&rt)) +// // we need to determine whether ifaceIndir, and then whether to just pass 0 as the ptr +// uv := unsafeReflectValue{ut.word, &zeroRTv, flag(rt.Kind())} +// return *(*reflect.Value)(unsafe.Pointer(&uv}) +// } + +// func rv2i(rv reflect.Value) interface{} { +// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) +// // true references (map, func, chan, ptr - NOT slice) may be double-referenced as flagIndir +// var ptr unsafe.Pointer +// // kk := reflect.Kind(urv.flag & (1<<5 - 1)) +// // if (kk == reflect.Map || kk == reflect.Ptr || kk == reflect.Chan || kk == reflect.Func) && urv.flag&unsafeFlagIndir != 0 { +// if refBitset.isset(byte(urv.flag&(1<<5-1))) && urv.flag&unsafeFlagIndir != 0 { +// ptr = *(*unsafe.Pointer)(urv.ptr) +// } else { +// ptr = urv.ptr +// } +// return *(*interface{})(unsafe.Pointer(&unsafeIntf{typ: urv.typ, word: ptr})) +// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) +// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) +// } + +// func definitelyNil(v interface{}) bool { +// var ui *unsafeIntf = (*unsafeIntf)(unsafe.Pointer(&v)) +// if ui.word == nil { +// return true +// } +// var tk = reflect.TypeOf(v).Kind() +// return (tk == reflect.Interface || tk == reflect.Slice) && *(*unsafe.Pointer)(ui.word) == nil +// fmt.Printf(">>>> definitely nil: isnil: %v, TYPE: \t%T, word: %v, *word: %v, type: %v, nil: %v\n", +// v == nil, v, word, *((*unsafe.Pointer)(word)), ui.typ, nil) +// } + +// func keepAlive4BytesView(v string) { +// runtime.KeepAlive(v) +// } + +// func keepAlive4StringView(v []byte) { +// runtime.KeepAlive(v) +// } + // func rt2id(rt reflect.Type) uintptr { // return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word) // // var i interface{} = rt diff --git a/vendor/github.com/ugorji/go/codec/json.go b/vendor/github.com/ugorji/go/codec/json.go index a227607..ec7b0d6 100644 --- a/vendor/github.com/ugorji/go/codec/json.go +++ b/vendor/github.com/ugorji/go/codec/json.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -17,16 +17,6 @@ package codec // Note: // - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently. // We implement it here. -// - Also, strconv.ParseXXX for floats and integers -// - only works on strings resulting in unnecessary allocation and []byte-string conversion. -// - it does a lot of redundant checks, because json numbers are simpler that what it supports. -// - We parse numbers (floats and integers) directly here. -// We only delegate parsing floats if it is a hairy float which could cause a loss of precision. -// In that case, we delegate to strconv.ParseFloat. -// -// Note: -// - encode does not beautify. There is no whitespace when encoding. -// - rpc calls which take single integer arguments or write single numeric arguments will need care. // Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver // MUST not call one-another. @@ -34,8 +24,10 @@ package codec import ( "bytes" "encoding/base64" + "math" "reflect" "strconv" + "time" "unicode" "unicode/utf16" "unicode/utf8" @@ -44,15 +36,9 @@ import ( //-------------------------------- var jsonLiterals = [...]byte{ - '"', - 't', 'r', 'u', 'e', - '"', - '"', - 'f', 'a', 'l', 's', 'e', - '"', - '"', - 'n', 'u', 'l', 'l', - '"', + '"', 't', 'r', 'u', 'e', '"', + '"', 'f', 'a', 'l', 's', 'e', '"', + '"', 'n', 'u', 'l', 'l', '"', } const ( @@ -64,28 +50,12 @@ const ( jsonLitNull = 14 ) -var ( - // jsonFloat64Pow10 = [...]float64{ - // 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - // 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - // 1e20, 1e21, 1e22, - // } +const ( + jsonU4Chk2 = '0' + jsonU4Chk1 = 'a' - 10 + jsonU4Chk0 = 'A' - 10 - // jsonUint64Pow10 = [...]uint64{ - // 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - // 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - // } - - // jsonTabs and jsonSpaces are used as caches for indents - jsonTabs, jsonSpaces string - - jsonCharHtmlSafeSet bitset128 - jsonCharSafeSet bitset128 - jsonCharWhitespaceSet bitset256 - jsonNumSet bitset256 - // jsonIsFloatSet bitset256 - - jsonU4Set [256]byte + jsonScratchArrayLen = 64 ) const ( @@ -99,22 +69,24 @@ const ( jsonSpacesOrTabsLen = 128 - jsonU4SetErrVal = 128 - jsonAlwaysReturnInternString = false ) -func init() { - var bs [jsonSpacesOrTabsLen]byte - for i := 0; i < jsonSpacesOrTabsLen; i++ { - bs[i] = ' ' - } - jsonSpaces = string(bs[:]) +var ( + // jsonTabs and jsonSpaces are used as caches for indents + jsonTabs, jsonSpaces [jsonSpacesOrTabsLen]byte + jsonCharHtmlSafeSet bitset128 + jsonCharSafeSet bitset128 + jsonCharWhitespaceSet bitset256 + jsonNumSet bitset256 +) + +func init() { for i := 0; i < jsonSpacesOrTabsLen; i++ { - bs[i] = '\t' + jsonSpaces[i] = ' ' + jsonTabs[i] = '\t' } - jsonTabs = string(bs[:]) // populate the safe values as true: note: ASCII control characters are (0-31) // jsonCharSafeSet: all true except (0-31) " \ @@ -138,38 +110,113 @@ func init() { jsonNumSet.set(i) } } - for j := range jsonU4Set { - switch i = byte(j); i { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - jsonU4Set[i] = i - '0' - case 'a', 'b', 'c', 'd', 'e', 'f': - jsonU4Set[i] = i - 'a' + 10 - case 'A', 'B', 'C', 'D', 'E', 'F': - jsonU4Set[i] = i - 'A' + 10 - default: - jsonU4Set[i] = jsonU4SetErrVal - } - // switch i = byte(j); i { - // case 'e', 'E', '.': - // jsonIsFloatSet.set(i) - // } - } - // jsonU4Set[255] = jsonU4SetErrVal } -type jsonEncDriver struct { - e *Encoder - w encWriter - h *JsonHandle - b [64]byte // scratch - bs []byte // scratch - se setExtWrapper - ds string // indent string - dl uint16 // indent level - dt bool // indent using tabs - d bool // indent +// ---------------- + +type jsonEncDriverTypical struct { + w encWriter + // w *encWriterSwitch + b *[jsonScratchArrayLen]byte + tw bool // term white space c containerState - noBuiltInTypes +} + +func (e *jsonEncDriverTypical) typical() {} + +func (e *jsonEncDriverTypical) reset(ee *jsonEncDriver) { + e.w = ee.ew + // e.w = &ee.e.encWriterSwitch + e.b = &ee.b + e.tw = ee.h.TermWhitespace + e.c = 0 +} + +func (e *jsonEncDriverTypical) WriteArrayStart(length int) { + e.w.writen1('[') + e.c = containerArrayStart +} + +func (e *jsonEncDriverTypical) WriteArrayElem() { + if e.c != containerArrayStart { + e.w.writen1(',') + } + e.c = containerArrayElem +} + +func (e *jsonEncDriverTypical) WriteArrayEnd() { + e.w.writen1(']') + e.c = containerArrayEnd +} + +func (e *jsonEncDriverTypical) WriteMapStart(length int) { + e.w.writen1('{') + e.c = containerMapStart +} + +func (e *jsonEncDriverTypical) WriteMapElemKey() { + if e.c != containerMapStart { + e.w.writen1(',') + } + e.c = containerMapKey +} + +func (e *jsonEncDriverTypical) WriteMapElemValue() { + e.w.writen1(':') + e.c = containerMapValue +} + +func (e *jsonEncDriverTypical) WriteMapEnd() { + e.w.writen1('}') + e.c = containerMapEnd +} + +func (e *jsonEncDriverTypical) EncodeBool(b bool) { + if b { + e.w.writeb(jsonLiterals[jsonLitTrue : jsonLitTrue+4]) + } else { + e.w.writeb(jsonLiterals[jsonLitFalse : jsonLitFalse+5]) + } +} + +func (e *jsonEncDriverTypical) EncodeFloat64(f float64) { + fmt, prec := jsonFloatStrconvFmtPrec(f) + e.w.writeb(strconv.AppendFloat(e.b[:0], f, fmt, prec, 64)) +} + +func (e *jsonEncDriverTypical) EncodeInt(v int64) { + e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) +} + +func (e *jsonEncDriverTypical) EncodeUint(v uint64) { + e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) +} + +func (e *jsonEncDriverTypical) EncodeFloat32(f float32) { + e.EncodeFloat64(float64(f)) +} + +func (e *jsonEncDriverTypical) atEndOfEncode() { + if e.tw { + e.w.writen1(' ') + } +} + +// ---------------- + +type jsonEncDriverGeneric struct { + w encWriter // encWriter // *encWriterSwitch + b *[jsonScratchArrayLen]byte + c containerState + // ds string // indent string + di int8 // indent per + d bool // indenting? + dt bool // indent using tabs + dl uint16 // indent level + ks bool // map key as string + is byte // integer as string + tw bool // term white space + _ [7]byte // padding } // indent is done as below: @@ -177,7 +224,26 @@ type jsonEncDriver struct { // - newline and indent are added before each ending, // except there was no entry (so we can have {} or []) -func (e *jsonEncDriver) WriteArrayStart(length int) { +func (e *jsonEncDriverGeneric) reset(ee *jsonEncDriver) { + e.w = ee.ew + e.b = &ee.b + e.tw = ee.h.TermWhitespace + e.c = 0 + e.d, e.dt, e.dl, e.di = false, false, 0, 0 + h := ee.h + if h.Indent > 0 { + e.d = true + e.di = int8(h.Indent) + } else if h.Indent < 0 { + e.d = true + e.dt = true + e.di = int8(-h.Indent) + } + e.ks = h.MapKeyAsString + e.is = h.IntegerAsString +} + +func (e *jsonEncDriverGeneric) WriteArrayStart(length int) { if e.d { e.dl++ } @@ -185,7 +251,7 @@ func (e *jsonEncDriver) WriteArrayStart(length int) { e.c = containerArrayStart } -func (e *jsonEncDriver) WriteArrayElem() { +func (e *jsonEncDriverGeneric) WriteArrayElem() { if e.c != containerArrayStart { e.w.writen1(',') } @@ -195,7 +261,7 @@ func (e *jsonEncDriver) WriteArrayElem() { e.c = containerArrayElem } -func (e *jsonEncDriver) WriteArrayEnd() { +func (e *jsonEncDriverGeneric) WriteArrayEnd() { if e.d { e.dl-- if e.c != containerArrayStart { @@ -206,7 +272,7 @@ func (e *jsonEncDriver) WriteArrayEnd() { e.c = containerArrayEnd } -func (e *jsonEncDriver) WriteMapStart(length int) { +func (e *jsonEncDriverGeneric) WriteMapStart(length int) { if e.d { e.dl++ } @@ -214,7 +280,7 @@ func (e *jsonEncDriver) WriteMapStart(length int) { e.c = containerMapStart } -func (e *jsonEncDriver) WriteMapElemKey() { +func (e *jsonEncDriverGeneric) WriteMapElemKey() { if e.c != containerMapStart { e.w.writen1(',') } @@ -224,7 +290,7 @@ func (e *jsonEncDriver) WriteMapElemKey() { e.c = containerMapKey } -func (e *jsonEncDriver) WriteMapElemValue() { +func (e *jsonEncDriverGeneric) WriteMapElemValue() { if e.d { e.w.writen2(':', ' ') } else { @@ -233,7 +299,7 @@ func (e *jsonEncDriver) WriteMapElemValue() { e.c = containerMapValue } -func (e *jsonEncDriver) WriteMapEnd() { +func (e *jsonEncDriverGeneric) WriteMapEnd() { if e.d { e.dl-- if e.c != containerMapStart { @@ -244,36 +310,26 @@ func (e *jsonEncDriver) WriteMapEnd() { e.c = containerMapEnd } -func (e *jsonEncDriver) writeIndent() { +func (e *jsonEncDriverGeneric) writeIndent() { e.w.writen1('\n') - if x := len(e.ds) * int(e.dl); x <= jsonSpacesOrTabsLen { - if e.dt { - e.w.writestr(jsonTabs[:x]) - } else { - e.w.writestr(jsonSpaces[:x]) + x := int(e.di) * int(e.dl) + if e.dt { + for x > jsonSpacesOrTabsLen { + e.w.writeb(jsonTabs[:]) + x -= jsonSpacesOrTabsLen } + e.w.writeb(jsonTabs[:x]) } else { - for i := uint16(0); i < e.dl; i++ { - e.w.writestr(e.ds) + for x > jsonSpacesOrTabsLen { + e.w.writeb(jsonSpaces[:]) + x -= jsonSpacesOrTabsLen } + e.w.writeb(jsonSpaces[:x]) } } -func (e *jsonEncDriver) EncodeNil() { - // We always encode nil as just null (never in quotes) - // This allows us to easily decode if a nil in the json stream - // ie if initial token is n. - e.w.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) - - // if e.h.MapKeyAsString && e.c == containerMapKey { - // e.w.writeb(jsonLiterals[jsonLitNullQ : jsonLitNullQ+6]) - // } else { - // e.w.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) - // } -} - -func (e *jsonEncDriver) EncodeBool(b bool) { - if e.h.MapKeyAsString && e.c == containerMapKey { +func (e *jsonEncDriverGeneric) EncodeBool(b bool) { + if e.ks && e.c == containerMapKey { if b { e.w.writeb(jsonLiterals[jsonLitTrueQ : jsonLitTrueQ+6]) } else { @@ -288,45 +344,24 @@ func (e *jsonEncDriver) EncodeBool(b bool) { } } -func (e *jsonEncDriver) EncodeFloat32(f float32) { - e.encodeFloat(float64(f), 32) -} +func (e *jsonEncDriverGeneric) EncodeFloat64(f float64) { + // instead of using 'g', specify whether to use 'e' or 'f' + fmt, prec := jsonFloatStrconvFmtPrec(f) -func (e *jsonEncDriver) EncodeFloat64(f float64) { - e.encodeFloat(f, 64) -} - -func (e *jsonEncDriver) encodeFloat(f float64, numbits int) { var blen int - var x []byte - if e.h.MapKeyAsString && e.c == containerMapKey { + if e.ks && e.c == containerMapKey { + blen = 2 + len(strconv.AppendFloat(e.b[1:1], f, fmt, prec, 64)) e.b[0] = '"' - x = strconv.AppendFloat(e.b[1:1], f, 'G', -1, numbits) - blen = 1 + len(x) - if jsonIsFloatBytesB2(x) { - e.b[blen] = '"' - blen += 1 - } else { - e.b[blen] = '.' - e.b[blen+1] = '0' - e.b[blen+2] = '"' - blen += 3 - } + e.b[blen-1] = '"' } else { - x = strconv.AppendFloat(e.b[:0], f, 'G', -1, numbits) - blen = len(x) - if !jsonIsFloatBytesB2(x) { - e.b[blen] = '.' - e.b[blen+1] = '0' - blen += 2 - } + blen = len(strconv.AppendFloat(e.b[:0], f, fmt, prec, 64)) } e.w.writeb(e.b[:blen]) } -func (e *jsonEncDriver) EncodeInt(v int64) { - x := e.h.IntegerAsString - if x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) || (e.h.MapKeyAsString && e.c == containerMapKey) { +func (e *jsonEncDriverGeneric) EncodeInt(v int64) { + x := e.is + if x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) || (e.ks && e.c == containerMapKey) { blen := 2 + len(strconv.AppendInt(e.b[1:1], v, 10)) e.b[0] = '"' e.b[blen-1] = '"' @@ -336,9 +371,9 @@ func (e *jsonEncDriver) EncodeInt(v int64) { e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) } -func (e *jsonEncDriver) EncodeUint(v uint64) { - x := e.h.IntegerAsString - if x == 'A' || x == 'L' && v > 1<<53 || (e.h.MapKeyAsString && e.c == containerMapKey) { +func (e *jsonEncDriverGeneric) EncodeUint(v uint64) { + x := e.is + if x == 'A' || x == 'L' && v > 1<<53 || (e.ks && e.c == containerMapKey) { blen := 2 + len(strconv.AppendUint(e.b[1:1], v, 10)) e.b[0] = '"' e.b[blen-1] = '"' @@ -348,6 +383,65 @@ func (e *jsonEncDriver) EncodeUint(v uint64) { e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) } +func (e *jsonEncDriverGeneric) EncodeFloat32(f float32) { + // e.encodeFloat(float64(f), 32) + // always encode all floats as IEEE 64-bit floating point. + // It also ensures that we can decode in full precision even if into a float32, + // as what is written is always to float64 precision. + e.EncodeFloat64(float64(f)) +} + +func (e *jsonEncDriverGeneric) atEndOfEncode() { + if e.tw { + if e.d { + e.w.writen1('\n') + } else { + e.w.writen1(' ') + } + } +} + +// -------------------- + +type jsonEncDriver struct { + noBuiltInTypes + e *Encoder + h *JsonHandle + ew encWriter // encWriter // *encWriterSwitch + se extWrapper + // ---- cpu cache line boundary? + bs []byte // scratch + // ---- cpu cache line boundary? + b [jsonScratchArrayLen]byte // scratch (encode time, +} + +func (e *jsonEncDriver) EncodeNil() { + // We always encode nil as just null (never in quotes) + // This allows us to easily decode if a nil in the json stream + // ie if initial token is n. + e.ew.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) + + // if e.h.MapKeyAsString && e.c == containerMapKey { + // e.ew.writeb(jsonLiterals[jsonLitNullQ : jsonLitNullQ+6]) + // } else { + // e.ew.writeb(jsonLiterals[jsonLitNull : jsonLitNull+4]) + // } +} + +func (e *jsonEncDriver) EncodeTime(t time.Time) { + // Do NOT use MarshalJSON, as it allocates internally. + // instead, we call AppendFormat directly, using our scratch buffer (e.b) + if t.IsZero() { + e.EncodeNil() + } else { + e.b[0] = '"' + b := t.AppendFormat(e.b[1:1], time.RFC3339Nano) + e.b[len(b)+1] = '"' + e.ew.writeb(e.b[:len(b)+2]) + } + // v, err := t.MarshalJSON(); if err != nil { e.e.error(err) } e.ew.writeb(v) +} + func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { if v := ext.ConvertExt(rv); v == nil { e.EncodeNil() @@ -369,40 +463,42 @@ func (e *jsonEncDriver) EncodeString(c charEncoding, v string) { e.quoteStr(v) } -func (e *jsonEncDriver) EncodeSymbol(v string) { - e.quoteStr(v) -} - func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) { // if encoding raw bytes and RawBytesExt is configured, use it to encode - if c == c_RAW && e.se.i != nil { - e.EncodeExt(v, 0, &e.se, e.e) + if v == nil { + e.EncodeNil() return } - if c == c_RAW { - slen := base64.StdEncoding.EncodedLen(len(v)) - if cap(e.bs) >= slen { - e.bs = e.bs[:slen] - } else { - e.bs = make([]byte, slen) + if c == cRAW { + if e.se.InterfaceExt != nil { + e.EncodeExt(v, 0, &e.se, e.e) + return } - base64.StdEncoding.Encode(e.bs, v) - e.w.writen1('"') - e.w.writeb(e.bs) - e.w.writen1('"') + + slen := base64.StdEncoding.EncodedLen(len(v)) + if cap(e.bs) >= slen+2 { + e.bs = e.bs[:slen+2] + } else { + e.bs = make([]byte, slen+2) + } + e.bs[0] = '"' + base64.StdEncoding.Encode(e.bs[1:], v) + e.bs[slen+1] = '"' + e.ew.writeb(e.bs) } else { e.quoteStr(stringView(v)) } } func (e *jsonEncDriver) EncodeAsis(v []byte) { - e.w.writeb(v) + e.ew.writeb(v) } func (e *jsonEncDriver) quoteStr(s string) { // adapted from std pkg encoding/json const hex = "0123456789abcdef" - w := e.w + w := e.ew + htmlasis := e.h.HTMLCharsAsIs w.writen1('"') var start int for i, slen := 0, len(s); i < slen; { @@ -410,7 +506,8 @@ func (e *jsonEncDriver) quoteStr(s string) { // also encode < > & to prevent security holes when served to some browsers. if b := s[i]; b < utf8.RuneSelf { // if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { - if jsonCharHtmlSafeSet.isset(b) || (e.h.HTMLCharsAsIs && jsonCharSafeSet.isset(b)) { + // if (htmlasis && jsonCharSafeSet.isset(b)) || jsonCharHtmlSafeSet.isset(b) { + if jsonCharHtmlSafeSet.isset(b) || (htmlasis && jsonCharSafeSet.isset(b)) { i++ continue } @@ -468,42 +565,33 @@ func (e *jsonEncDriver) quoteStr(s string) { w.writen1('"') } -func (e *jsonEncDriver) atEndOfEncode() { - if e.h.TermWhitespace { - if e.d { - e.w.writen1('\n') - } else { - e.w.writen1(' ') - } - } -} - type jsonDecDriver struct { noBuiltInTypes - d *Decoder - h *JsonHandle - r decReader + d *Decoder + h *JsonHandle + r decReader // *decReaderSwitch // decReader + se extWrapper + + // ---- writable fields during execution --- *try* to keep in sep cache line c containerState // tok is used to store the token read right after skipWhiteSpace. - tok uint8 - - fnull bool // found null from appendStringAsBytes - - bstr [8]byte // scratch used for string \UXXX parsing - b [64]byte // scratch, used for parsing strings or numbers - b2 [64]byte // scratch, used only for decodeBytes (after base64) - bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. - - se setExtWrapper + tok uint8 + fnull bool // found null from appendStringAsBytes + bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. + bstr [8]byte // scratch used for string \UXXX parsing + // ---- cpu cache line boundary? + b [jsonScratchArrayLen]byte // scratch 1, used for parsing strings or numbers or time.Time + b2 [jsonScratchArrayLen]byte // scratch 2, used only for readUntil, decNumBytes + _ [3]uint64 // padding // n jsonNum } -func jsonIsWS(b byte) bool { - // return b == ' ' || b == '\t' || b == '\r' || b == '\n' - return jsonCharWhitespaceSet.isset(b) -} +// func jsonIsWS(b byte) bool { +// // return b == ' ' || b == '\t' || b == '\r' || b == '\n' +// return jsonCharWhitespaceSet.isset(b) +// } func (d *jsonDecDriver) uncacheRead() { if d.tok != 0 { @@ -516,8 +604,9 @@ func (d *jsonDecDriver) ReadMapStart() int { if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - if d.tok != '{' { - d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) + const xc uint8 = '{' + if d.tok != xc { + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 d.c = containerMapStart @@ -528,8 +617,9 @@ func (d *jsonDecDriver) ReadArrayStart() int { if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - if d.tok != '[' { - d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) + const xc uint8 = '[' + if d.tok != xc { + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 d.c = containerArrayStart @@ -543,14 +633,23 @@ func (d *jsonDecDriver) CheckBreak() bool { return d.tok == '}' || d.tok == ']' } +// For the ReadXXX methods below, we could just delegate to helper functions +// readContainerState(c containerState, xc uint8, check bool) +// - ReadArrayElem would become: +// readContainerState(containerArrayElem, ',', d.c != containerArrayStart) +// +// However, until mid-stack inlining (go 1.10?) comes, supporting inlining of +// oneliners, we explicitly write them all 5 out to elide the extra func call. +// TODO: For Go 1.10, if inlined, consider consolidating these. + func (d *jsonDecDriver) ReadArrayElem() { + const xc uint8 = ',' if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } if d.c != containerArrayStart { - const xc uint8 = ',' if d.tok != xc { - d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 } @@ -558,25 +657,25 @@ func (d *jsonDecDriver) ReadArrayElem() { } func (d *jsonDecDriver) ReadArrayEnd() { + const xc uint8 = ']' if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - const xc uint8 = ']' if d.tok != xc { - d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 d.c = containerArrayEnd } func (d *jsonDecDriver) ReadMapElemKey() { + const xc uint8 = ',' if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } if d.c != containerMapStart { - const xc uint8 = ',' if d.tok != xc { - d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 } @@ -584,47 +683,34 @@ func (d *jsonDecDriver) ReadMapElemKey() { } func (d *jsonDecDriver) ReadMapElemValue() { + const xc uint8 = ':' if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - const xc uint8 = ':' if d.tok != xc { - d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 d.c = containerMapValue } func (d *jsonDecDriver) ReadMapEnd() { + const xc uint8 = '}' if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - const xc uint8 = '}' if d.tok != xc { - d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + d.d.errorf("expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 d.c = containerMapEnd } -// func (d *jsonDecDriver) readContainerState(c containerState, xc uint8, check bool) { -// if d.tok == 0 { -// d.tok = d.r.skip(&jsonCharWhitespaceSet) -// } -// if check { -// if d.tok != xc { -// d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) -// } -// d.tok = 0 -// } -// d.c = c -// } - func (d *jsonDecDriver) readLit(length, fromIdx uint8) { bs := d.r.readx(int(length)) d.tok = 0 if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:fromIdx+length]) { - d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:fromIdx+length], bs) + d.d.errorf("expecting %s: got %s", jsonLiterals[fromIdx:fromIdx+length], bs) return } } @@ -633,10 +719,10 @@ func (d *jsonDecDriver) TryDecodeAsNil() bool { if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - // TODO: we shouldn't try to see if "null" was here, right? - // only "null" denotes a nil + // we shouldn't try to see if "null" was here, right? + // only the plain string: `null` denotes a nil (ie not quotes) if d.tok == 'n' { - d.readLit(3, jsonLitNull+1) // ull + d.readLit(3, jsonLitNull+1) // (n)ull return true } return false @@ -652,13 +738,13 @@ func (d *jsonDecDriver) DecodeBool() (v bool) { } switch d.tok { case 'f': - d.readLit(4, jsonLitFalse+1) // alse + d.readLit(4, jsonLitFalse+1) // (f)alse // v = false case 't': - d.readLit(3, jsonLitTrue+1) // rue + d.readLit(3, jsonLitTrue+1) // (t)rue v = true default: - d.d.errorf("json: decode bool: got first char %c", d.tok) + d.d.errorf("decode bool: got first char %c", d.tok) // v = false // "unreachable" } if fquot { @@ -667,11 +753,30 @@ func (d *jsonDecDriver) DecodeBool() (v bool) { return } +func (d *jsonDecDriver) DecodeTime() (t time.Time) { + // read string, and pass the string into json.unmarshal + d.appendStringAsBytes() + if d.fnull { + return + } + t, err := time.Parse(time.RFC3339, stringView(d.bs)) + if err != nil { + d.d.errorv(err) + } + return +} + func (d *jsonDecDriver) ContainerType() (vt valueType) { // check container type by checking the first char if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } + + // optimize this, so we don't do 4 checks but do one computation. + // return jsonContainerSet[d.tok] + + // ContainerType is mostly called for Map and Array, + // so this conditional is good enough (max 2 checks typically) if b := d.tok; b == '{' { return valueTypeMap } else if b == '[' { @@ -682,8 +787,6 @@ func (d *jsonDecDriver) ContainerType() (vt valueType) { return valueTypeString } return valueTypeUnset - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) - // return false // "unreachable" } func (d *jsonDecDriver) decNumBytes() (bs []byte) { @@ -702,36 +805,69 @@ func (d *jsonDecDriver) decNumBytes() (bs []byte) { return bs } -func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) { +func (d *jsonDecDriver) DecodeUint64() (u uint64) { bs := d.decNumBytes() - u, err := strconv.ParseUint(stringView(bs), 10, int(bitsize)) - if err != nil { - d.d.errorf("json: decode uint from %s: %v", bs, err) - return + n, neg, badsyntax, overflow := jsonParseInteger(bs) + if overflow { + d.d.errorf("overflow parsing unsigned integer: %s", bs) + } else if neg { + d.d.errorf("minus found parsing unsigned integer: %s", bs) + } else if badsyntax { + // fallback: try to decode as float, and cast + n = d.decUint64ViaFloat(stringView(bs)) + } + return n +} + +func (d *jsonDecDriver) DecodeInt64() (i int64) { + const cutoff = uint64(1 << uint(64-1)) + bs := d.decNumBytes() + n, neg, badsyntax, overflow := jsonParseInteger(bs) + if overflow { + d.d.errorf("overflow parsing integer: %s", bs) + } else if badsyntax { + // d.d.errorf("invalid syntax for integer: %s", bs) + // fallback: try to decode as float, and cast + if neg { + n = d.decUint64ViaFloat(stringView(bs[1:])) + } else { + n = d.decUint64ViaFloat(stringView(bs)) + } + } + if neg { + if n > cutoff { + d.d.errorf("overflow parsing integer: %s", bs) + } + i = -(int64(n)) + } else { + if n >= cutoff { + d.d.errorf("overflow parsing integer: %s", bs) + } + i = int64(n) } return } -func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) { - bs := d.decNumBytes() - i, err := strconv.ParseInt(stringView(bs), 10, int(bitsize)) +func (d *jsonDecDriver) decUint64ViaFloat(s string) (u uint64) { + f, err := strconv.ParseFloat(s, 64) if err != nil { - d.d.errorf("json: decode int from %s: %v", bs, err) - return + d.d.errorf("invalid syntax for integer: %s", s) + // d.d.errorv(err) } - return + fi, ff := math.Modf(f) + if ff > 0 { + d.d.errorf("fractional part found parsing integer: %s", s) + } else if fi > float64(math.MaxUint64) { + d.d.errorf("overflow parsing integer: %s", s) + } + return uint64(fi) } -func (d *jsonDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { +func (d *jsonDecDriver) DecodeFloat64() (f float64) { bs := d.decNumBytes() - bitsize := 64 - if chkOverflow32 { - bitsize = 32 - } - f, err := strconv.ParseFloat(stringView(bs), bitsize) + f, err := strconv.ParseFloat(stringView(bs), 64) if err != nil { - d.d.errorf("json: decode float from %s: %v", bs, err) - return + d.d.errorv(err) } return } @@ -751,11 +887,19 @@ func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxta func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { // if decoding into raw bytes, and the RawBytesExt is configured, use it to decode. - if d.se.i != nil { + if d.se.InterfaceExt != nil { bsOut = bs d.DecodeExt(&bsOut, 0, &d.se) return } + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + // check if an "array" of uint8's (see ContainerType for how to infer if an array) + if d.tok == '[' { + bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + return + } d.appendStringAsBytes() // base64 encodes []byte{} as "", and we encode nil []byte as null. // Consequently, base64 should decode null as a nil []byte, and "" as an empty []byte{}. @@ -778,7 +922,7 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { } slen2, err := base64.StdEncoding.Decode(bsOut, bs0) if err != nil { - d.d.errorf("json: error decoding base64 binary '%s': %v", bs0, err) + d.d.errorf("error decoding base64 binary '%s': %v", bs0, err) return nil } if slen != slen2 { @@ -804,25 +948,29 @@ func (d *jsonDecDriver) appendStringAsBytes() { d.fnull = false if d.tok != '"' { - // d.d.errorf("json: expect char '%c' but got char '%c'", '"', d.tok) + // d.d.errorf("expect char '%c' but got char '%c'", '"', d.tok) // handle non-string scalar: null, true, false or a number switch d.tok { case 'n': - d.readLit(3, jsonLitNull+1) // ull + d.readLit(3, jsonLitNull+1) // (n)ull d.bs = d.bs[:0] d.fnull = true case 'f': - d.readLit(4, jsonLitFalse+1) // alse + d.readLit(4, jsonLitFalse+1) // (f)alse d.bs = d.bs[:5] copy(d.bs, "false") case 't': - d.readLit(3, jsonLitTrue+1) // rue + d.readLit(3, jsonLitTrue+1) // (t)rue d.bs = d.bs[:4] copy(d.bs, "true") default: // try to parse a valid number bs := d.decNumBytes() - d.bs = d.bs[:len(bs)] + if len(bs) <= cap(d.bs) { + d.bs = d.bs[:len(bs)] + } else { + d.bs = make([]byte, len(bs)) + } copy(d.bs, bs) } return @@ -876,18 +1024,24 @@ func (d *jsonDecDriver) appendStringAsBytes() { var r rune var rr uint32 if len(cs) < i+4 { // may help reduce bounds-checking - d.d.errorf(`json: need at least 4 more bytes for unicode sequence`) + d.d.errorf("need at least 4 more bytes for unicode sequence") } // c = cs[i+4] // may help reduce bounds-checking for j := 1; j < 5; j++ { - c = jsonU4Set[cs[i+j]] - if c == jsonU4SetErrVal { - // d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, c) + // best to use explicit if-else + // - not a table, etc which involve memory loads, array lookup with bounds checks, etc + c = cs[i+j] + if c >= '0' && c <= '9' { + rr = rr*16 + uint32(c-jsonU4Chk2) + } else if c >= 'a' && c <= 'f' { + rr = rr*16 + uint32(c-jsonU4Chk1) + } else if c >= 'A' && c <= 'F' { + rr = rr*16 + uint32(c-jsonU4Chk0) + } else { r = unicode.ReplacementChar i += 4 goto encode_rune } - rr = rr*16 + uint32(c) } r = rune(rr) i += 4 @@ -897,14 +1051,18 @@ func (d *jsonDecDriver) appendStringAsBytes() { // c = cs[i+4] // may help reduce bounds-checking var rr1 uint32 for j := 1; j < 5; j++ { - c = jsonU4Set[cs[i+j]] - if c == jsonU4SetErrVal { - // d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, c) + c = cs[i+j] + if c >= '0' && c <= '9' { + rr = rr*16 + uint32(c-jsonU4Chk2) + } else if c >= 'a' && c <= 'f' { + rr = rr*16 + uint32(c-jsonU4Chk1) + } else if c >= 'A' && c <= 'F' { + rr = rr*16 + uint32(c-jsonU4Chk0) + } else { r = unicode.ReplacementChar i += 4 goto encode_rune } - rr1 = rr1*16 + uint32(c) } r = utf16.DecodeRune(r, rune(rr1)) i += 4 @@ -917,7 +1075,7 @@ func (d *jsonDecDriver) appendStringAsBytes() { w2 := utf8.EncodeRune(d.bstr[:], r) v = append(v, d.bstr[:w2]...) default: - d.d.errorf("json: unsupported escaped value: %c", c) + d.d.errorf("unsupported escaped value: %c", c) } i++ cursor = i @@ -926,24 +1084,38 @@ func (d *jsonDecDriver) appendStringAsBytes() { } func (d *jsonDecDriver) nakedNum(z *decNaked, bs []byte) (err error) { - if d.h.PreferFloat || jsonIsFloatBytesB3(bs) { // bytes.IndexByte(bs, '.') != -1 ||... - // } else if d.h.PreferFloat || bytes.ContainsAny(bs, ".eE") { - z.v = valueTypeFloat - z.f, err = strconv.ParseFloat(stringView(bs), 64) - } else if d.h.SignedInteger || bs[0] == '-' { + const cutoff = uint64(1 << uint(64-1)) + var n uint64 + var neg, badsyntax, overflow bool + + if d.h.PreferFloat { + goto F + } + n, neg, badsyntax, overflow = jsonParseInteger(bs) + if badsyntax || overflow { + goto F + } + if neg { + if n > cutoff { + goto F + } z.v = valueTypeInt - z.i, err = strconv.ParseInt(stringView(bs), 10, 64) + z.i = -(int64(n)) + } else if d.h.SignedInteger { + if n >= cutoff { + goto F + } + z.v = valueTypeInt + z.i = int64(n) } else { z.v = valueTypeUint - z.u, err = strconv.ParseUint(stringView(bs), 10, 64) - } - if err != nil && z.v != valueTypeFloat { - if v, ok := err.(*strconv.NumError); ok && (v.Err == strconv.ErrRange || v.Err == strconv.ErrSyntax) { - z.v = valueTypeFloat - z.f, err = strconv.ParseFloat(stringView(bs), 64) - } + z.u = n } return +F: + z.v = valueTypeFloat + z.f, err = strconv.ParseFloat(stringView(bs), 64) + return } func (d *jsonDecDriver) bsToString() string { @@ -963,14 +1135,14 @@ func (d *jsonDecDriver) DecodeNaked() { } switch d.tok { case 'n': - d.readLit(3, jsonLitNull+1) // ull + d.readLit(3, jsonLitNull+1) // (n)ull z.v = valueTypeNil case 'f': - d.readLit(4, jsonLitFalse+1) // alse + d.readLit(4, jsonLitFalse+1) // (f)alse z.v = valueTypeBool z.b = false case 't': - d.readLit(3, jsonLitTrue+1) // rue + d.readLit(3, jsonLitTrue+1) // (t)rue z.v = valueTypeBool z.b = true case '{': @@ -1004,11 +1176,11 @@ func (d *jsonDecDriver) DecodeNaked() { default: // number bs := d.decNumBytes() if len(bs) == 0 { - d.d.errorf("json: decode number from empty string") + d.d.errorf("decode number from empty string") return } if err := d.nakedNum(z, bs); err != nil { - d.d.errorf("json: decode number from %s: %v", bs, err) + d.d.errorf("decode number from %s: %v", bs, err) return } } @@ -1024,30 +1196,27 @@ func (d *jsonDecDriver) DecodeNaked() { // // Json is comprehensively supported: // - decodes numbers into interface{} as int, uint or float64 +// based on how the number looks and some config parameters e.g. PreferFloat, SignedInt, etc. +// - decode integers from float formatted numbers e.g. 1.27e+8 +// - decode any json value (numbers, bool, etc) from quoted strings // - configurable way to encode/decode []byte . // by default, encodes and decodes []byte using base64 Std Encoding // - UTF-8 support for encoding and decoding // // It has better performance than the json library in the standard library, -// by leveraging the performance improvements of the codec library and -// minimizing allocations. +// by leveraging the performance improvements of the codec library. // // In addition, it doesn't read more bytes than necessary during a decode, which allows // reading multiple values from a stream containing json and non-json content. // For example, a user can read a json value, then a cbor value, then a msgpack value, // all from the same stream in sequence. // -// Note that, when decoding quoted strings, invalid UTF-8 or invalid UTF-16 surrogate pairs -// are not treated as an error. -// Instead, they are replaced by the Unicode replacement character U+FFFD. +// Note that, when decoding quoted strings, invalid UTF-8 or invalid UTF-16 surrogate pairs are +// not treated as an error. Instead, they are replaced by the Unicode replacement character U+FFFD. type JsonHandle struct { textEncodingType BasicHandle - // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. - // If not configured, raw bytes are encoded to/from base64 text. - RawBytesExt InterfaceExt - // Indent indicates how a value is encoded. // - If positive, indent by that number of spaces. // - If negative, indent by that number of tabs. @@ -1064,7 +1233,7 @@ type JsonHandle struct { // - if 'A', then encode all integers as a json string // containing the exact integer representation as a decimal. // - else encode all integers as a json number (default) - IntegerAsString uint8 + IntegerAsString byte // HTMLCharsAsIs controls how to encode some special characters to html: < > & // @@ -1089,52 +1258,97 @@ type JsonHandle struct { // Use this to enforce strict json output. // The only caveat is that nil value is ALWAYS written as null (never as "null") MapKeyAsString bool + + // _ [2]byte // padding + + // Note: below, we store hardly-used items e.g. RawBytesExt is cached in the (en|de)cDriver. + + // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. + // If not configured, raw bytes are encoded to/from base64 text. + RawBytesExt InterfaceExt + + _ [3]uint64 // padding } +// Name returns the name of the handle: json +func (h *JsonHandle) Name() string { return "json" } func (h *JsonHandle) hasElemSeparators() bool { return true } - -func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{i: ext}) +func (h *JsonHandle) typical() bool { + return h.Indent == 0 && !h.MapKeyAsString && h.IntegerAsString != 'A' && h.IntegerAsString != 'L' } -func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { - hd := jsonEncDriver{e: e, h: h} - hd.bs = hd.b[:0] +type jsonTypical interface { + typical() +} - hd.reset() +func (h *JsonHandle) recreateEncDriver(ed encDriver) (v bool) { + _, v = ed.(jsonTypical) + return v != h.typical() +} - return &hd +// SetInterfaceExt sets an extension +func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) +} + +type jsonEncDriverTypicalImpl struct { + jsonEncDriver + jsonEncDriverTypical + _ [1]uint64 // padding +} + +func (x *jsonEncDriverTypicalImpl) reset() { + x.jsonEncDriver.reset() + x.jsonEncDriverTypical.reset(&x.jsonEncDriver) +} + +type jsonEncDriverGenericImpl struct { + jsonEncDriver + jsonEncDriverGeneric +} + +func (x *jsonEncDriverGenericImpl) reset() { + x.jsonEncDriver.reset() + x.jsonEncDriverGeneric.reset(&x.jsonEncDriver) +} + +func (h *JsonHandle) newEncDriver(e *Encoder) (ee encDriver) { + var hd *jsonEncDriver + if h.typical() { + var v jsonEncDriverTypicalImpl + ee = &v + hd = &v.jsonEncDriver + } else { + var v jsonEncDriverGenericImpl + ee = &v + hd = &v.jsonEncDriver + } + hd.e, hd.h, hd.bs = e, h, hd.b[:0] + hd.se.BytesExt = bytesExtFailer{} + ee.reset() + return } func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} hd := jsonDecDriver{d: d, h: h} + hd.se.BytesExt = bytesExtFailer{} hd.bs = hd.b[:0] hd.reset() return &hd } func (e *jsonEncDriver) reset() { - e.w = e.e.w - e.se.i = e.h.RawBytesExt + e.ew = e.e.w // e.e.w // &e.e.encWriterSwitch + e.se.InterfaceExt = e.h.RawBytesExt if e.bs != nil { e.bs = e.bs[:0] } - e.d, e.dt, e.dl, e.ds = false, false, 0, "" - e.c = 0 - if e.h.Indent > 0 { - e.d = true - e.ds = jsonSpaces[:e.h.Indent] - } else if e.h.Indent < 0 { - e.d = true - e.dt = true - e.ds = jsonTabs[:-(e.h.Indent)] - } } func (d *jsonDecDriver) reset() { - d.r = d.d.r - d.se.i = d.h.RawBytesExt + d.r = d.d.r // &d.d.decReaderSwitch // d.d.r + d.se.InterfaceExt = d.h.RawBytesExt if d.bs != nil { d.bs = d.bs[:0] } @@ -1142,26 +1356,67 @@ func (d *jsonDecDriver) reset() { // d.n.reset() } -// func jsonIsFloatBytes(bs []byte) bool { -// for _, v := range bs { -// // if v == '.' || v == 'e' || v == 'E' { -// if jsonIsFloatSet.isset(v) { -// return true -// } -// } -// return false -// } - -func jsonIsFloatBytesB2(bs []byte) bool { - return bytes.IndexByte(bs, '.') != -1 || - bytes.IndexByte(bs, 'E') != -1 +func jsonFloatStrconvFmtPrec(f float64) (fmt byte, prec int) { + prec = -1 + var abs = math.Abs(f) + if abs != 0 && (abs < 1e-6 || abs >= 1e21) { + fmt = 'e' + } else { + fmt = 'f' + // set prec to 1 iff mod is 0. + // better than using jsonIsFloatBytesB2 to check if a . or E in the float bytes. + // this ensures that every float has an e or .0 in it. + if abs <= 1 { + if abs == 0 || abs == 1 { + prec = 1 + } + } else if _, mod := math.Modf(abs); mod == 0 { + prec = 1 + } + } + return } -func jsonIsFloatBytesB3(bs []byte) bool { - return bytes.IndexByte(bs, '.') != -1 || - bytes.IndexByte(bs, 'E') != -1 || - bytes.IndexByte(bs, 'e') != -1 +// custom-fitted version of strconv.Parse(Ui|I)nt. +// Also ensures we don't have to search for .eE to determine if a float or not. +func jsonParseInteger(s []byte) (n uint64, neg, badSyntax, overflow bool) { + const maxUint64 = (1<<64 - 1) + const cutoff = maxUint64/10 + 1 + + if len(s) == 0 { + badSyntax = true + return + } + switch s[0] { + case '+': + s = s[1:] + case '-': + s = s[1:] + neg = true + } + for _, c := range s { + if c < '0' || c > '9' { + badSyntax = true + return + } + // unsigned integers don't overflow well on multiplication, so check cutoff here + // e.g. (maxUint64-5)*10 doesn't overflow well ... + if n >= cutoff { + overflow = true + return + } + n *= 10 + n1 := n + uint64(c-'0') + if n1 < n || n1 > maxUint64 { + overflow = true + return + } + n = n1 + } + return } var _ decDriver = (*jsonDecDriver)(nil) -var _ encDriver = (*jsonEncDriver)(nil) +var _ encDriver = (*jsonEncDriverGenericImpl)(nil) +var _ encDriver = (*jsonEncDriverTypicalImpl)(nil) +var _ jsonTypical = (*jsonEncDriverTypical)(nil) diff --git a/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl index 0fd2b53..90d758c 100644 --- a/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl +++ b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl @@ -1,15 +1,13 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from mammoth-test.go.tmpl -// ************************************************************ +// Code generated from mammoth-test.go.tmpl - DO NOT EDIT. package codec import "testing" import "fmt" +import "reflect" // TestMammoth has all the different paths optimized in fast-path // It has all the primitives, slices and maps. @@ -38,36 +36,78 @@ type TestMammoth struct { } {{range .Values }}{{if not .Primitive }}{{if not .MapKey }}{{/* -*/}} type {{ .MethodNamePfx "type" false }} []{{ .Elem }} -func (_ {{ .MethodNamePfx "type" false }}) MapBySlice() { } +*/}} type {{ .MethodNamePfx "typMbs" false }} []{{ .Elem }} +func (_ {{ .MethodNamePfx "typMbs" false }}) MapBySlice() { } +{{end}}{{end}}{{end}} + +{{range .Values }}{{if not .Primitive }}{{if .MapKey }}{{/* +*/}} type {{ .MethodNamePfx "typMap" false }} map[{{ .MapKey }}]{{ .Elem }} {{end}}{{end}}{{end}} func doTestMammothSlices(t *testing.T, h Handle) { {{range $i, $e := .Values }}{{if not .Primitive }}{{if not .MapKey }}{{/* */}} - for _, v := range [][]{{ .Elem }}{ nil, []{{ .Elem }}{}, []{{ .Elem }}{ {{ nonzerocmd .Elem }}, {{ nonzerocmd .Elem }} } } { + var v{{$i}}va [8]{{ .Elem }} + for _, v := range [][]{{ .Elem }}{ nil, {}, { {{ nonzerocmd .Elem }}, {{ zerocmd .Elem }}, {{ zerocmd .Elem }}, {{ nonzerocmd .Elem }} } } { {{/* // fmt.Printf(">>>> running mammoth slice v{{$i}}: %v\n", v) - var v{{$i}}v1, v{{$i}}v2, v{{$i}}v3, v{{$i}}v4 []{{ .Elem }} + // - encode value to some []byte + // - decode into a length-wise-equal []byte + // - check if equal to initial slice + // - encode ptr to the value + // - check if encode bytes are same + // - decode into ptrs to: nil, then 1-elem slice, equal-length, then large len slice + // - decode into non-addressable slice of equal length, then larger len + // - for each decode, compare elem-by-elem to the original slice + // - + // - rinse and repeat for a MapBySlice version + // - + */}} + var v{{$i}}v1, v{{$i}}v2 []{{ .Elem }} v{{$i}}v1 = v bs{{$i}} := testMarshalErr(v{{$i}}v1, h, t, "enc-slice-v{{$i}}") - if v != nil { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}") testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}") + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } + testUnmarshalErr(reflect.ValueOf(v{{$i}}v2), bs{{$i}}, h, t, "dec-slice-v{{$i}}-noaddr") // non-addressable value + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-noaddr") + // ... bs{{$i}} = testMarshalErr(&v{{$i}}v1, h, t, "enc-slice-v{{$i}}-p") v{{$i}}v2 = nil testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p") testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:1:1] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-1") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-1") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:len(v{{$i}}v1):len(v{{$i}}v1)] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-len") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + v{{$i}}v2 = v{{$i}}va[:] + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-cap") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-slice-v{{$i}}-p-cap") + if len(v{{$i}}v1) > 1 { + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + testUnmarshalErr((&v{{$i}}va)[:len(v{{$i}}v1)], bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-len-noaddr") + testDeepEqualErr(v{{$i}}v1, v{{$i}}va[:len(v{{$i}}v1)], t, "equal-slice-v{{$i}}-p-len-noaddr") + v{{$i}}va = [8]{{ .Elem }}{} // clear the array + testUnmarshalErr((&v{{$i}}va)[:], bs{{$i}}, h, t, "dec-slice-v{{$i}}-p-cap-noaddr") + testDeepEqualErr(v{{$i}}v1, v{{$i}}va[:len(v{{$i}}v1)], t, "equal-slice-v{{$i}}-p-cap-noaddr") + } // ... + var v{{$i}}v3, v{{$i}}v4 {{ .MethodNamePfx "typMbs" false }} v{{$i}}v2 = nil if v != nil { v{{$i}}v2 = make([]{{ .Elem }}, len(v)) } - v{{$i}}v3 = {{ .MethodNamePfx "type" false }}(v{{$i}}v1) + v{{$i}}v3 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v1) + v{{$i}}v4 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v2) bs{{$i}} = testMarshalErr(v{{$i}}v3, h, t, "enc-slice-v{{$i}}-custom") - v{{$i}}v4 = {{ .MethodNamePfx "type" false }}(v{{$i}}v2) testUnmarshalErr(v{{$i}}v4, bs{{$i}}, h, t, "dec-slice-v{{$i}}-custom") testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-slice-v{{$i}}-custom") - v{{$i}}v2 = nil bs{{$i}} = testMarshalErr(&v{{$i}}v3, h, t, "enc-slice-v{{$i}}-custom-p") - v{{$i}}v4 = {{ .MethodNamePfx "type" false }}(v{{$i}}v2) + v{{$i}}v2 = nil + v{{$i}}v4 = {{ .MethodNamePfx "typMbs" false }}(v{{$i}}v2) testUnmarshalErr(&v{{$i}}v4, bs{{$i}}, h, t, "dec-slice-v{{$i}}-custom-p") testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-slice-v{{$i}}-custom-p") } @@ -77,18 +117,32 @@ func doTestMammothSlices(t *testing.T, h Handle) { func doTestMammothMaps(t *testing.T, h Handle) { {{range $i, $e := .Values }}{{if not .Primitive }}{{if .MapKey }}{{/* */}} - for _, v := range []map[{{ .MapKey }}]{{ .Elem }}{ nil, map[{{ .MapKey }}]{{ .Elem }}{}, map[{{ .MapKey }}]{{ .Elem }}{ {{ nonzerocmd .MapKey }}:{{ nonzerocmd .Elem }} } } { + for _, v := range []map[{{ .MapKey }}]{{ .Elem }}{ nil, {}, { {{ nonzerocmd .MapKey }}:{{ zerocmd .Elem }} {{if ne "bool" .MapKey}}, {{ nonzerocmd .MapKey }}:{{ nonzerocmd .Elem }} {{end}} } } { // fmt.Printf(">>>> running mammoth map v{{$i}}: %v\n", v) var v{{$i}}v1, v{{$i}}v2 map[{{ .MapKey }}]{{ .Elem }} v{{$i}}v1 = v bs{{$i}} := testMarshalErr(v{{$i}}v1, h, t, "enc-map-v{{$i}}") - if v != nil { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map testUnmarshalErr(v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}") testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}") + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + testUnmarshalErr(reflect.ValueOf(v{{$i}}v2), bs{{$i}}, h, t, "dec-map-v{{$i}}-noaddr") // decode into non-addressable map value + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-noaddr") + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-p-len") bs{{$i}} = testMarshalErr(&v{{$i}}v1, h, t, "enc-map-v{{$i}}-p") v{{$i}}v2 = nil - testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}-p") - testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-p") + testUnmarshalErr(&v{{$i}}v2, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-nil") + testDeepEqualErr(v{{$i}}v1, v{{$i}}v2, t, "equal-map-v{{$i}}-p-nil") + // ... + if v == nil { v{{$i}}v2 = nil } else { v{{$i}}v2 = make(map[{{ .MapKey }}]{{ .Elem }}, len(v)) } // reset map + var v{{$i}}v3, v{{$i}}v4 {{ .MethodNamePfx "typMap" false }} + v{{$i}}v3 = {{ .MethodNamePfx "typMap" false }}(v{{$i}}v1) + v{{$i}}v4 = {{ .MethodNamePfx "typMap" false }}(v{{$i}}v2) + bs{{$i}} = testMarshalErr(v{{$i}}v3, h, t, "enc-map-v{{$i}}-custom") + testUnmarshalErr(v{{$i}}v4, bs{{$i}}, h, t, "dec-map-v{{$i}}-p-len") + testDeepEqualErr(v{{$i}}v3, v{{$i}}v4, t, "equal-map-v{{$i}}-p-len") } {{end}}{{end}}{{end}} diff --git a/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl b/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl index fd7618a..7cdf8f5 100644 --- a/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl +++ b/vendor/github.com/ugorji/go/codec/mammoth2-test.go.tmpl @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from mammoth2-test.go.tmpl -// ************************************************************ +// Code generated from mammoth2-test.go.tmpl - DO NOT EDIT. package codec diff --git a/vendor/github.com/ugorji/go/codec/mammoth2_codecgen_generated_test.go b/vendor/github.com/ugorji/go/codec/mammoth2_codecgen_generated_test.go index 7e6ff45..ce9324a 100644 --- a/vendor/github.com/ugorji/go/codec/mammoth2_codecgen_generated_test.go +++ b/vendor/github.com/ugorji/go/codec/mammoth2_codecgen_generated_test.go @@ -1,37 +1,31 @@ // +build !notfastpath -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED BY codecgen. -// ************************************************************ +// Code generated by codecgen - DO NOT EDIT. package codec import ( "errors" - "fmt" - "reflect" "runtime" + "strconv" ) const ( // ----- content types ---- - codecSelferC_UTF819781 = 1 - codecSelferC_RAW19781 = 0 + codecSelferCcUTF819781 = 1 + codecSelferCcRAW19781 = 0 // ----- value types used ---- - codecSelferValueTypeArray19781 = 10 - codecSelferValueTypeMap19781 = 9 - // ----- containerStateValues ---- - codecSelfer_containerMapKey19781 = 2 - codecSelfer_containerMapValue19781 = 3 - codecSelfer_containerMapEnd19781 = 4 - codecSelfer_containerArrayElem19781 = 6 - codecSelfer_containerArrayEnd19781 = 7 + codecSelferValueTypeArray19781 = 10 + codecSelferValueTypeMap19781 = 9 + codecSelferValueTypeString19781 = 6 + codecSelferValueTypeInt19781 = 2 + codecSelferValueTypeUint19781 = 3 + codecSelferValueTypeFloat19781 = 4 + codecSelferBitsize19781 = uint8(32 << (^uint(0) >> 63)) ) var ( - codecSelferBitsize19781 = uint8(reflect.TypeOf(uint(0)).Bits()) - codecSelferOnlyMapOrArrayEncodeToStructErr19781 = errors.New(`only encoded map or array can be decoded into a struct`) + errCodecSelferOnlyMapOrArrayEncodeToStruct19781 = errors.New(`only encoded map or array can be decoded into a struct`) ) type codecSelfer19781 struct{} @@ -39,9 +33,7 @@ type codecSelfer19781 struct{} func init() { if GenVersion != 8 { _, file, _, _ := runtime.Caller(0) - err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", - 8, GenVersion, file) - panic(err) + panic("codecgen version mismatch: current: 8, need " + strconv.FormatInt(int64(GenVersion), 10) + ". Re-generate file: " + file) } if false { // reference the types, but skip this branch at build/run time } @@ -54,27 +46,24 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x == nil { r.EncodeNil() } else { - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray _, _ = yysep2, yy2arr2 - const yyr2 bool = false + const yyr2 bool = false // struct tag has 'toArray' if yyr2 || yy2arr2 { - r.WriteArrayStart(574) + r.WriteArrayStart(576) } else { - r.WriteMapStart(574) + r.WriteMapStart(576) } if yyr2 || yy2arr2 { r.WriteArrayElem() if x.FIntf == nil { r.EncodeNil() } else { - yym4 := z.EncBinary() - _ = yym4 if false { } else { z.EncFallback(x.FIntf) @@ -82,13 +71,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FIntf")) + r.EncodeString(codecSelferCcUTF819781, `FIntf`) r.WriteMapElemValue() if x.FIntf == nil { r.EncodeNil() } else { - yym5 := z.EncBinary() - _ = yym5 if false { } else { z.EncFallback(x.FIntf) @@ -111,8 +98,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy7 := *x.FptrIntf - yym8 := z.EncBinary() - _ = yym8 if false { } else { z.EncFallback(yy7) @@ -121,7 +106,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrIntf`) r.WriteMapElemValue() if yyn6 { r.EncodeNil() @@ -130,8 +115,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy9 := *x.FptrIntf - yym10 := z.EncBinary() - _ = yym10 if false { } else { z.EncFallback(yy9) @@ -141,21 +124,17 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym12 := z.EncBinary() - _ = yym12 if false { } else { - r.EncodeString(codecSelferC_UTF819781, string(x.FString)) + r.EncodeString(codecSelferCcUTF819781, string(x.FString)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FString")) + r.EncodeString(codecSelferCcUTF819781, `FString`) r.WriteMapElemValue() - yym13 := z.EncBinary() - _ = yym13 if false { } else { - r.EncodeString(codecSelferC_UTF819781, string(x.FString)) + r.EncodeString(codecSelferCcUTF819781, string(x.FString)) } } var yyn14 bool @@ -174,17 +153,15 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy15 := *x.FptrString - yym16 := z.EncBinary() - _ = yym16 if false { } else { - r.EncodeString(codecSelferC_UTF819781, string(yy15)) + r.EncodeString(codecSelferCcUTF819781, string(yy15)) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrString")) + r.EncodeString(codecSelferCcUTF819781, `FptrString`) r.WriteMapElemValue() if yyn14 { r.EncodeNil() @@ -193,29 +170,23 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy17 := *x.FptrString - yym18 := z.EncBinary() - _ = yym18 if false { } else { - r.EncodeString(codecSelferC_UTF819781, string(yy17)) + r.EncodeString(codecSelferCcUTF819781, string(yy17)) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym20 := z.EncBinary() - _ = yym20 if false { } else { r.EncodeFloat32(float32(x.FFloat32)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FFloat32`) r.WriteMapElemValue() - yym21 := z.EncBinary() - _ = yym21 if false { } else { r.EncodeFloat32(float32(x.FFloat32)) @@ -237,8 +208,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy23 := *x.FptrFloat32 - yym24 := z.EncBinary() - _ = yym24 if false { } else { r.EncodeFloat32(float32(yy23)) @@ -247,7 +216,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrFloat32`) r.WriteMapElemValue() if yyn22 { r.EncodeNil() @@ -256,8 +225,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy25 := *x.FptrFloat32 - yym26 := z.EncBinary() - _ = yym26 if false { } else { r.EncodeFloat32(float32(yy25)) @@ -267,18 +234,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym28 := z.EncBinary() - _ = yym28 if false { } else { r.EncodeFloat64(float64(x.FFloat64)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FFloat64`) r.WriteMapElemValue() - yym29 := z.EncBinary() - _ = yym29 if false { } else { r.EncodeFloat64(float64(x.FFloat64)) @@ -300,8 +263,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy31 := *x.FptrFloat64 - yym32 := z.EncBinary() - _ = yym32 if false { } else { r.EncodeFloat64(float64(yy31)) @@ -310,7 +271,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrFloat64`) r.WriteMapElemValue() if yyn30 { r.EncodeNil() @@ -319,8 +280,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy33 := *x.FptrFloat64 - yym34 := z.EncBinary() - _ = yym34 if false { } else { r.EncodeFloat64(float64(yy33)) @@ -330,18 +289,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym36 := z.EncBinary() - _ = yym36 if false { } else { r.EncodeUint(uint64(x.FUint)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUint")) + r.EncodeString(codecSelferCcUTF819781, `FUint`) r.WriteMapElemValue() - yym37 := z.EncBinary() - _ = yym37 if false { } else { r.EncodeUint(uint64(x.FUint)) @@ -363,8 +318,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy39 := *x.FptrUint - yym40 := z.EncBinary() - _ = yym40 if false { } else { r.EncodeUint(uint64(yy39)) @@ -373,7 +326,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrUint`) r.WriteMapElemValue() if yyn38 { r.EncodeNil() @@ -382,8 +335,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy41 := *x.FptrUint - yym42 := z.EncBinary() - _ = yym42 if false { } else { r.EncodeUint(uint64(yy41)) @@ -393,18 +344,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym44 := z.EncBinary() - _ = yym44 if false { } else { r.EncodeUint(uint64(x.FUint8)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUint8")) + r.EncodeString(codecSelferCcUTF819781, `FUint8`) r.WriteMapElemValue() - yym45 := z.EncBinary() - _ = yym45 if false { } else { r.EncodeUint(uint64(x.FUint8)) @@ -426,8 +373,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy47 := *x.FptrUint8 - yym48 := z.EncBinary() - _ = yym48 if false { } else { r.EncodeUint(uint64(yy47)) @@ -436,7 +381,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrUint8`) r.WriteMapElemValue() if yyn46 { r.EncodeNil() @@ -445,8 +390,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy49 := *x.FptrUint8 - yym50 := z.EncBinary() - _ = yym50 if false { } else { r.EncodeUint(uint64(yy49)) @@ -456,18 +399,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym52 := z.EncBinary() - _ = yym52 if false { } else { r.EncodeUint(uint64(x.FUint16)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUint16")) + r.EncodeString(codecSelferCcUTF819781, `FUint16`) r.WriteMapElemValue() - yym53 := z.EncBinary() - _ = yym53 if false { } else { r.EncodeUint(uint64(x.FUint16)) @@ -489,8 +428,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy55 := *x.FptrUint16 - yym56 := z.EncBinary() - _ = yym56 if false { } else { r.EncodeUint(uint64(yy55)) @@ -499,7 +436,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrUint16`) r.WriteMapElemValue() if yyn54 { r.EncodeNil() @@ -508,8 +445,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy57 := *x.FptrUint16 - yym58 := z.EncBinary() - _ = yym58 if false { } else { r.EncodeUint(uint64(yy57)) @@ -519,18 +454,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym60 := z.EncBinary() - _ = yym60 if false { } else { r.EncodeUint(uint64(x.FUint32)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUint32")) + r.EncodeString(codecSelferCcUTF819781, `FUint32`) r.WriteMapElemValue() - yym61 := z.EncBinary() - _ = yym61 if false { } else { r.EncodeUint(uint64(x.FUint32)) @@ -552,8 +483,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy63 := *x.FptrUint32 - yym64 := z.EncBinary() - _ = yym64 if false { } else { r.EncodeUint(uint64(yy63)) @@ -562,7 +491,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrUint32`) r.WriteMapElemValue() if yyn62 { r.EncodeNil() @@ -571,8 +500,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy65 := *x.FptrUint32 - yym66 := z.EncBinary() - _ = yym66 if false { } else { r.EncodeUint(uint64(yy65)) @@ -582,18 +509,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym68 := z.EncBinary() - _ = yym68 if false { } else { r.EncodeUint(uint64(x.FUint64)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUint64")) + r.EncodeString(codecSelferCcUTF819781, `FUint64`) r.WriteMapElemValue() - yym69 := z.EncBinary() - _ = yym69 if false { } else { r.EncodeUint(uint64(x.FUint64)) @@ -615,8 +538,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy71 := *x.FptrUint64 - yym72 := z.EncBinary() - _ = yym72 if false { } else { r.EncodeUint(uint64(yy71)) @@ -625,7 +546,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrUint64`) r.WriteMapElemValue() if yyn70 { r.EncodeNil() @@ -634,8 +555,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy73 := *x.FptrUint64 - yym74 := z.EncBinary() - _ = yym74 if false { } else { r.EncodeUint(uint64(yy73)) @@ -645,18 +564,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym76 := z.EncBinary() - _ = yym76 if false { } else { r.EncodeUint(uint64(x.FUintptr)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FUintptr`) r.WriteMapElemValue() - yym77 := z.EncBinary() - _ = yym77 if false { } else { r.EncodeUint(uint64(x.FUintptr)) @@ -678,8 +593,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy79 := *x.FptrUintptr - yym80 := z.EncBinary() - _ = yym80 if false { } else { r.EncodeUint(uint64(yy79)) @@ -688,7 +601,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrUintptr`) r.WriteMapElemValue() if yyn78 { r.EncodeNil() @@ -697,8 +610,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy81 := *x.FptrUintptr - yym82 := z.EncBinary() - _ = yym82 if false { } else { r.EncodeUint(uint64(yy81)) @@ -708,18 +619,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym84 := z.EncBinary() - _ = yym84 if false { } else { r.EncodeInt(int64(x.FInt)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FInt")) + r.EncodeString(codecSelferCcUTF819781, `FInt`) r.WriteMapElemValue() - yym85 := z.EncBinary() - _ = yym85 if false { } else { r.EncodeInt(int64(x.FInt)) @@ -741,8 +648,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy87 := *x.FptrInt - yym88 := z.EncBinary() - _ = yym88 if false { } else { r.EncodeInt(int64(yy87)) @@ -751,7 +656,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrInt`) r.WriteMapElemValue() if yyn86 { r.EncodeNil() @@ -760,8 +665,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy89 := *x.FptrInt - yym90 := z.EncBinary() - _ = yym90 if false { } else { r.EncodeInt(int64(yy89)) @@ -771,18 +674,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym92 := z.EncBinary() - _ = yym92 if false { } else { r.EncodeInt(int64(x.FInt8)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FInt8")) + r.EncodeString(codecSelferCcUTF819781, `FInt8`) r.WriteMapElemValue() - yym93 := z.EncBinary() - _ = yym93 if false { } else { r.EncodeInt(int64(x.FInt8)) @@ -804,8 +703,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy95 := *x.FptrInt8 - yym96 := z.EncBinary() - _ = yym96 if false { } else { r.EncodeInt(int64(yy95)) @@ -814,7 +711,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrInt8`) r.WriteMapElemValue() if yyn94 { r.EncodeNil() @@ -823,8 +720,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy97 := *x.FptrInt8 - yym98 := z.EncBinary() - _ = yym98 if false { } else { r.EncodeInt(int64(yy97)) @@ -834,18 +729,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym100 := z.EncBinary() - _ = yym100 if false { } else { r.EncodeInt(int64(x.FInt16)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FInt16")) + r.EncodeString(codecSelferCcUTF819781, `FInt16`) r.WriteMapElemValue() - yym101 := z.EncBinary() - _ = yym101 if false { } else { r.EncodeInt(int64(x.FInt16)) @@ -867,8 +758,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy103 := *x.FptrInt16 - yym104 := z.EncBinary() - _ = yym104 if false { } else { r.EncodeInt(int64(yy103)) @@ -877,7 +766,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrInt16`) r.WriteMapElemValue() if yyn102 { r.EncodeNil() @@ -886,8 +775,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy105 := *x.FptrInt16 - yym106 := z.EncBinary() - _ = yym106 if false { } else { r.EncodeInt(int64(yy105)) @@ -897,18 +784,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym108 := z.EncBinary() - _ = yym108 if false { } else { r.EncodeInt(int64(x.FInt32)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FInt32")) + r.EncodeString(codecSelferCcUTF819781, `FInt32`) r.WriteMapElemValue() - yym109 := z.EncBinary() - _ = yym109 if false { } else { r.EncodeInt(int64(x.FInt32)) @@ -930,8 +813,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy111 := *x.FptrInt32 - yym112 := z.EncBinary() - _ = yym112 if false { } else { r.EncodeInt(int64(yy111)) @@ -940,7 +821,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrInt32`) r.WriteMapElemValue() if yyn110 { r.EncodeNil() @@ -949,8 +830,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy113 := *x.FptrInt32 - yym114 := z.EncBinary() - _ = yym114 if false { } else { r.EncodeInt(int64(yy113)) @@ -960,18 +839,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym116 := z.EncBinary() - _ = yym116 if false { } else { r.EncodeInt(int64(x.FInt64)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FInt64")) + r.EncodeString(codecSelferCcUTF819781, `FInt64`) r.WriteMapElemValue() - yym117 := z.EncBinary() - _ = yym117 if false { } else { r.EncodeInt(int64(x.FInt64)) @@ -993,8 +868,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy119 := *x.FptrInt64 - yym120 := z.EncBinary() - _ = yym120 if false { } else { r.EncodeInt(int64(yy119)) @@ -1003,7 +876,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrInt64`) r.WriteMapElemValue() if yyn118 { r.EncodeNil() @@ -1012,8 +885,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy121 := *x.FptrInt64 - yym122 := z.EncBinary() - _ = yym122 if false { } else { r.EncodeInt(int64(yy121)) @@ -1023,18 +894,14 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - yym124 := z.EncBinary() - _ = yym124 if false { } else { r.EncodeBool(bool(x.FBool)) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FBool")) + r.EncodeString(codecSelferCcUTF819781, `FBool`) r.WriteMapElemValue() - yym125 := z.EncBinary() - _ = yym125 if false { } else { r.EncodeBool(bool(x.FBool)) @@ -1056,8 +923,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy127 := *x.FptrBool - yym128 := z.EncBinary() - _ = yym128 if false { } else { r.EncodeBool(bool(yy127)) @@ -1066,7 +931,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrBool`) r.WriteMapElemValue() if yyn126 { r.EncodeNil() @@ -1075,8 +940,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy129 := *x.FptrBool - yym130 := z.EncBinary() - _ = yym130 if false { } else { r.EncodeBool(bool(yy129)) @@ -1089,8 +952,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x.FSliceIntf == nil { r.EncodeNil() } else { - yym132 := z.EncBinary() - _ = yym132 if false { } else { z.F.EncSliceIntfV(x.FSliceIntf, e) @@ -1098,13 +959,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceIntf")) + r.EncodeString(codecSelferCcUTF819781, `FSliceIntf`) r.WriteMapElemValue() if x.FSliceIntf == nil { r.EncodeNil() } else { - yym133 := z.EncBinary() - _ = yym133 if false { } else { z.F.EncSliceIntfV(x.FSliceIntf, e) @@ -1127,8 +986,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy135 := *x.FptrSliceIntf - yym136 := z.EncBinary() - _ = yym136 if false { } else { z.F.EncSliceIntfV(yy135, e) @@ -1137,7 +994,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceIntf`) r.WriteMapElemValue() if yyn134 { r.EncodeNil() @@ -1146,8 +1003,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy137 := *x.FptrSliceIntf - yym138 := z.EncBinary() - _ = yym138 if false { } else { z.F.EncSliceIntfV(yy137, e) @@ -1160,8 +1015,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x.FSliceString == nil { r.EncodeNil() } else { - yym140 := z.EncBinary() - _ = yym140 if false { } else { z.F.EncSliceStringV(x.FSliceString, e) @@ -1169,13 +1022,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceString")) + r.EncodeString(codecSelferCcUTF819781, `FSliceString`) r.WriteMapElemValue() if x.FSliceString == nil { r.EncodeNil() } else { - yym141 := z.EncBinary() - _ = yym141 if false { } else { z.F.EncSliceStringV(x.FSliceString, e) @@ -1198,8 +1049,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy143 := *x.FptrSliceString - yym144 := z.EncBinary() - _ = yym144 if false { } else { z.F.EncSliceStringV(yy143, e) @@ -1208,7 +1057,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceString")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceString`) r.WriteMapElemValue() if yyn142 { r.EncodeNil() @@ -1217,8 +1066,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy145 := *x.FptrSliceString - yym146 := z.EncBinary() - _ = yym146 if false { } else { z.F.EncSliceStringV(yy145, e) @@ -1231,8 +1078,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x.FSliceFloat32 == nil { r.EncodeNil() } else { - yym148 := z.EncBinary() - _ = yym148 if false { } else { z.F.EncSliceFloat32V(x.FSliceFloat32, e) @@ -1240,13 +1085,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FSliceFloat32`) r.WriteMapElemValue() if x.FSliceFloat32 == nil { r.EncodeNil() } else { - yym149 := z.EncBinary() - _ = yym149 if false { } else { z.F.EncSliceFloat32V(x.FSliceFloat32, e) @@ -1269,8 +1112,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy151 := *x.FptrSliceFloat32 - yym152 := z.EncBinary() - _ = yym152 if false { } else { z.F.EncSliceFloat32V(yy151, e) @@ -1279,7 +1120,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceFloat32`) r.WriteMapElemValue() if yyn150 { r.EncodeNil() @@ -1288,8 +1129,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy153 := *x.FptrSliceFloat32 - yym154 := z.EncBinary() - _ = yym154 if false { } else { z.F.EncSliceFloat32V(yy153, e) @@ -1302,8 +1141,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x.FSliceFloat64 == nil { r.EncodeNil() } else { - yym156 := z.EncBinary() - _ = yym156 if false { } else { z.F.EncSliceFloat64V(x.FSliceFloat64, e) @@ -1311,13 +1148,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FSliceFloat64`) r.WriteMapElemValue() if x.FSliceFloat64 == nil { r.EncodeNil() } else { - yym157 := z.EncBinary() - _ = yym157 if false { } else { z.F.EncSliceFloat64V(x.FSliceFloat64, e) @@ -1340,8 +1175,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy159 := *x.FptrSliceFloat64 - yym160 := z.EncBinary() - _ = yym160 if false { } else { z.F.EncSliceFloat64V(yy159, e) @@ -1350,7 +1183,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceFloat64`) r.WriteMapElemValue() if yyn158 { r.EncodeNil() @@ -1359,8 +1192,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy161 := *x.FptrSliceFloat64 - yym162 := z.EncBinary() - _ = yym162 if false { } else { z.F.EncSliceFloat64V(yy161, e) @@ -1373,8 +1204,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { if x.FSliceUint == nil { r.EncodeNil() } else { - yym164 := z.EncBinary() - _ = yym164 if false { } else { z.F.EncSliceUintV(x.FSliceUint, e) @@ -1382,13 +1211,11 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceUint")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUint`) r.WriteMapElemValue() if x.FSliceUint == nil { r.EncodeNil() } else { - yym165 := z.EncBinary() - _ = yym165 if false { } else { z.F.EncSliceUintV(x.FSliceUint, e) @@ -1411,8 +1238,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy167 := *x.FptrSliceUint - yym168 := z.EncBinary() - _ = yym168 if false { } else { z.F.EncSliceUintV(yy167, e) @@ -1421,7 +1246,7 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUint`) r.WriteMapElemValue() if yyn166 { r.EncodeNil() @@ -1430,8 +1255,6 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { yy169 := *x.FptrSliceUint - yym170 := z.EncBinary() - _ = yym170 if false { } else { z.F.EncSliceUintV(yy169, e) @@ -1441,33 +1264,29 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceUint16 == nil { + if x.FSliceUint8 == nil { r.EncodeNil() } else { - yym172 := z.EncBinary() - _ = yym172 if false { } else { - z.F.EncSliceUint16V(x.FSliceUint16, e) + r.EncodeStringBytes(codecSelferCcRAW19781, []byte(x.FSliceUint8)) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceUint16")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUint8`) r.WriteMapElemValue() - if x.FSliceUint16 == nil { + if x.FSliceUint8 == nil { r.EncodeNil() } else { - yym173 := z.EncBinary() - _ = yym173 if false { } else { - z.F.EncSliceUint16V(x.FSliceUint16, e) + r.EncodeStringBytes(codecSelferCcRAW19781, []byte(x.FSliceUint8)) } } } var yyn174 bool - if x.FptrSliceUint16 == nil { + if x.FptrSliceUint8 == nil { yyn174 = true goto LABEL174 } @@ -1478,67 +1297,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceUint16 == nil { + if x.FptrSliceUint8 == nil { r.EncodeNil() } else { - yy175 := *x.FptrSliceUint16 - yym176 := z.EncBinary() - _ = yym176 + yy175 := *x.FptrSliceUint8 if false { } else { - z.F.EncSliceUint16V(yy175, e) + r.EncodeStringBytes(codecSelferCcRAW19781, []byte(yy175)) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUint8`) r.WriteMapElemValue() if yyn174 { r.EncodeNil() } else { - if x.FptrSliceUint16 == nil { + if x.FptrSliceUint8 == nil { r.EncodeNil() } else { - yy177 := *x.FptrSliceUint16 - yym178 := z.EncBinary() - _ = yym178 + yy177 := *x.FptrSliceUint8 if false { } else { - z.F.EncSliceUint16V(yy177, e) + r.EncodeStringBytes(codecSelferCcRAW19781, []byte(yy177)) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceUint32 == nil { + if x.FSliceUint16 == nil { r.EncodeNil() } else { - yym180 := z.EncBinary() - _ = yym180 if false { } else { - z.F.EncSliceUint32V(x.FSliceUint32, e) + z.F.EncSliceUint16V(x.FSliceUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceUint32")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUint16`) r.WriteMapElemValue() - if x.FSliceUint32 == nil { + if x.FSliceUint16 == nil { r.EncodeNil() } else { - yym181 := z.EncBinary() - _ = yym181 if false { } else { - z.F.EncSliceUint32V(x.FSliceUint32, e) + z.F.EncSliceUint16V(x.FSliceUint16, e) } } } var yyn182 bool - if x.FptrSliceUint32 == nil { + if x.FptrSliceUint16 == nil { yyn182 = true goto LABEL182 } @@ -1549,67 +1360,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceUint32 == nil { + if x.FptrSliceUint16 == nil { r.EncodeNil() } else { - yy183 := *x.FptrSliceUint32 - yym184 := z.EncBinary() - _ = yym184 + yy183 := *x.FptrSliceUint16 if false { } else { - z.F.EncSliceUint32V(yy183, e) + z.F.EncSliceUint16V(yy183, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUint16`) r.WriteMapElemValue() if yyn182 { r.EncodeNil() } else { - if x.FptrSliceUint32 == nil { + if x.FptrSliceUint16 == nil { r.EncodeNil() } else { - yy185 := *x.FptrSliceUint32 - yym186 := z.EncBinary() - _ = yym186 + yy185 := *x.FptrSliceUint16 if false { } else { - z.F.EncSliceUint32V(yy185, e) + z.F.EncSliceUint16V(yy185, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceUint64 == nil { + if x.FSliceUint32 == nil { r.EncodeNil() } else { - yym188 := z.EncBinary() - _ = yym188 if false { } else { - z.F.EncSliceUint64V(x.FSliceUint64, e) + z.F.EncSliceUint32V(x.FSliceUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceUint64")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUint32`) r.WriteMapElemValue() - if x.FSliceUint64 == nil { + if x.FSliceUint32 == nil { r.EncodeNil() } else { - yym189 := z.EncBinary() - _ = yym189 if false { } else { - z.F.EncSliceUint64V(x.FSliceUint64, e) + z.F.EncSliceUint32V(x.FSliceUint32, e) } } } var yyn190 bool - if x.FptrSliceUint64 == nil { + if x.FptrSliceUint32 == nil { yyn190 = true goto LABEL190 } @@ -1620,67 +1423,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceUint64 == nil { + if x.FptrSliceUint32 == nil { r.EncodeNil() } else { - yy191 := *x.FptrSliceUint64 - yym192 := z.EncBinary() - _ = yym192 + yy191 := *x.FptrSliceUint32 if false { } else { - z.F.EncSliceUint64V(yy191, e) + z.F.EncSliceUint32V(yy191, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUint32`) r.WriteMapElemValue() if yyn190 { r.EncodeNil() } else { - if x.FptrSliceUint64 == nil { + if x.FptrSliceUint32 == nil { r.EncodeNil() } else { - yy193 := *x.FptrSliceUint64 - yym194 := z.EncBinary() - _ = yym194 + yy193 := *x.FptrSliceUint32 if false { } else { - z.F.EncSliceUint64V(yy193, e) + z.F.EncSliceUint32V(yy193, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceUintptr == nil { + if x.FSliceUint64 == nil { r.EncodeNil() } else { - yym196 := z.EncBinary() - _ = yym196 if false { } else { - z.F.EncSliceUintptrV(x.FSliceUintptr, e) + z.F.EncSliceUint64V(x.FSliceUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUint64`) r.WriteMapElemValue() - if x.FSliceUintptr == nil { + if x.FSliceUint64 == nil { r.EncodeNil() } else { - yym197 := z.EncBinary() - _ = yym197 if false { } else { - z.F.EncSliceUintptrV(x.FSliceUintptr, e) + z.F.EncSliceUint64V(x.FSliceUint64, e) } } } var yyn198 bool - if x.FptrSliceUintptr == nil { + if x.FptrSliceUint64 == nil { yyn198 = true goto LABEL198 } @@ -1691,67 +1486,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceUintptr == nil { + if x.FptrSliceUint64 == nil { r.EncodeNil() } else { - yy199 := *x.FptrSliceUintptr - yym200 := z.EncBinary() - _ = yym200 + yy199 := *x.FptrSliceUint64 if false { } else { - z.F.EncSliceUintptrV(yy199, e) + z.F.EncSliceUint64V(yy199, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUint64`) r.WriteMapElemValue() if yyn198 { r.EncodeNil() } else { - if x.FptrSliceUintptr == nil { + if x.FptrSliceUint64 == nil { r.EncodeNil() } else { - yy201 := *x.FptrSliceUintptr - yym202 := z.EncBinary() - _ = yym202 + yy201 := *x.FptrSliceUint64 if false { } else { - z.F.EncSliceUintptrV(yy201, e) + z.F.EncSliceUint64V(yy201, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceInt == nil { + if x.FSliceUintptr == nil { r.EncodeNil() } else { - yym204 := z.EncBinary() - _ = yym204 if false { } else { - z.F.EncSliceIntV(x.FSliceInt, e) + z.F.EncSliceUintptrV(x.FSliceUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceInt")) + r.EncodeString(codecSelferCcUTF819781, `FSliceUintptr`) r.WriteMapElemValue() - if x.FSliceInt == nil { + if x.FSliceUintptr == nil { r.EncodeNil() } else { - yym205 := z.EncBinary() - _ = yym205 if false { } else { - z.F.EncSliceIntV(x.FSliceInt, e) + z.F.EncSliceUintptrV(x.FSliceUintptr, e) } } } var yyn206 bool - if x.FptrSliceInt == nil { + if x.FptrSliceUintptr == nil { yyn206 = true goto LABEL206 } @@ -1762,67 +1549,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceInt == nil { + if x.FptrSliceUintptr == nil { r.EncodeNil() } else { - yy207 := *x.FptrSliceInt - yym208 := z.EncBinary() - _ = yym208 + yy207 := *x.FptrSliceUintptr if false { } else { - z.F.EncSliceIntV(yy207, e) + z.F.EncSliceUintptrV(yy207, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceUintptr`) r.WriteMapElemValue() if yyn206 { r.EncodeNil() } else { - if x.FptrSliceInt == nil { + if x.FptrSliceUintptr == nil { r.EncodeNil() } else { - yy209 := *x.FptrSliceInt - yym210 := z.EncBinary() - _ = yym210 + yy209 := *x.FptrSliceUintptr if false { } else { - z.F.EncSliceIntV(yy209, e) + z.F.EncSliceUintptrV(yy209, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceInt8 == nil { + if x.FSliceInt == nil { r.EncodeNil() } else { - yym212 := z.EncBinary() - _ = yym212 if false { } else { - z.F.EncSliceInt8V(x.FSliceInt8, e) + z.F.EncSliceIntV(x.FSliceInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceInt8")) + r.EncodeString(codecSelferCcUTF819781, `FSliceInt`) r.WriteMapElemValue() - if x.FSliceInt8 == nil { + if x.FSliceInt == nil { r.EncodeNil() } else { - yym213 := z.EncBinary() - _ = yym213 if false { } else { - z.F.EncSliceInt8V(x.FSliceInt8, e) + z.F.EncSliceIntV(x.FSliceInt, e) } } } var yyn214 bool - if x.FptrSliceInt8 == nil { + if x.FptrSliceInt == nil { yyn214 = true goto LABEL214 } @@ -1833,67 +1612,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceInt8 == nil { + if x.FptrSliceInt == nil { r.EncodeNil() } else { - yy215 := *x.FptrSliceInt8 - yym216 := z.EncBinary() - _ = yym216 + yy215 := *x.FptrSliceInt if false { } else { - z.F.EncSliceInt8V(yy215, e) + z.F.EncSliceIntV(yy215, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceInt`) r.WriteMapElemValue() if yyn214 { r.EncodeNil() } else { - if x.FptrSliceInt8 == nil { + if x.FptrSliceInt == nil { r.EncodeNil() } else { - yy217 := *x.FptrSliceInt8 - yym218 := z.EncBinary() - _ = yym218 + yy217 := *x.FptrSliceInt if false { } else { - z.F.EncSliceInt8V(yy217, e) + z.F.EncSliceIntV(yy217, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceInt16 == nil { + if x.FSliceInt8 == nil { r.EncodeNil() } else { - yym220 := z.EncBinary() - _ = yym220 if false { } else { - z.F.EncSliceInt16V(x.FSliceInt16, e) + z.F.EncSliceInt8V(x.FSliceInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceInt16")) + r.EncodeString(codecSelferCcUTF819781, `FSliceInt8`) r.WriteMapElemValue() - if x.FSliceInt16 == nil { + if x.FSliceInt8 == nil { r.EncodeNil() } else { - yym221 := z.EncBinary() - _ = yym221 if false { } else { - z.F.EncSliceInt16V(x.FSliceInt16, e) + z.F.EncSliceInt8V(x.FSliceInt8, e) } } } var yyn222 bool - if x.FptrSliceInt16 == nil { + if x.FptrSliceInt8 == nil { yyn222 = true goto LABEL222 } @@ -1904,67 +1675,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceInt16 == nil { + if x.FptrSliceInt8 == nil { r.EncodeNil() } else { - yy223 := *x.FptrSliceInt16 - yym224 := z.EncBinary() - _ = yym224 + yy223 := *x.FptrSliceInt8 if false { } else { - z.F.EncSliceInt16V(yy223, e) + z.F.EncSliceInt8V(yy223, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceInt8`) r.WriteMapElemValue() if yyn222 { r.EncodeNil() } else { - if x.FptrSliceInt16 == nil { + if x.FptrSliceInt8 == nil { r.EncodeNil() } else { - yy225 := *x.FptrSliceInt16 - yym226 := z.EncBinary() - _ = yym226 + yy225 := *x.FptrSliceInt8 if false { } else { - z.F.EncSliceInt16V(yy225, e) + z.F.EncSliceInt8V(yy225, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceInt32 == nil { + if x.FSliceInt16 == nil { r.EncodeNil() } else { - yym228 := z.EncBinary() - _ = yym228 if false { } else { - z.F.EncSliceInt32V(x.FSliceInt32, e) + z.F.EncSliceInt16V(x.FSliceInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceInt32")) + r.EncodeString(codecSelferCcUTF819781, `FSliceInt16`) r.WriteMapElemValue() - if x.FSliceInt32 == nil { + if x.FSliceInt16 == nil { r.EncodeNil() } else { - yym229 := z.EncBinary() - _ = yym229 if false { } else { - z.F.EncSliceInt32V(x.FSliceInt32, e) + z.F.EncSliceInt16V(x.FSliceInt16, e) } } } var yyn230 bool - if x.FptrSliceInt32 == nil { + if x.FptrSliceInt16 == nil { yyn230 = true goto LABEL230 } @@ -1975,67 +1738,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceInt32 == nil { + if x.FptrSliceInt16 == nil { r.EncodeNil() } else { - yy231 := *x.FptrSliceInt32 - yym232 := z.EncBinary() - _ = yym232 + yy231 := *x.FptrSliceInt16 if false { } else { - z.F.EncSliceInt32V(yy231, e) + z.F.EncSliceInt16V(yy231, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceInt16`) r.WriteMapElemValue() if yyn230 { r.EncodeNil() } else { - if x.FptrSliceInt32 == nil { + if x.FptrSliceInt16 == nil { r.EncodeNil() } else { - yy233 := *x.FptrSliceInt32 - yym234 := z.EncBinary() - _ = yym234 + yy233 := *x.FptrSliceInt16 if false { } else { - z.F.EncSliceInt32V(yy233, e) + z.F.EncSliceInt16V(yy233, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceInt64 == nil { + if x.FSliceInt32 == nil { r.EncodeNil() } else { - yym236 := z.EncBinary() - _ = yym236 if false { } else { - z.F.EncSliceInt64V(x.FSliceInt64, e) + z.F.EncSliceInt32V(x.FSliceInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceInt64")) + r.EncodeString(codecSelferCcUTF819781, `FSliceInt32`) r.WriteMapElemValue() - if x.FSliceInt64 == nil { + if x.FSliceInt32 == nil { r.EncodeNil() } else { - yym237 := z.EncBinary() - _ = yym237 if false { } else { - z.F.EncSliceInt64V(x.FSliceInt64, e) + z.F.EncSliceInt32V(x.FSliceInt32, e) } } } var yyn238 bool - if x.FptrSliceInt64 == nil { + if x.FptrSliceInt32 == nil { yyn238 = true goto LABEL238 } @@ -2046,67 +1801,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceInt64 == nil { + if x.FptrSliceInt32 == nil { r.EncodeNil() } else { - yy239 := *x.FptrSliceInt64 - yym240 := z.EncBinary() - _ = yym240 + yy239 := *x.FptrSliceInt32 if false { } else { - z.F.EncSliceInt64V(yy239, e) + z.F.EncSliceInt32V(yy239, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceInt32`) r.WriteMapElemValue() if yyn238 { r.EncodeNil() } else { - if x.FptrSliceInt64 == nil { + if x.FptrSliceInt32 == nil { r.EncodeNil() } else { - yy241 := *x.FptrSliceInt64 - yym242 := z.EncBinary() - _ = yym242 + yy241 := *x.FptrSliceInt32 if false { } else { - z.F.EncSliceInt64V(yy241, e) + z.F.EncSliceInt32V(yy241, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FSliceBool == nil { + if x.FSliceInt64 == nil { r.EncodeNil() } else { - yym244 := z.EncBinary() - _ = yym244 if false { } else { - z.F.EncSliceBoolV(x.FSliceBool, e) + z.F.EncSliceInt64V(x.FSliceInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FSliceBool")) + r.EncodeString(codecSelferCcUTF819781, `FSliceInt64`) r.WriteMapElemValue() - if x.FSliceBool == nil { + if x.FSliceInt64 == nil { r.EncodeNil() } else { - yym245 := z.EncBinary() - _ = yym245 if false { } else { - z.F.EncSliceBoolV(x.FSliceBool, e) + z.F.EncSliceInt64V(x.FSliceInt64, e) } } } var yyn246 bool - if x.FptrSliceBool == nil { + if x.FptrSliceInt64 == nil { yyn246 = true goto LABEL246 } @@ -2117,67 +1864,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrSliceBool == nil { + if x.FptrSliceInt64 == nil { r.EncodeNil() } else { - yy247 := *x.FptrSliceBool - yym248 := z.EncBinary() - _ = yym248 + yy247 := *x.FptrSliceInt64 if false { } else { - z.F.EncSliceBoolV(yy247, e) + z.F.EncSliceInt64V(yy247, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrSliceBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceInt64`) r.WriteMapElemValue() if yyn246 { r.EncodeNil() } else { - if x.FptrSliceBool == nil { + if x.FptrSliceInt64 == nil { r.EncodeNil() } else { - yy249 := *x.FptrSliceBool - yym250 := z.EncBinary() - _ = yym250 + yy249 := *x.FptrSliceInt64 if false { } else { - z.F.EncSliceBoolV(yy249, e) + z.F.EncSliceInt64V(yy249, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfIntf == nil { + if x.FSliceBool == nil { r.EncodeNil() } else { - yym252 := z.EncBinary() - _ = yym252 if false { } else { - z.F.EncMapIntfIntfV(x.FMapIntfIntf, e) + z.F.EncSliceBoolV(x.FSliceBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfIntf")) + r.EncodeString(codecSelferCcUTF819781, `FSliceBool`) r.WriteMapElemValue() - if x.FMapIntfIntf == nil { + if x.FSliceBool == nil { r.EncodeNil() } else { - yym253 := z.EncBinary() - _ = yym253 if false { } else { - z.F.EncMapIntfIntfV(x.FMapIntfIntf, e) + z.F.EncSliceBoolV(x.FSliceBool, e) } } } var yyn254 bool - if x.FptrMapIntfIntf == nil { + if x.FptrSliceBool == nil { yyn254 = true goto LABEL254 } @@ -2188,67 +1927,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfIntf == nil { + if x.FptrSliceBool == nil { r.EncodeNil() } else { - yy255 := *x.FptrMapIntfIntf - yym256 := z.EncBinary() - _ = yym256 + yy255 := *x.FptrSliceBool if false { } else { - z.F.EncMapIntfIntfV(yy255, e) + z.F.EncSliceBoolV(yy255, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrSliceBool`) r.WriteMapElemValue() if yyn254 { r.EncodeNil() } else { - if x.FptrMapIntfIntf == nil { + if x.FptrSliceBool == nil { r.EncodeNil() } else { - yy257 := *x.FptrMapIntfIntf - yym258 := z.EncBinary() - _ = yym258 + yy257 := *x.FptrSliceBool if false { } else { - z.F.EncMapIntfIntfV(yy257, e) + z.F.EncSliceBoolV(yy257, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfString == nil { + if x.FMapIntfIntf == nil { r.EncodeNil() } else { - yym260 := z.EncBinary() - _ = yym260 if false { } else { - z.F.EncMapIntfStringV(x.FMapIntfString, e) + z.F.EncMapIntfIntfV(x.FMapIntfIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfString")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfIntf`) r.WriteMapElemValue() - if x.FMapIntfString == nil { + if x.FMapIntfIntf == nil { r.EncodeNil() } else { - yym261 := z.EncBinary() - _ = yym261 if false { } else { - z.F.EncMapIntfStringV(x.FMapIntfString, e) + z.F.EncMapIntfIntfV(x.FMapIntfIntf, e) } } } var yyn262 bool - if x.FptrMapIntfString == nil { + if x.FptrMapIntfIntf == nil { yyn262 = true goto LABEL262 } @@ -2259,67 +1990,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfString == nil { + if x.FptrMapIntfIntf == nil { r.EncodeNil() } else { - yy263 := *x.FptrMapIntfString - yym264 := z.EncBinary() - _ = yym264 + yy263 := *x.FptrMapIntfIntf if false { } else { - z.F.EncMapIntfStringV(yy263, e) + z.F.EncMapIntfIntfV(yy263, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfIntf`) r.WriteMapElemValue() if yyn262 { r.EncodeNil() } else { - if x.FptrMapIntfString == nil { + if x.FptrMapIntfIntf == nil { r.EncodeNil() } else { - yy265 := *x.FptrMapIntfString - yym266 := z.EncBinary() - _ = yym266 + yy265 := *x.FptrMapIntfIntf if false { } else { - z.F.EncMapIntfStringV(yy265, e) + z.F.EncMapIntfIntfV(yy265, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUint == nil { + if x.FMapIntfString == nil { r.EncodeNil() } else { - yym268 := z.EncBinary() - _ = yym268 if false { } else { - z.F.EncMapIntfUintV(x.FMapIntfUint, e) + z.F.EncMapIntfStringV(x.FMapIntfString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfString`) r.WriteMapElemValue() - if x.FMapIntfUint == nil { + if x.FMapIntfString == nil { r.EncodeNil() } else { - yym269 := z.EncBinary() - _ = yym269 if false { } else { - z.F.EncMapIntfUintV(x.FMapIntfUint, e) + z.F.EncMapIntfStringV(x.FMapIntfString, e) } } } var yyn270 bool - if x.FptrMapIntfUint == nil { + if x.FptrMapIntfString == nil { yyn270 = true goto LABEL270 } @@ -2330,67 +2053,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUint == nil { + if x.FptrMapIntfString == nil { r.EncodeNil() } else { - yy271 := *x.FptrMapIntfUint - yym272 := z.EncBinary() - _ = yym272 + yy271 := *x.FptrMapIntfString if false { } else { - z.F.EncMapIntfUintV(yy271, e) + z.F.EncMapIntfStringV(yy271, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfString`) r.WriteMapElemValue() if yyn270 { r.EncodeNil() } else { - if x.FptrMapIntfUint == nil { + if x.FptrMapIntfString == nil { r.EncodeNil() } else { - yy273 := *x.FptrMapIntfUint - yym274 := z.EncBinary() - _ = yym274 + yy273 := *x.FptrMapIntfString if false { } else { - z.F.EncMapIntfUintV(yy273, e) + z.F.EncMapIntfStringV(yy273, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUint8 == nil { + if x.FMapIntfUint == nil { r.EncodeNil() } else { - yym276 := z.EncBinary() - _ = yym276 if false { } else { - z.F.EncMapIntfUint8V(x.FMapIntfUint8, e) + z.F.EncMapIntfUintV(x.FMapIntfUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUint`) r.WriteMapElemValue() - if x.FMapIntfUint8 == nil { + if x.FMapIntfUint == nil { r.EncodeNil() } else { - yym277 := z.EncBinary() - _ = yym277 if false { } else { - z.F.EncMapIntfUint8V(x.FMapIntfUint8, e) + z.F.EncMapIntfUintV(x.FMapIntfUint, e) } } } var yyn278 bool - if x.FptrMapIntfUint8 == nil { + if x.FptrMapIntfUint == nil { yyn278 = true goto LABEL278 } @@ -2401,67 +2116,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUint8 == nil { + if x.FptrMapIntfUint == nil { r.EncodeNil() } else { - yy279 := *x.FptrMapIntfUint8 - yym280 := z.EncBinary() - _ = yym280 + yy279 := *x.FptrMapIntfUint if false { } else { - z.F.EncMapIntfUint8V(yy279, e) + z.F.EncMapIntfUintV(yy279, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUint`) r.WriteMapElemValue() if yyn278 { r.EncodeNil() } else { - if x.FptrMapIntfUint8 == nil { + if x.FptrMapIntfUint == nil { r.EncodeNil() } else { - yy281 := *x.FptrMapIntfUint8 - yym282 := z.EncBinary() - _ = yym282 + yy281 := *x.FptrMapIntfUint if false { } else { - z.F.EncMapIntfUint8V(yy281, e) + z.F.EncMapIntfUintV(yy281, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUint16 == nil { + if x.FMapIntfUint8 == nil { r.EncodeNil() } else { - yym284 := z.EncBinary() - _ = yym284 if false { } else { - z.F.EncMapIntfUint16V(x.FMapIntfUint16, e) + z.F.EncMapIntfUint8V(x.FMapIntfUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUint8`) r.WriteMapElemValue() - if x.FMapIntfUint16 == nil { + if x.FMapIntfUint8 == nil { r.EncodeNil() } else { - yym285 := z.EncBinary() - _ = yym285 if false { } else { - z.F.EncMapIntfUint16V(x.FMapIntfUint16, e) + z.F.EncMapIntfUint8V(x.FMapIntfUint8, e) } } } var yyn286 bool - if x.FptrMapIntfUint16 == nil { + if x.FptrMapIntfUint8 == nil { yyn286 = true goto LABEL286 } @@ -2472,67 +2179,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUint16 == nil { + if x.FptrMapIntfUint8 == nil { r.EncodeNil() } else { - yy287 := *x.FptrMapIntfUint16 - yym288 := z.EncBinary() - _ = yym288 + yy287 := *x.FptrMapIntfUint8 if false { } else { - z.F.EncMapIntfUint16V(yy287, e) + z.F.EncMapIntfUint8V(yy287, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUint8`) r.WriteMapElemValue() if yyn286 { r.EncodeNil() } else { - if x.FptrMapIntfUint16 == nil { + if x.FptrMapIntfUint8 == nil { r.EncodeNil() } else { - yy289 := *x.FptrMapIntfUint16 - yym290 := z.EncBinary() - _ = yym290 + yy289 := *x.FptrMapIntfUint8 if false { } else { - z.F.EncMapIntfUint16V(yy289, e) + z.F.EncMapIntfUint8V(yy289, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUint32 == nil { + if x.FMapIntfUint16 == nil { r.EncodeNil() } else { - yym292 := z.EncBinary() - _ = yym292 if false { } else { - z.F.EncMapIntfUint32V(x.FMapIntfUint32, e) + z.F.EncMapIntfUint16V(x.FMapIntfUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUint16`) r.WriteMapElemValue() - if x.FMapIntfUint32 == nil { + if x.FMapIntfUint16 == nil { r.EncodeNil() } else { - yym293 := z.EncBinary() - _ = yym293 if false { } else { - z.F.EncMapIntfUint32V(x.FMapIntfUint32, e) + z.F.EncMapIntfUint16V(x.FMapIntfUint16, e) } } } var yyn294 bool - if x.FptrMapIntfUint32 == nil { + if x.FptrMapIntfUint16 == nil { yyn294 = true goto LABEL294 } @@ -2543,67 +2242,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUint32 == nil { + if x.FptrMapIntfUint16 == nil { r.EncodeNil() } else { - yy295 := *x.FptrMapIntfUint32 - yym296 := z.EncBinary() - _ = yym296 + yy295 := *x.FptrMapIntfUint16 if false { } else { - z.F.EncMapIntfUint32V(yy295, e) + z.F.EncMapIntfUint16V(yy295, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUint16`) r.WriteMapElemValue() if yyn294 { r.EncodeNil() } else { - if x.FptrMapIntfUint32 == nil { + if x.FptrMapIntfUint16 == nil { r.EncodeNil() } else { - yy297 := *x.FptrMapIntfUint32 - yym298 := z.EncBinary() - _ = yym298 + yy297 := *x.FptrMapIntfUint16 if false { } else { - z.F.EncMapIntfUint32V(yy297, e) + z.F.EncMapIntfUint16V(yy297, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUint64 == nil { + if x.FMapIntfUint32 == nil { r.EncodeNil() } else { - yym300 := z.EncBinary() - _ = yym300 if false { } else { - z.F.EncMapIntfUint64V(x.FMapIntfUint64, e) + z.F.EncMapIntfUint32V(x.FMapIntfUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUint32`) r.WriteMapElemValue() - if x.FMapIntfUint64 == nil { + if x.FMapIntfUint32 == nil { r.EncodeNil() } else { - yym301 := z.EncBinary() - _ = yym301 if false { } else { - z.F.EncMapIntfUint64V(x.FMapIntfUint64, e) + z.F.EncMapIntfUint32V(x.FMapIntfUint32, e) } } } var yyn302 bool - if x.FptrMapIntfUint64 == nil { + if x.FptrMapIntfUint32 == nil { yyn302 = true goto LABEL302 } @@ -2614,67 +2305,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUint64 == nil { + if x.FptrMapIntfUint32 == nil { r.EncodeNil() } else { - yy303 := *x.FptrMapIntfUint64 - yym304 := z.EncBinary() - _ = yym304 + yy303 := *x.FptrMapIntfUint32 if false { } else { - z.F.EncMapIntfUint64V(yy303, e) + z.F.EncMapIntfUint32V(yy303, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUint32`) r.WriteMapElemValue() if yyn302 { r.EncodeNil() } else { - if x.FptrMapIntfUint64 == nil { + if x.FptrMapIntfUint32 == nil { r.EncodeNil() } else { - yy305 := *x.FptrMapIntfUint64 - yym306 := z.EncBinary() - _ = yym306 + yy305 := *x.FptrMapIntfUint32 if false { } else { - z.F.EncMapIntfUint64V(yy305, e) + z.F.EncMapIntfUint32V(yy305, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfUintptr == nil { + if x.FMapIntfUint64 == nil { r.EncodeNil() } else { - yym308 := z.EncBinary() - _ = yym308 if false { } else { - z.F.EncMapIntfUintptrV(x.FMapIntfUintptr, e) + z.F.EncMapIntfUint64V(x.FMapIntfUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUint64`) r.WriteMapElemValue() - if x.FMapIntfUintptr == nil { + if x.FMapIntfUint64 == nil { r.EncodeNil() } else { - yym309 := z.EncBinary() - _ = yym309 if false { } else { - z.F.EncMapIntfUintptrV(x.FMapIntfUintptr, e) + z.F.EncMapIntfUint64V(x.FMapIntfUint64, e) } } } var yyn310 bool - if x.FptrMapIntfUintptr == nil { + if x.FptrMapIntfUint64 == nil { yyn310 = true goto LABEL310 } @@ -2685,67 +2368,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfUintptr == nil { + if x.FptrMapIntfUint64 == nil { r.EncodeNil() } else { - yy311 := *x.FptrMapIntfUintptr - yym312 := z.EncBinary() - _ = yym312 + yy311 := *x.FptrMapIntfUint64 if false { } else { - z.F.EncMapIntfUintptrV(yy311, e) + z.F.EncMapIntfUint64V(yy311, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUint64`) r.WriteMapElemValue() if yyn310 { r.EncodeNil() } else { - if x.FptrMapIntfUintptr == nil { + if x.FptrMapIntfUint64 == nil { r.EncodeNil() } else { - yy313 := *x.FptrMapIntfUintptr - yym314 := z.EncBinary() - _ = yym314 + yy313 := *x.FptrMapIntfUint64 if false { } else { - z.F.EncMapIntfUintptrV(yy313, e) + z.F.EncMapIntfUint64V(yy313, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfInt == nil { + if x.FMapIntfUintptr == nil { r.EncodeNil() } else { - yym316 := z.EncBinary() - _ = yym316 if false { } else { - z.F.EncMapIntfIntV(x.FMapIntfInt, e) + z.F.EncMapIntfUintptrV(x.FMapIntfUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfUintptr`) r.WriteMapElemValue() - if x.FMapIntfInt == nil { + if x.FMapIntfUintptr == nil { r.EncodeNil() } else { - yym317 := z.EncBinary() - _ = yym317 if false { } else { - z.F.EncMapIntfIntV(x.FMapIntfInt, e) + z.F.EncMapIntfUintptrV(x.FMapIntfUintptr, e) } } } var yyn318 bool - if x.FptrMapIntfInt == nil { + if x.FptrMapIntfUintptr == nil { yyn318 = true goto LABEL318 } @@ -2756,67 +2431,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfInt == nil { + if x.FptrMapIntfUintptr == nil { r.EncodeNil() } else { - yy319 := *x.FptrMapIntfInt - yym320 := z.EncBinary() - _ = yym320 + yy319 := *x.FptrMapIntfUintptr if false { } else { - z.F.EncMapIntfIntV(yy319, e) + z.F.EncMapIntfUintptrV(yy319, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfUintptr`) r.WriteMapElemValue() if yyn318 { r.EncodeNil() } else { - if x.FptrMapIntfInt == nil { + if x.FptrMapIntfUintptr == nil { r.EncodeNil() } else { - yy321 := *x.FptrMapIntfInt - yym322 := z.EncBinary() - _ = yym322 + yy321 := *x.FptrMapIntfUintptr if false { } else { - z.F.EncMapIntfIntV(yy321, e) + z.F.EncMapIntfUintptrV(yy321, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfInt8 == nil { + if x.FMapIntfInt == nil { r.EncodeNil() } else { - yym324 := z.EncBinary() - _ = yym324 if false { } else { - z.F.EncMapIntfInt8V(x.FMapIntfInt8, e) + z.F.EncMapIntfIntV(x.FMapIntfInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfInt`) r.WriteMapElemValue() - if x.FMapIntfInt8 == nil { + if x.FMapIntfInt == nil { r.EncodeNil() } else { - yym325 := z.EncBinary() - _ = yym325 if false { } else { - z.F.EncMapIntfInt8V(x.FMapIntfInt8, e) + z.F.EncMapIntfIntV(x.FMapIntfInt, e) } } } var yyn326 bool - if x.FptrMapIntfInt8 == nil { + if x.FptrMapIntfInt == nil { yyn326 = true goto LABEL326 } @@ -2827,67 +2494,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfInt8 == nil { + if x.FptrMapIntfInt == nil { r.EncodeNil() } else { - yy327 := *x.FptrMapIntfInt8 - yym328 := z.EncBinary() - _ = yym328 + yy327 := *x.FptrMapIntfInt if false { } else { - z.F.EncMapIntfInt8V(yy327, e) + z.F.EncMapIntfIntV(yy327, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfInt`) r.WriteMapElemValue() if yyn326 { r.EncodeNil() } else { - if x.FptrMapIntfInt8 == nil { + if x.FptrMapIntfInt == nil { r.EncodeNil() } else { - yy329 := *x.FptrMapIntfInt8 - yym330 := z.EncBinary() - _ = yym330 + yy329 := *x.FptrMapIntfInt if false { } else { - z.F.EncMapIntfInt8V(yy329, e) + z.F.EncMapIntfIntV(yy329, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfInt16 == nil { + if x.FMapIntfInt8 == nil { r.EncodeNil() } else { - yym332 := z.EncBinary() - _ = yym332 if false { } else { - z.F.EncMapIntfInt16V(x.FMapIntfInt16, e) + z.F.EncMapIntfInt8V(x.FMapIntfInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfInt8`) r.WriteMapElemValue() - if x.FMapIntfInt16 == nil { + if x.FMapIntfInt8 == nil { r.EncodeNil() } else { - yym333 := z.EncBinary() - _ = yym333 if false { } else { - z.F.EncMapIntfInt16V(x.FMapIntfInt16, e) + z.F.EncMapIntfInt8V(x.FMapIntfInt8, e) } } } var yyn334 bool - if x.FptrMapIntfInt16 == nil { + if x.FptrMapIntfInt8 == nil { yyn334 = true goto LABEL334 } @@ -2898,67 +2557,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfInt16 == nil { + if x.FptrMapIntfInt8 == nil { r.EncodeNil() } else { - yy335 := *x.FptrMapIntfInt16 - yym336 := z.EncBinary() - _ = yym336 + yy335 := *x.FptrMapIntfInt8 if false { } else { - z.F.EncMapIntfInt16V(yy335, e) + z.F.EncMapIntfInt8V(yy335, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfInt8`) r.WriteMapElemValue() if yyn334 { r.EncodeNil() } else { - if x.FptrMapIntfInt16 == nil { + if x.FptrMapIntfInt8 == nil { r.EncodeNil() } else { - yy337 := *x.FptrMapIntfInt16 - yym338 := z.EncBinary() - _ = yym338 + yy337 := *x.FptrMapIntfInt8 if false { } else { - z.F.EncMapIntfInt16V(yy337, e) + z.F.EncMapIntfInt8V(yy337, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfInt32 == nil { + if x.FMapIntfInt16 == nil { r.EncodeNil() } else { - yym340 := z.EncBinary() - _ = yym340 if false { } else { - z.F.EncMapIntfInt32V(x.FMapIntfInt32, e) + z.F.EncMapIntfInt16V(x.FMapIntfInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfInt16`) r.WriteMapElemValue() - if x.FMapIntfInt32 == nil { + if x.FMapIntfInt16 == nil { r.EncodeNil() } else { - yym341 := z.EncBinary() - _ = yym341 if false { } else { - z.F.EncMapIntfInt32V(x.FMapIntfInt32, e) + z.F.EncMapIntfInt16V(x.FMapIntfInt16, e) } } } var yyn342 bool - if x.FptrMapIntfInt32 == nil { + if x.FptrMapIntfInt16 == nil { yyn342 = true goto LABEL342 } @@ -2969,67 +2620,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfInt32 == nil { + if x.FptrMapIntfInt16 == nil { r.EncodeNil() } else { - yy343 := *x.FptrMapIntfInt32 - yym344 := z.EncBinary() - _ = yym344 + yy343 := *x.FptrMapIntfInt16 if false { } else { - z.F.EncMapIntfInt32V(yy343, e) + z.F.EncMapIntfInt16V(yy343, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfInt16`) r.WriteMapElemValue() if yyn342 { r.EncodeNil() } else { - if x.FptrMapIntfInt32 == nil { + if x.FptrMapIntfInt16 == nil { r.EncodeNil() } else { - yy345 := *x.FptrMapIntfInt32 - yym346 := z.EncBinary() - _ = yym346 + yy345 := *x.FptrMapIntfInt16 if false { } else { - z.F.EncMapIntfInt32V(yy345, e) + z.F.EncMapIntfInt16V(yy345, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfInt64 == nil { + if x.FMapIntfInt32 == nil { r.EncodeNil() } else { - yym348 := z.EncBinary() - _ = yym348 if false { } else { - z.F.EncMapIntfInt64V(x.FMapIntfInt64, e) + z.F.EncMapIntfInt32V(x.FMapIntfInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfInt32`) r.WriteMapElemValue() - if x.FMapIntfInt64 == nil { + if x.FMapIntfInt32 == nil { r.EncodeNil() } else { - yym349 := z.EncBinary() - _ = yym349 if false { } else { - z.F.EncMapIntfInt64V(x.FMapIntfInt64, e) + z.F.EncMapIntfInt32V(x.FMapIntfInt32, e) } } } var yyn350 bool - if x.FptrMapIntfInt64 == nil { + if x.FptrMapIntfInt32 == nil { yyn350 = true goto LABEL350 } @@ -3040,67 +2683,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfInt64 == nil { + if x.FptrMapIntfInt32 == nil { r.EncodeNil() } else { - yy351 := *x.FptrMapIntfInt64 - yym352 := z.EncBinary() - _ = yym352 + yy351 := *x.FptrMapIntfInt32 if false { } else { - z.F.EncMapIntfInt64V(yy351, e) + z.F.EncMapIntfInt32V(yy351, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfInt32`) r.WriteMapElemValue() if yyn350 { r.EncodeNil() } else { - if x.FptrMapIntfInt64 == nil { + if x.FptrMapIntfInt32 == nil { r.EncodeNil() } else { - yy353 := *x.FptrMapIntfInt64 - yym354 := z.EncBinary() - _ = yym354 + yy353 := *x.FptrMapIntfInt32 if false { } else { - z.F.EncMapIntfInt64V(yy353, e) + z.F.EncMapIntfInt32V(yy353, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfFloat32 == nil { + if x.FMapIntfInt64 == nil { r.EncodeNil() } else { - yym356 := z.EncBinary() - _ = yym356 if false { } else { - z.F.EncMapIntfFloat32V(x.FMapIntfFloat32, e) + z.F.EncMapIntfInt64V(x.FMapIntfInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfInt64`) r.WriteMapElemValue() - if x.FMapIntfFloat32 == nil { + if x.FMapIntfInt64 == nil { r.EncodeNil() } else { - yym357 := z.EncBinary() - _ = yym357 if false { } else { - z.F.EncMapIntfFloat32V(x.FMapIntfFloat32, e) + z.F.EncMapIntfInt64V(x.FMapIntfInt64, e) } } } var yyn358 bool - if x.FptrMapIntfFloat32 == nil { + if x.FptrMapIntfInt64 == nil { yyn358 = true goto LABEL358 } @@ -3111,67 +2746,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfFloat32 == nil { + if x.FptrMapIntfInt64 == nil { r.EncodeNil() } else { - yy359 := *x.FptrMapIntfFloat32 - yym360 := z.EncBinary() - _ = yym360 + yy359 := *x.FptrMapIntfInt64 if false { } else { - z.F.EncMapIntfFloat32V(yy359, e) + z.F.EncMapIntfInt64V(yy359, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfInt64`) r.WriteMapElemValue() if yyn358 { r.EncodeNil() } else { - if x.FptrMapIntfFloat32 == nil { + if x.FptrMapIntfInt64 == nil { r.EncodeNil() } else { - yy361 := *x.FptrMapIntfFloat32 - yym362 := z.EncBinary() - _ = yym362 + yy361 := *x.FptrMapIntfInt64 if false { } else { - z.F.EncMapIntfFloat32V(yy361, e) + z.F.EncMapIntfInt64V(yy361, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfFloat64 == nil { + if x.FMapIntfFloat32 == nil { r.EncodeNil() } else { - yym364 := z.EncBinary() - _ = yym364 if false { } else { - z.F.EncMapIntfFloat64V(x.FMapIntfFloat64, e) + z.F.EncMapIntfFloat32V(x.FMapIntfFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfFloat32`) r.WriteMapElemValue() - if x.FMapIntfFloat64 == nil { + if x.FMapIntfFloat32 == nil { r.EncodeNil() } else { - yym365 := z.EncBinary() - _ = yym365 if false { } else { - z.F.EncMapIntfFloat64V(x.FMapIntfFloat64, e) + z.F.EncMapIntfFloat32V(x.FMapIntfFloat32, e) } } } var yyn366 bool - if x.FptrMapIntfFloat64 == nil { + if x.FptrMapIntfFloat32 == nil { yyn366 = true goto LABEL366 } @@ -3182,67 +2809,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfFloat64 == nil { + if x.FptrMapIntfFloat32 == nil { r.EncodeNil() } else { - yy367 := *x.FptrMapIntfFloat64 - yym368 := z.EncBinary() - _ = yym368 + yy367 := *x.FptrMapIntfFloat32 if false { } else { - z.F.EncMapIntfFloat64V(yy367, e) + z.F.EncMapIntfFloat32V(yy367, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfFloat32`) r.WriteMapElemValue() if yyn366 { r.EncodeNil() } else { - if x.FptrMapIntfFloat64 == nil { + if x.FptrMapIntfFloat32 == nil { r.EncodeNil() } else { - yy369 := *x.FptrMapIntfFloat64 - yym370 := z.EncBinary() - _ = yym370 + yy369 := *x.FptrMapIntfFloat32 if false { } else { - z.F.EncMapIntfFloat64V(yy369, e) + z.F.EncMapIntfFloat32V(yy369, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntfBool == nil { + if x.FMapIntfFloat64 == nil { r.EncodeNil() } else { - yym372 := z.EncBinary() - _ = yym372 if false { } else { - z.F.EncMapIntfBoolV(x.FMapIntfBool, e) + z.F.EncMapIntfFloat64V(x.FMapIntfFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntfBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfFloat64`) r.WriteMapElemValue() - if x.FMapIntfBool == nil { + if x.FMapIntfFloat64 == nil { r.EncodeNil() } else { - yym373 := z.EncBinary() - _ = yym373 if false { } else { - z.F.EncMapIntfBoolV(x.FMapIntfBool, e) + z.F.EncMapIntfFloat64V(x.FMapIntfFloat64, e) } } } var yyn374 bool - if x.FptrMapIntfBool == nil { + if x.FptrMapIntfFloat64 == nil { yyn374 = true goto LABEL374 } @@ -3253,67 +2872,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntfBool == nil { + if x.FptrMapIntfFloat64 == nil { r.EncodeNil() } else { - yy375 := *x.FptrMapIntfBool - yym376 := z.EncBinary() - _ = yym376 + yy375 := *x.FptrMapIntfFloat64 if false { } else { - z.F.EncMapIntfBoolV(yy375, e) + z.F.EncMapIntfFloat64V(yy375, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntfBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfFloat64`) r.WriteMapElemValue() if yyn374 { r.EncodeNil() } else { - if x.FptrMapIntfBool == nil { + if x.FptrMapIntfFloat64 == nil { r.EncodeNil() } else { - yy377 := *x.FptrMapIntfBool - yym378 := z.EncBinary() - _ = yym378 + yy377 := *x.FptrMapIntfFloat64 if false { } else { - z.F.EncMapIntfBoolV(yy377, e) + z.F.EncMapIntfFloat64V(yy377, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringIntf == nil { + if x.FMapIntfBool == nil { r.EncodeNil() } else { - yym380 := z.EncBinary() - _ = yym380 if false { } else { - z.F.EncMapStringIntfV(x.FMapStringIntf, e) + z.F.EncMapIntfBoolV(x.FMapIntfBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringIntf")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntfBool`) r.WriteMapElemValue() - if x.FMapStringIntf == nil { + if x.FMapIntfBool == nil { r.EncodeNil() } else { - yym381 := z.EncBinary() - _ = yym381 if false { } else { - z.F.EncMapStringIntfV(x.FMapStringIntf, e) + z.F.EncMapIntfBoolV(x.FMapIntfBool, e) } } } var yyn382 bool - if x.FptrMapStringIntf == nil { + if x.FptrMapIntfBool == nil { yyn382 = true goto LABEL382 } @@ -3324,67 +2935,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringIntf == nil { + if x.FptrMapIntfBool == nil { r.EncodeNil() } else { - yy383 := *x.FptrMapStringIntf - yym384 := z.EncBinary() - _ = yym384 + yy383 := *x.FptrMapIntfBool if false { } else { - z.F.EncMapStringIntfV(yy383, e) + z.F.EncMapIntfBoolV(yy383, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntfBool`) r.WriteMapElemValue() if yyn382 { r.EncodeNil() } else { - if x.FptrMapStringIntf == nil { + if x.FptrMapIntfBool == nil { r.EncodeNil() } else { - yy385 := *x.FptrMapStringIntf - yym386 := z.EncBinary() - _ = yym386 + yy385 := *x.FptrMapIntfBool if false { } else { - z.F.EncMapStringIntfV(yy385, e) + z.F.EncMapIntfBoolV(yy385, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringString == nil { + if x.FMapStringIntf == nil { r.EncodeNil() } else { - yym388 := z.EncBinary() - _ = yym388 if false { } else { - z.F.EncMapStringStringV(x.FMapStringString, e) + z.F.EncMapStringIntfV(x.FMapStringIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringString")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringIntf`) r.WriteMapElemValue() - if x.FMapStringString == nil { + if x.FMapStringIntf == nil { r.EncodeNil() } else { - yym389 := z.EncBinary() - _ = yym389 if false { } else { - z.F.EncMapStringStringV(x.FMapStringString, e) + z.F.EncMapStringIntfV(x.FMapStringIntf, e) } } } var yyn390 bool - if x.FptrMapStringString == nil { + if x.FptrMapStringIntf == nil { yyn390 = true goto LABEL390 } @@ -3395,67 +2998,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringString == nil { + if x.FptrMapStringIntf == nil { r.EncodeNil() } else { - yy391 := *x.FptrMapStringString - yym392 := z.EncBinary() - _ = yym392 + yy391 := *x.FptrMapStringIntf if false { } else { - z.F.EncMapStringStringV(yy391, e) + z.F.EncMapStringIntfV(yy391, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringIntf`) r.WriteMapElemValue() if yyn390 { r.EncodeNil() } else { - if x.FptrMapStringString == nil { + if x.FptrMapStringIntf == nil { r.EncodeNil() } else { - yy393 := *x.FptrMapStringString - yym394 := z.EncBinary() - _ = yym394 + yy393 := *x.FptrMapStringIntf if false { } else { - z.F.EncMapStringStringV(yy393, e) + z.F.EncMapStringIntfV(yy393, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUint == nil { + if x.FMapStringString == nil { r.EncodeNil() } else { - yym396 := z.EncBinary() - _ = yym396 if false { } else { - z.F.EncMapStringUintV(x.FMapStringUint, e) + z.F.EncMapStringStringV(x.FMapStringString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringString`) r.WriteMapElemValue() - if x.FMapStringUint == nil { + if x.FMapStringString == nil { r.EncodeNil() } else { - yym397 := z.EncBinary() - _ = yym397 if false { } else { - z.F.EncMapStringUintV(x.FMapStringUint, e) + z.F.EncMapStringStringV(x.FMapStringString, e) } } } var yyn398 bool - if x.FptrMapStringUint == nil { + if x.FptrMapStringString == nil { yyn398 = true goto LABEL398 } @@ -3466,67 +3061,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUint == nil { + if x.FptrMapStringString == nil { r.EncodeNil() } else { - yy399 := *x.FptrMapStringUint - yym400 := z.EncBinary() - _ = yym400 + yy399 := *x.FptrMapStringString if false { } else { - z.F.EncMapStringUintV(yy399, e) + z.F.EncMapStringStringV(yy399, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringString`) r.WriteMapElemValue() if yyn398 { r.EncodeNil() } else { - if x.FptrMapStringUint == nil { + if x.FptrMapStringString == nil { r.EncodeNil() } else { - yy401 := *x.FptrMapStringUint - yym402 := z.EncBinary() - _ = yym402 + yy401 := *x.FptrMapStringString if false { } else { - z.F.EncMapStringUintV(yy401, e) + z.F.EncMapStringStringV(yy401, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUint8 == nil { + if x.FMapStringUint == nil { r.EncodeNil() } else { - yym404 := z.EncBinary() - _ = yym404 if false { } else { - z.F.EncMapStringUint8V(x.FMapStringUint8, e) + z.F.EncMapStringUintV(x.FMapStringUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUint`) r.WriteMapElemValue() - if x.FMapStringUint8 == nil { + if x.FMapStringUint == nil { r.EncodeNil() } else { - yym405 := z.EncBinary() - _ = yym405 if false { } else { - z.F.EncMapStringUint8V(x.FMapStringUint8, e) + z.F.EncMapStringUintV(x.FMapStringUint, e) } } } var yyn406 bool - if x.FptrMapStringUint8 == nil { + if x.FptrMapStringUint == nil { yyn406 = true goto LABEL406 } @@ -3537,67 +3124,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUint8 == nil { + if x.FptrMapStringUint == nil { r.EncodeNil() } else { - yy407 := *x.FptrMapStringUint8 - yym408 := z.EncBinary() - _ = yym408 + yy407 := *x.FptrMapStringUint if false { } else { - z.F.EncMapStringUint8V(yy407, e) + z.F.EncMapStringUintV(yy407, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUint`) r.WriteMapElemValue() if yyn406 { r.EncodeNil() } else { - if x.FptrMapStringUint8 == nil { + if x.FptrMapStringUint == nil { r.EncodeNil() } else { - yy409 := *x.FptrMapStringUint8 - yym410 := z.EncBinary() - _ = yym410 + yy409 := *x.FptrMapStringUint if false { } else { - z.F.EncMapStringUint8V(yy409, e) + z.F.EncMapStringUintV(yy409, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUint16 == nil { + if x.FMapStringUint8 == nil { r.EncodeNil() } else { - yym412 := z.EncBinary() - _ = yym412 if false { } else { - z.F.EncMapStringUint16V(x.FMapStringUint16, e) + z.F.EncMapStringUint8V(x.FMapStringUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUint8`) r.WriteMapElemValue() - if x.FMapStringUint16 == nil { + if x.FMapStringUint8 == nil { r.EncodeNil() } else { - yym413 := z.EncBinary() - _ = yym413 if false { } else { - z.F.EncMapStringUint16V(x.FMapStringUint16, e) + z.F.EncMapStringUint8V(x.FMapStringUint8, e) } } } var yyn414 bool - if x.FptrMapStringUint16 == nil { + if x.FptrMapStringUint8 == nil { yyn414 = true goto LABEL414 } @@ -3608,67 +3187,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUint16 == nil { + if x.FptrMapStringUint8 == nil { r.EncodeNil() } else { - yy415 := *x.FptrMapStringUint16 - yym416 := z.EncBinary() - _ = yym416 + yy415 := *x.FptrMapStringUint8 if false { } else { - z.F.EncMapStringUint16V(yy415, e) + z.F.EncMapStringUint8V(yy415, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUint8`) r.WriteMapElemValue() if yyn414 { r.EncodeNil() } else { - if x.FptrMapStringUint16 == nil { + if x.FptrMapStringUint8 == nil { r.EncodeNil() } else { - yy417 := *x.FptrMapStringUint16 - yym418 := z.EncBinary() - _ = yym418 + yy417 := *x.FptrMapStringUint8 if false { } else { - z.F.EncMapStringUint16V(yy417, e) + z.F.EncMapStringUint8V(yy417, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUint32 == nil { + if x.FMapStringUint16 == nil { r.EncodeNil() } else { - yym420 := z.EncBinary() - _ = yym420 if false { } else { - z.F.EncMapStringUint32V(x.FMapStringUint32, e) + z.F.EncMapStringUint16V(x.FMapStringUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUint16`) r.WriteMapElemValue() - if x.FMapStringUint32 == nil { + if x.FMapStringUint16 == nil { r.EncodeNil() } else { - yym421 := z.EncBinary() - _ = yym421 if false { } else { - z.F.EncMapStringUint32V(x.FMapStringUint32, e) + z.F.EncMapStringUint16V(x.FMapStringUint16, e) } } } var yyn422 bool - if x.FptrMapStringUint32 == nil { + if x.FptrMapStringUint16 == nil { yyn422 = true goto LABEL422 } @@ -3679,67 +3250,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUint32 == nil { + if x.FptrMapStringUint16 == nil { r.EncodeNil() } else { - yy423 := *x.FptrMapStringUint32 - yym424 := z.EncBinary() - _ = yym424 + yy423 := *x.FptrMapStringUint16 if false { } else { - z.F.EncMapStringUint32V(yy423, e) + z.F.EncMapStringUint16V(yy423, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUint16`) r.WriteMapElemValue() if yyn422 { r.EncodeNil() } else { - if x.FptrMapStringUint32 == nil { + if x.FptrMapStringUint16 == nil { r.EncodeNil() } else { - yy425 := *x.FptrMapStringUint32 - yym426 := z.EncBinary() - _ = yym426 + yy425 := *x.FptrMapStringUint16 if false { } else { - z.F.EncMapStringUint32V(yy425, e) + z.F.EncMapStringUint16V(yy425, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUint64 == nil { + if x.FMapStringUint32 == nil { r.EncodeNil() } else { - yym428 := z.EncBinary() - _ = yym428 if false { } else { - z.F.EncMapStringUint64V(x.FMapStringUint64, e) + z.F.EncMapStringUint32V(x.FMapStringUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUint32`) r.WriteMapElemValue() - if x.FMapStringUint64 == nil { + if x.FMapStringUint32 == nil { r.EncodeNil() } else { - yym429 := z.EncBinary() - _ = yym429 if false { } else { - z.F.EncMapStringUint64V(x.FMapStringUint64, e) + z.F.EncMapStringUint32V(x.FMapStringUint32, e) } } } var yyn430 bool - if x.FptrMapStringUint64 == nil { + if x.FptrMapStringUint32 == nil { yyn430 = true goto LABEL430 } @@ -3750,67 +3313,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUint64 == nil { + if x.FptrMapStringUint32 == nil { r.EncodeNil() } else { - yy431 := *x.FptrMapStringUint64 - yym432 := z.EncBinary() - _ = yym432 + yy431 := *x.FptrMapStringUint32 if false { } else { - z.F.EncMapStringUint64V(yy431, e) + z.F.EncMapStringUint32V(yy431, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUint32`) r.WriteMapElemValue() if yyn430 { r.EncodeNil() } else { - if x.FptrMapStringUint64 == nil { + if x.FptrMapStringUint32 == nil { r.EncodeNil() } else { - yy433 := *x.FptrMapStringUint64 - yym434 := z.EncBinary() - _ = yym434 + yy433 := *x.FptrMapStringUint32 if false { } else { - z.F.EncMapStringUint64V(yy433, e) + z.F.EncMapStringUint32V(yy433, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringUintptr == nil { + if x.FMapStringUint64 == nil { r.EncodeNil() } else { - yym436 := z.EncBinary() - _ = yym436 if false { } else { - z.F.EncMapStringUintptrV(x.FMapStringUintptr, e) + z.F.EncMapStringUint64V(x.FMapStringUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUint64`) r.WriteMapElemValue() - if x.FMapStringUintptr == nil { + if x.FMapStringUint64 == nil { r.EncodeNil() } else { - yym437 := z.EncBinary() - _ = yym437 if false { } else { - z.F.EncMapStringUintptrV(x.FMapStringUintptr, e) + z.F.EncMapStringUint64V(x.FMapStringUint64, e) } } } var yyn438 bool - if x.FptrMapStringUintptr == nil { + if x.FptrMapStringUint64 == nil { yyn438 = true goto LABEL438 } @@ -3821,67 +3376,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringUintptr == nil { + if x.FptrMapStringUint64 == nil { r.EncodeNil() } else { - yy439 := *x.FptrMapStringUintptr - yym440 := z.EncBinary() - _ = yym440 + yy439 := *x.FptrMapStringUint64 if false { } else { - z.F.EncMapStringUintptrV(yy439, e) + z.F.EncMapStringUint64V(yy439, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUint64`) r.WriteMapElemValue() if yyn438 { r.EncodeNil() } else { - if x.FptrMapStringUintptr == nil { + if x.FptrMapStringUint64 == nil { r.EncodeNil() } else { - yy441 := *x.FptrMapStringUintptr - yym442 := z.EncBinary() - _ = yym442 + yy441 := *x.FptrMapStringUint64 if false { } else { - z.F.EncMapStringUintptrV(yy441, e) + z.F.EncMapStringUint64V(yy441, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringInt == nil { + if x.FMapStringUintptr == nil { r.EncodeNil() } else { - yym444 := z.EncBinary() - _ = yym444 if false { } else { - z.F.EncMapStringIntV(x.FMapStringInt, e) + z.F.EncMapStringUintptrV(x.FMapStringUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringUintptr`) r.WriteMapElemValue() - if x.FMapStringInt == nil { + if x.FMapStringUintptr == nil { r.EncodeNil() } else { - yym445 := z.EncBinary() - _ = yym445 if false { } else { - z.F.EncMapStringIntV(x.FMapStringInt, e) + z.F.EncMapStringUintptrV(x.FMapStringUintptr, e) } } } var yyn446 bool - if x.FptrMapStringInt == nil { + if x.FptrMapStringUintptr == nil { yyn446 = true goto LABEL446 } @@ -3892,67 +3439,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringInt == nil { + if x.FptrMapStringUintptr == nil { r.EncodeNil() } else { - yy447 := *x.FptrMapStringInt - yym448 := z.EncBinary() - _ = yym448 + yy447 := *x.FptrMapStringUintptr if false { } else { - z.F.EncMapStringIntV(yy447, e) + z.F.EncMapStringUintptrV(yy447, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringUintptr`) r.WriteMapElemValue() if yyn446 { r.EncodeNil() } else { - if x.FptrMapStringInt == nil { + if x.FptrMapStringUintptr == nil { r.EncodeNil() } else { - yy449 := *x.FptrMapStringInt - yym450 := z.EncBinary() - _ = yym450 + yy449 := *x.FptrMapStringUintptr if false { } else { - z.F.EncMapStringIntV(yy449, e) + z.F.EncMapStringUintptrV(yy449, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringInt8 == nil { + if x.FMapStringInt == nil { r.EncodeNil() } else { - yym452 := z.EncBinary() - _ = yym452 if false { } else { - z.F.EncMapStringInt8V(x.FMapStringInt8, e) + z.F.EncMapStringIntV(x.FMapStringInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringInt`) r.WriteMapElemValue() - if x.FMapStringInt8 == nil { + if x.FMapStringInt == nil { r.EncodeNil() } else { - yym453 := z.EncBinary() - _ = yym453 if false { } else { - z.F.EncMapStringInt8V(x.FMapStringInt8, e) + z.F.EncMapStringIntV(x.FMapStringInt, e) } } } var yyn454 bool - if x.FptrMapStringInt8 == nil { + if x.FptrMapStringInt == nil { yyn454 = true goto LABEL454 } @@ -3963,67 +3502,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringInt8 == nil { + if x.FptrMapStringInt == nil { r.EncodeNil() } else { - yy455 := *x.FptrMapStringInt8 - yym456 := z.EncBinary() - _ = yym456 + yy455 := *x.FptrMapStringInt if false { } else { - z.F.EncMapStringInt8V(yy455, e) + z.F.EncMapStringIntV(yy455, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringInt`) r.WriteMapElemValue() if yyn454 { r.EncodeNil() } else { - if x.FptrMapStringInt8 == nil { + if x.FptrMapStringInt == nil { r.EncodeNil() } else { - yy457 := *x.FptrMapStringInt8 - yym458 := z.EncBinary() - _ = yym458 + yy457 := *x.FptrMapStringInt if false { } else { - z.F.EncMapStringInt8V(yy457, e) + z.F.EncMapStringIntV(yy457, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringInt16 == nil { + if x.FMapStringInt8 == nil { r.EncodeNil() } else { - yym460 := z.EncBinary() - _ = yym460 if false { } else { - z.F.EncMapStringInt16V(x.FMapStringInt16, e) + z.F.EncMapStringInt8V(x.FMapStringInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringInt8`) r.WriteMapElemValue() - if x.FMapStringInt16 == nil { + if x.FMapStringInt8 == nil { r.EncodeNil() } else { - yym461 := z.EncBinary() - _ = yym461 if false { } else { - z.F.EncMapStringInt16V(x.FMapStringInt16, e) + z.F.EncMapStringInt8V(x.FMapStringInt8, e) } } } var yyn462 bool - if x.FptrMapStringInt16 == nil { + if x.FptrMapStringInt8 == nil { yyn462 = true goto LABEL462 } @@ -4034,67 +3565,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringInt16 == nil { + if x.FptrMapStringInt8 == nil { r.EncodeNil() } else { - yy463 := *x.FptrMapStringInt16 - yym464 := z.EncBinary() - _ = yym464 + yy463 := *x.FptrMapStringInt8 if false { } else { - z.F.EncMapStringInt16V(yy463, e) + z.F.EncMapStringInt8V(yy463, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringInt8`) r.WriteMapElemValue() if yyn462 { r.EncodeNil() } else { - if x.FptrMapStringInt16 == nil { + if x.FptrMapStringInt8 == nil { r.EncodeNil() } else { - yy465 := *x.FptrMapStringInt16 - yym466 := z.EncBinary() - _ = yym466 + yy465 := *x.FptrMapStringInt8 if false { } else { - z.F.EncMapStringInt16V(yy465, e) + z.F.EncMapStringInt8V(yy465, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringInt32 == nil { + if x.FMapStringInt16 == nil { r.EncodeNil() } else { - yym468 := z.EncBinary() - _ = yym468 if false { } else { - z.F.EncMapStringInt32V(x.FMapStringInt32, e) + z.F.EncMapStringInt16V(x.FMapStringInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringInt16`) r.WriteMapElemValue() - if x.FMapStringInt32 == nil { + if x.FMapStringInt16 == nil { r.EncodeNil() } else { - yym469 := z.EncBinary() - _ = yym469 if false { } else { - z.F.EncMapStringInt32V(x.FMapStringInt32, e) + z.F.EncMapStringInt16V(x.FMapStringInt16, e) } } } var yyn470 bool - if x.FptrMapStringInt32 == nil { + if x.FptrMapStringInt16 == nil { yyn470 = true goto LABEL470 } @@ -4105,67 +3628,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringInt32 == nil { + if x.FptrMapStringInt16 == nil { r.EncodeNil() } else { - yy471 := *x.FptrMapStringInt32 - yym472 := z.EncBinary() - _ = yym472 + yy471 := *x.FptrMapStringInt16 if false { } else { - z.F.EncMapStringInt32V(yy471, e) + z.F.EncMapStringInt16V(yy471, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringInt16`) r.WriteMapElemValue() if yyn470 { r.EncodeNil() } else { - if x.FptrMapStringInt32 == nil { + if x.FptrMapStringInt16 == nil { r.EncodeNil() } else { - yy473 := *x.FptrMapStringInt32 - yym474 := z.EncBinary() - _ = yym474 + yy473 := *x.FptrMapStringInt16 if false { } else { - z.F.EncMapStringInt32V(yy473, e) + z.F.EncMapStringInt16V(yy473, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringInt64 == nil { + if x.FMapStringInt32 == nil { r.EncodeNil() } else { - yym476 := z.EncBinary() - _ = yym476 if false { } else { - z.F.EncMapStringInt64V(x.FMapStringInt64, e) + z.F.EncMapStringInt32V(x.FMapStringInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringInt32`) r.WriteMapElemValue() - if x.FMapStringInt64 == nil { + if x.FMapStringInt32 == nil { r.EncodeNil() } else { - yym477 := z.EncBinary() - _ = yym477 if false { } else { - z.F.EncMapStringInt64V(x.FMapStringInt64, e) + z.F.EncMapStringInt32V(x.FMapStringInt32, e) } } } var yyn478 bool - if x.FptrMapStringInt64 == nil { + if x.FptrMapStringInt32 == nil { yyn478 = true goto LABEL478 } @@ -4176,67 +3691,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringInt64 == nil { + if x.FptrMapStringInt32 == nil { r.EncodeNil() } else { - yy479 := *x.FptrMapStringInt64 - yym480 := z.EncBinary() - _ = yym480 + yy479 := *x.FptrMapStringInt32 if false { } else { - z.F.EncMapStringInt64V(yy479, e) + z.F.EncMapStringInt32V(yy479, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringInt32`) r.WriteMapElemValue() if yyn478 { r.EncodeNil() } else { - if x.FptrMapStringInt64 == nil { + if x.FptrMapStringInt32 == nil { r.EncodeNil() } else { - yy481 := *x.FptrMapStringInt64 - yym482 := z.EncBinary() - _ = yym482 + yy481 := *x.FptrMapStringInt32 if false { } else { - z.F.EncMapStringInt64V(yy481, e) + z.F.EncMapStringInt32V(yy481, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringFloat32 == nil { + if x.FMapStringInt64 == nil { r.EncodeNil() } else { - yym484 := z.EncBinary() - _ = yym484 if false { } else { - z.F.EncMapStringFloat32V(x.FMapStringFloat32, e) + z.F.EncMapStringInt64V(x.FMapStringInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringInt64`) r.WriteMapElemValue() - if x.FMapStringFloat32 == nil { + if x.FMapStringInt64 == nil { r.EncodeNil() } else { - yym485 := z.EncBinary() - _ = yym485 if false { } else { - z.F.EncMapStringFloat32V(x.FMapStringFloat32, e) + z.F.EncMapStringInt64V(x.FMapStringInt64, e) } } } var yyn486 bool - if x.FptrMapStringFloat32 == nil { + if x.FptrMapStringInt64 == nil { yyn486 = true goto LABEL486 } @@ -4247,67 +3754,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringFloat32 == nil { + if x.FptrMapStringInt64 == nil { r.EncodeNil() } else { - yy487 := *x.FptrMapStringFloat32 - yym488 := z.EncBinary() - _ = yym488 + yy487 := *x.FptrMapStringInt64 if false { } else { - z.F.EncMapStringFloat32V(yy487, e) + z.F.EncMapStringInt64V(yy487, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringInt64`) r.WriteMapElemValue() if yyn486 { r.EncodeNil() } else { - if x.FptrMapStringFloat32 == nil { + if x.FptrMapStringInt64 == nil { r.EncodeNil() } else { - yy489 := *x.FptrMapStringFloat32 - yym490 := z.EncBinary() - _ = yym490 + yy489 := *x.FptrMapStringInt64 if false { } else { - z.F.EncMapStringFloat32V(yy489, e) + z.F.EncMapStringInt64V(yy489, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringFloat64 == nil { + if x.FMapStringFloat32 == nil { r.EncodeNil() } else { - yym492 := z.EncBinary() - _ = yym492 if false { } else { - z.F.EncMapStringFloat64V(x.FMapStringFloat64, e) + z.F.EncMapStringFloat32V(x.FMapStringFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringFloat32`) r.WriteMapElemValue() - if x.FMapStringFloat64 == nil { + if x.FMapStringFloat32 == nil { r.EncodeNil() } else { - yym493 := z.EncBinary() - _ = yym493 if false { } else { - z.F.EncMapStringFloat64V(x.FMapStringFloat64, e) + z.F.EncMapStringFloat32V(x.FMapStringFloat32, e) } } } var yyn494 bool - if x.FptrMapStringFloat64 == nil { + if x.FptrMapStringFloat32 == nil { yyn494 = true goto LABEL494 } @@ -4318,67 +3817,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringFloat64 == nil { + if x.FptrMapStringFloat32 == nil { r.EncodeNil() } else { - yy495 := *x.FptrMapStringFloat64 - yym496 := z.EncBinary() - _ = yym496 + yy495 := *x.FptrMapStringFloat32 if false { } else { - z.F.EncMapStringFloat64V(yy495, e) + z.F.EncMapStringFloat32V(yy495, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringFloat32`) r.WriteMapElemValue() if yyn494 { r.EncodeNil() } else { - if x.FptrMapStringFloat64 == nil { + if x.FptrMapStringFloat32 == nil { r.EncodeNil() } else { - yy497 := *x.FptrMapStringFloat64 - yym498 := z.EncBinary() - _ = yym498 + yy497 := *x.FptrMapStringFloat32 if false { } else { - z.F.EncMapStringFloat64V(yy497, e) + z.F.EncMapStringFloat32V(yy497, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapStringBool == nil { + if x.FMapStringFloat64 == nil { r.EncodeNil() } else { - yym500 := z.EncBinary() - _ = yym500 if false { } else { - z.F.EncMapStringBoolV(x.FMapStringBool, e) + z.F.EncMapStringFloat64V(x.FMapStringFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapStringBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringFloat64`) r.WriteMapElemValue() - if x.FMapStringBool == nil { + if x.FMapStringFloat64 == nil { r.EncodeNil() } else { - yym501 := z.EncBinary() - _ = yym501 if false { } else { - z.F.EncMapStringBoolV(x.FMapStringBool, e) + z.F.EncMapStringFloat64V(x.FMapStringFloat64, e) } } } var yyn502 bool - if x.FptrMapStringBool == nil { + if x.FptrMapStringFloat64 == nil { yyn502 = true goto LABEL502 } @@ -4389,67 +3880,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapStringBool == nil { + if x.FptrMapStringFloat64 == nil { r.EncodeNil() } else { - yy503 := *x.FptrMapStringBool - yym504 := z.EncBinary() - _ = yym504 + yy503 := *x.FptrMapStringFloat64 if false { } else { - z.F.EncMapStringBoolV(yy503, e) + z.F.EncMapStringFloat64V(yy503, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapStringBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringFloat64`) r.WriteMapElemValue() if yyn502 { r.EncodeNil() } else { - if x.FptrMapStringBool == nil { + if x.FptrMapStringFloat64 == nil { r.EncodeNil() } else { - yy505 := *x.FptrMapStringBool - yym506 := z.EncBinary() - _ = yym506 + yy505 := *x.FptrMapStringFloat64 if false { } else { - z.F.EncMapStringBoolV(yy505, e) + z.F.EncMapStringFloat64V(yy505, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Intf == nil { + if x.FMapStringBool == nil { r.EncodeNil() } else { - yym508 := z.EncBinary() - _ = yym508 if false { } else { - z.F.EncMapFloat32IntfV(x.FMapFloat32Intf, e) + z.F.EncMapStringBoolV(x.FMapStringBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapStringBool`) r.WriteMapElemValue() - if x.FMapFloat32Intf == nil { + if x.FMapStringBool == nil { r.EncodeNil() } else { - yym509 := z.EncBinary() - _ = yym509 if false { } else { - z.F.EncMapFloat32IntfV(x.FMapFloat32Intf, e) + z.F.EncMapStringBoolV(x.FMapStringBool, e) } } } var yyn510 bool - if x.FptrMapFloat32Intf == nil { + if x.FptrMapStringBool == nil { yyn510 = true goto LABEL510 } @@ -4460,67 +3943,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Intf == nil { + if x.FptrMapStringBool == nil { r.EncodeNil() } else { - yy511 := *x.FptrMapFloat32Intf - yym512 := z.EncBinary() - _ = yym512 + yy511 := *x.FptrMapStringBool if false { } else { - z.F.EncMapFloat32IntfV(yy511, e) + z.F.EncMapStringBoolV(yy511, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapStringBool`) r.WriteMapElemValue() if yyn510 { r.EncodeNil() } else { - if x.FptrMapFloat32Intf == nil { + if x.FptrMapStringBool == nil { r.EncodeNil() } else { - yy513 := *x.FptrMapFloat32Intf - yym514 := z.EncBinary() - _ = yym514 + yy513 := *x.FptrMapStringBool if false { } else { - z.F.EncMapFloat32IntfV(yy513, e) + z.F.EncMapStringBoolV(yy513, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32String == nil { + if x.FMapFloat32Intf == nil { r.EncodeNil() } else { - yym516 := z.EncBinary() - _ = yym516 if false { } else { - z.F.EncMapFloat32StringV(x.FMapFloat32String, e) + z.F.EncMapFloat32IntfV(x.FMapFloat32Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32String")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Intf`) r.WriteMapElemValue() - if x.FMapFloat32String == nil { + if x.FMapFloat32Intf == nil { r.EncodeNil() } else { - yym517 := z.EncBinary() - _ = yym517 if false { } else { - z.F.EncMapFloat32StringV(x.FMapFloat32String, e) + z.F.EncMapFloat32IntfV(x.FMapFloat32Intf, e) } } } var yyn518 bool - if x.FptrMapFloat32String == nil { + if x.FptrMapFloat32Intf == nil { yyn518 = true goto LABEL518 } @@ -4531,67 +4006,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32String == nil { + if x.FptrMapFloat32Intf == nil { r.EncodeNil() } else { - yy519 := *x.FptrMapFloat32String - yym520 := z.EncBinary() - _ = yym520 + yy519 := *x.FptrMapFloat32Intf if false { } else { - z.F.EncMapFloat32StringV(yy519, e) + z.F.EncMapFloat32IntfV(yy519, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Intf`) r.WriteMapElemValue() if yyn518 { r.EncodeNil() } else { - if x.FptrMapFloat32String == nil { + if x.FptrMapFloat32Intf == nil { r.EncodeNil() } else { - yy521 := *x.FptrMapFloat32String - yym522 := z.EncBinary() - _ = yym522 + yy521 := *x.FptrMapFloat32Intf if false { } else { - z.F.EncMapFloat32StringV(yy521, e) + z.F.EncMapFloat32IntfV(yy521, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uint == nil { + if x.FMapFloat32String == nil { r.EncodeNil() } else { - yym524 := z.EncBinary() - _ = yym524 if false { } else { - z.F.EncMapFloat32UintV(x.FMapFloat32Uint, e) + z.F.EncMapFloat32StringV(x.FMapFloat32String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32String`) r.WriteMapElemValue() - if x.FMapFloat32Uint == nil { + if x.FMapFloat32String == nil { r.EncodeNil() } else { - yym525 := z.EncBinary() - _ = yym525 if false { } else { - z.F.EncMapFloat32UintV(x.FMapFloat32Uint, e) + z.F.EncMapFloat32StringV(x.FMapFloat32String, e) } } } var yyn526 bool - if x.FptrMapFloat32Uint == nil { + if x.FptrMapFloat32String == nil { yyn526 = true goto LABEL526 } @@ -4602,67 +4069,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uint == nil { + if x.FptrMapFloat32String == nil { r.EncodeNil() } else { - yy527 := *x.FptrMapFloat32Uint - yym528 := z.EncBinary() - _ = yym528 + yy527 := *x.FptrMapFloat32String if false { } else { - z.F.EncMapFloat32UintV(yy527, e) + z.F.EncMapFloat32StringV(yy527, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32String`) r.WriteMapElemValue() if yyn526 { r.EncodeNil() } else { - if x.FptrMapFloat32Uint == nil { + if x.FptrMapFloat32String == nil { r.EncodeNil() } else { - yy529 := *x.FptrMapFloat32Uint - yym530 := z.EncBinary() - _ = yym530 + yy529 := *x.FptrMapFloat32String if false { } else { - z.F.EncMapFloat32UintV(yy529, e) + z.F.EncMapFloat32StringV(yy529, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uint8 == nil { + if x.FMapFloat32Uint == nil { r.EncodeNil() } else { - yym532 := z.EncBinary() - _ = yym532 if false { } else { - z.F.EncMapFloat32Uint8V(x.FMapFloat32Uint8, e) + z.F.EncMapFloat32UintV(x.FMapFloat32Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uint`) r.WriteMapElemValue() - if x.FMapFloat32Uint8 == nil { + if x.FMapFloat32Uint == nil { r.EncodeNil() } else { - yym533 := z.EncBinary() - _ = yym533 if false { } else { - z.F.EncMapFloat32Uint8V(x.FMapFloat32Uint8, e) + z.F.EncMapFloat32UintV(x.FMapFloat32Uint, e) } } } var yyn534 bool - if x.FptrMapFloat32Uint8 == nil { + if x.FptrMapFloat32Uint == nil { yyn534 = true goto LABEL534 } @@ -4673,67 +4132,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uint8 == nil { + if x.FptrMapFloat32Uint == nil { r.EncodeNil() } else { - yy535 := *x.FptrMapFloat32Uint8 - yym536 := z.EncBinary() - _ = yym536 + yy535 := *x.FptrMapFloat32Uint if false { } else { - z.F.EncMapFloat32Uint8V(yy535, e) + z.F.EncMapFloat32UintV(yy535, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uint`) r.WriteMapElemValue() if yyn534 { r.EncodeNil() } else { - if x.FptrMapFloat32Uint8 == nil { + if x.FptrMapFloat32Uint == nil { r.EncodeNil() } else { - yy537 := *x.FptrMapFloat32Uint8 - yym538 := z.EncBinary() - _ = yym538 + yy537 := *x.FptrMapFloat32Uint if false { } else { - z.F.EncMapFloat32Uint8V(yy537, e) + z.F.EncMapFloat32UintV(yy537, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uint16 == nil { + if x.FMapFloat32Uint8 == nil { r.EncodeNil() } else { - yym540 := z.EncBinary() - _ = yym540 if false { } else { - z.F.EncMapFloat32Uint16V(x.FMapFloat32Uint16, e) + z.F.EncMapFloat32Uint8V(x.FMapFloat32Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uint8`) r.WriteMapElemValue() - if x.FMapFloat32Uint16 == nil { + if x.FMapFloat32Uint8 == nil { r.EncodeNil() } else { - yym541 := z.EncBinary() - _ = yym541 if false { } else { - z.F.EncMapFloat32Uint16V(x.FMapFloat32Uint16, e) + z.F.EncMapFloat32Uint8V(x.FMapFloat32Uint8, e) } } } var yyn542 bool - if x.FptrMapFloat32Uint16 == nil { + if x.FptrMapFloat32Uint8 == nil { yyn542 = true goto LABEL542 } @@ -4744,67 +4195,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uint16 == nil { + if x.FptrMapFloat32Uint8 == nil { r.EncodeNil() } else { - yy543 := *x.FptrMapFloat32Uint16 - yym544 := z.EncBinary() - _ = yym544 + yy543 := *x.FptrMapFloat32Uint8 if false { } else { - z.F.EncMapFloat32Uint16V(yy543, e) + z.F.EncMapFloat32Uint8V(yy543, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uint8`) r.WriteMapElemValue() if yyn542 { r.EncodeNil() } else { - if x.FptrMapFloat32Uint16 == nil { + if x.FptrMapFloat32Uint8 == nil { r.EncodeNil() } else { - yy545 := *x.FptrMapFloat32Uint16 - yym546 := z.EncBinary() - _ = yym546 + yy545 := *x.FptrMapFloat32Uint8 if false { } else { - z.F.EncMapFloat32Uint16V(yy545, e) + z.F.EncMapFloat32Uint8V(yy545, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uint32 == nil { + if x.FMapFloat32Uint16 == nil { r.EncodeNil() } else { - yym548 := z.EncBinary() - _ = yym548 if false { } else { - z.F.EncMapFloat32Uint32V(x.FMapFloat32Uint32, e) + z.F.EncMapFloat32Uint16V(x.FMapFloat32Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uint16`) r.WriteMapElemValue() - if x.FMapFloat32Uint32 == nil { + if x.FMapFloat32Uint16 == nil { r.EncodeNil() } else { - yym549 := z.EncBinary() - _ = yym549 if false { } else { - z.F.EncMapFloat32Uint32V(x.FMapFloat32Uint32, e) + z.F.EncMapFloat32Uint16V(x.FMapFloat32Uint16, e) } } } var yyn550 bool - if x.FptrMapFloat32Uint32 == nil { + if x.FptrMapFloat32Uint16 == nil { yyn550 = true goto LABEL550 } @@ -4815,67 +4258,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uint32 == nil { + if x.FptrMapFloat32Uint16 == nil { r.EncodeNil() } else { - yy551 := *x.FptrMapFloat32Uint32 - yym552 := z.EncBinary() - _ = yym552 + yy551 := *x.FptrMapFloat32Uint16 if false { } else { - z.F.EncMapFloat32Uint32V(yy551, e) + z.F.EncMapFloat32Uint16V(yy551, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uint16`) r.WriteMapElemValue() if yyn550 { r.EncodeNil() } else { - if x.FptrMapFloat32Uint32 == nil { + if x.FptrMapFloat32Uint16 == nil { r.EncodeNil() } else { - yy553 := *x.FptrMapFloat32Uint32 - yym554 := z.EncBinary() - _ = yym554 + yy553 := *x.FptrMapFloat32Uint16 if false { } else { - z.F.EncMapFloat32Uint32V(yy553, e) + z.F.EncMapFloat32Uint16V(yy553, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uint64 == nil { + if x.FMapFloat32Uint32 == nil { r.EncodeNil() } else { - yym556 := z.EncBinary() - _ = yym556 if false { } else { - z.F.EncMapFloat32Uint64V(x.FMapFloat32Uint64, e) + z.F.EncMapFloat32Uint32V(x.FMapFloat32Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uint32`) r.WriteMapElemValue() - if x.FMapFloat32Uint64 == nil { + if x.FMapFloat32Uint32 == nil { r.EncodeNil() } else { - yym557 := z.EncBinary() - _ = yym557 if false { } else { - z.F.EncMapFloat32Uint64V(x.FMapFloat32Uint64, e) + z.F.EncMapFloat32Uint32V(x.FMapFloat32Uint32, e) } } } var yyn558 bool - if x.FptrMapFloat32Uint64 == nil { + if x.FptrMapFloat32Uint32 == nil { yyn558 = true goto LABEL558 } @@ -4886,67 +4321,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uint64 == nil { + if x.FptrMapFloat32Uint32 == nil { r.EncodeNil() } else { - yy559 := *x.FptrMapFloat32Uint64 - yym560 := z.EncBinary() - _ = yym560 + yy559 := *x.FptrMapFloat32Uint32 if false { } else { - z.F.EncMapFloat32Uint64V(yy559, e) + z.F.EncMapFloat32Uint32V(yy559, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uint32`) r.WriteMapElemValue() if yyn558 { r.EncodeNil() } else { - if x.FptrMapFloat32Uint64 == nil { + if x.FptrMapFloat32Uint32 == nil { r.EncodeNil() } else { - yy561 := *x.FptrMapFloat32Uint64 - yym562 := z.EncBinary() - _ = yym562 + yy561 := *x.FptrMapFloat32Uint32 if false { } else { - z.F.EncMapFloat32Uint64V(yy561, e) + z.F.EncMapFloat32Uint32V(yy561, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Uintptr == nil { + if x.FMapFloat32Uint64 == nil { r.EncodeNil() } else { - yym564 := z.EncBinary() - _ = yym564 if false { } else { - z.F.EncMapFloat32UintptrV(x.FMapFloat32Uintptr, e) + z.F.EncMapFloat32Uint64V(x.FMapFloat32Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uint64`) r.WriteMapElemValue() - if x.FMapFloat32Uintptr == nil { + if x.FMapFloat32Uint64 == nil { r.EncodeNil() } else { - yym565 := z.EncBinary() - _ = yym565 if false { } else { - z.F.EncMapFloat32UintptrV(x.FMapFloat32Uintptr, e) + z.F.EncMapFloat32Uint64V(x.FMapFloat32Uint64, e) } } } var yyn566 bool - if x.FptrMapFloat32Uintptr == nil { + if x.FptrMapFloat32Uint64 == nil { yyn566 = true goto LABEL566 } @@ -4957,67 +4384,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Uintptr == nil { + if x.FptrMapFloat32Uint64 == nil { r.EncodeNil() } else { - yy567 := *x.FptrMapFloat32Uintptr - yym568 := z.EncBinary() - _ = yym568 + yy567 := *x.FptrMapFloat32Uint64 if false { } else { - z.F.EncMapFloat32UintptrV(yy567, e) + z.F.EncMapFloat32Uint64V(yy567, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uint64`) r.WriteMapElemValue() if yyn566 { r.EncodeNil() } else { - if x.FptrMapFloat32Uintptr == nil { + if x.FptrMapFloat32Uint64 == nil { r.EncodeNil() } else { - yy569 := *x.FptrMapFloat32Uintptr - yym570 := z.EncBinary() - _ = yym570 + yy569 := *x.FptrMapFloat32Uint64 if false { } else { - z.F.EncMapFloat32UintptrV(yy569, e) + z.F.EncMapFloat32Uint64V(yy569, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Int == nil { + if x.FMapFloat32Uintptr == nil { r.EncodeNil() } else { - yym572 := z.EncBinary() - _ = yym572 if false { } else { - z.F.EncMapFloat32IntV(x.FMapFloat32Int, e) + z.F.EncMapFloat32UintptrV(x.FMapFloat32Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Uintptr`) r.WriteMapElemValue() - if x.FMapFloat32Int == nil { + if x.FMapFloat32Uintptr == nil { r.EncodeNil() } else { - yym573 := z.EncBinary() - _ = yym573 if false { } else { - z.F.EncMapFloat32IntV(x.FMapFloat32Int, e) + z.F.EncMapFloat32UintptrV(x.FMapFloat32Uintptr, e) } } } var yyn574 bool - if x.FptrMapFloat32Int == nil { + if x.FptrMapFloat32Uintptr == nil { yyn574 = true goto LABEL574 } @@ -5028,67 +4447,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Int == nil { + if x.FptrMapFloat32Uintptr == nil { r.EncodeNil() } else { - yy575 := *x.FptrMapFloat32Int - yym576 := z.EncBinary() - _ = yym576 + yy575 := *x.FptrMapFloat32Uintptr if false { } else { - z.F.EncMapFloat32IntV(yy575, e) + z.F.EncMapFloat32UintptrV(yy575, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Uintptr`) r.WriteMapElemValue() if yyn574 { r.EncodeNil() } else { - if x.FptrMapFloat32Int == nil { + if x.FptrMapFloat32Uintptr == nil { r.EncodeNil() } else { - yy577 := *x.FptrMapFloat32Int - yym578 := z.EncBinary() - _ = yym578 + yy577 := *x.FptrMapFloat32Uintptr if false { } else { - z.F.EncMapFloat32IntV(yy577, e) + z.F.EncMapFloat32UintptrV(yy577, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Int8 == nil { + if x.FMapFloat32Int == nil { r.EncodeNil() } else { - yym580 := z.EncBinary() - _ = yym580 if false { } else { - z.F.EncMapFloat32Int8V(x.FMapFloat32Int8, e) + z.F.EncMapFloat32IntV(x.FMapFloat32Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Int`) r.WriteMapElemValue() - if x.FMapFloat32Int8 == nil { + if x.FMapFloat32Int == nil { r.EncodeNil() } else { - yym581 := z.EncBinary() - _ = yym581 if false { } else { - z.F.EncMapFloat32Int8V(x.FMapFloat32Int8, e) + z.F.EncMapFloat32IntV(x.FMapFloat32Int, e) } } } var yyn582 bool - if x.FptrMapFloat32Int8 == nil { + if x.FptrMapFloat32Int == nil { yyn582 = true goto LABEL582 } @@ -5099,67 +4510,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Int8 == nil { + if x.FptrMapFloat32Int == nil { r.EncodeNil() } else { - yy583 := *x.FptrMapFloat32Int8 - yym584 := z.EncBinary() - _ = yym584 + yy583 := *x.FptrMapFloat32Int if false { } else { - z.F.EncMapFloat32Int8V(yy583, e) + z.F.EncMapFloat32IntV(yy583, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Int`) r.WriteMapElemValue() if yyn582 { r.EncodeNil() } else { - if x.FptrMapFloat32Int8 == nil { + if x.FptrMapFloat32Int == nil { r.EncodeNil() } else { - yy585 := *x.FptrMapFloat32Int8 - yym586 := z.EncBinary() - _ = yym586 + yy585 := *x.FptrMapFloat32Int if false { } else { - z.F.EncMapFloat32Int8V(yy585, e) + z.F.EncMapFloat32IntV(yy585, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Int16 == nil { + if x.FMapFloat32Int8 == nil { r.EncodeNil() } else { - yym588 := z.EncBinary() - _ = yym588 if false { } else { - z.F.EncMapFloat32Int16V(x.FMapFloat32Int16, e) + z.F.EncMapFloat32Int8V(x.FMapFloat32Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Int8`) r.WriteMapElemValue() - if x.FMapFloat32Int16 == nil { + if x.FMapFloat32Int8 == nil { r.EncodeNil() } else { - yym589 := z.EncBinary() - _ = yym589 if false { } else { - z.F.EncMapFloat32Int16V(x.FMapFloat32Int16, e) + z.F.EncMapFloat32Int8V(x.FMapFloat32Int8, e) } } } var yyn590 bool - if x.FptrMapFloat32Int16 == nil { + if x.FptrMapFloat32Int8 == nil { yyn590 = true goto LABEL590 } @@ -5170,67 +4573,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Int16 == nil { + if x.FptrMapFloat32Int8 == nil { r.EncodeNil() } else { - yy591 := *x.FptrMapFloat32Int16 - yym592 := z.EncBinary() - _ = yym592 + yy591 := *x.FptrMapFloat32Int8 if false { } else { - z.F.EncMapFloat32Int16V(yy591, e) + z.F.EncMapFloat32Int8V(yy591, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Int8`) r.WriteMapElemValue() if yyn590 { r.EncodeNil() } else { - if x.FptrMapFloat32Int16 == nil { + if x.FptrMapFloat32Int8 == nil { r.EncodeNil() } else { - yy593 := *x.FptrMapFloat32Int16 - yym594 := z.EncBinary() - _ = yym594 + yy593 := *x.FptrMapFloat32Int8 if false { } else { - z.F.EncMapFloat32Int16V(yy593, e) + z.F.EncMapFloat32Int8V(yy593, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Int32 == nil { + if x.FMapFloat32Int16 == nil { r.EncodeNil() } else { - yym596 := z.EncBinary() - _ = yym596 if false { } else { - z.F.EncMapFloat32Int32V(x.FMapFloat32Int32, e) + z.F.EncMapFloat32Int16V(x.FMapFloat32Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Int16`) r.WriteMapElemValue() - if x.FMapFloat32Int32 == nil { + if x.FMapFloat32Int16 == nil { r.EncodeNil() } else { - yym597 := z.EncBinary() - _ = yym597 if false { } else { - z.F.EncMapFloat32Int32V(x.FMapFloat32Int32, e) + z.F.EncMapFloat32Int16V(x.FMapFloat32Int16, e) } } } var yyn598 bool - if x.FptrMapFloat32Int32 == nil { + if x.FptrMapFloat32Int16 == nil { yyn598 = true goto LABEL598 } @@ -5241,67 +4636,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Int32 == nil { + if x.FptrMapFloat32Int16 == nil { r.EncodeNil() } else { - yy599 := *x.FptrMapFloat32Int32 - yym600 := z.EncBinary() - _ = yym600 + yy599 := *x.FptrMapFloat32Int16 if false { } else { - z.F.EncMapFloat32Int32V(yy599, e) + z.F.EncMapFloat32Int16V(yy599, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Int16`) r.WriteMapElemValue() if yyn598 { r.EncodeNil() } else { - if x.FptrMapFloat32Int32 == nil { + if x.FptrMapFloat32Int16 == nil { r.EncodeNil() } else { - yy601 := *x.FptrMapFloat32Int32 - yym602 := z.EncBinary() - _ = yym602 + yy601 := *x.FptrMapFloat32Int16 if false { } else { - z.F.EncMapFloat32Int32V(yy601, e) + z.F.EncMapFloat32Int16V(yy601, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Int64 == nil { + if x.FMapFloat32Int32 == nil { r.EncodeNil() } else { - yym604 := z.EncBinary() - _ = yym604 if false { } else { - z.F.EncMapFloat32Int64V(x.FMapFloat32Int64, e) + z.F.EncMapFloat32Int32V(x.FMapFloat32Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Int32`) r.WriteMapElemValue() - if x.FMapFloat32Int64 == nil { + if x.FMapFloat32Int32 == nil { r.EncodeNil() } else { - yym605 := z.EncBinary() - _ = yym605 if false { } else { - z.F.EncMapFloat32Int64V(x.FMapFloat32Int64, e) + z.F.EncMapFloat32Int32V(x.FMapFloat32Int32, e) } } } var yyn606 bool - if x.FptrMapFloat32Int64 == nil { + if x.FptrMapFloat32Int32 == nil { yyn606 = true goto LABEL606 } @@ -5312,67 +4699,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Int64 == nil { + if x.FptrMapFloat32Int32 == nil { r.EncodeNil() } else { - yy607 := *x.FptrMapFloat32Int64 - yym608 := z.EncBinary() - _ = yym608 + yy607 := *x.FptrMapFloat32Int32 if false { } else { - z.F.EncMapFloat32Int64V(yy607, e) + z.F.EncMapFloat32Int32V(yy607, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Int32`) r.WriteMapElemValue() if yyn606 { r.EncodeNil() } else { - if x.FptrMapFloat32Int64 == nil { + if x.FptrMapFloat32Int32 == nil { r.EncodeNil() } else { - yy609 := *x.FptrMapFloat32Int64 - yym610 := z.EncBinary() - _ = yym610 + yy609 := *x.FptrMapFloat32Int32 if false { } else { - z.F.EncMapFloat32Int64V(yy609, e) + z.F.EncMapFloat32Int32V(yy609, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Float32 == nil { + if x.FMapFloat32Int64 == nil { r.EncodeNil() } else { - yym612 := z.EncBinary() - _ = yym612 if false { } else { - z.F.EncMapFloat32Float32V(x.FMapFloat32Float32, e) + z.F.EncMapFloat32Int64V(x.FMapFloat32Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Int64`) r.WriteMapElemValue() - if x.FMapFloat32Float32 == nil { + if x.FMapFloat32Int64 == nil { r.EncodeNil() } else { - yym613 := z.EncBinary() - _ = yym613 if false { } else { - z.F.EncMapFloat32Float32V(x.FMapFloat32Float32, e) + z.F.EncMapFloat32Int64V(x.FMapFloat32Int64, e) } } } var yyn614 bool - if x.FptrMapFloat32Float32 == nil { + if x.FptrMapFloat32Int64 == nil { yyn614 = true goto LABEL614 } @@ -5383,67 +4762,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Float32 == nil { + if x.FptrMapFloat32Int64 == nil { r.EncodeNil() } else { - yy615 := *x.FptrMapFloat32Float32 - yym616 := z.EncBinary() - _ = yym616 + yy615 := *x.FptrMapFloat32Int64 if false { } else { - z.F.EncMapFloat32Float32V(yy615, e) + z.F.EncMapFloat32Int64V(yy615, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Int64`) r.WriteMapElemValue() if yyn614 { r.EncodeNil() } else { - if x.FptrMapFloat32Float32 == nil { + if x.FptrMapFloat32Int64 == nil { r.EncodeNil() } else { - yy617 := *x.FptrMapFloat32Float32 - yym618 := z.EncBinary() - _ = yym618 + yy617 := *x.FptrMapFloat32Int64 if false { } else { - z.F.EncMapFloat32Float32V(yy617, e) + z.F.EncMapFloat32Int64V(yy617, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Float64 == nil { + if x.FMapFloat32Float32 == nil { r.EncodeNil() } else { - yym620 := z.EncBinary() - _ = yym620 if false { } else { - z.F.EncMapFloat32Float64V(x.FMapFloat32Float64, e) + z.F.EncMapFloat32Float32V(x.FMapFloat32Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Float32`) r.WriteMapElemValue() - if x.FMapFloat32Float64 == nil { + if x.FMapFloat32Float32 == nil { r.EncodeNil() } else { - yym621 := z.EncBinary() - _ = yym621 if false { } else { - z.F.EncMapFloat32Float64V(x.FMapFloat32Float64, e) + z.F.EncMapFloat32Float32V(x.FMapFloat32Float32, e) } } } var yyn622 bool - if x.FptrMapFloat32Float64 == nil { + if x.FptrMapFloat32Float32 == nil { yyn622 = true goto LABEL622 } @@ -5454,67 +4825,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Float64 == nil { + if x.FptrMapFloat32Float32 == nil { r.EncodeNil() } else { - yy623 := *x.FptrMapFloat32Float64 - yym624 := z.EncBinary() - _ = yym624 + yy623 := *x.FptrMapFloat32Float32 if false { } else { - z.F.EncMapFloat32Float64V(yy623, e) + z.F.EncMapFloat32Float32V(yy623, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Float32`) r.WriteMapElemValue() if yyn622 { r.EncodeNil() } else { - if x.FptrMapFloat32Float64 == nil { + if x.FptrMapFloat32Float32 == nil { r.EncodeNil() } else { - yy625 := *x.FptrMapFloat32Float64 - yym626 := z.EncBinary() - _ = yym626 + yy625 := *x.FptrMapFloat32Float32 if false { } else { - z.F.EncMapFloat32Float64V(yy625, e) + z.F.EncMapFloat32Float32V(yy625, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat32Bool == nil { + if x.FMapFloat32Float64 == nil { r.EncodeNil() } else { - yym628 := z.EncBinary() - _ = yym628 if false { } else { - z.F.EncMapFloat32BoolV(x.FMapFloat32Bool, e) + z.F.EncMapFloat32Float64V(x.FMapFloat32Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Float64`) r.WriteMapElemValue() - if x.FMapFloat32Bool == nil { + if x.FMapFloat32Float64 == nil { r.EncodeNil() } else { - yym629 := z.EncBinary() - _ = yym629 if false { } else { - z.F.EncMapFloat32BoolV(x.FMapFloat32Bool, e) + z.F.EncMapFloat32Float64V(x.FMapFloat32Float64, e) } } } var yyn630 bool - if x.FptrMapFloat32Bool == nil { + if x.FptrMapFloat32Float64 == nil { yyn630 = true goto LABEL630 } @@ -5525,67 +4888,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat32Bool == nil { + if x.FptrMapFloat32Float64 == nil { r.EncodeNil() } else { - yy631 := *x.FptrMapFloat32Bool - yym632 := z.EncBinary() - _ = yym632 + yy631 := *x.FptrMapFloat32Float64 if false { } else { - z.F.EncMapFloat32BoolV(yy631, e) + z.F.EncMapFloat32Float64V(yy631, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Float64`) r.WriteMapElemValue() if yyn630 { r.EncodeNil() } else { - if x.FptrMapFloat32Bool == nil { + if x.FptrMapFloat32Float64 == nil { r.EncodeNil() } else { - yy633 := *x.FptrMapFloat32Bool - yym634 := z.EncBinary() - _ = yym634 + yy633 := *x.FptrMapFloat32Float64 if false { } else { - z.F.EncMapFloat32BoolV(yy633, e) + z.F.EncMapFloat32Float64V(yy633, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Intf == nil { + if x.FMapFloat32Bool == nil { r.EncodeNil() } else { - yym636 := z.EncBinary() - _ = yym636 if false { } else { - z.F.EncMapFloat64IntfV(x.FMapFloat64Intf, e) + z.F.EncMapFloat32BoolV(x.FMapFloat32Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat32Bool`) r.WriteMapElemValue() - if x.FMapFloat64Intf == nil { + if x.FMapFloat32Bool == nil { r.EncodeNil() } else { - yym637 := z.EncBinary() - _ = yym637 if false { } else { - z.F.EncMapFloat64IntfV(x.FMapFloat64Intf, e) + z.F.EncMapFloat32BoolV(x.FMapFloat32Bool, e) } } } var yyn638 bool - if x.FptrMapFloat64Intf == nil { + if x.FptrMapFloat32Bool == nil { yyn638 = true goto LABEL638 } @@ -5596,67 +4951,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Intf == nil { + if x.FptrMapFloat32Bool == nil { r.EncodeNil() } else { - yy639 := *x.FptrMapFloat64Intf - yym640 := z.EncBinary() - _ = yym640 + yy639 := *x.FptrMapFloat32Bool if false { } else { - z.F.EncMapFloat64IntfV(yy639, e) + z.F.EncMapFloat32BoolV(yy639, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat32Bool`) r.WriteMapElemValue() if yyn638 { r.EncodeNil() } else { - if x.FptrMapFloat64Intf == nil { + if x.FptrMapFloat32Bool == nil { r.EncodeNil() } else { - yy641 := *x.FptrMapFloat64Intf - yym642 := z.EncBinary() - _ = yym642 + yy641 := *x.FptrMapFloat32Bool if false { } else { - z.F.EncMapFloat64IntfV(yy641, e) + z.F.EncMapFloat32BoolV(yy641, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64String == nil { + if x.FMapFloat64Intf == nil { r.EncodeNil() } else { - yym644 := z.EncBinary() - _ = yym644 if false { } else { - z.F.EncMapFloat64StringV(x.FMapFloat64String, e) + z.F.EncMapFloat64IntfV(x.FMapFloat64Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64String")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Intf`) r.WriteMapElemValue() - if x.FMapFloat64String == nil { + if x.FMapFloat64Intf == nil { r.EncodeNil() } else { - yym645 := z.EncBinary() - _ = yym645 if false { } else { - z.F.EncMapFloat64StringV(x.FMapFloat64String, e) + z.F.EncMapFloat64IntfV(x.FMapFloat64Intf, e) } } } var yyn646 bool - if x.FptrMapFloat64String == nil { + if x.FptrMapFloat64Intf == nil { yyn646 = true goto LABEL646 } @@ -5667,67 +5014,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64String == nil { + if x.FptrMapFloat64Intf == nil { r.EncodeNil() } else { - yy647 := *x.FptrMapFloat64String - yym648 := z.EncBinary() - _ = yym648 + yy647 := *x.FptrMapFloat64Intf if false { } else { - z.F.EncMapFloat64StringV(yy647, e) + z.F.EncMapFloat64IntfV(yy647, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Intf`) r.WriteMapElemValue() if yyn646 { r.EncodeNil() } else { - if x.FptrMapFloat64String == nil { + if x.FptrMapFloat64Intf == nil { r.EncodeNil() } else { - yy649 := *x.FptrMapFloat64String - yym650 := z.EncBinary() - _ = yym650 + yy649 := *x.FptrMapFloat64Intf if false { } else { - z.F.EncMapFloat64StringV(yy649, e) + z.F.EncMapFloat64IntfV(yy649, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uint == nil { + if x.FMapFloat64String == nil { r.EncodeNil() } else { - yym652 := z.EncBinary() - _ = yym652 if false { } else { - z.F.EncMapFloat64UintV(x.FMapFloat64Uint, e) + z.F.EncMapFloat64StringV(x.FMapFloat64String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64String`) r.WriteMapElemValue() - if x.FMapFloat64Uint == nil { + if x.FMapFloat64String == nil { r.EncodeNil() } else { - yym653 := z.EncBinary() - _ = yym653 if false { } else { - z.F.EncMapFloat64UintV(x.FMapFloat64Uint, e) + z.F.EncMapFloat64StringV(x.FMapFloat64String, e) } } } var yyn654 bool - if x.FptrMapFloat64Uint == nil { + if x.FptrMapFloat64String == nil { yyn654 = true goto LABEL654 } @@ -5738,67 +5077,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uint == nil { + if x.FptrMapFloat64String == nil { r.EncodeNil() } else { - yy655 := *x.FptrMapFloat64Uint - yym656 := z.EncBinary() - _ = yym656 + yy655 := *x.FptrMapFloat64String if false { } else { - z.F.EncMapFloat64UintV(yy655, e) + z.F.EncMapFloat64StringV(yy655, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64String`) r.WriteMapElemValue() if yyn654 { r.EncodeNil() } else { - if x.FptrMapFloat64Uint == nil { + if x.FptrMapFloat64String == nil { r.EncodeNil() } else { - yy657 := *x.FptrMapFloat64Uint - yym658 := z.EncBinary() - _ = yym658 + yy657 := *x.FptrMapFloat64String if false { } else { - z.F.EncMapFloat64UintV(yy657, e) + z.F.EncMapFloat64StringV(yy657, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uint8 == nil { + if x.FMapFloat64Uint == nil { r.EncodeNil() } else { - yym660 := z.EncBinary() - _ = yym660 if false { } else { - z.F.EncMapFloat64Uint8V(x.FMapFloat64Uint8, e) + z.F.EncMapFloat64UintV(x.FMapFloat64Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uint`) r.WriteMapElemValue() - if x.FMapFloat64Uint8 == nil { + if x.FMapFloat64Uint == nil { r.EncodeNil() } else { - yym661 := z.EncBinary() - _ = yym661 if false { } else { - z.F.EncMapFloat64Uint8V(x.FMapFloat64Uint8, e) + z.F.EncMapFloat64UintV(x.FMapFloat64Uint, e) } } } var yyn662 bool - if x.FptrMapFloat64Uint8 == nil { + if x.FptrMapFloat64Uint == nil { yyn662 = true goto LABEL662 } @@ -5809,67 +5140,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uint8 == nil { + if x.FptrMapFloat64Uint == nil { r.EncodeNil() } else { - yy663 := *x.FptrMapFloat64Uint8 - yym664 := z.EncBinary() - _ = yym664 + yy663 := *x.FptrMapFloat64Uint if false { } else { - z.F.EncMapFloat64Uint8V(yy663, e) + z.F.EncMapFloat64UintV(yy663, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uint`) r.WriteMapElemValue() if yyn662 { r.EncodeNil() } else { - if x.FptrMapFloat64Uint8 == nil { + if x.FptrMapFloat64Uint == nil { r.EncodeNil() } else { - yy665 := *x.FptrMapFloat64Uint8 - yym666 := z.EncBinary() - _ = yym666 + yy665 := *x.FptrMapFloat64Uint if false { } else { - z.F.EncMapFloat64Uint8V(yy665, e) + z.F.EncMapFloat64UintV(yy665, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uint16 == nil { + if x.FMapFloat64Uint8 == nil { r.EncodeNil() } else { - yym668 := z.EncBinary() - _ = yym668 if false { } else { - z.F.EncMapFloat64Uint16V(x.FMapFloat64Uint16, e) + z.F.EncMapFloat64Uint8V(x.FMapFloat64Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uint8`) r.WriteMapElemValue() - if x.FMapFloat64Uint16 == nil { + if x.FMapFloat64Uint8 == nil { r.EncodeNil() } else { - yym669 := z.EncBinary() - _ = yym669 if false { } else { - z.F.EncMapFloat64Uint16V(x.FMapFloat64Uint16, e) + z.F.EncMapFloat64Uint8V(x.FMapFloat64Uint8, e) } } } var yyn670 bool - if x.FptrMapFloat64Uint16 == nil { + if x.FptrMapFloat64Uint8 == nil { yyn670 = true goto LABEL670 } @@ -5880,67 +5203,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uint16 == nil { + if x.FptrMapFloat64Uint8 == nil { r.EncodeNil() } else { - yy671 := *x.FptrMapFloat64Uint16 - yym672 := z.EncBinary() - _ = yym672 + yy671 := *x.FptrMapFloat64Uint8 if false { } else { - z.F.EncMapFloat64Uint16V(yy671, e) + z.F.EncMapFloat64Uint8V(yy671, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uint8`) r.WriteMapElemValue() if yyn670 { r.EncodeNil() } else { - if x.FptrMapFloat64Uint16 == nil { + if x.FptrMapFloat64Uint8 == nil { r.EncodeNil() } else { - yy673 := *x.FptrMapFloat64Uint16 - yym674 := z.EncBinary() - _ = yym674 + yy673 := *x.FptrMapFloat64Uint8 if false { } else { - z.F.EncMapFloat64Uint16V(yy673, e) + z.F.EncMapFloat64Uint8V(yy673, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uint32 == nil { + if x.FMapFloat64Uint16 == nil { r.EncodeNil() } else { - yym676 := z.EncBinary() - _ = yym676 if false { } else { - z.F.EncMapFloat64Uint32V(x.FMapFloat64Uint32, e) + z.F.EncMapFloat64Uint16V(x.FMapFloat64Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uint16`) r.WriteMapElemValue() - if x.FMapFloat64Uint32 == nil { + if x.FMapFloat64Uint16 == nil { r.EncodeNil() } else { - yym677 := z.EncBinary() - _ = yym677 if false { } else { - z.F.EncMapFloat64Uint32V(x.FMapFloat64Uint32, e) + z.F.EncMapFloat64Uint16V(x.FMapFloat64Uint16, e) } } } var yyn678 bool - if x.FptrMapFloat64Uint32 == nil { + if x.FptrMapFloat64Uint16 == nil { yyn678 = true goto LABEL678 } @@ -5951,67 +5266,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uint32 == nil { + if x.FptrMapFloat64Uint16 == nil { r.EncodeNil() } else { - yy679 := *x.FptrMapFloat64Uint32 - yym680 := z.EncBinary() - _ = yym680 + yy679 := *x.FptrMapFloat64Uint16 if false { } else { - z.F.EncMapFloat64Uint32V(yy679, e) + z.F.EncMapFloat64Uint16V(yy679, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uint16`) r.WriteMapElemValue() if yyn678 { r.EncodeNil() } else { - if x.FptrMapFloat64Uint32 == nil { + if x.FptrMapFloat64Uint16 == nil { r.EncodeNil() } else { - yy681 := *x.FptrMapFloat64Uint32 - yym682 := z.EncBinary() - _ = yym682 + yy681 := *x.FptrMapFloat64Uint16 if false { } else { - z.F.EncMapFloat64Uint32V(yy681, e) + z.F.EncMapFloat64Uint16V(yy681, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uint64 == nil { + if x.FMapFloat64Uint32 == nil { r.EncodeNil() } else { - yym684 := z.EncBinary() - _ = yym684 if false { } else { - z.F.EncMapFloat64Uint64V(x.FMapFloat64Uint64, e) + z.F.EncMapFloat64Uint32V(x.FMapFloat64Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uint32`) r.WriteMapElemValue() - if x.FMapFloat64Uint64 == nil { + if x.FMapFloat64Uint32 == nil { r.EncodeNil() } else { - yym685 := z.EncBinary() - _ = yym685 if false { } else { - z.F.EncMapFloat64Uint64V(x.FMapFloat64Uint64, e) + z.F.EncMapFloat64Uint32V(x.FMapFloat64Uint32, e) } } } var yyn686 bool - if x.FptrMapFloat64Uint64 == nil { + if x.FptrMapFloat64Uint32 == nil { yyn686 = true goto LABEL686 } @@ -6022,67 +5329,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uint64 == nil { + if x.FptrMapFloat64Uint32 == nil { r.EncodeNil() } else { - yy687 := *x.FptrMapFloat64Uint64 - yym688 := z.EncBinary() - _ = yym688 + yy687 := *x.FptrMapFloat64Uint32 if false { } else { - z.F.EncMapFloat64Uint64V(yy687, e) + z.F.EncMapFloat64Uint32V(yy687, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uint32`) r.WriteMapElemValue() if yyn686 { r.EncodeNil() } else { - if x.FptrMapFloat64Uint64 == nil { + if x.FptrMapFloat64Uint32 == nil { r.EncodeNil() } else { - yy689 := *x.FptrMapFloat64Uint64 - yym690 := z.EncBinary() - _ = yym690 + yy689 := *x.FptrMapFloat64Uint32 if false { } else { - z.F.EncMapFloat64Uint64V(yy689, e) + z.F.EncMapFloat64Uint32V(yy689, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Uintptr == nil { + if x.FMapFloat64Uint64 == nil { r.EncodeNil() } else { - yym692 := z.EncBinary() - _ = yym692 if false { } else { - z.F.EncMapFloat64UintptrV(x.FMapFloat64Uintptr, e) + z.F.EncMapFloat64Uint64V(x.FMapFloat64Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uint64`) r.WriteMapElemValue() - if x.FMapFloat64Uintptr == nil { + if x.FMapFloat64Uint64 == nil { r.EncodeNil() } else { - yym693 := z.EncBinary() - _ = yym693 if false { } else { - z.F.EncMapFloat64UintptrV(x.FMapFloat64Uintptr, e) + z.F.EncMapFloat64Uint64V(x.FMapFloat64Uint64, e) } } } var yyn694 bool - if x.FptrMapFloat64Uintptr == nil { + if x.FptrMapFloat64Uint64 == nil { yyn694 = true goto LABEL694 } @@ -6093,67 +5392,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Uintptr == nil { + if x.FptrMapFloat64Uint64 == nil { r.EncodeNil() } else { - yy695 := *x.FptrMapFloat64Uintptr - yym696 := z.EncBinary() - _ = yym696 + yy695 := *x.FptrMapFloat64Uint64 if false { } else { - z.F.EncMapFloat64UintptrV(yy695, e) + z.F.EncMapFloat64Uint64V(yy695, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uint64`) r.WriteMapElemValue() if yyn694 { r.EncodeNil() } else { - if x.FptrMapFloat64Uintptr == nil { + if x.FptrMapFloat64Uint64 == nil { r.EncodeNil() } else { - yy697 := *x.FptrMapFloat64Uintptr - yym698 := z.EncBinary() - _ = yym698 + yy697 := *x.FptrMapFloat64Uint64 if false { } else { - z.F.EncMapFloat64UintptrV(yy697, e) + z.F.EncMapFloat64Uint64V(yy697, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Int == nil { + if x.FMapFloat64Uintptr == nil { r.EncodeNil() } else { - yym700 := z.EncBinary() - _ = yym700 if false { } else { - z.F.EncMapFloat64IntV(x.FMapFloat64Int, e) + z.F.EncMapFloat64UintptrV(x.FMapFloat64Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Uintptr`) r.WriteMapElemValue() - if x.FMapFloat64Int == nil { + if x.FMapFloat64Uintptr == nil { r.EncodeNil() } else { - yym701 := z.EncBinary() - _ = yym701 if false { } else { - z.F.EncMapFloat64IntV(x.FMapFloat64Int, e) + z.F.EncMapFloat64UintptrV(x.FMapFloat64Uintptr, e) } } } var yyn702 bool - if x.FptrMapFloat64Int == nil { + if x.FptrMapFloat64Uintptr == nil { yyn702 = true goto LABEL702 } @@ -6164,67 +5455,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Int == nil { + if x.FptrMapFloat64Uintptr == nil { r.EncodeNil() } else { - yy703 := *x.FptrMapFloat64Int - yym704 := z.EncBinary() - _ = yym704 + yy703 := *x.FptrMapFloat64Uintptr if false { } else { - z.F.EncMapFloat64IntV(yy703, e) + z.F.EncMapFloat64UintptrV(yy703, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Uintptr`) r.WriteMapElemValue() if yyn702 { r.EncodeNil() } else { - if x.FptrMapFloat64Int == nil { + if x.FptrMapFloat64Uintptr == nil { r.EncodeNil() } else { - yy705 := *x.FptrMapFloat64Int - yym706 := z.EncBinary() - _ = yym706 + yy705 := *x.FptrMapFloat64Uintptr if false { } else { - z.F.EncMapFloat64IntV(yy705, e) + z.F.EncMapFloat64UintptrV(yy705, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Int8 == nil { + if x.FMapFloat64Int == nil { r.EncodeNil() } else { - yym708 := z.EncBinary() - _ = yym708 if false { } else { - z.F.EncMapFloat64Int8V(x.FMapFloat64Int8, e) + z.F.EncMapFloat64IntV(x.FMapFloat64Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Int`) r.WriteMapElemValue() - if x.FMapFloat64Int8 == nil { + if x.FMapFloat64Int == nil { r.EncodeNil() } else { - yym709 := z.EncBinary() - _ = yym709 if false { } else { - z.F.EncMapFloat64Int8V(x.FMapFloat64Int8, e) + z.F.EncMapFloat64IntV(x.FMapFloat64Int, e) } } } var yyn710 bool - if x.FptrMapFloat64Int8 == nil { + if x.FptrMapFloat64Int == nil { yyn710 = true goto LABEL710 } @@ -6235,67 +5518,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Int8 == nil { + if x.FptrMapFloat64Int == nil { r.EncodeNil() } else { - yy711 := *x.FptrMapFloat64Int8 - yym712 := z.EncBinary() - _ = yym712 + yy711 := *x.FptrMapFloat64Int if false { } else { - z.F.EncMapFloat64Int8V(yy711, e) + z.F.EncMapFloat64IntV(yy711, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Int`) r.WriteMapElemValue() if yyn710 { r.EncodeNil() } else { - if x.FptrMapFloat64Int8 == nil { + if x.FptrMapFloat64Int == nil { r.EncodeNil() } else { - yy713 := *x.FptrMapFloat64Int8 - yym714 := z.EncBinary() - _ = yym714 + yy713 := *x.FptrMapFloat64Int if false { } else { - z.F.EncMapFloat64Int8V(yy713, e) + z.F.EncMapFloat64IntV(yy713, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Int16 == nil { + if x.FMapFloat64Int8 == nil { r.EncodeNil() } else { - yym716 := z.EncBinary() - _ = yym716 if false { } else { - z.F.EncMapFloat64Int16V(x.FMapFloat64Int16, e) + z.F.EncMapFloat64Int8V(x.FMapFloat64Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Int8`) r.WriteMapElemValue() - if x.FMapFloat64Int16 == nil { + if x.FMapFloat64Int8 == nil { r.EncodeNil() } else { - yym717 := z.EncBinary() - _ = yym717 if false { } else { - z.F.EncMapFloat64Int16V(x.FMapFloat64Int16, e) + z.F.EncMapFloat64Int8V(x.FMapFloat64Int8, e) } } } var yyn718 bool - if x.FptrMapFloat64Int16 == nil { + if x.FptrMapFloat64Int8 == nil { yyn718 = true goto LABEL718 } @@ -6306,67 +5581,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Int16 == nil { + if x.FptrMapFloat64Int8 == nil { r.EncodeNil() } else { - yy719 := *x.FptrMapFloat64Int16 - yym720 := z.EncBinary() - _ = yym720 + yy719 := *x.FptrMapFloat64Int8 if false { } else { - z.F.EncMapFloat64Int16V(yy719, e) + z.F.EncMapFloat64Int8V(yy719, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Int8`) r.WriteMapElemValue() if yyn718 { r.EncodeNil() } else { - if x.FptrMapFloat64Int16 == nil { + if x.FptrMapFloat64Int8 == nil { r.EncodeNil() } else { - yy721 := *x.FptrMapFloat64Int16 - yym722 := z.EncBinary() - _ = yym722 + yy721 := *x.FptrMapFloat64Int8 if false { } else { - z.F.EncMapFloat64Int16V(yy721, e) + z.F.EncMapFloat64Int8V(yy721, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Int32 == nil { + if x.FMapFloat64Int16 == nil { r.EncodeNil() } else { - yym724 := z.EncBinary() - _ = yym724 if false { } else { - z.F.EncMapFloat64Int32V(x.FMapFloat64Int32, e) + z.F.EncMapFloat64Int16V(x.FMapFloat64Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Int16`) r.WriteMapElemValue() - if x.FMapFloat64Int32 == nil { + if x.FMapFloat64Int16 == nil { r.EncodeNil() } else { - yym725 := z.EncBinary() - _ = yym725 if false { } else { - z.F.EncMapFloat64Int32V(x.FMapFloat64Int32, e) + z.F.EncMapFloat64Int16V(x.FMapFloat64Int16, e) } } } var yyn726 bool - if x.FptrMapFloat64Int32 == nil { + if x.FptrMapFloat64Int16 == nil { yyn726 = true goto LABEL726 } @@ -6377,67 +5644,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Int32 == nil { + if x.FptrMapFloat64Int16 == nil { r.EncodeNil() } else { - yy727 := *x.FptrMapFloat64Int32 - yym728 := z.EncBinary() - _ = yym728 + yy727 := *x.FptrMapFloat64Int16 if false { } else { - z.F.EncMapFloat64Int32V(yy727, e) + z.F.EncMapFloat64Int16V(yy727, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Int16`) r.WriteMapElemValue() if yyn726 { r.EncodeNil() } else { - if x.FptrMapFloat64Int32 == nil { + if x.FptrMapFloat64Int16 == nil { r.EncodeNil() } else { - yy729 := *x.FptrMapFloat64Int32 - yym730 := z.EncBinary() - _ = yym730 + yy729 := *x.FptrMapFloat64Int16 if false { } else { - z.F.EncMapFloat64Int32V(yy729, e) + z.F.EncMapFloat64Int16V(yy729, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Int64 == nil { + if x.FMapFloat64Int32 == nil { r.EncodeNil() } else { - yym732 := z.EncBinary() - _ = yym732 if false { } else { - z.F.EncMapFloat64Int64V(x.FMapFloat64Int64, e) + z.F.EncMapFloat64Int32V(x.FMapFloat64Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Int32`) r.WriteMapElemValue() - if x.FMapFloat64Int64 == nil { + if x.FMapFloat64Int32 == nil { r.EncodeNil() } else { - yym733 := z.EncBinary() - _ = yym733 if false { } else { - z.F.EncMapFloat64Int64V(x.FMapFloat64Int64, e) + z.F.EncMapFloat64Int32V(x.FMapFloat64Int32, e) } } } var yyn734 bool - if x.FptrMapFloat64Int64 == nil { + if x.FptrMapFloat64Int32 == nil { yyn734 = true goto LABEL734 } @@ -6448,67 +5707,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Int64 == nil { + if x.FptrMapFloat64Int32 == nil { r.EncodeNil() } else { - yy735 := *x.FptrMapFloat64Int64 - yym736 := z.EncBinary() - _ = yym736 + yy735 := *x.FptrMapFloat64Int32 if false { } else { - z.F.EncMapFloat64Int64V(yy735, e) + z.F.EncMapFloat64Int32V(yy735, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Int32`) r.WriteMapElemValue() if yyn734 { r.EncodeNil() } else { - if x.FptrMapFloat64Int64 == nil { + if x.FptrMapFloat64Int32 == nil { r.EncodeNil() } else { - yy737 := *x.FptrMapFloat64Int64 - yym738 := z.EncBinary() - _ = yym738 + yy737 := *x.FptrMapFloat64Int32 if false { } else { - z.F.EncMapFloat64Int64V(yy737, e) + z.F.EncMapFloat64Int32V(yy737, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Float32 == nil { + if x.FMapFloat64Int64 == nil { r.EncodeNil() } else { - yym740 := z.EncBinary() - _ = yym740 if false { } else { - z.F.EncMapFloat64Float32V(x.FMapFloat64Float32, e) + z.F.EncMapFloat64Int64V(x.FMapFloat64Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Int64`) r.WriteMapElemValue() - if x.FMapFloat64Float32 == nil { + if x.FMapFloat64Int64 == nil { r.EncodeNil() } else { - yym741 := z.EncBinary() - _ = yym741 if false { } else { - z.F.EncMapFloat64Float32V(x.FMapFloat64Float32, e) + z.F.EncMapFloat64Int64V(x.FMapFloat64Int64, e) } } } var yyn742 bool - if x.FptrMapFloat64Float32 == nil { + if x.FptrMapFloat64Int64 == nil { yyn742 = true goto LABEL742 } @@ -6519,67 +5770,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Float32 == nil { + if x.FptrMapFloat64Int64 == nil { r.EncodeNil() } else { - yy743 := *x.FptrMapFloat64Float32 - yym744 := z.EncBinary() - _ = yym744 + yy743 := *x.FptrMapFloat64Int64 if false { } else { - z.F.EncMapFloat64Float32V(yy743, e) + z.F.EncMapFloat64Int64V(yy743, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Int64`) r.WriteMapElemValue() if yyn742 { r.EncodeNil() } else { - if x.FptrMapFloat64Float32 == nil { + if x.FptrMapFloat64Int64 == nil { r.EncodeNil() } else { - yy745 := *x.FptrMapFloat64Float32 - yym746 := z.EncBinary() - _ = yym746 + yy745 := *x.FptrMapFloat64Int64 if false { } else { - z.F.EncMapFloat64Float32V(yy745, e) + z.F.EncMapFloat64Int64V(yy745, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Float64 == nil { + if x.FMapFloat64Float32 == nil { r.EncodeNil() } else { - yym748 := z.EncBinary() - _ = yym748 if false { } else { - z.F.EncMapFloat64Float64V(x.FMapFloat64Float64, e) + z.F.EncMapFloat64Float32V(x.FMapFloat64Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Float32`) r.WriteMapElemValue() - if x.FMapFloat64Float64 == nil { + if x.FMapFloat64Float32 == nil { r.EncodeNil() } else { - yym749 := z.EncBinary() - _ = yym749 if false { } else { - z.F.EncMapFloat64Float64V(x.FMapFloat64Float64, e) + z.F.EncMapFloat64Float32V(x.FMapFloat64Float32, e) } } } var yyn750 bool - if x.FptrMapFloat64Float64 == nil { + if x.FptrMapFloat64Float32 == nil { yyn750 = true goto LABEL750 } @@ -6590,67 +5833,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Float64 == nil { + if x.FptrMapFloat64Float32 == nil { r.EncodeNil() } else { - yy751 := *x.FptrMapFloat64Float64 - yym752 := z.EncBinary() - _ = yym752 + yy751 := *x.FptrMapFloat64Float32 if false { } else { - z.F.EncMapFloat64Float64V(yy751, e) + z.F.EncMapFloat64Float32V(yy751, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Float32`) r.WriteMapElemValue() if yyn750 { r.EncodeNil() } else { - if x.FptrMapFloat64Float64 == nil { + if x.FptrMapFloat64Float32 == nil { r.EncodeNil() } else { - yy753 := *x.FptrMapFloat64Float64 - yym754 := z.EncBinary() - _ = yym754 + yy753 := *x.FptrMapFloat64Float32 if false { } else { - z.F.EncMapFloat64Float64V(yy753, e) + z.F.EncMapFloat64Float32V(yy753, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapFloat64Bool == nil { + if x.FMapFloat64Float64 == nil { r.EncodeNil() } else { - yym756 := z.EncBinary() - _ = yym756 if false { } else { - z.F.EncMapFloat64BoolV(x.FMapFloat64Bool, e) + z.F.EncMapFloat64Float64V(x.FMapFloat64Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapFloat64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Float64`) r.WriteMapElemValue() - if x.FMapFloat64Bool == nil { + if x.FMapFloat64Float64 == nil { r.EncodeNil() } else { - yym757 := z.EncBinary() - _ = yym757 if false { } else { - z.F.EncMapFloat64BoolV(x.FMapFloat64Bool, e) + z.F.EncMapFloat64Float64V(x.FMapFloat64Float64, e) } } } var yyn758 bool - if x.FptrMapFloat64Bool == nil { + if x.FptrMapFloat64Float64 == nil { yyn758 = true goto LABEL758 } @@ -6661,67 +5896,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapFloat64Bool == nil { + if x.FptrMapFloat64Float64 == nil { r.EncodeNil() } else { - yy759 := *x.FptrMapFloat64Bool - yym760 := z.EncBinary() - _ = yym760 + yy759 := *x.FptrMapFloat64Float64 if false { } else { - z.F.EncMapFloat64BoolV(yy759, e) + z.F.EncMapFloat64Float64V(yy759, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapFloat64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Float64`) r.WriteMapElemValue() if yyn758 { r.EncodeNil() } else { - if x.FptrMapFloat64Bool == nil { + if x.FptrMapFloat64Float64 == nil { r.EncodeNil() } else { - yy761 := *x.FptrMapFloat64Bool - yym762 := z.EncBinary() - _ = yym762 + yy761 := *x.FptrMapFloat64Float64 if false { } else { - z.F.EncMapFloat64BoolV(yy761, e) + z.F.EncMapFloat64Float64V(yy761, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintIntf == nil { + if x.FMapFloat64Bool == nil { r.EncodeNil() } else { - yym764 := z.EncBinary() - _ = yym764 if false { } else { - z.F.EncMapUintIntfV(x.FMapUintIntf, e) + z.F.EncMapFloat64BoolV(x.FMapFloat64Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintIntf")) + r.EncodeString(codecSelferCcUTF819781, `FMapFloat64Bool`) r.WriteMapElemValue() - if x.FMapUintIntf == nil { + if x.FMapFloat64Bool == nil { r.EncodeNil() } else { - yym765 := z.EncBinary() - _ = yym765 if false { } else { - z.F.EncMapUintIntfV(x.FMapUintIntf, e) + z.F.EncMapFloat64BoolV(x.FMapFloat64Bool, e) } } } var yyn766 bool - if x.FptrMapUintIntf == nil { + if x.FptrMapFloat64Bool == nil { yyn766 = true goto LABEL766 } @@ -6732,67 +5959,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintIntf == nil { + if x.FptrMapFloat64Bool == nil { r.EncodeNil() } else { - yy767 := *x.FptrMapUintIntf - yym768 := z.EncBinary() - _ = yym768 + yy767 := *x.FptrMapFloat64Bool if false { } else { - z.F.EncMapUintIntfV(yy767, e) + z.F.EncMapFloat64BoolV(yy767, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapFloat64Bool`) r.WriteMapElemValue() if yyn766 { r.EncodeNil() } else { - if x.FptrMapUintIntf == nil { + if x.FptrMapFloat64Bool == nil { r.EncodeNil() } else { - yy769 := *x.FptrMapUintIntf - yym770 := z.EncBinary() - _ = yym770 + yy769 := *x.FptrMapFloat64Bool if false { } else { - z.F.EncMapUintIntfV(yy769, e) + z.F.EncMapFloat64BoolV(yy769, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintString == nil { + if x.FMapUintIntf == nil { r.EncodeNil() } else { - yym772 := z.EncBinary() - _ = yym772 if false { } else { - z.F.EncMapUintStringV(x.FMapUintString, e) + z.F.EncMapUintIntfV(x.FMapUintIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintString")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintIntf`) r.WriteMapElemValue() - if x.FMapUintString == nil { + if x.FMapUintIntf == nil { r.EncodeNil() } else { - yym773 := z.EncBinary() - _ = yym773 if false { } else { - z.F.EncMapUintStringV(x.FMapUintString, e) + z.F.EncMapUintIntfV(x.FMapUintIntf, e) } } } var yyn774 bool - if x.FptrMapUintString == nil { + if x.FptrMapUintIntf == nil { yyn774 = true goto LABEL774 } @@ -6803,67 +6022,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintString == nil { + if x.FptrMapUintIntf == nil { r.EncodeNil() } else { - yy775 := *x.FptrMapUintString - yym776 := z.EncBinary() - _ = yym776 + yy775 := *x.FptrMapUintIntf if false { } else { - z.F.EncMapUintStringV(yy775, e) + z.F.EncMapUintIntfV(yy775, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintIntf`) r.WriteMapElemValue() if yyn774 { r.EncodeNil() } else { - if x.FptrMapUintString == nil { + if x.FptrMapUintIntf == nil { r.EncodeNil() } else { - yy777 := *x.FptrMapUintString - yym778 := z.EncBinary() - _ = yym778 + yy777 := *x.FptrMapUintIntf if false { } else { - z.F.EncMapUintStringV(yy777, e) + z.F.EncMapUintIntfV(yy777, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUint == nil { + if x.FMapUintString == nil { r.EncodeNil() } else { - yym780 := z.EncBinary() - _ = yym780 if false { } else { - z.F.EncMapUintUintV(x.FMapUintUint, e) + z.F.EncMapUintStringV(x.FMapUintString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintString`) r.WriteMapElemValue() - if x.FMapUintUint == nil { + if x.FMapUintString == nil { r.EncodeNil() } else { - yym781 := z.EncBinary() - _ = yym781 if false { } else { - z.F.EncMapUintUintV(x.FMapUintUint, e) + z.F.EncMapUintStringV(x.FMapUintString, e) } } } var yyn782 bool - if x.FptrMapUintUint == nil { + if x.FptrMapUintString == nil { yyn782 = true goto LABEL782 } @@ -6874,67 +6085,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUint == nil { + if x.FptrMapUintString == nil { r.EncodeNil() } else { - yy783 := *x.FptrMapUintUint - yym784 := z.EncBinary() - _ = yym784 + yy783 := *x.FptrMapUintString if false { } else { - z.F.EncMapUintUintV(yy783, e) + z.F.EncMapUintStringV(yy783, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintString`) r.WriteMapElemValue() if yyn782 { r.EncodeNil() } else { - if x.FptrMapUintUint == nil { + if x.FptrMapUintString == nil { r.EncodeNil() } else { - yy785 := *x.FptrMapUintUint - yym786 := z.EncBinary() - _ = yym786 + yy785 := *x.FptrMapUintString if false { } else { - z.F.EncMapUintUintV(yy785, e) + z.F.EncMapUintStringV(yy785, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUint8 == nil { + if x.FMapUintUint == nil { r.EncodeNil() } else { - yym788 := z.EncBinary() - _ = yym788 if false { } else { - z.F.EncMapUintUint8V(x.FMapUintUint8, e) + z.F.EncMapUintUintV(x.FMapUintUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUint`) r.WriteMapElemValue() - if x.FMapUintUint8 == nil { + if x.FMapUintUint == nil { r.EncodeNil() } else { - yym789 := z.EncBinary() - _ = yym789 if false { } else { - z.F.EncMapUintUint8V(x.FMapUintUint8, e) + z.F.EncMapUintUintV(x.FMapUintUint, e) } } } var yyn790 bool - if x.FptrMapUintUint8 == nil { + if x.FptrMapUintUint == nil { yyn790 = true goto LABEL790 } @@ -6945,67 +6148,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUint8 == nil { + if x.FptrMapUintUint == nil { r.EncodeNil() } else { - yy791 := *x.FptrMapUintUint8 - yym792 := z.EncBinary() - _ = yym792 + yy791 := *x.FptrMapUintUint if false { } else { - z.F.EncMapUintUint8V(yy791, e) + z.F.EncMapUintUintV(yy791, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUint`) r.WriteMapElemValue() if yyn790 { r.EncodeNil() } else { - if x.FptrMapUintUint8 == nil { + if x.FptrMapUintUint == nil { r.EncodeNil() } else { - yy793 := *x.FptrMapUintUint8 - yym794 := z.EncBinary() - _ = yym794 + yy793 := *x.FptrMapUintUint if false { } else { - z.F.EncMapUintUint8V(yy793, e) + z.F.EncMapUintUintV(yy793, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUint16 == nil { + if x.FMapUintUint8 == nil { r.EncodeNil() } else { - yym796 := z.EncBinary() - _ = yym796 if false { } else { - z.F.EncMapUintUint16V(x.FMapUintUint16, e) + z.F.EncMapUintUint8V(x.FMapUintUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUint8`) r.WriteMapElemValue() - if x.FMapUintUint16 == nil { + if x.FMapUintUint8 == nil { r.EncodeNil() } else { - yym797 := z.EncBinary() - _ = yym797 if false { } else { - z.F.EncMapUintUint16V(x.FMapUintUint16, e) + z.F.EncMapUintUint8V(x.FMapUintUint8, e) } } } var yyn798 bool - if x.FptrMapUintUint16 == nil { + if x.FptrMapUintUint8 == nil { yyn798 = true goto LABEL798 } @@ -7016,67 +6211,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUint16 == nil { + if x.FptrMapUintUint8 == nil { r.EncodeNil() } else { - yy799 := *x.FptrMapUintUint16 - yym800 := z.EncBinary() - _ = yym800 + yy799 := *x.FptrMapUintUint8 if false { } else { - z.F.EncMapUintUint16V(yy799, e) + z.F.EncMapUintUint8V(yy799, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUint8`) r.WriteMapElemValue() if yyn798 { r.EncodeNil() } else { - if x.FptrMapUintUint16 == nil { + if x.FptrMapUintUint8 == nil { r.EncodeNil() } else { - yy801 := *x.FptrMapUintUint16 - yym802 := z.EncBinary() - _ = yym802 + yy801 := *x.FptrMapUintUint8 if false { } else { - z.F.EncMapUintUint16V(yy801, e) + z.F.EncMapUintUint8V(yy801, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUint32 == nil { + if x.FMapUintUint16 == nil { r.EncodeNil() } else { - yym804 := z.EncBinary() - _ = yym804 if false { } else { - z.F.EncMapUintUint32V(x.FMapUintUint32, e) + z.F.EncMapUintUint16V(x.FMapUintUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUint16`) r.WriteMapElemValue() - if x.FMapUintUint32 == nil { + if x.FMapUintUint16 == nil { r.EncodeNil() } else { - yym805 := z.EncBinary() - _ = yym805 if false { } else { - z.F.EncMapUintUint32V(x.FMapUintUint32, e) + z.F.EncMapUintUint16V(x.FMapUintUint16, e) } } } var yyn806 bool - if x.FptrMapUintUint32 == nil { + if x.FptrMapUintUint16 == nil { yyn806 = true goto LABEL806 } @@ -7087,67 +6274,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUint32 == nil { + if x.FptrMapUintUint16 == nil { r.EncodeNil() } else { - yy807 := *x.FptrMapUintUint32 - yym808 := z.EncBinary() - _ = yym808 + yy807 := *x.FptrMapUintUint16 if false { } else { - z.F.EncMapUintUint32V(yy807, e) + z.F.EncMapUintUint16V(yy807, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUint16`) r.WriteMapElemValue() if yyn806 { r.EncodeNil() } else { - if x.FptrMapUintUint32 == nil { + if x.FptrMapUintUint16 == nil { r.EncodeNil() } else { - yy809 := *x.FptrMapUintUint32 - yym810 := z.EncBinary() - _ = yym810 + yy809 := *x.FptrMapUintUint16 if false { } else { - z.F.EncMapUintUint32V(yy809, e) + z.F.EncMapUintUint16V(yy809, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUint64 == nil { + if x.FMapUintUint32 == nil { r.EncodeNil() } else { - yym812 := z.EncBinary() - _ = yym812 if false { } else { - z.F.EncMapUintUint64V(x.FMapUintUint64, e) + z.F.EncMapUintUint32V(x.FMapUintUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUint32`) r.WriteMapElemValue() - if x.FMapUintUint64 == nil { + if x.FMapUintUint32 == nil { r.EncodeNil() } else { - yym813 := z.EncBinary() - _ = yym813 if false { } else { - z.F.EncMapUintUint64V(x.FMapUintUint64, e) + z.F.EncMapUintUint32V(x.FMapUintUint32, e) } } } var yyn814 bool - if x.FptrMapUintUint64 == nil { + if x.FptrMapUintUint32 == nil { yyn814 = true goto LABEL814 } @@ -7158,67 +6337,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUint64 == nil { + if x.FptrMapUintUint32 == nil { r.EncodeNil() } else { - yy815 := *x.FptrMapUintUint64 - yym816 := z.EncBinary() - _ = yym816 + yy815 := *x.FptrMapUintUint32 if false { } else { - z.F.EncMapUintUint64V(yy815, e) + z.F.EncMapUintUint32V(yy815, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUint32`) r.WriteMapElemValue() if yyn814 { r.EncodeNil() } else { - if x.FptrMapUintUint64 == nil { + if x.FptrMapUintUint32 == nil { r.EncodeNil() } else { - yy817 := *x.FptrMapUintUint64 - yym818 := z.EncBinary() - _ = yym818 + yy817 := *x.FptrMapUintUint32 if false { } else { - z.F.EncMapUintUint64V(yy817, e) + z.F.EncMapUintUint32V(yy817, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintUintptr == nil { + if x.FMapUintUint64 == nil { r.EncodeNil() } else { - yym820 := z.EncBinary() - _ = yym820 if false { } else { - z.F.EncMapUintUintptrV(x.FMapUintUintptr, e) + z.F.EncMapUintUint64V(x.FMapUintUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUint64`) r.WriteMapElemValue() - if x.FMapUintUintptr == nil { + if x.FMapUintUint64 == nil { r.EncodeNil() } else { - yym821 := z.EncBinary() - _ = yym821 if false { } else { - z.F.EncMapUintUintptrV(x.FMapUintUintptr, e) + z.F.EncMapUintUint64V(x.FMapUintUint64, e) } } } var yyn822 bool - if x.FptrMapUintUintptr == nil { + if x.FptrMapUintUint64 == nil { yyn822 = true goto LABEL822 } @@ -7229,67 +6400,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintUintptr == nil { + if x.FptrMapUintUint64 == nil { r.EncodeNil() } else { - yy823 := *x.FptrMapUintUintptr - yym824 := z.EncBinary() - _ = yym824 + yy823 := *x.FptrMapUintUint64 if false { } else { - z.F.EncMapUintUintptrV(yy823, e) + z.F.EncMapUintUint64V(yy823, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUint64`) r.WriteMapElemValue() if yyn822 { r.EncodeNil() } else { - if x.FptrMapUintUintptr == nil { + if x.FptrMapUintUint64 == nil { r.EncodeNil() } else { - yy825 := *x.FptrMapUintUintptr - yym826 := z.EncBinary() - _ = yym826 + yy825 := *x.FptrMapUintUint64 if false { } else { - z.F.EncMapUintUintptrV(yy825, e) + z.F.EncMapUintUint64V(yy825, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintInt == nil { + if x.FMapUintUintptr == nil { r.EncodeNil() } else { - yym828 := z.EncBinary() - _ = yym828 if false { } else { - z.F.EncMapUintIntV(x.FMapUintInt, e) + z.F.EncMapUintUintptrV(x.FMapUintUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintUintptr`) r.WriteMapElemValue() - if x.FMapUintInt == nil { + if x.FMapUintUintptr == nil { r.EncodeNil() } else { - yym829 := z.EncBinary() - _ = yym829 if false { } else { - z.F.EncMapUintIntV(x.FMapUintInt, e) + z.F.EncMapUintUintptrV(x.FMapUintUintptr, e) } } } var yyn830 bool - if x.FptrMapUintInt == nil { + if x.FptrMapUintUintptr == nil { yyn830 = true goto LABEL830 } @@ -7300,67 +6463,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintInt == nil { + if x.FptrMapUintUintptr == nil { r.EncodeNil() } else { - yy831 := *x.FptrMapUintInt - yym832 := z.EncBinary() - _ = yym832 + yy831 := *x.FptrMapUintUintptr if false { } else { - z.F.EncMapUintIntV(yy831, e) + z.F.EncMapUintUintptrV(yy831, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintUintptr`) r.WriteMapElemValue() if yyn830 { r.EncodeNil() } else { - if x.FptrMapUintInt == nil { + if x.FptrMapUintUintptr == nil { r.EncodeNil() } else { - yy833 := *x.FptrMapUintInt - yym834 := z.EncBinary() - _ = yym834 + yy833 := *x.FptrMapUintUintptr if false { } else { - z.F.EncMapUintIntV(yy833, e) + z.F.EncMapUintUintptrV(yy833, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintInt8 == nil { + if x.FMapUintInt == nil { r.EncodeNil() } else { - yym836 := z.EncBinary() - _ = yym836 if false { } else { - z.F.EncMapUintInt8V(x.FMapUintInt8, e) + z.F.EncMapUintIntV(x.FMapUintInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintInt`) r.WriteMapElemValue() - if x.FMapUintInt8 == nil { + if x.FMapUintInt == nil { r.EncodeNil() } else { - yym837 := z.EncBinary() - _ = yym837 if false { } else { - z.F.EncMapUintInt8V(x.FMapUintInt8, e) + z.F.EncMapUintIntV(x.FMapUintInt, e) } } } var yyn838 bool - if x.FptrMapUintInt8 == nil { + if x.FptrMapUintInt == nil { yyn838 = true goto LABEL838 } @@ -7371,67 +6526,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintInt8 == nil { + if x.FptrMapUintInt == nil { r.EncodeNil() } else { - yy839 := *x.FptrMapUintInt8 - yym840 := z.EncBinary() - _ = yym840 + yy839 := *x.FptrMapUintInt if false { } else { - z.F.EncMapUintInt8V(yy839, e) + z.F.EncMapUintIntV(yy839, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintInt`) r.WriteMapElemValue() if yyn838 { r.EncodeNil() } else { - if x.FptrMapUintInt8 == nil { + if x.FptrMapUintInt == nil { r.EncodeNil() } else { - yy841 := *x.FptrMapUintInt8 - yym842 := z.EncBinary() - _ = yym842 + yy841 := *x.FptrMapUintInt if false { } else { - z.F.EncMapUintInt8V(yy841, e) + z.F.EncMapUintIntV(yy841, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintInt16 == nil { + if x.FMapUintInt8 == nil { r.EncodeNil() } else { - yym844 := z.EncBinary() - _ = yym844 if false { } else { - z.F.EncMapUintInt16V(x.FMapUintInt16, e) + z.F.EncMapUintInt8V(x.FMapUintInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintInt8`) r.WriteMapElemValue() - if x.FMapUintInt16 == nil { + if x.FMapUintInt8 == nil { r.EncodeNil() } else { - yym845 := z.EncBinary() - _ = yym845 if false { } else { - z.F.EncMapUintInt16V(x.FMapUintInt16, e) + z.F.EncMapUintInt8V(x.FMapUintInt8, e) } } } var yyn846 bool - if x.FptrMapUintInt16 == nil { + if x.FptrMapUintInt8 == nil { yyn846 = true goto LABEL846 } @@ -7442,67 +6589,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintInt16 == nil { + if x.FptrMapUintInt8 == nil { r.EncodeNil() } else { - yy847 := *x.FptrMapUintInt16 - yym848 := z.EncBinary() - _ = yym848 + yy847 := *x.FptrMapUintInt8 if false { } else { - z.F.EncMapUintInt16V(yy847, e) + z.F.EncMapUintInt8V(yy847, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintInt8`) r.WriteMapElemValue() if yyn846 { r.EncodeNil() } else { - if x.FptrMapUintInt16 == nil { + if x.FptrMapUintInt8 == nil { r.EncodeNil() } else { - yy849 := *x.FptrMapUintInt16 - yym850 := z.EncBinary() - _ = yym850 + yy849 := *x.FptrMapUintInt8 if false { } else { - z.F.EncMapUintInt16V(yy849, e) + z.F.EncMapUintInt8V(yy849, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintInt32 == nil { + if x.FMapUintInt16 == nil { r.EncodeNil() } else { - yym852 := z.EncBinary() - _ = yym852 if false { } else { - z.F.EncMapUintInt32V(x.FMapUintInt32, e) + z.F.EncMapUintInt16V(x.FMapUintInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintInt16`) r.WriteMapElemValue() - if x.FMapUintInt32 == nil { + if x.FMapUintInt16 == nil { r.EncodeNil() } else { - yym853 := z.EncBinary() - _ = yym853 if false { } else { - z.F.EncMapUintInt32V(x.FMapUintInt32, e) + z.F.EncMapUintInt16V(x.FMapUintInt16, e) } } } var yyn854 bool - if x.FptrMapUintInt32 == nil { + if x.FptrMapUintInt16 == nil { yyn854 = true goto LABEL854 } @@ -7513,67 +6652,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintInt32 == nil { + if x.FptrMapUintInt16 == nil { r.EncodeNil() } else { - yy855 := *x.FptrMapUintInt32 - yym856 := z.EncBinary() - _ = yym856 + yy855 := *x.FptrMapUintInt16 if false { } else { - z.F.EncMapUintInt32V(yy855, e) + z.F.EncMapUintInt16V(yy855, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintInt16`) r.WriteMapElemValue() if yyn854 { r.EncodeNil() } else { - if x.FptrMapUintInt32 == nil { + if x.FptrMapUintInt16 == nil { r.EncodeNil() } else { - yy857 := *x.FptrMapUintInt32 - yym858 := z.EncBinary() - _ = yym858 + yy857 := *x.FptrMapUintInt16 if false { } else { - z.F.EncMapUintInt32V(yy857, e) + z.F.EncMapUintInt16V(yy857, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintInt64 == nil { + if x.FMapUintInt32 == nil { r.EncodeNil() } else { - yym860 := z.EncBinary() - _ = yym860 if false { } else { - z.F.EncMapUintInt64V(x.FMapUintInt64, e) + z.F.EncMapUintInt32V(x.FMapUintInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintInt32`) r.WriteMapElemValue() - if x.FMapUintInt64 == nil { + if x.FMapUintInt32 == nil { r.EncodeNil() } else { - yym861 := z.EncBinary() - _ = yym861 if false { } else { - z.F.EncMapUintInt64V(x.FMapUintInt64, e) + z.F.EncMapUintInt32V(x.FMapUintInt32, e) } } } var yyn862 bool - if x.FptrMapUintInt64 == nil { + if x.FptrMapUintInt32 == nil { yyn862 = true goto LABEL862 } @@ -7584,67 +6715,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintInt64 == nil { + if x.FptrMapUintInt32 == nil { r.EncodeNil() } else { - yy863 := *x.FptrMapUintInt64 - yym864 := z.EncBinary() - _ = yym864 + yy863 := *x.FptrMapUintInt32 if false { } else { - z.F.EncMapUintInt64V(yy863, e) + z.F.EncMapUintInt32V(yy863, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintInt32`) r.WriteMapElemValue() if yyn862 { r.EncodeNil() } else { - if x.FptrMapUintInt64 == nil { + if x.FptrMapUintInt32 == nil { r.EncodeNil() } else { - yy865 := *x.FptrMapUintInt64 - yym866 := z.EncBinary() - _ = yym866 + yy865 := *x.FptrMapUintInt32 if false { } else { - z.F.EncMapUintInt64V(yy865, e) + z.F.EncMapUintInt32V(yy865, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintFloat32 == nil { + if x.FMapUintInt64 == nil { r.EncodeNil() } else { - yym868 := z.EncBinary() - _ = yym868 if false { } else { - z.F.EncMapUintFloat32V(x.FMapUintFloat32, e) + z.F.EncMapUintInt64V(x.FMapUintInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintInt64`) r.WriteMapElemValue() - if x.FMapUintFloat32 == nil { + if x.FMapUintInt64 == nil { r.EncodeNil() } else { - yym869 := z.EncBinary() - _ = yym869 if false { } else { - z.F.EncMapUintFloat32V(x.FMapUintFloat32, e) + z.F.EncMapUintInt64V(x.FMapUintInt64, e) } } } var yyn870 bool - if x.FptrMapUintFloat32 == nil { + if x.FptrMapUintInt64 == nil { yyn870 = true goto LABEL870 } @@ -7655,67 +6778,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintFloat32 == nil { + if x.FptrMapUintInt64 == nil { r.EncodeNil() } else { - yy871 := *x.FptrMapUintFloat32 - yym872 := z.EncBinary() - _ = yym872 + yy871 := *x.FptrMapUintInt64 if false { } else { - z.F.EncMapUintFloat32V(yy871, e) + z.F.EncMapUintInt64V(yy871, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintInt64`) r.WriteMapElemValue() if yyn870 { r.EncodeNil() } else { - if x.FptrMapUintFloat32 == nil { + if x.FptrMapUintInt64 == nil { r.EncodeNil() } else { - yy873 := *x.FptrMapUintFloat32 - yym874 := z.EncBinary() - _ = yym874 + yy873 := *x.FptrMapUintInt64 if false { } else { - z.F.EncMapUintFloat32V(yy873, e) + z.F.EncMapUintInt64V(yy873, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintFloat64 == nil { + if x.FMapUintFloat32 == nil { r.EncodeNil() } else { - yym876 := z.EncBinary() - _ = yym876 if false { } else { - z.F.EncMapUintFloat64V(x.FMapUintFloat64, e) + z.F.EncMapUintFloat32V(x.FMapUintFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintFloat32`) r.WriteMapElemValue() - if x.FMapUintFloat64 == nil { + if x.FMapUintFloat32 == nil { r.EncodeNil() } else { - yym877 := z.EncBinary() - _ = yym877 if false { } else { - z.F.EncMapUintFloat64V(x.FMapUintFloat64, e) + z.F.EncMapUintFloat32V(x.FMapUintFloat32, e) } } } var yyn878 bool - if x.FptrMapUintFloat64 == nil { + if x.FptrMapUintFloat32 == nil { yyn878 = true goto LABEL878 } @@ -7726,67 +6841,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintFloat64 == nil { + if x.FptrMapUintFloat32 == nil { r.EncodeNil() } else { - yy879 := *x.FptrMapUintFloat64 - yym880 := z.EncBinary() - _ = yym880 + yy879 := *x.FptrMapUintFloat32 if false { } else { - z.F.EncMapUintFloat64V(yy879, e) + z.F.EncMapUintFloat32V(yy879, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintFloat32`) r.WriteMapElemValue() if yyn878 { r.EncodeNil() } else { - if x.FptrMapUintFloat64 == nil { + if x.FptrMapUintFloat32 == nil { r.EncodeNil() } else { - yy881 := *x.FptrMapUintFloat64 - yym882 := z.EncBinary() - _ = yym882 + yy881 := *x.FptrMapUintFloat32 if false { } else { - z.F.EncMapUintFloat64V(yy881, e) + z.F.EncMapUintFloat32V(yy881, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintBool == nil { + if x.FMapUintFloat64 == nil { r.EncodeNil() } else { - yym884 := z.EncBinary() - _ = yym884 if false { } else { - z.F.EncMapUintBoolV(x.FMapUintBool, e) + z.F.EncMapUintFloat64V(x.FMapUintFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintFloat64`) r.WriteMapElemValue() - if x.FMapUintBool == nil { + if x.FMapUintFloat64 == nil { r.EncodeNil() } else { - yym885 := z.EncBinary() - _ = yym885 if false { } else { - z.F.EncMapUintBoolV(x.FMapUintBool, e) + z.F.EncMapUintFloat64V(x.FMapUintFloat64, e) } } } var yyn886 bool - if x.FptrMapUintBool == nil { + if x.FptrMapUintFloat64 == nil { yyn886 = true goto LABEL886 } @@ -7797,67 +6904,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintBool == nil { + if x.FptrMapUintFloat64 == nil { r.EncodeNil() } else { - yy887 := *x.FptrMapUintBool - yym888 := z.EncBinary() - _ = yym888 + yy887 := *x.FptrMapUintFloat64 if false { } else { - z.F.EncMapUintBoolV(yy887, e) + z.F.EncMapUintFloat64V(yy887, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintFloat64`) r.WriteMapElemValue() if yyn886 { r.EncodeNil() } else { - if x.FptrMapUintBool == nil { + if x.FptrMapUintFloat64 == nil { r.EncodeNil() } else { - yy889 := *x.FptrMapUintBool - yym890 := z.EncBinary() - _ = yym890 + yy889 := *x.FptrMapUintFloat64 if false { } else { - z.F.EncMapUintBoolV(yy889, e) + z.F.EncMapUintFloat64V(yy889, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Intf == nil { + if x.FMapUintBool == nil { r.EncodeNil() } else { - yym892 := z.EncBinary() - _ = yym892 if false { } else { - z.F.EncMapUint8IntfV(x.FMapUint8Intf, e) + z.F.EncMapUintBoolV(x.FMapUintBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintBool`) r.WriteMapElemValue() - if x.FMapUint8Intf == nil { + if x.FMapUintBool == nil { r.EncodeNil() } else { - yym893 := z.EncBinary() - _ = yym893 if false { } else { - z.F.EncMapUint8IntfV(x.FMapUint8Intf, e) + z.F.EncMapUintBoolV(x.FMapUintBool, e) } } } var yyn894 bool - if x.FptrMapUint8Intf == nil { + if x.FptrMapUintBool == nil { yyn894 = true goto LABEL894 } @@ -7868,67 +6967,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Intf == nil { + if x.FptrMapUintBool == nil { r.EncodeNil() } else { - yy895 := *x.FptrMapUint8Intf - yym896 := z.EncBinary() - _ = yym896 + yy895 := *x.FptrMapUintBool if false { } else { - z.F.EncMapUint8IntfV(yy895, e) + z.F.EncMapUintBoolV(yy895, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintBool`) r.WriteMapElemValue() if yyn894 { r.EncodeNil() } else { - if x.FptrMapUint8Intf == nil { + if x.FptrMapUintBool == nil { r.EncodeNil() } else { - yy897 := *x.FptrMapUint8Intf - yym898 := z.EncBinary() - _ = yym898 + yy897 := *x.FptrMapUintBool if false { } else { - z.F.EncMapUint8IntfV(yy897, e) + z.F.EncMapUintBoolV(yy897, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8String == nil { + if x.FMapUint8Intf == nil { r.EncodeNil() } else { - yym900 := z.EncBinary() - _ = yym900 if false { } else { - z.F.EncMapUint8StringV(x.FMapUint8String, e) + z.F.EncMapUint8IntfV(x.FMapUint8Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8String")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Intf`) r.WriteMapElemValue() - if x.FMapUint8String == nil { + if x.FMapUint8Intf == nil { r.EncodeNil() } else { - yym901 := z.EncBinary() - _ = yym901 if false { } else { - z.F.EncMapUint8StringV(x.FMapUint8String, e) + z.F.EncMapUint8IntfV(x.FMapUint8Intf, e) } } } var yyn902 bool - if x.FptrMapUint8String == nil { + if x.FptrMapUint8Intf == nil { yyn902 = true goto LABEL902 } @@ -7939,67 +7030,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8String == nil { + if x.FptrMapUint8Intf == nil { r.EncodeNil() } else { - yy903 := *x.FptrMapUint8String - yym904 := z.EncBinary() - _ = yym904 + yy903 := *x.FptrMapUint8Intf if false { } else { - z.F.EncMapUint8StringV(yy903, e) + z.F.EncMapUint8IntfV(yy903, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Intf`) r.WriteMapElemValue() if yyn902 { r.EncodeNil() } else { - if x.FptrMapUint8String == nil { + if x.FptrMapUint8Intf == nil { r.EncodeNil() } else { - yy905 := *x.FptrMapUint8String - yym906 := z.EncBinary() - _ = yym906 + yy905 := *x.FptrMapUint8Intf if false { } else { - z.F.EncMapUint8StringV(yy905, e) + z.F.EncMapUint8IntfV(yy905, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uint == nil { + if x.FMapUint8String == nil { r.EncodeNil() } else { - yym908 := z.EncBinary() - _ = yym908 if false { } else { - z.F.EncMapUint8UintV(x.FMapUint8Uint, e) + z.F.EncMapUint8StringV(x.FMapUint8String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8String`) r.WriteMapElemValue() - if x.FMapUint8Uint == nil { + if x.FMapUint8String == nil { r.EncodeNil() } else { - yym909 := z.EncBinary() - _ = yym909 if false { } else { - z.F.EncMapUint8UintV(x.FMapUint8Uint, e) + z.F.EncMapUint8StringV(x.FMapUint8String, e) } } } var yyn910 bool - if x.FptrMapUint8Uint == nil { + if x.FptrMapUint8String == nil { yyn910 = true goto LABEL910 } @@ -8010,67 +7093,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uint == nil { + if x.FptrMapUint8String == nil { r.EncodeNil() } else { - yy911 := *x.FptrMapUint8Uint - yym912 := z.EncBinary() - _ = yym912 + yy911 := *x.FptrMapUint8String if false { } else { - z.F.EncMapUint8UintV(yy911, e) + z.F.EncMapUint8StringV(yy911, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8String`) r.WriteMapElemValue() if yyn910 { r.EncodeNil() } else { - if x.FptrMapUint8Uint == nil { + if x.FptrMapUint8String == nil { r.EncodeNil() } else { - yy913 := *x.FptrMapUint8Uint - yym914 := z.EncBinary() - _ = yym914 + yy913 := *x.FptrMapUint8String if false { } else { - z.F.EncMapUint8UintV(yy913, e) + z.F.EncMapUint8StringV(yy913, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uint8 == nil { + if x.FMapUint8Uint == nil { r.EncodeNil() } else { - yym916 := z.EncBinary() - _ = yym916 if false { } else { - z.F.EncMapUint8Uint8V(x.FMapUint8Uint8, e) + z.F.EncMapUint8UintV(x.FMapUint8Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uint`) r.WriteMapElemValue() - if x.FMapUint8Uint8 == nil { + if x.FMapUint8Uint == nil { r.EncodeNil() } else { - yym917 := z.EncBinary() - _ = yym917 if false { } else { - z.F.EncMapUint8Uint8V(x.FMapUint8Uint8, e) + z.F.EncMapUint8UintV(x.FMapUint8Uint, e) } } } var yyn918 bool - if x.FptrMapUint8Uint8 == nil { + if x.FptrMapUint8Uint == nil { yyn918 = true goto LABEL918 } @@ -8081,67 +7156,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uint8 == nil { + if x.FptrMapUint8Uint == nil { r.EncodeNil() } else { - yy919 := *x.FptrMapUint8Uint8 - yym920 := z.EncBinary() - _ = yym920 + yy919 := *x.FptrMapUint8Uint if false { } else { - z.F.EncMapUint8Uint8V(yy919, e) + z.F.EncMapUint8UintV(yy919, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uint`) r.WriteMapElemValue() if yyn918 { r.EncodeNil() } else { - if x.FptrMapUint8Uint8 == nil { + if x.FptrMapUint8Uint == nil { r.EncodeNil() } else { - yy921 := *x.FptrMapUint8Uint8 - yym922 := z.EncBinary() - _ = yym922 + yy921 := *x.FptrMapUint8Uint if false { } else { - z.F.EncMapUint8Uint8V(yy921, e) + z.F.EncMapUint8UintV(yy921, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uint16 == nil { + if x.FMapUint8Uint8 == nil { r.EncodeNil() } else { - yym924 := z.EncBinary() - _ = yym924 if false { } else { - z.F.EncMapUint8Uint16V(x.FMapUint8Uint16, e) + z.F.EncMapUint8Uint8V(x.FMapUint8Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uint8`) r.WriteMapElemValue() - if x.FMapUint8Uint16 == nil { + if x.FMapUint8Uint8 == nil { r.EncodeNil() } else { - yym925 := z.EncBinary() - _ = yym925 if false { } else { - z.F.EncMapUint8Uint16V(x.FMapUint8Uint16, e) + z.F.EncMapUint8Uint8V(x.FMapUint8Uint8, e) } } } var yyn926 bool - if x.FptrMapUint8Uint16 == nil { + if x.FptrMapUint8Uint8 == nil { yyn926 = true goto LABEL926 } @@ -8152,67 +7219,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uint16 == nil { + if x.FptrMapUint8Uint8 == nil { r.EncodeNil() } else { - yy927 := *x.FptrMapUint8Uint16 - yym928 := z.EncBinary() - _ = yym928 + yy927 := *x.FptrMapUint8Uint8 if false { } else { - z.F.EncMapUint8Uint16V(yy927, e) + z.F.EncMapUint8Uint8V(yy927, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uint8`) r.WriteMapElemValue() if yyn926 { r.EncodeNil() } else { - if x.FptrMapUint8Uint16 == nil { + if x.FptrMapUint8Uint8 == nil { r.EncodeNil() } else { - yy929 := *x.FptrMapUint8Uint16 - yym930 := z.EncBinary() - _ = yym930 + yy929 := *x.FptrMapUint8Uint8 if false { } else { - z.F.EncMapUint8Uint16V(yy929, e) + z.F.EncMapUint8Uint8V(yy929, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uint32 == nil { + if x.FMapUint8Uint16 == nil { r.EncodeNil() } else { - yym932 := z.EncBinary() - _ = yym932 if false { } else { - z.F.EncMapUint8Uint32V(x.FMapUint8Uint32, e) + z.F.EncMapUint8Uint16V(x.FMapUint8Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uint16`) r.WriteMapElemValue() - if x.FMapUint8Uint32 == nil { + if x.FMapUint8Uint16 == nil { r.EncodeNil() } else { - yym933 := z.EncBinary() - _ = yym933 if false { } else { - z.F.EncMapUint8Uint32V(x.FMapUint8Uint32, e) + z.F.EncMapUint8Uint16V(x.FMapUint8Uint16, e) } } } var yyn934 bool - if x.FptrMapUint8Uint32 == nil { + if x.FptrMapUint8Uint16 == nil { yyn934 = true goto LABEL934 } @@ -8223,67 +7282,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uint32 == nil { + if x.FptrMapUint8Uint16 == nil { r.EncodeNil() } else { - yy935 := *x.FptrMapUint8Uint32 - yym936 := z.EncBinary() - _ = yym936 + yy935 := *x.FptrMapUint8Uint16 if false { } else { - z.F.EncMapUint8Uint32V(yy935, e) + z.F.EncMapUint8Uint16V(yy935, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uint16`) r.WriteMapElemValue() if yyn934 { r.EncodeNil() } else { - if x.FptrMapUint8Uint32 == nil { + if x.FptrMapUint8Uint16 == nil { r.EncodeNil() } else { - yy937 := *x.FptrMapUint8Uint32 - yym938 := z.EncBinary() - _ = yym938 + yy937 := *x.FptrMapUint8Uint16 if false { } else { - z.F.EncMapUint8Uint32V(yy937, e) + z.F.EncMapUint8Uint16V(yy937, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uint64 == nil { + if x.FMapUint8Uint32 == nil { r.EncodeNil() } else { - yym940 := z.EncBinary() - _ = yym940 if false { } else { - z.F.EncMapUint8Uint64V(x.FMapUint8Uint64, e) + z.F.EncMapUint8Uint32V(x.FMapUint8Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uint32`) r.WriteMapElemValue() - if x.FMapUint8Uint64 == nil { + if x.FMapUint8Uint32 == nil { r.EncodeNil() } else { - yym941 := z.EncBinary() - _ = yym941 if false { } else { - z.F.EncMapUint8Uint64V(x.FMapUint8Uint64, e) + z.F.EncMapUint8Uint32V(x.FMapUint8Uint32, e) } } } var yyn942 bool - if x.FptrMapUint8Uint64 == nil { + if x.FptrMapUint8Uint32 == nil { yyn942 = true goto LABEL942 } @@ -8294,67 +7345,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uint64 == nil { + if x.FptrMapUint8Uint32 == nil { r.EncodeNil() } else { - yy943 := *x.FptrMapUint8Uint64 - yym944 := z.EncBinary() - _ = yym944 + yy943 := *x.FptrMapUint8Uint32 if false { } else { - z.F.EncMapUint8Uint64V(yy943, e) + z.F.EncMapUint8Uint32V(yy943, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uint32`) r.WriteMapElemValue() if yyn942 { r.EncodeNil() } else { - if x.FptrMapUint8Uint64 == nil { + if x.FptrMapUint8Uint32 == nil { r.EncodeNil() } else { - yy945 := *x.FptrMapUint8Uint64 - yym946 := z.EncBinary() - _ = yym946 + yy945 := *x.FptrMapUint8Uint32 if false { } else { - z.F.EncMapUint8Uint64V(yy945, e) + z.F.EncMapUint8Uint32V(yy945, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Uintptr == nil { + if x.FMapUint8Uint64 == nil { r.EncodeNil() } else { - yym948 := z.EncBinary() - _ = yym948 if false { } else { - z.F.EncMapUint8UintptrV(x.FMapUint8Uintptr, e) + z.F.EncMapUint8Uint64V(x.FMapUint8Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uint64`) r.WriteMapElemValue() - if x.FMapUint8Uintptr == nil { + if x.FMapUint8Uint64 == nil { r.EncodeNil() } else { - yym949 := z.EncBinary() - _ = yym949 if false { } else { - z.F.EncMapUint8UintptrV(x.FMapUint8Uintptr, e) + z.F.EncMapUint8Uint64V(x.FMapUint8Uint64, e) } } } var yyn950 bool - if x.FptrMapUint8Uintptr == nil { + if x.FptrMapUint8Uint64 == nil { yyn950 = true goto LABEL950 } @@ -8365,67 +7408,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Uintptr == nil { + if x.FptrMapUint8Uint64 == nil { r.EncodeNil() } else { - yy951 := *x.FptrMapUint8Uintptr - yym952 := z.EncBinary() - _ = yym952 + yy951 := *x.FptrMapUint8Uint64 if false { } else { - z.F.EncMapUint8UintptrV(yy951, e) + z.F.EncMapUint8Uint64V(yy951, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uint64`) r.WriteMapElemValue() if yyn950 { r.EncodeNil() } else { - if x.FptrMapUint8Uintptr == nil { + if x.FptrMapUint8Uint64 == nil { r.EncodeNil() } else { - yy953 := *x.FptrMapUint8Uintptr - yym954 := z.EncBinary() - _ = yym954 + yy953 := *x.FptrMapUint8Uint64 if false { } else { - z.F.EncMapUint8UintptrV(yy953, e) + z.F.EncMapUint8Uint64V(yy953, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Int == nil { + if x.FMapUint8Uintptr == nil { r.EncodeNil() } else { - yym956 := z.EncBinary() - _ = yym956 if false { } else { - z.F.EncMapUint8IntV(x.FMapUint8Int, e) + z.F.EncMapUint8UintptrV(x.FMapUint8Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Uintptr`) r.WriteMapElemValue() - if x.FMapUint8Int == nil { + if x.FMapUint8Uintptr == nil { r.EncodeNil() } else { - yym957 := z.EncBinary() - _ = yym957 if false { } else { - z.F.EncMapUint8IntV(x.FMapUint8Int, e) + z.F.EncMapUint8UintptrV(x.FMapUint8Uintptr, e) } } } var yyn958 bool - if x.FptrMapUint8Int == nil { + if x.FptrMapUint8Uintptr == nil { yyn958 = true goto LABEL958 } @@ -8436,67 +7471,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Int == nil { + if x.FptrMapUint8Uintptr == nil { r.EncodeNil() } else { - yy959 := *x.FptrMapUint8Int - yym960 := z.EncBinary() - _ = yym960 + yy959 := *x.FptrMapUint8Uintptr if false { } else { - z.F.EncMapUint8IntV(yy959, e) + z.F.EncMapUint8UintptrV(yy959, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Uintptr`) r.WriteMapElemValue() if yyn958 { r.EncodeNil() } else { - if x.FptrMapUint8Int == nil { + if x.FptrMapUint8Uintptr == nil { r.EncodeNil() } else { - yy961 := *x.FptrMapUint8Int - yym962 := z.EncBinary() - _ = yym962 + yy961 := *x.FptrMapUint8Uintptr if false { } else { - z.F.EncMapUint8IntV(yy961, e) + z.F.EncMapUint8UintptrV(yy961, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Int8 == nil { + if x.FMapUint8Int == nil { r.EncodeNil() } else { - yym964 := z.EncBinary() - _ = yym964 if false { } else { - z.F.EncMapUint8Int8V(x.FMapUint8Int8, e) + z.F.EncMapUint8IntV(x.FMapUint8Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Int`) r.WriteMapElemValue() - if x.FMapUint8Int8 == nil { + if x.FMapUint8Int == nil { r.EncodeNil() } else { - yym965 := z.EncBinary() - _ = yym965 if false { } else { - z.F.EncMapUint8Int8V(x.FMapUint8Int8, e) + z.F.EncMapUint8IntV(x.FMapUint8Int, e) } } } var yyn966 bool - if x.FptrMapUint8Int8 == nil { + if x.FptrMapUint8Int == nil { yyn966 = true goto LABEL966 } @@ -8507,67 +7534,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Int8 == nil { + if x.FptrMapUint8Int == nil { r.EncodeNil() } else { - yy967 := *x.FptrMapUint8Int8 - yym968 := z.EncBinary() - _ = yym968 + yy967 := *x.FptrMapUint8Int if false { } else { - z.F.EncMapUint8Int8V(yy967, e) + z.F.EncMapUint8IntV(yy967, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Int`) r.WriteMapElemValue() if yyn966 { r.EncodeNil() } else { - if x.FptrMapUint8Int8 == nil { + if x.FptrMapUint8Int == nil { r.EncodeNil() } else { - yy969 := *x.FptrMapUint8Int8 - yym970 := z.EncBinary() - _ = yym970 + yy969 := *x.FptrMapUint8Int if false { } else { - z.F.EncMapUint8Int8V(yy969, e) + z.F.EncMapUint8IntV(yy969, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Int16 == nil { + if x.FMapUint8Int8 == nil { r.EncodeNil() } else { - yym972 := z.EncBinary() - _ = yym972 if false { } else { - z.F.EncMapUint8Int16V(x.FMapUint8Int16, e) + z.F.EncMapUint8Int8V(x.FMapUint8Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Int8`) r.WriteMapElemValue() - if x.FMapUint8Int16 == nil { + if x.FMapUint8Int8 == nil { r.EncodeNil() } else { - yym973 := z.EncBinary() - _ = yym973 if false { } else { - z.F.EncMapUint8Int16V(x.FMapUint8Int16, e) + z.F.EncMapUint8Int8V(x.FMapUint8Int8, e) } } } var yyn974 bool - if x.FptrMapUint8Int16 == nil { + if x.FptrMapUint8Int8 == nil { yyn974 = true goto LABEL974 } @@ -8578,67 +7597,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Int16 == nil { + if x.FptrMapUint8Int8 == nil { r.EncodeNil() } else { - yy975 := *x.FptrMapUint8Int16 - yym976 := z.EncBinary() - _ = yym976 + yy975 := *x.FptrMapUint8Int8 if false { } else { - z.F.EncMapUint8Int16V(yy975, e) + z.F.EncMapUint8Int8V(yy975, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Int8`) r.WriteMapElemValue() if yyn974 { r.EncodeNil() } else { - if x.FptrMapUint8Int16 == nil { + if x.FptrMapUint8Int8 == nil { r.EncodeNil() } else { - yy977 := *x.FptrMapUint8Int16 - yym978 := z.EncBinary() - _ = yym978 + yy977 := *x.FptrMapUint8Int8 if false { } else { - z.F.EncMapUint8Int16V(yy977, e) + z.F.EncMapUint8Int8V(yy977, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Int32 == nil { + if x.FMapUint8Int16 == nil { r.EncodeNil() } else { - yym980 := z.EncBinary() - _ = yym980 if false { } else { - z.F.EncMapUint8Int32V(x.FMapUint8Int32, e) + z.F.EncMapUint8Int16V(x.FMapUint8Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Int16`) r.WriteMapElemValue() - if x.FMapUint8Int32 == nil { + if x.FMapUint8Int16 == nil { r.EncodeNil() } else { - yym981 := z.EncBinary() - _ = yym981 if false { } else { - z.F.EncMapUint8Int32V(x.FMapUint8Int32, e) + z.F.EncMapUint8Int16V(x.FMapUint8Int16, e) } } } var yyn982 bool - if x.FptrMapUint8Int32 == nil { + if x.FptrMapUint8Int16 == nil { yyn982 = true goto LABEL982 } @@ -8649,67 +7660,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Int32 == nil { + if x.FptrMapUint8Int16 == nil { r.EncodeNil() } else { - yy983 := *x.FptrMapUint8Int32 - yym984 := z.EncBinary() - _ = yym984 + yy983 := *x.FptrMapUint8Int16 if false { } else { - z.F.EncMapUint8Int32V(yy983, e) + z.F.EncMapUint8Int16V(yy983, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Int16`) r.WriteMapElemValue() if yyn982 { r.EncodeNil() } else { - if x.FptrMapUint8Int32 == nil { + if x.FptrMapUint8Int16 == nil { r.EncodeNil() } else { - yy985 := *x.FptrMapUint8Int32 - yym986 := z.EncBinary() - _ = yym986 + yy985 := *x.FptrMapUint8Int16 if false { } else { - z.F.EncMapUint8Int32V(yy985, e) + z.F.EncMapUint8Int16V(yy985, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Int64 == nil { + if x.FMapUint8Int32 == nil { r.EncodeNil() } else { - yym988 := z.EncBinary() - _ = yym988 if false { } else { - z.F.EncMapUint8Int64V(x.FMapUint8Int64, e) + z.F.EncMapUint8Int32V(x.FMapUint8Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Int32`) r.WriteMapElemValue() - if x.FMapUint8Int64 == nil { + if x.FMapUint8Int32 == nil { r.EncodeNil() } else { - yym989 := z.EncBinary() - _ = yym989 if false { } else { - z.F.EncMapUint8Int64V(x.FMapUint8Int64, e) + z.F.EncMapUint8Int32V(x.FMapUint8Int32, e) } } } var yyn990 bool - if x.FptrMapUint8Int64 == nil { + if x.FptrMapUint8Int32 == nil { yyn990 = true goto LABEL990 } @@ -8720,67 +7723,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Int64 == nil { + if x.FptrMapUint8Int32 == nil { r.EncodeNil() } else { - yy991 := *x.FptrMapUint8Int64 - yym992 := z.EncBinary() - _ = yym992 + yy991 := *x.FptrMapUint8Int32 if false { } else { - z.F.EncMapUint8Int64V(yy991, e) + z.F.EncMapUint8Int32V(yy991, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Int32`) r.WriteMapElemValue() if yyn990 { r.EncodeNil() } else { - if x.FptrMapUint8Int64 == nil { + if x.FptrMapUint8Int32 == nil { r.EncodeNil() } else { - yy993 := *x.FptrMapUint8Int64 - yym994 := z.EncBinary() - _ = yym994 + yy993 := *x.FptrMapUint8Int32 if false { } else { - z.F.EncMapUint8Int64V(yy993, e) + z.F.EncMapUint8Int32V(yy993, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Float32 == nil { + if x.FMapUint8Int64 == nil { r.EncodeNil() } else { - yym996 := z.EncBinary() - _ = yym996 if false { } else { - z.F.EncMapUint8Float32V(x.FMapUint8Float32, e) + z.F.EncMapUint8Int64V(x.FMapUint8Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Int64`) r.WriteMapElemValue() - if x.FMapUint8Float32 == nil { + if x.FMapUint8Int64 == nil { r.EncodeNil() } else { - yym997 := z.EncBinary() - _ = yym997 if false { } else { - z.F.EncMapUint8Float32V(x.FMapUint8Float32, e) + z.F.EncMapUint8Int64V(x.FMapUint8Int64, e) } } } var yyn998 bool - if x.FptrMapUint8Float32 == nil { + if x.FptrMapUint8Int64 == nil { yyn998 = true goto LABEL998 } @@ -8791,67 +7786,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Float32 == nil { + if x.FptrMapUint8Int64 == nil { r.EncodeNil() } else { - yy999 := *x.FptrMapUint8Float32 - yym1000 := z.EncBinary() - _ = yym1000 + yy999 := *x.FptrMapUint8Int64 if false { } else { - z.F.EncMapUint8Float32V(yy999, e) + z.F.EncMapUint8Int64V(yy999, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Int64`) r.WriteMapElemValue() if yyn998 { r.EncodeNil() } else { - if x.FptrMapUint8Float32 == nil { + if x.FptrMapUint8Int64 == nil { r.EncodeNil() } else { - yy1001 := *x.FptrMapUint8Float32 - yym1002 := z.EncBinary() - _ = yym1002 + yy1001 := *x.FptrMapUint8Int64 if false { } else { - z.F.EncMapUint8Float32V(yy1001, e) + z.F.EncMapUint8Int64V(yy1001, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Float64 == nil { + if x.FMapUint8Float32 == nil { r.EncodeNil() } else { - yym1004 := z.EncBinary() - _ = yym1004 if false { } else { - z.F.EncMapUint8Float64V(x.FMapUint8Float64, e) + z.F.EncMapUint8Float32V(x.FMapUint8Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Float32`) r.WriteMapElemValue() - if x.FMapUint8Float64 == nil { + if x.FMapUint8Float32 == nil { r.EncodeNil() } else { - yym1005 := z.EncBinary() - _ = yym1005 if false { } else { - z.F.EncMapUint8Float64V(x.FMapUint8Float64, e) + z.F.EncMapUint8Float32V(x.FMapUint8Float32, e) } } } var yyn1006 bool - if x.FptrMapUint8Float64 == nil { + if x.FptrMapUint8Float32 == nil { yyn1006 = true goto LABEL1006 } @@ -8862,67 +7849,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Float64 == nil { + if x.FptrMapUint8Float32 == nil { r.EncodeNil() } else { - yy1007 := *x.FptrMapUint8Float64 - yym1008 := z.EncBinary() - _ = yym1008 + yy1007 := *x.FptrMapUint8Float32 if false { } else { - z.F.EncMapUint8Float64V(yy1007, e) + z.F.EncMapUint8Float32V(yy1007, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Float32`) r.WriteMapElemValue() if yyn1006 { r.EncodeNil() } else { - if x.FptrMapUint8Float64 == nil { + if x.FptrMapUint8Float32 == nil { r.EncodeNil() } else { - yy1009 := *x.FptrMapUint8Float64 - yym1010 := z.EncBinary() - _ = yym1010 + yy1009 := *x.FptrMapUint8Float32 if false { } else { - z.F.EncMapUint8Float64V(yy1009, e) + z.F.EncMapUint8Float32V(yy1009, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint8Bool == nil { + if x.FMapUint8Float64 == nil { r.EncodeNil() } else { - yym1012 := z.EncBinary() - _ = yym1012 if false { } else { - z.F.EncMapUint8BoolV(x.FMapUint8Bool, e) + z.F.EncMapUint8Float64V(x.FMapUint8Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint8Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Float64`) r.WriteMapElemValue() - if x.FMapUint8Bool == nil { + if x.FMapUint8Float64 == nil { r.EncodeNil() } else { - yym1013 := z.EncBinary() - _ = yym1013 if false { } else { - z.F.EncMapUint8BoolV(x.FMapUint8Bool, e) + z.F.EncMapUint8Float64V(x.FMapUint8Float64, e) } } } var yyn1014 bool - if x.FptrMapUint8Bool == nil { + if x.FptrMapUint8Float64 == nil { yyn1014 = true goto LABEL1014 } @@ -8933,67 +7912,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint8Bool == nil { + if x.FptrMapUint8Float64 == nil { r.EncodeNil() } else { - yy1015 := *x.FptrMapUint8Bool - yym1016 := z.EncBinary() - _ = yym1016 + yy1015 := *x.FptrMapUint8Float64 if false { } else { - z.F.EncMapUint8BoolV(yy1015, e) + z.F.EncMapUint8Float64V(yy1015, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint8Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Float64`) r.WriteMapElemValue() if yyn1014 { r.EncodeNil() } else { - if x.FptrMapUint8Bool == nil { + if x.FptrMapUint8Float64 == nil { r.EncodeNil() } else { - yy1017 := *x.FptrMapUint8Bool - yym1018 := z.EncBinary() - _ = yym1018 + yy1017 := *x.FptrMapUint8Float64 if false { } else { - z.F.EncMapUint8BoolV(yy1017, e) + z.F.EncMapUint8Float64V(yy1017, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Intf == nil { + if x.FMapUint8Bool == nil { r.EncodeNil() } else { - yym1020 := z.EncBinary() - _ = yym1020 if false { } else { - z.F.EncMapUint16IntfV(x.FMapUint16Intf, e) + z.F.EncMapUint8BoolV(x.FMapUint8Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint8Bool`) r.WriteMapElemValue() - if x.FMapUint16Intf == nil { + if x.FMapUint8Bool == nil { r.EncodeNil() } else { - yym1021 := z.EncBinary() - _ = yym1021 if false { } else { - z.F.EncMapUint16IntfV(x.FMapUint16Intf, e) + z.F.EncMapUint8BoolV(x.FMapUint8Bool, e) } } } var yyn1022 bool - if x.FptrMapUint16Intf == nil { + if x.FptrMapUint8Bool == nil { yyn1022 = true goto LABEL1022 } @@ -9004,67 +7975,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Intf == nil { + if x.FptrMapUint8Bool == nil { r.EncodeNil() } else { - yy1023 := *x.FptrMapUint16Intf - yym1024 := z.EncBinary() - _ = yym1024 + yy1023 := *x.FptrMapUint8Bool if false { } else { - z.F.EncMapUint16IntfV(yy1023, e) + z.F.EncMapUint8BoolV(yy1023, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint8Bool`) r.WriteMapElemValue() if yyn1022 { r.EncodeNil() } else { - if x.FptrMapUint16Intf == nil { + if x.FptrMapUint8Bool == nil { r.EncodeNil() } else { - yy1025 := *x.FptrMapUint16Intf - yym1026 := z.EncBinary() - _ = yym1026 + yy1025 := *x.FptrMapUint8Bool if false { } else { - z.F.EncMapUint16IntfV(yy1025, e) + z.F.EncMapUint8BoolV(yy1025, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16String == nil { + if x.FMapUint16Intf == nil { r.EncodeNil() } else { - yym1028 := z.EncBinary() - _ = yym1028 if false { } else { - z.F.EncMapUint16StringV(x.FMapUint16String, e) + z.F.EncMapUint16IntfV(x.FMapUint16Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16String")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Intf`) r.WriteMapElemValue() - if x.FMapUint16String == nil { + if x.FMapUint16Intf == nil { r.EncodeNil() } else { - yym1029 := z.EncBinary() - _ = yym1029 if false { } else { - z.F.EncMapUint16StringV(x.FMapUint16String, e) + z.F.EncMapUint16IntfV(x.FMapUint16Intf, e) } } } var yyn1030 bool - if x.FptrMapUint16String == nil { + if x.FptrMapUint16Intf == nil { yyn1030 = true goto LABEL1030 } @@ -9075,67 +8038,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16String == nil { + if x.FptrMapUint16Intf == nil { r.EncodeNil() } else { - yy1031 := *x.FptrMapUint16String - yym1032 := z.EncBinary() - _ = yym1032 + yy1031 := *x.FptrMapUint16Intf if false { } else { - z.F.EncMapUint16StringV(yy1031, e) + z.F.EncMapUint16IntfV(yy1031, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Intf`) r.WriteMapElemValue() if yyn1030 { r.EncodeNil() } else { - if x.FptrMapUint16String == nil { + if x.FptrMapUint16Intf == nil { r.EncodeNil() } else { - yy1033 := *x.FptrMapUint16String - yym1034 := z.EncBinary() - _ = yym1034 + yy1033 := *x.FptrMapUint16Intf if false { } else { - z.F.EncMapUint16StringV(yy1033, e) + z.F.EncMapUint16IntfV(yy1033, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uint == nil { + if x.FMapUint16String == nil { r.EncodeNil() } else { - yym1036 := z.EncBinary() - _ = yym1036 if false { } else { - z.F.EncMapUint16UintV(x.FMapUint16Uint, e) + z.F.EncMapUint16StringV(x.FMapUint16String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16String`) r.WriteMapElemValue() - if x.FMapUint16Uint == nil { + if x.FMapUint16String == nil { r.EncodeNil() } else { - yym1037 := z.EncBinary() - _ = yym1037 if false { } else { - z.F.EncMapUint16UintV(x.FMapUint16Uint, e) + z.F.EncMapUint16StringV(x.FMapUint16String, e) } } } var yyn1038 bool - if x.FptrMapUint16Uint == nil { + if x.FptrMapUint16String == nil { yyn1038 = true goto LABEL1038 } @@ -9146,67 +8101,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uint == nil { + if x.FptrMapUint16String == nil { r.EncodeNil() } else { - yy1039 := *x.FptrMapUint16Uint - yym1040 := z.EncBinary() - _ = yym1040 + yy1039 := *x.FptrMapUint16String if false { } else { - z.F.EncMapUint16UintV(yy1039, e) + z.F.EncMapUint16StringV(yy1039, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16String`) r.WriteMapElemValue() if yyn1038 { r.EncodeNil() } else { - if x.FptrMapUint16Uint == nil { + if x.FptrMapUint16String == nil { r.EncodeNil() } else { - yy1041 := *x.FptrMapUint16Uint - yym1042 := z.EncBinary() - _ = yym1042 + yy1041 := *x.FptrMapUint16String if false { } else { - z.F.EncMapUint16UintV(yy1041, e) + z.F.EncMapUint16StringV(yy1041, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uint8 == nil { + if x.FMapUint16Uint == nil { r.EncodeNil() } else { - yym1044 := z.EncBinary() - _ = yym1044 if false { } else { - z.F.EncMapUint16Uint8V(x.FMapUint16Uint8, e) + z.F.EncMapUint16UintV(x.FMapUint16Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uint`) r.WriteMapElemValue() - if x.FMapUint16Uint8 == nil { + if x.FMapUint16Uint == nil { r.EncodeNil() } else { - yym1045 := z.EncBinary() - _ = yym1045 if false { } else { - z.F.EncMapUint16Uint8V(x.FMapUint16Uint8, e) + z.F.EncMapUint16UintV(x.FMapUint16Uint, e) } } } var yyn1046 bool - if x.FptrMapUint16Uint8 == nil { + if x.FptrMapUint16Uint == nil { yyn1046 = true goto LABEL1046 } @@ -9217,67 +8164,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uint8 == nil { + if x.FptrMapUint16Uint == nil { r.EncodeNil() } else { - yy1047 := *x.FptrMapUint16Uint8 - yym1048 := z.EncBinary() - _ = yym1048 + yy1047 := *x.FptrMapUint16Uint if false { } else { - z.F.EncMapUint16Uint8V(yy1047, e) + z.F.EncMapUint16UintV(yy1047, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uint`) r.WriteMapElemValue() if yyn1046 { r.EncodeNil() } else { - if x.FptrMapUint16Uint8 == nil { + if x.FptrMapUint16Uint == nil { r.EncodeNil() } else { - yy1049 := *x.FptrMapUint16Uint8 - yym1050 := z.EncBinary() - _ = yym1050 + yy1049 := *x.FptrMapUint16Uint if false { } else { - z.F.EncMapUint16Uint8V(yy1049, e) + z.F.EncMapUint16UintV(yy1049, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uint16 == nil { + if x.FMapUint16Uint8 == nil { r.EncodeNil() } else { - yym1052 := z.EncBinary() - _ = yym1052 if false { } else { - z.F.EncMapUint16Uint16V(x.FMapUint16Uint16, e) + z.F.EncMapUint16Uint8V(x.FMapUint16Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uint8`) r.WriteMapElemValue() - if x.FMapUint16Uint16 == nil { + if x.FMapUint16Uint8 == nil { r.EncodeNil() } else { - yym1053 := z.EncBinary() - _ = yym1053 if false { } else { - z.F.EncMapUint16Uint16V(x.FMapUint16Uint16, e) + z.F.EncMapUint16Uint8V(x.FMapUint16Uint8, e) } } } var yyn1054 bool - if x.FptrMapUint16Uint16 == nil { + if x.FptrMapUint16Uint8 == nil { yyn1054 = true goto LABEL1054 } @@ -9288,67 +8227,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uint16 == nil { + if x.FptrMapUint16Uint8 == nil { r.EncodeNil() } else { - yy1055 := *x.FptrMapUint16Uint16 - yym1056 := z.EncBinary() - _ = yym1056 + yy1055 := *x.FptrMapUint16Uint8 if false { } else { - z.F.EncMapUint16Uint16V(yy1055, e) + z.F.EncMapUint16Uint8V(yy1055, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uint8`) r.WriteMapElemValue() if yyn1054 { r.EncodeNil() } else { - if x.FptrMapUint16Uint16 == nil { + if x.FptrMapUint16Uint8 == nil { r.EncodeNil() } else { - yy1057 := *x.FptrMapUint16Uint16 - yym1058 := z.EncBinary() - _ = yym1058 + yy1057 := *x.FptrMapUint16Uint8 if false { } else { - z.F.EncMapUint16Uint16V(yy1057, e) + z.F.EncMapUint16Uint8V(yy1057, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uint32 == nil { + if x.FMapUint16Uint16 == nil { r.EncodeNil() } else { - yym1060 := z.EncBinary() - _ = yym1060 if false { } else { - z.F.EncMapUint16Uint32V(x.FMapUint16Uint32, e) + z.F.EncMapUint16Uint16V(x.FMapUint16Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uint16`) r.WriteMapElemValue() - if x.FMapUint16Uint32 == nil { + if x.FMapUint16Uint16 == nil { r.EncodeNil() } else { - yym1061 := z.EncBinary() - _ = yym1061 if false { } else { - z.F.EncMapUint16Uint32V(x.FMapUint16Uint32, e) + z.F.EncMapUint16Uint16V(x.FMapUint16Uint16, e) } } } var yyn1062 bool - if x.FptrMapUint16Uint32 == nil { + if x.FptrMapUint16Uint16 == nil { yyn1062 = true goto LABEL1062 } @@ -9359,67 +8290,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uint32 == nil { + if x.FptrMapUint16Uint16 == nil { r.EncodeNil() } else { - yy1063 := *x.FptrMapUint16Uint32 - yym1064 := z.EncBinary() - _ = yym1064 + yy1063 := *x.FptrMapUint16Uint16 if false { } else { - z.F.EncMapUint16Uint32V(yy1063, e) + z.F.EncMapUint16Uint16V(yy1063, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uint16`) r.WriteMapElemValue() if yyn1062 { r.EncodeNil() } else { - if x.FptrMapUint16Uint32 == nil { + if x.FptrMapUint16Uint16 == nil { r.EncodeNil() } else { - yy1065 := *x.FptrMapUint16Uint32 - yym1066 := z.EncBinary() - _ = yym1066 + yy1065 := *x.FptrMapUint16Uint16 if false { } else { - z.F.EncMapUint16Uint32V(yy1065, e) + z.F.EncMapUint16Uint16V(yy1065, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uint64 == nil { + if x.FMapUint16Uint32 == nil { r.EncodeNil() } else { - yym1068 := z.EncBinary() - _ = yym1068 if false { } else { - z.F.EncMapUint16Uint64V(x.FMapUint16Uint64, e) + z.F.EncMapUint16Uint32V(x.FMapUint16Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uint32`) r.WriteMapElemValue() - if x.FMapUint16Uint64 == nil { + if x.FMapUint16Uint32 == nil { r.EncodeNil() } else { - yym1069 := z.EncBinary() - _ = yym1069 if false { } else { - z.F.EncMapUint16Uint64V(x.FMapUint16Uint64, e) + z.F.EncMapUint16Uint32V(x.FMapUint16Uint32, e) } } } var yyn1070 bool - if x.FptrMapUint16Uint64 == nil { + if x.FptrMapUint16Uint32 == nil { yyn1070 = true goto LABEL1070 } @@ -9430,67 +8353,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uint64 == nil { + if x.FptrMapUint16Uint32 == nil { r.EncodeNil() } else { - yy1071 := *x.FptrMapUint16Uint64 - yym1072 := z.EncBinary() - _ = yym1072 + yy1071 := *x.FptrMapUint16Uint32 if false { } else { - z.F.EncMapUint16Uint64V(yy1071, e) + z.F.EncMapUint16Uint32V(yy1071, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uint32`) r.WriteMapElemValue() if yyn1070 { r.EncodeNil() } else { - if x.FptrMapUint16Uint64 == nil { + if x.FptrMapUint16Uint32 == nil { r.EncodeNil() } else { - yy1073 := *x.FptrMapUint16Uint64 - yym1074 := z.EncBinary() - _ = yym1074 + yy1073 := *x.FptrMapUint16Uint32 if false { } else { - z.F.EncMapUint16Uint64V(yy1073, e) + z.F.EncMapUint16Uint32V(yy1073, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Uintptr == nil { + if x.FMapUint16Uint64 == nil { r.EncodeNil() } else { - yym1076 := z.EncBinary() - _ = yym1076 if false { } else { - z.F.EncMapUint16UintptrV(x.FMapUint16Uintptr, e) + z.F.EncMapUint16Uint64V(x.FMapUint16Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uint64`) r.WriteMapElemValue() - if x.FMapUint16Uintptr == nil { + if x.FMapUint16Uint64 == nil { r.EncodeNil() } else { - yym1077 := z.EncBinary() - _ = yym1077 if false { } else { - z.F.EncMapUint16UintptrV(x.FMapUint16Uintptr, e) + z.F.EncMapUint16Uint64V(x.FMapUint16Uint64, e) } } } var yyn1078 bool - if x.FptrMapUint16Uintptr == nil { + if x.FptrMapUint16Uint64 == nil { yyn1078 = true goto LABEL1078 } @@ -9501,67 +8416,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Uintptr == nil { + if x.FptrMapUint16Uint64 == nil { r.EncodeNil() } else { - yy1079 := *x.FptrMapUint16Uintptr - yym1080 := z.EncBinary() - _ = yym1080 + yy1079 := *x.FptrMapUint16Uint64 if false { } else { - z.F.EncMapUint16UintptrV(yy1079, e) + z.F.EncMapUint16Uint64V(yy1079, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uint64`) r.WriteMapElemValue() if yyn1078 { r.EncodeNil() } else { - if x.FptrMapUint16Uintptr == nil { + if x.FptrMapUint16Uint64 == nil { r.EncodeNil() } else { - yy1081 := *x.FptrMapUint16Uintptr - yym1082 := z.EncBinary() - _ = yym1082 + yy1081 := *x.FptrMapUint16Uint64 if false { } else { - z.F.EncMapUint16UintptrV(yy1081, e) + z.F.EncMapUint16Uint64V(yy1081, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Int == nil { + if x.FMapUint16Uintptr == nil { r.EncodeNil() } else { - yym1084 := z.EncBinary() - _ = yym1084 if false { } else { - z.F.EncMapUint16IntV(x.FMapUint16Int, e) + z.F.EncMapUint16UintptrV(x.FMapUint16Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Uintptr`) r.WriteMapElemValue() - if x.FMapUint16Int == nil { + if x.FMapUint16Uintptr == nil { r.EncodeNil() } else { - yym1085 := z.EncBinary() - _ = yym1085 if false { } else { - z.F.EncMapUint16IntV(x.FMapUint16Int, e) + z.F.EncMapUint16UintptrV(x.FMapUint16Uintptr, e) } } } var yyn1086 bool - if x.FptrMapUint16Int == nil { + if x.FptrMapUint16Uintptr == nil { yyn1086 = true goto LABEL1086 } @@ -9572,67 +8479,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Int == nil { + if x.FptrMapUint16Uintptr == nil { r.EncodeNil() } else { - yy1087 := *x.FptrMapUint16Int - yym1088 := z.EncBinary() - _ = yym1088 + yy1087 := *x.FptrMapUint16Uintptr if false { } else { - z.F.EncMapUint16IntV(yy1087, e) + z.F.EncMapUint16UintptrV(yy1087, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Uintptr`) r.WriteMapElemValue() if yyn1086 { r.EncodeNil() } else { - if x.FptrMapUint16Int == nil { + if x.FptrMapUint16Uintptr == nil { r.EncodeNil() } else { - yy1089 := *x.FptrMapUint16Int - yym1090 := z.EncBinary() - _ = yym1090 + yy1089 := *x.FptrMapUint16Uintptr if false { } else { - z.F.EncMapUint16IntV(yy1089, e) + z.F.EncMapUint16UintptrV(yy1089, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Int8 == nil { + if x.FMapUint16Int == nil { r.EncodeNil() } else { - yym1092 := z.EncBinary() - _ = yym1092 if false { } else { - z.F.EncMapUint16Int8V(x.FMapUint16Int8, e) + z.F.EncMapUint16IntV(x.FMapUint16Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Int`) r.WriteMapElemValue() - if x.FMapUint16Int8 == nil { + if x.FMapUint16Int == nil { r.EncodeNil() } else { - yym1093 := z.EncBinary() - _ = yym1093 if false { } else { - z.F.EncMapUint16Int8V(x.FMapUint16Int8, e) + z.F.EncMapUint16IntV(x.FMapUint16Int, e) } } } var yyn1094 bool - if x.FptrMapUint16Int8 == nil { + if x.FptrMapUint16Int == nil { yyn1094 = true goto LABEL1094 } @@ -9643,67 +8542,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Int8 == nil { + if x.FptrMapUint16Int == nil { r.EncodeNil() } else { - yy1095 := *x.FptrMapUint16Int8 - yym1096 := z.EncBinary() - _ = yym1096 + yy1095 := *x.FptrMapUint16Int if false { } else { - z.F.EncMapUint16Int8V(yy1095, e) + z.F.EncMapUint16IntV(yy1095, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Int`) r.WriteMapElemValue() if yyn1094 { r.EncodeNil() } else { - if x.FptrMapUint16Int8 == nil { + if x.FptrMapUint16Int == nil { r.EncodeNil() } else { - yy1097 := *x.FptrMapUint16Int8 - yym1098 := z.EncBinary() - _ = yym1098 + yy1097 := *x.FptrMapUint16Int if false { } else { - z.F.EncMapUint16Int8V(yy1097, e) + z.F.EncMapUint16IntV(yy1097, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Int16 == nil { + if x.FMapUint16Int8 == nil { r.EncodeNil() } else { - yym1100 := z.EncBinary() - _ = yym1100 if false { } else { - z.F.EncMapUint16Int16V(x.FMapUint16Int16, e) + z.F.EncMapUint16Int8V(x.FMapUint16Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Int8`) r.WriteMapElemValue() - if x.FMapUint16Int16 == nil { + if x.FMapUint16Int8 == nil { r.EncodeNil() } else { - yym1101 := z.EncBinary() - _ = yym1101 if false { } else { - z.F.EncMapUint16Int16V(x.FMapUint16Int16, e) + z.F.EncMapUint16Int8V(x.FMapUint16Int8, e) } } } var yyn1102 bool - if x.FptrMapUint16Int16 == nil { + if x.FptrMapUint16Int8 == nil { yyn1102 = true goto LABEL1102 } @@ -9714,67 +8605,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Int16 == nil { + if x.FptrMapUint16Int8 == nil { r.EncodeNil() } else { - yy1103 := *x.FptrMapUint16Int16 - yym1104 := z.EncBinary() - _ = yym1104 + yy1103 := *x.FptrMapUint16Int8 if false { } else { - z.F.EncMapUint16Int16V(yy1103, e) + z.F.EncMapUint16Int8V(yy1103, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Int8`) r.WriteMapElemValue() if yyn1102 { r.EncodeNil() } else { - if x.FptrMapUint16Int16 == nil { + if x.FptrMapUint16Int8 == nil { r.EncodeNil() } else { - yy1105 := *x.FptrMapUint16Int16 - yym1106 := z.EncBinary() - _ = yym1106 + yy1105 := *x.FptrMapUint16Int8 if false { } else { - z.F.EncMapUint16Int16V(yy1105, e) + z.F.EncMapUint16Int8V(yy1105, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Int32 == nil { + if x.FMapUint16Int16 == nil { r.EncodeNil() } else { - yym1108 := z.EncBinary() - _ = yym1108 if false { } else { - z.F.EncMapUint16Int32V(x.FMapUint16Int32, e) + z.F.EncMapUint16Int16V(x.FMapUint16Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Int16`) r.WriteMapElemValue() - if x.FMapUint16Int32 == nil { + if x.FMapUint16Int16 == nil { r.EncodeNil() } else { - yym1109 := z.EncBinary() - _ = yym1109 if false { } else { - z.F.EncMapUint16Int32V(x.FMapUint16Int32, e) + z.F.EncMapUint16Int16V(x.FMapUint16Int16, e) } } } var yyn1110 bool - if x.FptrMapUint16Int32 == nil { + if x.FptrMapUint16Int16 == nil { yyn1110 = true goto LABEL1110 } @@ -9785,67 +8668,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Int32 == nil { + if x.FptrMapUint16Int16 == nil { r.EncodeNil() } else { - yy1111 := *x.FptrMapUint16Int32 - yym1112 := z.EncBinary() - _ = yym1112 + yy1111 := *x.FptrMapUint16Int16 if false { } else { - z.F.EncMapUint16Int32V(yy1111, e) + z.F.EncMapUint16Int16V(yy1111, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Int16`) r.WriteMapElemValue() if yyn1110 { r.EncodeNil() } else { - if x.FptrMapUint16Int32 == nil { + if x.FptrMapUint16Int16 == nil { r.EncodeNil() } else { - yy1113 := *x.FptrMapUint16Int32 - yym1114 := z.EncBinary() - _ = yym1114 + yy1113 := *x.FptrMapUint16Int16 if false { } else { - z.F.EncMapUint16Int32V(yy1113, e) + z.F.EncMapUint16Int16V(yy1113, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Int64 == nil { + if x.FMapUint16Int32 == nil { r.EncodeNil() } else { - yym1116 := z.EncBinary() - _ = yym1116 if false { } else { - z.F.EncMapUint16Int64V(x.FMapUint16Int64, e) + z.F.EncMapUint16Int32V(x.FMapUint16Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Int32`) r.WriteMapElemValue() - if x.FMapUint16Int64 == nil { + if x.FMapUint16Int32 == nil { r.EncodeNil() } else { - yym1117 := z.EncBinary() - _ = yym1117 if false { } else { - z.F.EncMapUint16Int64V(x.FMapUint16Int64, e) + z.F.EncMapUint16Int32V(x.FMapUint16Int32, e) } } } var yyn1118 bool - if x.FptrMapUint16Int64 == nil { + if x.FptrMapUint16Int32 == nil { yyn1118 = true goto LABEL1118 } @@ -9856,67 +8731,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Int64 == nil { + if x.FptrMapUint16Int32 == nil { r.EncodeNil() } else { - yy1119 := *x.FptrMapUint16Int64 - yym1120 := z.EncBinary() - _ = yym1120 + yy1119 := *x.FptrMapUint16Int32 if false { } else { - z.F.EncMapUint16Int64V(yy1119, e) + z.F.EncMapUint16Int32V(yy1119, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Int32`) r.WriteMapElemValue() if yyn1118 { r.EncodeNil() } else { - if x.FptrMapUint16Int64 == nil { + if x.FptrMapUint16Int32 == nil { r.EncodeNil() } else { - yy1121 := *x.FptrMapUint16Int64 - yym1122 := z.EncBinary() - _ = yym1122 + yy1121 := *x.FptrMapUint16Int32 if false { } else { - z.F.EncMapUint16Int64V(yy1121, e) + z.F.EncMapUint16Int32V(yy1121, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Float32 == nil { + if x.FMapUint16Int64 == nil { r.EncodeNil() } else { - yym1124 := z.EncBinary() - _ = yym1124 if false { } else { - z.F.EncMapUint16Float32V(x.FMapUint16Float32, e) + z.F.EncMapUint16Int64V(x.FMapUint16Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Int64`) r.WriteMapElemValue() - if x.FMapUint16Float32 == nil { + if x.FMapUint16Int64 == nil { r.EncodeNil() } else { - yym1125 := z.EncBinary() - _ = yym1125 if false { } else { - z.F.EncMapUint16Float32V(x.FMapUint16Float32, e) + z.F.EncMapUint16Int64V(x.FMapUint16Int64, e) } } } var yyn1126 bool - if x.FptrMapUint16Float32 == nil { + if x.FptrMapUint16Int64 == nil { yyn1126 = true goto LABEL1126 } @@ -9927,67 +8794,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Float32 == nil { + if x.FptrMapUint16Int64 == nil { r.EncodeNil() } else { - yy1127 := *x.FptrMapUint16Float32 - yym1128 := z.EncBinary() - _ = yym1128 + yy1127 := *x.FptrMapUint16Int64 if false { } else { - z.F.EncMapUint16Float32V(yy1127, e) + z.F.EncMapUint16Int64V(yy1127, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Int64`) r.WriteMapElemValue() if yyn1126 { r.EncodeNil() } else { - if x.FptrMapUint16Float32 == nil { + if x.FptrMapUint16Int64 == nil { r.EncodeNil() } else { - yy1129 := *x.FptrMapUint16Float32 - yym1130 := z.EncBinary() - _ = yym1130 + yy1129 := *x.FptrMapUint16Int64 if false { } else { - z.F.EncMapUint16Float32V(yy1129, e) + z.F.EncMapUint16Int64V(yy1129, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Float64 == nil { + if x.FMapUint16Float32 == nil { r.EncodeNil() } else { - yym1132 := z.EncBinary() - _ = yym1132 if false { } else { - z.F.EncMapUint16Float64V(x.FMapUint16Float64, e) + z.F.EncMapUint16Float32V(x.FMapUint16Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Float32`) r.WriteMapElemValue() - if x.FMapUint16Float64 == nil { + if x.FMapUint16Float32 == nil { r.EncodeNil() } else { - yym1133 := z.EncBinary() - _ = yym1133 if false { } else { - z.F.EncMapUint16Float64V(x.FMapUint16Float64, e) + z.F.EncMapUint16Float32V(x.FMapUint16Float32, e) } } } var yyn1134 bool - if x.FptrMapUint16Float64 == nil { + if x.FptrMapUint16Float32 == nil { yyn1134 = true goto LABEL1134 } @@ -9998,67 +8857,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Float64 == nil { + if x.FptrMapUint16Float32 == nil { r.EncodeNil() } else { - yy1135 := *x.FptrMapUint16Float64 - yym1136 := z.EncBinary() - _ = yym1136 + yy1135 := *x.FptrMapUint16Float32 if false { } else { - z.F.EncMapUint16Float64V(yy1135, e) + z.F.EncMapUint16Float32V(yy1135, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Float32`) r.WriteMapElemValue() if yyn1134 { r.EncodeNil() } else { - if x.FptrMapUint16Float64 == nil { + if x.FptrMapUint16Float32 == nil { r.EncodeNil() } else { - yy1137 := *x.FptrMapUint16Float64 - yym1138 := z.EncBinary() - _ = yym1138 + yy1137 := *x.FptrMapUint16Float32 if false { } else { - z.F.EncMapUint16Float64V(yy1137, e) + z.F.EncMapUint16Float32V(yy1137, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint16Bool == nil { + if x.FMapUint16Float64 == nil { r.EncodeNil() } else { - yym1140 := z.EncBinary() - _ = yym1140 if false { } else { - z.F.EncMapUint16BoolV(x.FMapUint16Bool, e) + z.F.EncMapUint16Float64V(x.FMapUint16Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint16Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Float64`) r.WriteMapElemValue() - if x.FMapUint16Bool == nil { + if x.FMapUint16Float64 == nil { r.EncodeNil() } else { - yym1141 := z.EncBinary() - _ = yym1141 if false { } else { - z.F.EncMapUint16BoolV(x.FMapUint16Bool, e) + z.F.EncMapUint16Float64V(x.FMapUint16Float64, e) } } } var yyn1142 bool - if x.FptrMapUint16Bool == nil { + if x.FptrMapUint16Float64 == nil { yyn1142 = true goto LABEL1142 } @@ -10069,67 +8920,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint16Bool == nil { + if x.FptrMapUint16Float64 == nil { r.EncodeNil() } else { - yy1143 := *x.FptrMapUint16Bool - yym1144 := z.EncBinary() - _ = yym1144 + yy1143 := *x.FptrMapUint16Float64 if false { } else { - z.F.EncMapUint16BoolV(yy1143, e) + z.F.EncMapUint16Float64V(yy1143, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint16Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Float64`) r.WriteMapElemValue() if yyn1142 { r.EncodeNil() } else { - if x.FptrMapUint16Bool == nil { + if x.FptrMapUint16Float64 == nil { r.EncodeNil() } else { - yy1145 := *x.FptrMapUint16Bool - yym1146 := z.EncBinary() - _ = yym1146 + yy1145 := *x.FptrMapUint16Float64 if false { } else { - z.F.EncMapUint16BoolV(yy1145, e) + z.F.EncMapUint16Float64V(yy1145, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Intf == nil { + if x.FMapUint16Bool == nil { r.EncodeNil() } else { - yym1148 := z.EncBinary() - _ = yym1148 if false { } else { - z.F.EncMapUint32IntfV(x.FMapUint32Intf, e) + z.F.EncMapUint16BoolV(x.FMapUint16Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint16Bool`) r.WriteMapElemValue() - if x.FMapUint32Intf == nil { + if x.FMapUint16Bool == nil { r.EncodeNil() } else { - yym1149 := z.EncBinary() - _ = yym1149 if false { } else { - z.F.EncMapUint32IntfV(x.FMapUint32Intf, e) + z.F.EncMapUint16BoolV(x.FMapUint16Bool, e) } } } var yyn1150 bool - if x.FptrMapUint32Intf == nil { + if x.FptrMapUint16Bool == nil { yyn1150 = true goto LABEL1150 } @@ -10140,67 +8983,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Intf == nil { + if x.FptrMapUint16Bool == nil { r.EncodeNil() } else { - yy1151 := *x.FptrMapUint32Intf - yym1152 := z.EncBinary() - _ = yym1152 + yy1151 := *x.FptrMapUint16Bool if false { } else { - z.F.EncMapUint32IntfV(yy1151, e) + z.F.EncMapUint16BoolV(yy1151, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint16Bool`) r.WriteMapElemValue() if yyn1150 { r.EncodeNil() } else { - if x.FptrMapUint32Intf == nil { + if x.FptrMapUint16Bool == nil { r.EncodeNil() } else { - yy1153 := *x.FptrMapUint32Intf - yym1154 := z.EncBinary() - _ = yym1154 + yy1153 := *x.FptrMapUint16Bool if false { } else { - z.F.EncMapUint32IntfV(yy1153, e) + z.F.EncMapUint16BoolV(yy1153, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32String == nil { + if x.FMapUint32Intf == nil { r.EncodeNil() } else { - yym1156 := z.EncBinary() - _ = yym1156 if false { } else { - z.F.EncMapUint32StringV(x.FMapUint32String, e) + z.F.EncMapUint32IntfV(x.FMapUint32Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32String")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Intf`) r.WriteMapElemValue() - if x.FMapUint32String == nil { + if x.FMapUint32Intf == nil { r.EncodeNil() } else { - yym1157 := z.EncBinary() - _ = yym1157 if false { } else { - z.F.EncMapUint32StringV(x.FMapUint32String, e) + z.F.EncMapUint32IntfV(x.FMapUint32Intf, e) } } } var yyn1158 bool - if x.FptrMapUint32String == nil { + if x.FptrMapUint32Intf == nil { yyn1158 = true goto LABEL1158 } @@ -10211,67 +9046,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32String == nil { + if x.FptrMapUint32Intf == nil { r.EncodeNil() } else { - yy1159 := *x.FptrMapUint32String - yym1160 := z.EncBinary() - _ = yym1160 + yy1159 := *x.FptrMapUint32Intf if false { } else { - z.F.EncMapUint32StringV(yy1159, e) + z.F.EncMapUint32IntfV(yy1159, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Intf`) r.WriteMapElemValue() if yyn1158 { r.EncodeNil() } else { - if x.FptrMapUint32String == nil { + if x.FptrMapUint32Intf == nil { r.EncodeNil() } else { - yy1161 := *x.FptrMapUint32String - yym1162 := z.EncBinary() - _ = yym1162 + yy1161 := *x.FptrMapUint32Intf if false { } else { - z.F.EncMapUint32StringV(yy1161, e) + z.F.EncMapUint32IntfV(yy1161, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uint == nil { + if x.FMapUint32String == nil { r.EncodeNil() } else { - yym1164 := z.EncBinary() - _ = yym1164 if false { } else { - z.F.EncMapUint32UintV(x.FMapUint32Uint, e) + z.F.EncMapUint32StringV(x.FMapUint32String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32String`) r.WriteMapElemValue() - if x.FMapUint32Uint == nil { + if x.FMapUint32String == nil { r.EncodeNil() } else { - yym1165 := z.EncBinary() - _ = yym1165 if false { } else { - z.F.EncMapUint32UintV(x.FMapUint32Uint, e) + z.F.EncMapUint32StringV(x.FMapUint32String, e) } } } var yyn1166 bool - if x.FptrMapUint32Uint == nil { + if x.FptrMapUint32String == nil { yyn1166 = true goto LABEL1166 } @@ -10282,67 +9109,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uint == nil { + if x.FptrMapUint32String == nil { r.EncodeNil() } else { - yy1167 := *x.FptrMapUint32Uint - yym1168 := z.EncBinary() - _ = yym1168 + yy1167 := *x.FptrMapUint32String if false { } else { - z.F.EncMapUint32UintV(yy1167, e) + z.F.EncMapUint32StringV(yy1167, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32String`) r.WriteMapElemValue() if yyn1166 { r.EncodeNil() } else { - if x.FptrMapUint32Uint == nil { + if x.FptrMapUint32String == nil { r.EncodeNil() } else { - yy1169 := *x.FptrMapUint32Uint - yym1170 := z.EncBinary() - _ = yym1170 + yy1169 := *x.FptrMapUint32String if false { } else { - z.F.EncMapUint32UintV(yy1169, e) + z.F.EncMapUint32StringV(yy1169, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uint8 == nil { + if x.FMapUint32Uint == nil { r.EncodeNil() } else { - yym1172 := z.EncBinary() - _ = yym1172 if false { } else { - z.F.EncMapUint32Uint8V(x.FMapUint32Uint8, e) + z.F.EncMapUint32UintV(x.FMapUint32Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uint`) r.WriteMapElemValue() - if x.FMapUint32Uint8 == nil { + if x.FMapUint32Uint == nil { r.EncodeNil() } else { - yym1173 := z.EncBinary() - _ = yym1173 if false { } else { - z.F.EncMapUint32Uint8V(x.FMapUint32Uint8, e) + z.F.EncMapUint32UintV(x.FMapUint32Uint, e) } } } var yyn1174 bool - if x.FptrMapUint32Uint8 == nil { + if x.FptrMapUint32Uint == nil { yyn1174 = true goto LABEL1174 } @@ -10353,67 +9172,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uint8 == nil { + if x.FptrMapUint32Uint == nil { r.EncodeNil() } else { - yy1175 := *x.FptrMapUint32Uint8 - yym1176 := z.EncBinary() - _ = yym1176 + yy1175 := *x.FptrMapUint32Uint if false { } else { - z.F.EncMapUint32Uint8V(yy1175, e) + z.F.EncMapUint32UintV(yy1175, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uint`) r.WriteMapElemValue() if yyn1174 { r.EncodeNil() } else { - if x.FptrMapUint32Uint8 == nil { + if x.FptrMapUint32Uint == nil { r.EncodeNil() } else { - yy1177 := *x.FptrMapUint32Uint8 - yym1178 := z.EncBinary() - _ = yym1178 + yy1177 := *x.FptrMapUint32Uint if false { } else { - z.F.EncMapUint32Uint8V(yy1177, e) + z.F.EncMapUint32UintV(yy1177, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uint16 == nil { + if x.FMapUint32Uint8 == nil { r.EncodeNil() } else { - yym1180 := z.EncBinary() - _ = yym1180 if false { } else { - z.F.EncMapUint32Uint16V(x.FMapUint32Uint16, e) + z.F.EncMapUint32Uint8V(x.FMapUint32Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uint8`) r.WriteMapElemValue() - if x.FMapUint32Uint16 == nil { + if x.FMapUint32Uint8 == nil { r.EncodeNil() } else { - yym1181 := z.EncBinary() - _ = yym1181 if false { } else { - z.F.EncMapUint32Uint16V(x.FMapUint32Uint16, e) + z.F.EncMapUint32Uint8V(x.FMapUint32Uint8, e) } } } var yyn1182 bool - if x.FptrMapUint32Uint16 == nil { + if x.FptrMapUint32Uint8 == nil { yyn1182 = true goto LABEL1182 } @@ -10424,67 +9235,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uint16 == nil { + if x.FptrMapUint32Uint8 == nil { r.EncodeNil() } else { - yy1183 := *x.FptrMapUint32Uint16 - yym1184 := z.EncBinary() - _ = yym1184 + yy1183 := *x.FptrMapUint32Uint8 if false { } else { - z.F.EncMapUint32Uint16V(yy1183, e) + z.F.EncMapUint32Uint8V(yy1183, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uint8`) r.WriteMapElemValue() if yyn1182 { r.EncodeNil() } else { - if x.FptrMapUint32Uint16 == nil { + if x.FptrMapUint32Uint8 == nil { r.EncodeNil() } else { - yy1185 := *x.FptrMapUint32Uint16 - yym1186 := z.EncBinary() - _ = yym1186 + yy1185 := *x.FptrMapUint32Uint8 if false { } else { - z.F.EncMapUint32Uint16V(yy1185, e) + z.F.EncMapUint32Uint8V(yy1185, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uint32 == nil { + if x.FMapUint32Uint16 == nil { r.EncodeNil() } else { - yym1188 := z.EncBinary() - _ = yym1188 if false { } else { - z.F.EncMapUint32Uint32V(x.FMapUint32Uint32, e) + z.F.EncMapUint32Uint16V(x.FMapUint32Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uint16`) r.WriteMapElemValue() - if x.FMapUint32Uint32 == nil { + if x.FMapUint32Uint16 == nil { r.EncodeNil() } else { - yym1189 := z.EncBinary() - _ = yym1189 if false { } else { - z.F.EncMapUint32Uint32V(x.FMapUint32Uint32, e) + z.F.EncMapUint32Uint16V(x.FMapUint32Uint16, e) } } } var yyn1190 bool - if x.FptrMapUint32Uint32 == nil { + if x.FptrMapUint32Uint16 == nil { yyn1190 = true goto LABEL1190 } @@ -10495,67 +9298,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uint32 == nil { + if x.FptrMapUint32Uint16 == nil { r.EncodeNil() } else { - yy1191 := *x.FptrMapUint32Uint32 - yym1192 := z.EncBinary() - _ = yym1192 + yy1191 := *x.FptrMapUint32Uint16 if false { } else { - z.F.EncMapUint32Uint32V(yy1191, e) + z.F.EncMapUint32Uint16V(yy1191, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uint16`) r.WriteMapElemValue() if yyn1190 { r.EncodeNil() } else { - if x.FptrMapUint32Uint32 == nil { + if x.FptrMapUint32Uint16 == nil { r.EncodeNil() } else { - yy1193 := *x.FptrMapUint32Uint32 - yym1194 := z.EncBinary() - _ = yym1194 + yy1193 := *x.FptrMapUint32Uint16 if false { } else { - z.F.EncMapUint32Uint32V(yy1193, e) + z.F.EncMapUint32Uint16V(yy1193, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uint64 == nil { + if x.FMapUint32Uint32 == nil { r.EncodeNil() } else { - yym1196 := z.EncBinary() - _ = yym1196 if false { } else { - z.F.EncMapUint32Uint64V(x.FMapUint32Uint64, e) + z.F.EncMapUint32Uint32V(x.FMapUint32Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uint32`) r.WriteMapElemValue() - if x.FMapUint32Uint64 == nil { + if x.FMapUint32Uint32 == nil { r.EncodeNil() } else { - yym1197 := z.EncBinary() - _ = yym1197 if false { } else { - z.F.EncMapUint32Uint64V(x.FMapUint32Uint64, e) + z.F.EncMapUint32Uint32V(x.FMapUint32Uint32, e) } } } var yyn1198 bool - if x.FptrMapUint32Uint64 == nil { + if x.FptrMapUint32Uint32 == nil { yyn1198 = true goto LABEL1198 } @@ -10566,67 +9361,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uint64 == nil { + if x.FptrMapUint32Uint32 == nil { r.EncodeNil() } else { - yy1199 := *x.FptrMapUint32Uint64 - yym1200 := z.EncBinary() - _ = yym1200 + yy1199 := *x.FptrMapUint32Uint32 if false { } else { - z.F.EncMapUint32Uint64V(yy1199, e) + z.F.EncMapUint32Uint32V(yy1199, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uint32`) r.WriteMapElemValue() if yyn1198 { r.EncodeNil() } else { - if x.FptrMapUint32Uint64 == nil { + if x.FptrMapUint32Uint32 == nil { r.EncodeNil() } else { - yy1201 := *x.FptrMapUint32Uint64 - yym1202 := z.EncBinary() - _ = yym1202 + yy1201 := *x.FptrMapUint32Uint32 if false { } else { - z.F.EncMapUint32Uint64V(yy1201, e) + z.F.EncMapUint32Uint32V(yy1201, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Uintptr == nil { + if x.FMapUint32Uint64 == nil { r.EncodeNil() } else { - yym1204 := z.EncBinary() - _ = yym1204 if false { } else { - z.F.EncMapUint32UintptrV(x.FMapUint32Uintptr, e) + z.F.EncMapUint32Uint64V(x.FMapUint32Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uint64`) r.WriteMapElemValue() - if x.FMapUint32Uintptr == nil { + if x.FMapUint32Uint64 == nil { r.EncodeNil() } else { - yym1205 := z.EncBinary() - _ = yym1205 if false { } else { - z.F.EncMapUint32UintptrV(x.FMapUint32Uintptr, e) + z.F.EncMapUint32Uint64V(x.FMapUint32Uint64, e) } } } var yyn1206 bool - if x.FptrMapUint32Uintptr == nil { + if x.FptrMapUint32Uint64 == nil { yyn1206 = true goto LABEL1206 } @@ -10637,67 +9424,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Uintptr == nil { + if x.FptrMapUint32Uint64 == nil { r.EncodeNil() } else { - yy1207 := *x.FptrMapUint32Uintptr - yym1208 := z.EncBinary() - _ = yym1208 + yy1207 := *x.FptrMapUint32Uint64 if false { } else { - z.F.EncMapUint32UintptrV(yy1207, e) + z.F.EncMapUint32Uint64V(yy1207, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uint64`) r.WriteMapElemValue() if yyn1206 { r.EncodeNil() } else { - if x.FptrMapUint32Uintptr == nil { + if x.FptrMapUint32Uint64 == nil { r.EncodeNil() } else { - yy1209 := *x.FptrMapUint32Uintptr - yym1210 := z.EncBinary() - _ = yym1210 + yy1209 := *x.FptrMapUint32Uint64 if false { } else { - z.F.EncMapUint32UintptrV(yy1209, e) + z.F.EncMapUint32Uint64V(yy1209, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Int == nil { + if x.FMapUint32Uintptr == nil { r.EncodeNil() } else { - yym1212 := z.EncBinary() - _ = yym1212 if false { } else { - z.F.EncMapUint32IntV(x.FMapUint32Int, e) + z.F.EncMapUint32UintptrV(x.FMapUint32Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Uintptr`) r.WriteMapElemValue() - if x.FMapUint32Int == nil { + if x.FMapUint32Uintptr == nil { r.EncodeNil() } else { - yym1213 := z.EncBinary() - _ = yym1213 if false { } else { - z.F.EncMapUint32IntV(x.FMapUint32Int, e) + z.F.EncMapUint32UintptrV(x.FMapUint32Uintptr, e) } } } var yyn1214 bool - if x.FptrMapUint32Int == nil { + if x.FptrMapUint32Uintptr == nil { yyn1214 = true goto LABEL1214 } @@ -10708,67 +9487,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Int == nil { + if x.FptrMapUint32Uintptr == nil { r.EncodeNil() } else { - yy1215 := *x.FptrMapUint32Int - yym1216 := z.EncBinary() - _ = yym1216 + yy1215 := *x.FptrMapUint32Uintptr if false { } else { - z.F.EncMapUint32IntV(yy1215, e) + z.F.EncMapUint32UintptrV(yy1215, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Uintptr`) r.WriteMapElemValue() if yyn1214 { r.EncodeNil() } else { - if x.FptrMapUint32Int == nil { + if x.FptrMapUint32Uintptr == nil { r.EncodeNil() } else { - yy1217 := *x.FptrMapUint32Int - yym1218 := z.EncBinary() - _ = yym1218 + yy1217 := *x.FptrMapUint32Uintptr if false { } else { - z.F.EncMapUint32IntV(yy1217, e) + z.F.EncMapUint32UintptrV(yy1217, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Int8 == nil { + if x.FMapUint32Int == nil { r.EncodeNil() } else { - yym1220 := z.EncBinary() - _ = yym1220 if false { } else { - z.F.EncMapUint32Int8V(x.FMapUint32Int8, e) + z.F.EncMapUint32IntV(x.FMapUint32Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Int`) r.WriteMapElemValue() - if x.FMapUint32Int8 == nil { + if x.FMapUint32Int == nil { r.EncodeNil() } else { - yym1221 := z.EncBinary() - _ = yym1221 if false { } else { - z.F.EncMapUint32Int8V(x.FMapUint32Int8, e) + z.F.EncMapUint32IntV(x.FMapUint32Int, e) } } } var yyn1222 bool - if x.FptrMapUint32Int8 == nil { + if x.FptrMapUint32Int == nil { yyn1222 = true goto LABEL1222 } @@ -10779,67 +9550,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Int8 == nil { + if x.FptrMapUint32Int == nil { r.EncodeNil() } else { - yy1223 := *x.FptrMapUint32Int8 - yym1224 := z.EncBinary() - _ = yym1224 + yy1223 := *x.FptrMapUint32Int if false { } else { - z.F.EncMapUint32Int8V(yy1223, e) + z.F.EncMapUint32IntV(yy1223, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Int`) r.WriteMapElemValue() if yyn1222 { r.EncodeNil() } else { - if x.FptrMapUint32Int8 == nil { + if x.FptrMapUint32Int == nil { r.EncodeNil() } else { - yy1225 := *x.FptrMapUint32Int8 - yym1226 := z.EncBinary() - _ = yym1226 + yy1225 := *x.FptrMapUint32Int if false { } else { - z.F.EncMapUint32Int8V(yy1225, e) + z.F.EncMapUint32IntV(yy1225, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Int16 == nil { + if x.FMapUint32Int8 == nil { r.EncodeNil() } else { - yym1228 := z.EncBinary() - _ = yym1228 if false { } else { - z.F.EncMapUint32Int16V(x.FMapUint32Int16, e) + z.F.EncMapUint32Int8V(x.FMapUint32Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Int8`) r.WriteMapElemValue() - if x.FMapUint32Int16 == nil { + if x.FMapUint32Int8 == nil { r.EncodeNil() } else { - yym1229 := z.EncBinary() - _ = yym1229 if false { } else { - z.F.EncMapUint32Int16V(x.FMapUint32Int16, e) + z.F.EncMapUint32Int8V(x.FMapUint32Int8, e) } } } var yyn1230 bool - if x.FptrMapUint32Int16 == nil { + if x.FptrMapUint32Int8 == nil { yyn1230 = true goto LABEL1230 } @@ -10850,67 +9613,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Int16 == nil { + if x.FptrMapUint32Int8 == nil { r.EncodeNil() } else { - yy1231 := *x.FptrMapUint32Int16 - yym1232 := z.EncBinary() - _ = yym1232 + yy1231 := *x.FptrMapUint32Int8 if false { } else { - z.F.EncMapUint32Int16V(yy1231, e) + z.F.EncMapUint32Int8V(yy1231, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Int8`) r.WriteMapElemValue() if yyn1230 { r.EncodeNil() } else { - if x.FptrMapUint32Int16 == nil { + if x.FptrMapUint32Int8 == nil { r.EncodeNil() } else { - yy1233 := *x.FptrMapUint32Int16 - yym1234 := z.EncBinary() - _ = yym1234 + yy1233 := *x.FptrMapUint32Int8 if false { } else { - z.F.EncMapUint32Int16V(yy1233, e) + z.F.EncMapUint32Int8V(yy1233, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Int32 == nil { + if x.FMapUint32Int16 == nil { r.EncodeNil() } else { - yym1236 := z.EncBinary() - _ = yym1236 if false { } else { - z.F.EncMapUint32Int32V(x.FMapUint32Int32, e) + z.F.EncMapUint32Int16V(x.FMapUint32Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Int16`) r.WriteMapElemValue() - if x.FMapUint32Int32 == nil { + if x.FMapUint32Int16 == nil { r.EncodeNil() } else { - yym1237 := z.EncBinary() - _ = yym1237 if false { } else { - z.F.EncMapUint32Int32V(x.FMapUint32Int32, e) + z.F.EncMapUint32Int16V(x.FMapUint32Int16, e) } } } var yyn1238 bool - if x.FptrMapUint32Int32 == nil { + if x.FptrMapUint32Int16 == nil { yyn1238 = true goto LABEL1238 } @@ -10921,67 +9676,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Int32 == nil { + if x.FptrMapUint32Int16 == nil { r.EncodeNil() } else { - yy1239 := *x.FptrMapUint32Int32 - yym1240 := z.EncBinary() - _ = yym1240 + yy1239 := *x.FptrMapUint32Int16 if false { } else { - z.F.EncMapUint32Int32V(yy1239, e) + z.F.EncMapUint32Int16V(yy1239, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Int16`) r.WriteMapElemValue() if yyn1238 { r.EncodeNil() } else { - if x.FptrMapUint32Int32 == nil { + if x.FptrMapUint32Int16 == nil { r.EncodeNil() } else { - yy1241 := *x.FptrMapUint32Int32 - yym1242 := z.EncBinary() - _ = yym1242 + yy1241 := *x.FptrMapUint32Int16 if false { } else { - z.F.EncMapUint32Int32V(yy1241, e) + z.F.EncMapUint32Int16V(yy1241, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Int64 == nil { + if x.FMapUint32Int32 == nil { r.EncodeNil() } else { - yym1244 := z.EncBinary() - _ = yym1244 if false { } else { - z.F.EncMapUint32Int64V(x.FMapUint32Int64, e) + z.F.EncMapUint32Int32V(x.FMapUint32Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Int32`) r.WriteMapElemValue() - if x.FMapUint32Int64 == nil { + if x.FMapUint32Int32 == nil { r.EncodeNil() } else { - yym1245 := z.EncBinary() - _ = yym1245 if false { } else { - z.F.EncMapUint32Int64V(x.FMapUint32Int64, e) + z.F.EncMapUint32Int32V(x.FMapUint32Int32, e) } } } var yyn1246 bool - if x.FptrMapUint32Int64 == nil { + if x.FptrMapUint32Int32 == nil { yyn1246 = true goto LABEL1246 } @@ -10992,67 +9739,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Int64 == nil { + if x.FptrMapUint32Int32 == nil { r.EncodeNil() } else { - yy1247 := *x.FptrMapUint32Int64 - yym1248 := z.EncBinary() - _ = yym1248 + yy1247 := *x.FptrMapUint32Int32 if false { } else { - z.F.EncMapUint32Int64V(yy1247, e) + z.F.EncMapUint32Int32V(yy1247, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Int32`) r.WriteMapElemValue() if yyn1246 { r.EncodeNil() } else { - if x.FptrMapUint32Int64 == nil { + if x.FptrMapUint32Int32 == nil { r.EncodeNil() } else { - yy1249 := *x.FptrMapUint32Int64 - yym1250 := z.EncBinary() - _ = yym1250 + yy1249 := *x.FptrMapUint32Int32 if false { } else { - z.F.EncMapUint32Int64V(yy1249, e) + z.F.EncMapUint32Int32V(yy1249, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Float32 == nil { + if x.FMapUint32Int64 == nil { r.EncodeNil() } else { - yym1252 := z.EncBinary() - _ = yym1252 if false { } else { - z.F.EncMapUint32Float32V(x.FMapUint32Float32, e) + z.F.EncMapUint32Int64V(x.FMapUint32Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Int64`) r.WriteMapElemValue() - if x.FMapUint32Float32 == nil { + if x.FMapUint32Int64 == nil { r.EncodeNil() } else { - yym1253 := z.EncBinary() - _ = yym1253 if false { } else { - z.F.EncMapUint32Float32V(x.FMapUint32Float32, e) + z.F.EncMapUint32Int64V(x.FMapUint32Int64, e) } } } var yyn1254 bool - if x.FptrMapUint32Float32 == nil { + if x.FptrMapUint32Int64 == nil { yyn1254 = true goto LABEL1254 } @@ -11063,67 +9802,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Float32 == nil { + if x.FptrMapUint32Int64 == nil { r.EncodeNil() } else { - yy1255 := *x.FptrMapUint32Float32 - yym1256 := z.EncBinary() - _ = yym1256 + yy1255 := *x.FptrMapUint32Int64 if false { } else { - z.F.EncMapUint32Float32V(yy1255, e) + z.F.EncMapUint32Int64V(yy1255, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Int64`) r.WriteMapElemValue() if yyn1254 { r.EncodeNil() } else { - if x.FptrMapUint32Float32 == nil { + if x.FptrMapUint32Int64 == nil { r.EncodeNil() } else { - yy1257 := *x.FptrMapUint32Float32 - yym1258 := z.EncBinary() - _ = yym1258 + yy1257 := *x.FptrMapUint32Int64 if false { } else { - z.F.EncMapUint32Float32V(yy1257, e) + z.F.EncMapUint32Int64V(yy1257, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Float64 == nil { + if x.FMapUint32Float32 == nil { r.EncodeNil() } else { - yym1260 := z.EncBinary() - _ = yym1260 if false { } else { - z.F.EncMapUint32Float64V(x.FMapUint32Float64, e) + z.F.EncMapUint32Float32V(x.FMapUint32Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Float32`) r.WriteMapElemValue() - if x.FMapUint32Float64 == nil { + if x.FMapUint32Float32 == nil { r.EncodeNil() } else { - yym1261 := z.EncBinary() - _ = yym1261 if false { } else { - z.F.EncMapUint32Float64V(x.FMapUint32Float64, e) + z.F.EncMapUint32Float32V(x.FMapUint32Float32, e) } } } var yyn1262 bool - if x.FptrMapUint32Float64 == nil { + if x.FptrMapUint32Float32 == nil { yyn1262 = true goto LABEL1262 } @@ -11134,67 +9865,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Float64 == nil { + if x.FptrMapUint32Float32 == nil { r.EncodeNil() } else { - yy1263 := *x.FptrMapUint32Float64 - yym1264 := z.EncBinary() - _ = yym1264 + yy1263 := *x.FptrMapUint32Float32 if false { } else { - z.F.EncMapUint32Float64V(yy1263, e) + z.F.EncMapUint32Float32V(yy1263, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Float32`) r.WriteMapElemValue() if yyn1262 { r.EncodeNil() } else { - if x.FptrMapUint32Float64 == nil { + if x.FptrMapUint32Float32 == nil { r.EncodeNil() } else { - yy1265 := *x.FptrMapUint32Float64 - yym1266 := z.EncBinary() - _ = yym1266 + yy1265 := *x.FptrMapUint32Float32 if false { } else { - z.F.EncMapUint32Float64V(yy1265, e) + z.F.EncMapUint32Float32V(yy1265, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint32Bool == nil { + if x.FMapUint32Float64 == nil { r.EncodeNil() } else { - yym1268 := z.EncBinary() - _ = yym1268 if false { } else { - z.F.EncMapUint32BoolV(x.FMapUint32Bool, e) + z.F.EncMapUint32Float64V(x.FMapUint32Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Float64`) r.WriteMapElemValue() - if x.FMapUint32Bool == nil { + if x.FMapUint32Float64 == nil { r.EncodeNil() } else { - yym1269 := z.EncBinary() - _ = yym1269 if false { } else { - z.F.EncMapUint32BoolV(x.FMapUint32Bool, e) + z.F.EncMapUint32Float64V(x.FMapUint32Float64, e) } } } var yyn1270 bool - if x.FptrMapUint32Bool == nil { + if x.FptrMapUint32Float64 == nil { yyn1270 = true goto LABEL1270 } @@ -11205,67 +9928,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint32Bool == nil { + if x.FptrMapUint32Float64 == nil { r.EncodeNil() } else { - yy1271 := *x.FptrMapUint32Bool - yym1272 := z.EncBinary() - _ = yym1272 + yy1271 := *x.FptrMapUint32Float64 if false { } else { - z.F.EncMapUint32BoolV(yy1271, e) + z.F.EncMapUint32Float64V(yy1271, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Float64`) r.WriteMapElemValue() if yyn1270 { r.EncodeNil() } else { - if x.FptrMapUint32Bool == nil { + if x.FptrMapUint32Float64 == nil { r.EncodeNil() } else { - yy1273 := *x.FptrMapUint32Bool - yym1274 := z.EncBinary() - _ = yym1274 + yy1273 := *x.FptrMapUint32Float64 if false { } else { - z.F.EncMapUint32BoolV(yy1273, e) + z.F.EncMapUint32Float64V(yy1273, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Intf == nil { + if x.FMapUint32Bool == nil { r.EncodeNil() } else { - yym1276 := z.EncBinary() - _ = yym1276 if false { } else { - z.F.EncMapUint64IntfV(x.FMapUint64Intf, e) + z.F.EncMapUint32BoolV(x.FMapUint32Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint32Bool`) r.WriteMapElemValue() - if x.FMapUint64Intf == nil { + if x.FMapUint32Bool == nil { r.EncodeNil() } else { - yym1277 := z.EncBinary() - _ = yym1277 if false { } else { - z.F.EncMapUint64IntfV(x.FMapUint64Intf, e) + z.F.EncMapUint32BoolV(x.FMapUint32Bool, e) } } } var yyn1278 bool - if x.FptrMapUint64Intf == nil { + if x.FptrMapUint32Bool == nil { yyn1278 = true goto LABEL1278 } @@ -11276,67 +9991,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Intf == nil { + if x.FptrMapUint32Bool == nil { r.EncodeNil() } else { - yy1279 := *x.FptrMapUint64Intf - yym1280 := z.EncBinary() - _ = yym1280 + yy1279 := *x.FptrMapUint32Bool if false { } else { - z.F.EncMapUint64IntfV(yy1279, e) + z.F.EncMapUint32BoolV(yy1279, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint32Bool`) r.WriteMapElemValue() if yyn1278 { r.EncodeNil() } else { - if x.FptrMapUint64Intf == nil { + if x.FptrMapUint32Bool == nil { r.EncodeNil() } else { - yy1281 := *x.FptrMapUint64Intf - yym1282 := z.EncBinary() - _ = yym1282 + yy1281 := *x.FptrMapUint32Bool if false { } else { - z.F.EncMapUint64IntfV(yy1281, e) + z.F.EncMapUint32BoolV(yy1281, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64String == nil { + if x.FMapUint64Intf == nil { r.EncodeNil() } else { - yym1284 := z.EncBinary() - _ = yym1284 if false { } else { - z.F.EncMapUint64StringV(x.FMapUint64String, e) + z.F.EncMapUint64IntfV(x.FMapUint64Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64String")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Intf`) r.WriteMapElemValue() - if x.FMapUint64String == nil { + if x.FMapUint64Intf == nil { r.EncodeNil() } else { - yym1285 := z.EncBinary() - _ = yym1285 if false { } else { - z.F.EncMapUint64StringV(x.FMapUint64String, e) + z.F.EncMapUint64IntfV(x.FMapUint64Intf, e) } } } var yyn1286 bool - if x.FptrMapUint64String == nil { + if x.FptrMapUint64Intf == nil { yyn1286 = true goto LABEL1286 } @@ -11347,67 +10054,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64String == nil { + if x.FptrMapUint64Intf == nil { r.EncodeNil() } else { - yy1287 := *x.FptrMapUint64String - yym1288 := z.EncBinary() - _ = yym1288 + yy1287 := *x.FptrMapUint64Intf if false { } else { - z.F.EncMapUint64StringV(yy1287, e) + z.F.EncMapUint64IntfV(yy1287, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Intf`) r.WriteMapElemValue() if yyn1286 { r.EncodeNil() } else { - if x.FptrMapUint64String == nil { + if x.FptrMapUint64Intf == nil { r.EncodeNil() } else { - yy1289 := *x.FptrMapUint64String - yym1290 := z.EncBinary() - _ = yym1290 + yy1289 := *x.FptrMapUint64Intf if false { } else { - z.F.EncMapUint64StringV(yy1289, e) + z.F.EncMapUint64IntfV(yy1289, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uint == nil { + if x.FMapUint64String == nil { r.EncodeNil() } else { - yym1292 := z.EncBinary() - _ = yym1292 if false { } else { - z.F.EncMapUint64UintV(x.FMapUint64Uint, e) + z.F.EncMapUint64StringV(x.FMapUint64String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64String`) r.WriteMapElemValue() - if x.FMapUint64Uint == nil { + if x.FMapUint64String == nil { r.EncodeNil() } else { - yym1293 := z.EncBinary() - _ = yym1293 if false { } else { - z.F.EncMapUint64UintV(x.FMapUint64Uint, e) + z.F.EncMapUint64StringV(x.FMapUint64String, e) } } } var yyn1294 bool - if x.FptrMapUint64Uint == nil { + if x.FptrMapUint64String == nil { yyn1294 = true goto LABEL1294 } @@ -11418,67 +10117,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uint == nil { + if x.FptrMapUint64String == nil { r.EncodeNil() } else { - yy1295 := *x.FptrMapUint64Uint - yym1296 := z.EncBinary() - _ = yym1296 + yy1295 := *x.FptrMapUint64String if false { } else { - z.F.EncMapUint64UintV(yy1295, e) + z.F.EncMapUint64StringV(yy1295, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64String`) r.WriteMapElemValue() if yyn1294 { r.EncodeNil() } else { - if x.FptrMapUint64Uint == nil { + if x.FptrMapUint64String == nil { r.EncodeNil() } else { - yy1297 := *x.FptrMapUint64Uint - yym1298 := z.EncBinary() - _ = yym1298 + yy1297 := *x.FptrMapUint64String if false { } else { - z.F.EncMapUint64UintV(yy1297, e) + z.F.EncMapUint64StringV(yy1297, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uint8 == nil { + if x.FMapUint64Uint == nil { r.EncodeNil() } else { - yym1300 := z.EncBinary() - _ = yym1300 if false { } else { - z.F.EncMapUint64Uint8V(x.FMapUint64Uint8, e) + z.F.EncMapUint64UintV(x.FMapUint64Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uint`) r.WriteMapElemValue() - if x.FMapUint64Uint8 == nil { + if x.FMapUint64Uint == nil { r.EncodeNil() } else { - yym1301 := z.EncBinary() - _ = yym1301 if false { } else { - z.F.EncMapUint64Uint8V(x.FMapUint64Uint8, e) + z.F.EncMapUint64UintV(x.FMapUint64Uint, e) } } } var yyn1302 bool - if x.FptrMapUint64Uint8 == nil { + if x.FptrMapUint64Uint == nil { yyn1302 = true goto LABEL1302 } @@ -11489,67 +10180,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uint8 == nil { + if x.FptrMapUint64Uint == nil { r.EncodeNil() } else { - yy1303 := *x.FptrMapUint64Uint8 - yym1304 := z.EncBinary() - _ = yym1304 + yy1303 := *x.FptrMapUint64Uint if false { } else { - z.F.EncMapUint64Uint8V(yy1303, e) + z.F.EncMapUint64UintV(yy1303, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uint`) r.WriteMapElemValue() if yyn1302 { r.EncodeNil() } else { - if x.FptrMapUint64Uint8 == nil { + if x.FptrMapUint64Uint == nil { r.EncodeNil() } else { - yy1305 := *x.FptrMapUint64Uint8 - yym1306 := z.EncBinary() - _ = yym1306 + yy1305 := *x.FptrMapUint64Uint if false { } else { - z.F.EncMapUint64Uint8V(yy1305, e) + z.F.EncMapUint64UintV(yy1305, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uint16 == nil { + if x.FMapUint64Uint8 == nil { r.EncodeNil() } else { - yym1308 := z.EncBinary() - _ = yym1308 if false { } else { - z.F.EncMapUint64Uint16V(x.FMapUint64Uint16, e) + z.F.EncMapUint64Uint8V(x.FMapUint64Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uint8`) r.WriteMapElemValue() - if x.FMapUint64Uint16 == nil { + if x.FMapUint64Uint8 == nil { r.EncodeNil() } else { - yym1309 := z.EncBinary() - _ = yym1309 if false { } else { - z.F.EncMapUint64Uint16V(x.FMapUint64Uint16, e) + z.F.EncMapUint64Uint8V(x.FMapUint64Uint8, e) } } } var yyn1310 bool - if x.FptrMapUint64Uint16 == nil { + if x.FptrMapUint64Uint8 == nil { yyn1310 = true goto LABEL1310 } @@ -11560,67 +10243,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uint16 == nil { + if x.FptrMapUint64Uint8 == nil { r.EncodeNil() } else { - yy1311 := *x.FptrMapUint64Uint16 - yym1312 := z.EncBinary() - _ = yym1312 + yy1311 := *x.FptrMapUint64Uint8 if false { } else { - z.F.EncMapUint64Uint16V(yy1311, e) + z.F.EncMapUint64Uint8V(yy1311, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uint8`) r.WriteMapElemValue() if yyn1310 { r.EncodeNil() } else { - if x.FptrMapUint64Uint16 == nil { + if x.FptrMapUint64Uint8 == nil { r.EncodeNil() } else { - yy1313 := *x.FptrMapUint64Uint16 - yym1314 := z.EncBinary() - _ = yym1314 + yy1313 := *x.FptrMapUint64Uint8 if false { } else { - z.F.EncMapUint64Uint16V(yy1313, e) + z.F.EncMapUint64Uint8V(yy1313, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uint32 == nil { + if x.FMapUint64Uint16 == nil { r.EncodeNil() } else { - yym1316 := z.EncBinary() - _ = yym1316 if false { } else { - z.F.EncMapUint64Uint32V(x.FMapUint64Uint32, e) + z.F.EncMapUint64Uint16V(x.FMapUint64Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uint16`) r.WriteMapElemValue() - if x.FMapUint64Uint32 == nil { + if x.FMapUint64Uint16 == nil { r.EncodeNil() } else { - yym1317 := z.EncBinary() - _ = yym1317 if false { } else { - z.F.EncMapUint64Uint32V(x.FMapUint64Uint32, e) + z.F.EncMapUint64Uint16V(x.FMapUint64Uint16, e) } } } var yyn1318 bool - if x.FptrMapUint64Uint32 == nil { + if x.FptrMapUint64Uint16 == nil { yyn1318 = true goto LABEL1318 } @@ -11631,67 +10306,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uint32 == nil { + if x.FptrMapUint64Uint16 == nil { r.EncodeNil() } else { - yy1319 := *x.FptrMapUint64Uint32 - yym1320 := z.EncBinary() - _ = yym1320 + yy1319 := *x.FptrMapUint64Uint16 if false { } else { - z.F.EncMapUint64Uint32V(yy1319, e) + z.F.EncMapUint64Uint16V(yy1319, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uint16`) r.WriteMapElemValue() if yyn1318 { r.EncodeNil() } else { - if x.FptrMapUint64Uint32 == nil { + if x.FptrMapUint64Uint16 == nil { r.EncodeNil() } else { - yy1321 := *x.FptrMapUint64Uint32 - yym1322 := z.EncBinary() - _ = yym1322 + yy1321 := *x.FptrMapUint64Uint16 if false { } else { - z.F.EncMapUint64Uint32V(yy1321, e) + z.F.EncMapUint64Uint16V(yy1321, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uint64 == nil { + if x.FMapUint64Uint32 == nil { r.EncodeNil() } else { - yym1324 := z.EncBinary() - _ = yym1324 if false { } else { - z.F.EncMapUint64Uint64V(x.FMapUint64Uint64, e) + z.F.EncMapUint64Uint32V(x.FMapUint64Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uint32`) r.WriteMapElemValue() - if x.FMapUint64Uint64 == nil { + if x.FMapUint64Uint32 == nil { r.EncodeNil() } else { - yym1325 := z.EncBinary() - _ = yym1325 if false { } else { - z.F.EncMapUint64Uint64V(x.FMapUint64Uint64, e) + z.F.EncMapUint64Uint32V(x.FMapUint64Uint32, e) } } } var yyn1326 bool - if x.FptrMapUint64Uint64 == nil { + if x.FptrMapUint64Uint32 == nil { yyn1326 = true goto LABEL1326 } @@ -11702,67 +10369,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uint64 == nil { + if x.FptrMapUint64Uint32 == nil { r.EncodeNil() } else { - yy1327 := *x.FptrMapUint64Uint64 - yym1328 := z.EncBinary() - _ = yym1328 + yy1327 := *x.FptrMapUint64Uint32 if false { } else { - z.F.EncMapUint64Uint64V(yy1327, e) + z.F.EncMapUint64Uint32V(yy1327, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uint32`) r.WriteMapElemValue() if yyn1326 { r.EncodeNil() } else { - if x.FptrMapUint64Uint64 == nil { + if x.FptrMapUint64Uint32 == nil { r.EncodeNil() } else { - yy1329 := *x.FptrMapUint64Uint64 - yym1330 := z.EncBinary() - _ = yym1330 + yy1329 := *x.FptrMapUint64Uint32 if false { } else { - z.F.EncMapUint64Uint64V(yy1329, e) + z.F.EncMapUint64Uint32V(yy1329, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Uintptr == nil { + if x.FMapUint64Uint64 == nil { r.EncodeNil() } else { - yym1332 := z.EncBinary() - _ = yym1332 if false { } else { - z.F.EncMapUint64UintptrV(x.FMapUint64Uintptr, e) + z.F.EncMapUint64Uint64V(x.FMapUint64Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uint64`) r.WriteMapElemValue() - if x.FMapUint64Uintptr == nil { + if x.FMapUint64Uint64 == nil { r.EncodeNil() } else { - yym1333 := z.EncBinary() - _ = yym1333 if false { } else { - z.F.EncMapUint64UintptrV(x.FMapUint64Uintptr, e) + z.F.EncMapUint64Uint64V(x.FMapUint64Uint64, e) } } } var yyn1334 bool - if x.FptrMapUint64Uintptr == nil { + if x.FptrMapUint64Uint64 == nil { yyn1334 = true goto LABEL1334 } @@ -11773,67 +10432,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Uintptr == nil { + if x.FptrMapUint64Uint64 == nil { r.EncodeNil() } else { - yy1335 := *x.FptrMapUint64Uintptr - yym1336 := z.EncBinary() - _ = yym1336 + yy1335 := *x.FptrMapUint64Uint64 if false { } else { - z.F.EncMapUint64UintptrV(yy1335, e) + z.F.EncMapUint64Uint64V(yy1335, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uint64`) r.WriteMapElemValue() if yyn1334 { r.EncodeNil() } else { - if x.FptrMapUint64Uintptr == nil { + if x.FptrMapUint64Uint64 == nil { r.EncodeNil() } else { - yy1337 := *x.FptrMapUint64Uintptr - yym1338 := z.EncBinary() - _ = yym1338 + yy1337 := *x.FptrMapUint64Uint64 if false { } else { - z.F.EncMapUint64UintptrV(yy1337, e) + z.F.EncMapUint64Uint64V(yy1337, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Int == nil { + if x.FMapUint64Uintptr == nil { r.EncodeNil() } else { - yym1340 := z.EncBinary() - _ = yym1340 if false { } else { - z.F.EncMapUint64IntV(x.FMapUint64Int, e) + z.F.EncMapUint64UintptrV(x.FMapUint64Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Uintptr`) r.WriteMapElemValue() - if x.FMapUint64Int == nil { + if x.FMapUint64Uintptr == nil { r.EncodeNil() } else { - yym1341 := z.EncBinary() - _ = yym1341 if false { } else { - z.F.EncMapUint64IntV(x.FMapUint64Int, e) + z.F.EncMapUint64UintptrV(x.FMapUint64Uintptr, e) } } } var yyn1342 bool - if x.FptrMapUint64Int == nil { + if x.FptrMapUint64Uintptr == nil { yyn1342 = true goto LABEL1342 } @@ -11844,67 +10495,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Int == nil { + if x.FptrMapUint64Uintptr == nil { r.EncodeNil() } else { - yy1343 := *x.FptrMapUint64Int - yym1344 := z.EncBinary() - _ = yym1344 + yy1343 := *x.FptrMapUint64Uintptr if false { } else { - z.F.EncMapUint64IntV(yy1343, e) + z.F.EncMapUint64UintptrV(yy1343, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Uintptr`) r.WriteMapElemValue() if yyn1342 { r.EncodeNil() } else { - if x.FptrMapUint64Int == nil { + if x.FptrMapUint64Uintptr == nil { r.EncodeNil() } else { - yy1345 := *x.FptrMapUint64Int - yym1346 := z.EncBinary() - _ = yym1346 + yy1345 := *x.FptrMapUint64Uintptr if false { } else { - z.F.EncMapUint64IntV(yy1345, e) + z.F.EncMapUint64UintptrV(yy1345, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Int8 == nil { + if x.FMapUint64Int == nil { r.EncodeNil() } else { - yym1348 := z.EncBinary() - _ = yym1348 if false { } else { - z.F.EncMapUint64Int8V(x.FMapUint64Int8, e) + z.F.EncMapUint64IntV(x.FMapUint64Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Int`) r.WriteMapElemValue() - if x.FMapUint64Int8 == nil { + if x.FMapUint64Int == nil { r.EncodeNil() } else { - yym1349 := z.EncBinary() - _ = yym1349 if false { } else { - z.F.EncMapUint64Int8V(x.FMapUint64Int8, e) + z.F.EncMapUint64IntV(x.FMapUint64Int, e) } } } var yyn1350 bool - if x.FptrMapUint64Int8 == nil { + if x.FptrMapUint64Int == nil { yyn1350 = true goto LABEL1350 } @@ -11915,67 +10558,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Int8 == nil { + if x.FptrMapUint64Int == nil { r.EncodeNil() } else { - yy1351 := *x.FptrMapUint64Int8 - yym1352 := z.EncBinary() - _ = yym1352 + yy1351 := *x.FptrMapUint64Int if false { } else { - z.F.EncMapUint64Int8V(yy1351, e) + z.F.EncMapUint64IntV(yy1351, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Int`) r.WriteMapElemValue() if yyn1350 { r.EncodeNil() } else { - if x.FptrMapUint64Int8 == nil { + if x.FptrMapUint64Int == nil { r.EncodeNil() } else { - yy1353 := *x.FptrMapUint64Int8 - yym1354 := z.EncBinary() - _ = yym1354 + yy1353 := *x.FptrMapUint64Int if false { } else { - z.F.EncMapUint64Int8V(yy1353, e) + z.F.EncMapUint64IntV(yy1353, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Int16 == nil { + if x.FMapUint64Int8 == nil { r.EncodeNil() } else { - yym1356 := z.EncBinary() - _ = yym1356 if false { } else { - z.F.EncMapUint64Int16V(x.FMapUint64Int16, e) + z.F.EncMapUint64Int8V(x.FMapUint64Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Int8`) r.WriteMapElemValue() - if x.FMapUint64Int16 == nil { + if x.FMapUint64Int8 == nil { r.EncodeNil() } else { - yym1357 := z.EncBinary() - _ = yym1357 if false { } else { - z.F.EncMapUint64Int16V(x.FMapUint64Int16, e) + z.F.EncMapUint64Int8V(x.FMapUint64Int8, e) } } } var yyn1358 bool - if x.FptrMapUint64Int16 == nil { + if x.FptrMapUint64Int8 == nil { yyn1358 = true goto LABEL1358 } @@ -11986,67 +10621,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Int16 == nil { + if x.FptrMapUint64Int8 == nil { r.EncodeNil() } else { - yy1359 := *x.FptrMapUint64Int16 - yym1360 := z.EncBinary() - _ = yym1360 + yy1359 := *x.FptrMapUint64Int8 if false { } else { - z.F.EncMapUint64Int16V(yy1359, e) + z.F.EncMapUint64Int8V(yy1359, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Int8`) r.WriteMapElemValue() if yyn1358 { r.EncodeNil() } else { - if x.FptrMapUint64Int16 == nil { + if x.FptrMapUint64Int8 == nil { r.EncodeNil() } else { - yy1361 := *x.FptrMapUint64Int16 - yym1362 := z.EncBinary() - _ = yym1362 + yy1361 := *x.FptrMapUint64Int8 if false { } else { - z.F.EncMapUint64Int16V(yy1361, e) + z.F.EncMapUint64Int8V(yy1361, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Int32 == nil { + if x.FMapUint64Int16 == nil { r.EncodeNil() } else { - yym1364 := z.EncBinary() - _ = yym1364 if false { } else { - z.F.EncMapUint64Int32V(x.FMapUint64Int32, e) + z.F.EncMapUint64Int16V(x.FMapUint64Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Int16`) r.WriteMapElemValue() - if x.FMapUint64Int32 == nil { + if x.FMapUint64Int16 == nil { r.EncodeNil() } else { - yym1365 := z.EncBinary() - _ = yym1365 if false { } else { - z.F.EncMapUint64Int32V(x.FMapUint64Int32, e) + z.F.EncMapUint64Int16V(x.FMapUint64Int16, e) } } } var yyn1366 bool - if x.FptrMapUint64Int32 == nil { + if x.FptrMapUint64Int16 == nil { yyn1366 = true goto LABEL1366 } @@ -12057,67 +10684,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Int32 == nil { + if x.FptrMapUint64Int16 == nil { r.EncodeNil() } else { - yy1367 := *x.FptrMapUint64Int32 - yym1368 := z.EncBinary() - _ = yym1368 + yy1367 := *x.FptrMapUint64Int16 if false { } else { - z.F.EncMapUint64Int32V(yy1367, e) + z.F.EncMapUint64Int16V(yy1367, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Int16`) r.WriteMapElemValue() if yyn1366 { r.EncodeNil() } else { - if x.FptrMapUint64Int32 == nil { + if x.FptrMapUint64Int16 == nil { r.EncodeNil() } else { - yy1369 := *x.FptrMapUint64Int32 - yym1370 := z.EncBinary() - _ = yym1370 + yy1369 := *x.FptrMapUint64Int16 if false { } else { - z.F.EncMapUint64Int32V(yy1369, e) + z.F.EncMapUint64Int16V(yy1369, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Int64 == nil { + if x.FMapUint64Int32 == nil { r.EncodeNil() } else { - yym1372 := z.EncBinary() - _ = yym1372 if false { } else { - z.F.EncMapUint64Int64V(x.FMapUint64Int64, e) + z.F.EncMapUint64Int32V(x.FMapUint64Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Int32`) r.WriteMapElemValue() - if x.FMapUint64Int64 == nil { + if x.FMapUint64Int32 == nil { r.EncodeNil() } else { - yym1373 := z.EncBinary() - _ = yym1373 if false { } else { - z.F.EncMapUint64Int64V(x.FMapUint64Int64, e) + z.F.EncMapUint64Int32V(x.FMapUint64Int32, e) } } } var yyn1374 bool - if x.FptrMapUint64Int64 == nil { + if x.FptrMapUint64Int32 == nil { yyn1374 = true goto LABEL1374 } @@ -12128,67 +10747,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Int64 == nil { + if x.FptrMapUint64Int32 == nil { r.EncodeNil() } else { - yy1375 := *x.FptrMapUint64Int64 - yym1376 := z.EncBinary() - _ = yym1376 + yy1375 := *x.FptrMapUint64Int32 if false { } else { - z.F.EncMapUint64Int64V(yy1375, e) + z.F.EncMapUint64Int32V(yy1375, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Int32`) r.WriteMapElemValue() if yyn1374 { r.EncodeNil() } else { - if x.FptrMapUint64Int64 == nil { + if x.FptrMapUint64Int32 == nil { r.EncodeNil() } else { - yy1377 := *x.FptrMapUint64Int64 - yym1378 := z.EncBinary() - _ = yym1378 + yy1377 := *x.FptrMapUint64Int32 if false { } else { - z.F.EncMapUint64Int64V(yy1377, e) + z.F.EncMapUint64Int32V(yy1377, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Float32 == nil { + if x.FMapUint64Int64 == nil { r.EncodeNil() } else { - yym1380 := z.EncBinary() - _ = yym1380 if false { } else { - z.F.EncMapUint64Float32V(x.FMapUint64Float32, e) + z.F.EncMapUint64Int64V(x.FMapUint64Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Int64`) r.WriteMapElemValue() - if x.FMapUint64Float32 == nil { + if x.FMapUint64Int64 == nil { r.EncodeNil() } else { - yym1381 := z.EncBinary() - _ = yym1381 if false { } else { - z.F.EncMapUint64Float32V(x.FMapUint64Float32, e) + z.F.EncMapUint64Int64V(x.FMapUint64Int64, e) } } } var yyn1382 bool - if x.FptrMapUint64Float32 == nil { + if x.FptrMapUint64Int64 == nil { yyn1382 = true goto LABEL1382 } @@ -12199,67 +10810,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Float32 == nil { + if x.FptrMapUint64Int64 == nil { r.EncodeNil() } else { - yy1383 := *x.FptrMapUint64Float32 - yym1384 := z.EncBinary() - _ = yym1384 + yy1383 := *x.FptrMapUint64Int64 if false { } else { - z.F.EncMapUint64Float32V(yy1383, e) + z.F.EncMapUint64Int64V(yy1383, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Int64`) r.WriteMapElemValue() if yyn1382 { r.EncodeNil() } else { - if x.FptrMapUint64Float32 == nil { + if x.FptrMapUint64Int64 == nil { r.EncodeNil() } else { - yy1385 := *x.FptrMapUint64Float32 - yym1386 := z.EncBinary() - _ = yym1386 + yy1385 := *x.FptrMapUint64Int64 if false { } else { - z.F.EncMapUint64Float32V(yy1385, e) + z.F.EncMapUint64Int64V(yy1385, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Float64 == nil { + if x.FMapUint64Float32 == nil { r.EncodeNil() } else { - yym1388 := z.EncBinary() - _ = yym1388 if false { } else { - z.F.EncMapUint64Float64V(x.FMapUint64Float64, e) + z.F.EncMapUint64Float32V(x.FMapUint64Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Float32`) r.WriteMapElemValue() - if x.FMapUint64Float64 == nil { + if x.FMapUint64Float32 == nil { r.EncodeNil() } else { - yym1389 := z.EncBinary() - _ = yym1389 if false { } else { - z.F.EncMapUint64Float64V(x.FMapUint64Float64, e) + z.F.EncMapUint64Float32V(x.FMapUint64Float32, e) } } } var yyn1390 bool - if x.FptrMapUint64Float64 == nil { + if x.FptrMapUint64Float32 == nil { yyn1390 = true goto LABEL1390 } @@ -12270,67 +10873,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Float64 == nil { + if x.FptrMapUint64Float32 == nil { r.EncodeNil() } else { - yy1391 := *x.FptrMapUint64Float64 - yym1392 := z.EncBinary() - _ = yym1392 + yy1391 := *x.FptrMapUint64Float32 if false { } else { - z.F.EncMapUint64Float64V(yy1391, e) + z.F.EncMapUint64Float32V(yy1391, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Float32`) r.WriteMapElemValue() if yyn1390 { r.EncodeNil() } else { - if x.FptrMapUint64Float64 == nil { + if x.FptrMapUint64Float32 == nil { r.EncodeNil() } else { - yy1393 := *x.FptrMapUint64Float64 - yym1394 := z.EncBinary() - _ = yym1394 + yy1393 := *x.FptrMapUint64Float32 if false { } else { - z.F.EncMapUint64Float64V(yy1393, e) + z.F.EncMapUint64Float32V(yy1393, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUint64Bool == nil { + if x.FMapUint64Float64 == nil { r.EncodeNil() } else { - yym1396 := z.EncBinary() - _ = yym1396 if false { } else { - z.F.EncMapUint64BoolV(x.FMapUint64Bool, e) + z.F.EncMapUint64Float64V(x.FMapUint64Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUint64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Float64`) r.WriteMapElemValue() - if x.FMapUint64Bool == nil { + if x.FMapUint64Float64 == nil { r.EncodeNil() } else { - yym1397 := z.EncBinary() - _ = yym1397 if false { } else { - z.F.EncMapUint64BoolV(x.FMapUint64Bool, e) + z.F.EncMapUint64Float64V(x.FMapUint64Float64, e) } } } var yyn1398 bool - if x.FptrMapUint64Bool == nil { + if x.FptrMapUint64Float64 == nil { yyn1398 = true goto LABEL1398 } @@ -12341,67 +10936,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUint64Bool == nil { + if x.FptrMapUint64Float64 == nil { r.EncodeNil() } else { - yy1399 := *x.FptrMapUint64Bool - yym1400 := z.EncBinary() - _ = yym1400 + yy1399 := *x.FptrMapUint64Float64 if false { } else { - z.F.EncMapUint64BoolV(yy1399, e) + z.F.EncMapUint64Float64V(yy1399, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUint64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Float64`) r.WriteMapElemValue() if yyn1398 { r.EncodeNil() } else { - if x.FptrMapUint64Bool == nil { + if x.FptrMapUint64Float64 == nil { r.EncodeNil() } else { - yy1401 := *x.FptrMapUint64Bool - yym1402 := z.EncBinary() - _ = yym1402 + yy1401 := *x.FptrMapUint64Float64 if false { } else { - z.F.EncMapUint64BoolV(yy1401, e) + z.F.EncMapUint64Float64V(yy1401, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrIntf == nil { + if x.FMapUint64Bool == nil { r.EncodeNil() } else { - yym1404 := z.EncBinary() - _ = yym1404 if false { } else { - z.F.EncMapUintptrIntfV(x.FMapUintptrIntf, e) + z.F.EncMapUint64BoolV(x.FMapUint64Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrIntf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUint64Bool`) r.WriteMapElemValue() - if x.FMapUintptrIntf == nil { + if x.FMapUint64Bool == nil { r.EncodeNil() } else { - yym1405 := z.EncBinary() - _ = yym1405 if false { } else { - z.F.EncMapUintptrIntfV(x.FMapUintptrIntf, e) + z.F.EncMapUint64BoolV(x.FMapUint64Bool, e) } } } var yyn1406 bool - if x.FptrMapUintptrIntf == nil { + if x.FptrMapUint64Bool == nil { yyn1406 = true goto LABEL1406 } @@ -12412,67 +10999,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrIntf == nil { + if x.FptrMapUint64Bool == nil { r.EncodeNil() } else { - yy1407 := *x.FptrMapUintptrIntf - yym1408 := z.EncBinary() - _ = yym1408 + yy1407 := *x.FptrMapUint64Bool if false { } else { - z.F.EncMapUintptrIntfV(yy1407, e) + z.F.EncMapUint64BoolV(yy1407, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUint64Bool`) r.WriteMapElemValue() if yyn1406 { r.EncodeNil() } else { - if x.FptrMapUintptrIntf == nil { + if x.FptrMapUint64Bool == nil { r.EncodeNil() } else { - yy1409 := *x.FptrMapUintptrIntf - yym1410 := z.EncBinary() - _ = yym1410 + yy1409 := *x.FptrMapUint64Bool if false { } else { - z.F.EncMapUintptrIntfV(yy1409, e) + z.F.EncMapUint64BoolV(yy1409, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrString == nil { + if x.FMapUintptrIntf == nil { r.EncodeNil() } else { - yym1412 := z.EncBinary() - _ = yym1412 if false { } else { - z.F.EncMapUintptrStringV(x.FMapUintptrString, e) + z.F.EncMapUintptrIntfV(x.FMapUintptrIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrString")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrIntf`) r.WriteMapElemValue() - if x.FMapUintptrString == nil { + if x.FMapUintptrIntf == nil { r.EncodeNil() } else { - yym1413 := z.EncBinary() - _ = yym1413 if false { } else { - z.F.EncMapUintptrStringV(x.FMapUintptrString, e) + z.F.EncMapUintptrIntfV(x.FMapUintptrIntf, e) } } } var yyn1414 bool - if x.FptrMapUintptrString == nil { + if x.FptrMapUintptrIntf == nil { yyn1414 = true goto LABEL1414 } @@ -12483,67 +11062,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrString == nil { + if x.FptrMapUintptrIntf == nil { r.EncodeNil() } else { - yy1415 := *x.FptrMapUintptrString - yym1416 := z.EncBinary() - _ = yym1416 + yy1415 := *x.FptrMapUintptrIntf if false { } else { - z.F.EncMapUintptrStringV(yy1415, e) + z.F.EncMapUintptrIntfV(yy1415, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrIntf`) r.WriteMapElemValue() if yyn1414 { r.EncodeNil() } else { - if x.FptrMapUintptrString == nil { + if x.FptrMapUintptrIntf == nil { r.EncodeNil() } else { - yy1417 := *x.FptrMapUintptrString - yym1418 := z.EncBinary() - _ = yym1418 + yy1417 := *x.FptrMapUintptrIntf if false { } else { - z.F.EncMapUintptrStringV(yy1417, e) + z.F.EncMapUintptrIntfV(yy1417, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUint == nil { + if x.FMapUintptrString == nil { r.EncodeNil() } else { - yym1420 := z.EncBinary() - _ = yym1420 if false { } else { - z.F.EncMapUintptrUintV(x.FMapUintptrUint, e) + z.F.EncMapUintptrStringV(x.FMapUintptrString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrString`) r.WriteMapElemValue() - if x.FMapUintptrUint == nil { + if x.FMapUintptrString == nil { r.EncodeNil() } else { - yym1421 := z.EncBinary() - _ = yym1421 if false { } else { - z.F.EncMapUintptrUintV(x.FMapUintptrUint, e) + z.F.EncMapUintptrStringV(x.FMapUintptrString, e) } } } var yyn1422 bool - if x.FptrMapUintptrUint == nil { + if x.FptrMapUintptrString == nil { yyn1422 = true goto LABEL1422 } @@ -12554,67 +11125,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUint == nil { + if x.FptrMapUintptrString == nil { r.EncodeNil() } else { - yy1423 := *x.FptrMapUintptrUint - yym1424 := z.EncBinary() - _ = yym1424 + yy1423 := *x.FptrMapUintptrString if false { } else { - z.F.EncMapUintptrUintV(yy1423, e) + z.F.EncMapUintptrStringV(yy1423, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrString`) r.WriteMapElemValue() if yyn1422 { r.EncodeNil() } else { - if x.FptrMapUintptrUint == nil { + if x.FptrMapUintptrString == nil { r.EncodeNil() } else { - yy1425 := *x.FptrMapUintptrUint - yym1426 := z.EncBinary() - _ = yym1426 + yy1425 := *x.FptrMapUintptrString if false { } else { - z.F.EncMapUintptrUintV(yy1425, e) + z.F.EncMapUintptrStringV(yy1425, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUint8 == nil { + if x.FMapUintptrUint == nil { r.EncodeNil() } else { - yym1428 := z.EncBinary() - _ = yym1428 if false { } else { - z.F.EncMapUintptrUint8V(x.FMapUintptrUint8, e) + z.F.EncMapUintptrUintV(x.FMapUintptrUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUint`) r.WriteMapElemValue() - if x.FMapUintptrUint8 == nil { + if x.FMapUintptrUint == nil { r.EncodeNil() } else { - yym1429 := z.EncBinary() - _ = yym1429 if false { } else { - z.F.EncMapUintptrUint8V(x.FMapUintptrUint8, e) + z.F.EncMapUintptrUintV(x.FMapUintptrUint, e) } } } var yyn1430 bool - if x.FptrMapUintptrUint8 == nil { + if x.FptrMapUintptrUint == nil { yyn1430 = true goto LABEL1430 } @@ -12625,67 +11188,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUint8 == nil { + if x.FptrMapUintptrUint == nil { r.EncodeNil() } else { - yy1431 := *x.FptrMapUintptrUint8 - yym1432 := z.EncBinary() - _ = yym1432 + yy1431 := *x.FptrMapUintptrUint if false { } else { - z.F.EncMapUintptrUint8V(yy1431, e) + z.F.EncMapUintptrUintV(yy1431, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUint`) r.WriteMapElemValue() if yyn1430 { r.EncodeNil() } else { - if x.FptrMapUintptrUint8 == nil { + if x.FptrMapUintptrUint == nil { r.EncodeNil() } else { - yy1433 := *x.FptrMapUintptrUint8 - yym1434 := z.EncBinary() - _ = yym1434 + yy1433 := *x.FptrMapUintptrUint if false { } else { - z.F.EncMapUintptrUint8V(yy1433, e) + z.F.EncMapUintptrUintV(yy1433, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUint16 == nil { + if x.FMapUintptrUint8 == nil { r.EncodeNil() } else { - yym1436 := z.EncBinary() - _ = yym1436 if false { } else { - z.F.EncMapUintptrUint16V(x.FMapUintptrUint16, e) + z.F.EncMapUintptrUint8V(x.FMapUintptrUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUint8`) r.WriteMapElemValue() - if x.FMapUintptrUint16 == nil { + if x.FMapUintptrUint8 == nil { r.EncodeNil() } else { - yym1437 := z.EncBinary() - _ = yym1437 if false { } else { - z.F.EncMapUintptrUint16V(x.FMapUintptrUint16, e) + z.F.EncMapUintptrUint8V(x.FMapUintptrUint8, e) } } } var yyn1438 bool - if x.FptrMapUintptrUint16 == nil { + if x.FptrMapUintptrUint8 == nil { yyn1438 = true goto LABEL1438 } @@ -12696,67 +11251,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUint16 == nil { + if x.FptrMapUintptrUint8 == nil { r.EncodeNil() } else { - yy1439 := *x.FptrMapUintptrUint16 - yym1440 := z.EncBinary() - _ = yym1440 + yy1439 := *x.FptrMapUintptrUint8 if false { } else { - z.F.EncMapUintptrUint16V(yy1439, e) + z.F.EncMapUintptrUint8V(yy1439, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUint8`) r.WriteMapElemValue() if yyn1438 { r.EncodeNil() } else { - if x.FptrMapUintptrUint16 == nil { + if x.FptrMapUintptrUint8 == nil { r.EncodeNil() } else { - yy1441 := *x.FptrMapUintptrUint16 - yym1442 := z.EncBinary() - _ = yym1442 + yy1441 := *x.FptrMapUintptrUint8 if false { } else { - z.F.EncMapUintptrUint16V(yy1441, e) + z.F.EncMapUintptrUint8V(yy1441, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUint32 == nil { + if x.FMapUintptrUint16 == nil { r.EncodeNil() } else { - yym1444 := z.EncBinary() - _ = yym1444 if false { } else { - z.F.EncMapUintptrUint32V(x.FMapUintptrUint32, e) + z.F.EncMapUintptrUint16V(x.FMapUintptrUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUint16`) r.WriteMapElemValue() - if x.FMapUintptrUint32 == nil { + if x.FMapUintptrUint16 == nil { r.EncodeNil() } else { - yym1445 := z.EncBinary() - _ = yym1445 if false { } else { - z.F.EncMapUintptrUint32V(x.FMapUintptrUint32, e) + z.F.EncMapUintptrUint16V(x.FMapUintptrUint16, e) } } } var yyn1446 bool - if x.FptrMapUintptrUint32 == nil { + if x.FptrMapUintptrUint16 == nil { yyn1446 = true goto LABEL1446 } @@ -12767,67 +11314,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUint32 == nil { + if x.FptrMapUintptrUint16 == nil { r.EncodeNil() } else { - yy1447 := *x.FptrMapUintptrUint32 - yym1448 := z.EncBinary() - _ = yym1448 + yy1447 := *x.FptrMapUintptrUint16 if false { } else { - z.F.EncMapUintptrUint32V(yy1447, e) + z.F.EncMapUintptrUint16V(yy1447, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUint16`) r.WriteMapElemValue() if yyn1446 { r.EncodeNil() } else { - if x.FptrMapUintptrUint32 == nil { + if x.FptrMapUintptrUint16 == nil { r.EncodeNil() } else { - yy1449 := *x.FptrMapUintptrUint32 - yym1450 := z.EncBinary() - _ = yym1450 + yy1449 := *x.FptrMapUintptrUint16 if false { } else { - z.F.EncMapUintptrUint32V(yy1449, e) + z.F.EncMapUintptrUint16V(yy1449, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUint64 == nil { + if x.FMapUintptrUint32 == nil { r.EncodeNil() } else { - yym1452 := z.EncBinary() - _ = yym1452 if false { } else { - z.F.EncMapUintptrUint64V(x.FMapUintptrUint64, e) + z.F.EncMapUintptrUint32V(x.FMapUintptrUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUint32`) r.WriteMapElemValue() - if x.FMapUintptrUint64 == nil { + if x.FMapUintptrUint32 == nil { r.EncodeNil() } else { - yym1453 := z.EncBinary() - _ = yym1453 if false { } else { - z.F.EncMapUintptrUint64V(x.FMapUintptrUint64, e) + z.F.EncMapUintptrUint32V(x.FMapUintptrUint32, e) } } } var yyn1454 bool - if x.FptrMapUintptrUint64 == nil { + if x.FptrMapUintptrUint32 == nil { yyn1454 = true goto LABEL1454 } @@ -12838,67 +11377,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUint64 == nil { + if x.FptrMapUintptrUint32 == nil { r.EncodeNil() } else { - yy1455 := *x.FptrMapUintptrUint64 - yym1456 := z.EncBinary() - _ = yym1456 + yy1455 := *x.FptrMapUintptrUint32 if false { } else { - z.F.EncMapUintptrUint64V(yy1455, e) + z.F.EncMapUintptrUint32V(yy1455, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUint32`) r.WriteMapElemValue() if yyn1454 { r.EncodeNil() } else { - if x.FptrMapUintptrUint64 == nil { + if x.FptrMapUintptrUint32 == nil { r.EncodeNil() } else { - yy1457 := *x.FptrMapUintptrUint64 - yym1458 := z.EncBinary() - _ = yym1458 + yy1457 := *x.FptrMapUintptrUint32 if false { } else { - z.F.EncMapUintptrUint64V(yy1457, e) + z.F.EncMapUintptrUint32V(yy1457, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrUintptr == nil { + if x.FMapUintptrUint64 == nil { r.EncodeNil() } else { - yym1460 := z.EncBinary() - _ = yym1460 if false { } else { - z.F.EncMapUintptrUintptrV(x.FMapUintptrUintptr, e) + z.F.EncMapUintptrUint64V(x.FMapUintptrUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUint64`) r.WriteMapElemValue() - if x.FMapUintptrUintptr == nil { + if x.FMapUintptrUint64 == nil { r.EncodeNil() } else { - yym1461 := z.EncBinary() - _ = yym1461 if false { } else { - z.F.EncMapUintptrUintptrV(x.FMapUintptrUintptr, e) + z.F.EncMapUintptrUint64V(x.FMapUintptrUint64, e) } } } var yyn1462 bool - if x.FptrMapUintptrUintptr == nil { + if x.FptrMapUintptrUint64 == nil { yyn1462 = true goto LABEL1462 } @@ -12909,67 +11440,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrUintptr == nil { + if x.FptrMapUintptrUint64 == nil { r.EncodeNil() } else { - yy1463 := *x.FptrMapUintptrUintptr - yym1464 := z.EncBinary() - _ = yym1464 + yy1463 := *x.FptrMapUintptrUint64 if false { } else { - z.F.EncMapUintptrUintptrV(yy1463, e) + z.F.EncMapUintptrUint64V(yy1463, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUint64`) r.WriteMapElemValue() if yyn1462 { r.EncodeNil() } else { - if x.FptrMapUintptrUintptr == nil { + if x.FptrMapUintptrUint64 == nil { r.EncodeNil() } else { - yy1465 := *x.FptrMapUintptrUintptr - yym1466 := z.EncBinary() - _ = yym1466 + yy1465 := *x.FptrMapUintptrUint64 if false { } else { - z.F.EncMapUintptrUintptrV(yy1465, e) + z.F.EncMapUintptrUint64V(yy1465, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrInt == nil { + if x.FMapUintptrUintptr == nil { r.EncodeNil() } else { - yym1468 := z.EncBinary() - _ = yym1468 if false { } else { - z.F.EncMapUintptrIntV(x.FMapUintptrInt, e) + z.F.EncMapUintptrUintptrV(x.FMapUintptrUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrUintptr`) r.WriteMapElemValue() - if x.FMapUintptrInt == nil { + if x.FMapUintptrUintptr == nil { r.EncodeNil() } else { - yym1469 := z.EncBinary() - _ = yym1469 if false { } else { - z.F.EncMapUintptrIntV(x.FMapUintptrInt, e) + z.F.EncMapUintptrUintptrV(x.FMapUintptrUintptr, e) } } } var yyn1470 bool - if x.FptrMapUintptrInt == nil { + if x.FptrMapUintptrUintptr == nil { yyn1470 = true goto LABEL1470 } @@ -12980,67 +11503,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrInt == nil { + if x.FptrMapUintptrUintptr == nil { r.EncodeNil() } else { - yy1471 := *x.FptrMapUintptrInt - yym1472 := z.EncBinary() - _ = yym1472 + yy1471 := *x.FptrMapUintptrUintptr if false { } else { - z.F.EncMapUintptrIntV(yy1471, e) + z.F.EncMapUintptrUintptrV(yy1471, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrUintptr`) r.WriteMapElemValue() if yyn1470 { r.EncodeNil() } else { - if x.FptrMapUintptrInt == nil { + if x.FptrMapUintptrUintptr == nil { r.EncodeNil() } else { - yy1473 := *x.FptrMapUintptrInt - yym1474 := z.EncBinary() - _ = yym1474 + yy1473 := *x.FptrMapUintptrUintptr if false { } else { - z.F.EncMapUintptrIntV(yy1473, e) + z.F.EncMapUintptrUintptrV(yy1473, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrInt8 == nil { + if x.FMapUintptrInt == nil { r.EncodeNil() } else { - yym1476 := z.EncBinary() - _ = yym1476 if false { } else { - z.F.EncMapUintptrInt8V(x.FMapUintptrInt8, e) + z.F.EncMapUintptrIntV(x.FMapUintptrInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrInt`) r.WriteMapElemValue() - if x.FMapUintptrInt8 == nil { + if x.FMapUintptrInt == nil { r.EncodeNil() } else { - yym1477 := z.EncBinary() - _ = yym1477 if false { } else { - z.F.EncMapUintptrInt8V(x.FMapUintptrInt8, e) + z.F.EncMapUintptrIntV(x.FMapUintptrInt, e) } } } var yyn1478 bool - if x.FptrMapUintptrInt8 == nil { + if x.FptrMapUintptrInt == nil { yyn1478 = true goto LABEL1478 } @@ -13051,67 +11566,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrInt8 == nil { + if x.FptrMapUintptrInt == nil { r.EncodeNil() } else { - yy1479 := *x.FptrMapUintptrInt8 - yym1480 := z.EncBinary() - _ = yym1480 + yy1479 := *x.FptrMapUintptrInt if false { } else { - z.F.EncMapUintptrInt8V(yy1479, e) + z.F.EncMapUintptrIntV(yy1479, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrInt`) r.WriteMapElemValue() if yyn1478 { r.EncodeNil() } else { - if x.FptrMapUintptrInt8 == nil { + if x.FptrMapUintptrInt == nil { r.EncodeNil() } else { - yy1481 := *x.FptrMapUintptrInt8 - yym1482 := z.EncBinary() - _ = yym1482 + yy1481 := *x.FptrMapUintptrInt if false { } else { - z.F.EncMapUintptrInt8V(yy1481, e) + z.F.EncMapUintptrIntV(yy1481, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrInt16 == nil { + if x.FMapUintptrInt8 == nil { r.EncodeNil() } else { - yym1484 := z.EncBinary() - _ = yym1484 if false { } else { - z.F.EncMapUintptrInt16V(x.FMapUintptrInt16, e) + z.F.EncMapUintptrInt8V(x.FMapUintptrInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrInt8`) r.WriteMapElemValue() - if x.FMapUintptrInt16 == nil { + if x.FMapUintptrInt8 == nil { r.EncodeNil() } else { - yym1485 := z.EncBinary() - _ = yym1485 if false { } else { - z.F.EncMapUintptrInt16V(x.FMapUintptrInt16, e) + z.F.EncMapUintptrInt8V(x.FMapUintptrInt8, e) } } } var yyn1486 bool - if x.FptrMapUintptrInt16 == nil { + if x.FptrMapUintptrInt8 == nil { yyn1486 = true goto LABEL1486 } @@ -13122,67 +11629,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrInt16 == nil { + if x.FptrMapUintptrInt8 == nil { r.EncodeNil() } else { - yy1487 := *x.FptrMapUintptrInt16 - yym1488 := z.EncBinary() - _ = yym1488 + yy1487 := *x.FptrMapUintptrInt8 if false { } else { - z.F.EncMapUintptrInt16V(yy1487, e) + z.F.EncMapUintptrInt8V(yy1487, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrInt8`) r.WriteMapElemValue() if yyn1486 { r.EncodeNil() } else { - if x.FptrMapUintptrInt16 == nil { + if x.FptrMapUintptrInt8 == nil { r.EncodeNil() } else { - yy1489 := *x.FptrMapUintptrInt16 - yym1490 := z.EncBinary() - _ = yym1490 + yy1489 := *x.FptrMapUintptrInt8 if false { } else { - z.F.EncMapUintptrInt16V(yy1489, e) + z.F.EncMapUintptrInt8V(yy1489, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrInt32 == nil { + if x.FMapUintptrInt16 == nil { r.EncodeNil() } else { - yym1492 := z.EncBinary() - _ = yym1492 if false { } else { - z.F.EncMapUintptrInt32V(x.FMapUintptrInt32, e) + z.F.EncMapUintptrInt16V(x.FMapUintptrInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrInt16`) r.WriteMapElemValue() - if x.FMapUintptrInt32 == nil { + if x.FMapUintptrInt16 == nil { r.EncodeNil() } else { - yym1493 := z.EncBinary() - _ = yym1493 if false { } else { - z.F.EncMapUintptrInt32V(x.FMapUintptrInt32, e) + z.F.EncMapUintptrInt16V(x.FMapUintptrInt16, e) } } } var yyn1494 bool - if x.FptrMapUintptrInt32 == nil { + if x.FptrMapUintptrInt16 == nil { yyn1494 = true goto LABEL1494 } @@ -13193,67 +11692,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrInt32 == nil { + if x.FptrMapUintptrInt16 == nil { r.EncodeNil() } else { - yy1495 := *x.FptrMapUintptrInt32 - yym1496 := z.EncBinary() - _ = yym1496 + yy1495 := *x.FptrMapUintptrInt16 if false { } else { - z.F.EncMapUintptrInt32V(yy1495, e) + z.F.EncMapUintptrInt16V(yy1495, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrInt16`) r.WriteMapElemValue() if yyn1494 { r.EncodeNil() } else { - if x.FptrMapUintptrInt32 == nil { + if x.FptrMapUintptrInt16 == nil { r.EncodeNil() } else { - yy1497 := *x.FptrMapUintptrInt32 - yym1498 := z.EncBinary() - _ = yym1498 + yy1497 := *x.FptrMapUintptrInt16 if false { } else { - z.F.EncMapUintptrInt32V(yy1497, e) + z.F.EncMapUintptrInt16V(yy1497, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrInt64 == nil { + if x.FMapUintptrInt32 == nil { r.EncodeNil() } else { - yym1500 := z.EncBinary() - _ = yym1500 if false { } else { - z.F.EncMapUintptrInt64V(x.FMapUintptrInt64, e) + z.F.EncMapUintptrInt32V(x.FMapUintptrInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrInt32`) r.WriteMapElemValue() - if x.FMapUintptrInt64 == nil { + if x.FMapUintptrInt32 == nil { r.EncodeNil() } else { - yym1501 := z.EncBinary() - _ = yym1501 if false { } else { - z.F.EncMapUintptrInt64V(x.FMapUintptrInt64, e) + z.F.EncMapUintptrInt32V(x.FMapUintptrInt32, e) } } } var yyn1502 bool - if x.FptrMapUintptrInt64 == nil { + if x.FptrMapUintptrInt32 == nil { yyn1502 = true goto LABEL1502 } @@ -13264,67 +11755,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrInt64 == nil { + if x.FptrMapUintptrInt32 == nil { r.EncodeNil() } else { - yy1503 := *x.FptrMapUintptrInt64 - yym1504 := z.EncBinary() - _ = yym1504 + yy1503 := *x.FptrMapUintptrInt32 if false { } else { - z.F.EncMapUintptrInt64V(yy1503, e) + z.F.EncMapUintptrInt32V(yy1503, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrInt32`) r.WriteMapElemValue() if yyn1502 { r.EncodeNil() } else { - if x.FptrMapUintptrInt64 == nil { + if x.FptrMapUintptrInt32 == nil { r.EncodeNil() } else { - yy1505 := *x.FptrMapUintptrInt64 - yym1506 := z.EncBinary() - _ = yym1506 + yy1505 := *x.FptrMapUintptrInt32 if false { } else { - z.F.EncMapUintptrInt64V(yy1505, e) + z.F.EncMapUintptrInt32V(yy1505, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrFloat32 == nil { + if x.FMapUintptrInt64 == nil { r.EncodeNil() } else { - yym1508 := z.EncBinary() - _ = yym1508 if false { } else { - z.F.EncMapUintptrFloat32V(x.FMapUintptrFloat32, e) + z.F.EncMapUintptrInt64V(x.FMapUintptrInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrInt64`) r.WriteMapElemValue() - if x.FMapUintptrFloat32 == nil { + if x.FMapUintptrInt64 == nil { r.EncodeNil() } else { - yym1509 := z.EncBinary() - _ = yym1509 if false { } else { - z.F.EncMapUintptrFloat32V(x.FMapUintptrFloat32, e) + z.F.EncMapUintptrInt64V(x.FMapUintptrInt64, e) } } } var yyn1510 bool - if x.FptrMapUintptrFloat32 == nil { + if x.FptrMapUintptrInt64 == nil { yyn1510 = true goto LABEL1510 } @@ -13335,67 +11818,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrFloat32 == nil { + if x.FptrMapUintptrInt64 == nil { r.EncodeNil() } else { - yy1511 := *x.FptrMapUintptrFloat32 - yym1512 := z.EncBinary() - _ = yym1512 + yy1511 := *x.FptrMapUintptrInt64 if false { } else { - z.F.EncMapUintptrFloat32V(yy1511, e) + z.F.EncMapUintptrInt64V(yy1511, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrInt64`) r.WriteMapElemValue() if yyn1510 { r.EncodeNil() } else { - if x.FptrMapUintptrFloat32 == nil { + if x.FptrMapUintptrInt64 == nil { r.EncodeNil() } else { - yy1513 := *x.FptrMapUintptrFloat32 - yym1514 := z.EncBinary() - _ = yym1514 + yy1513 := *x.FptrMapUintptrInt64 if false { } else { - z.F.EncMapUintptrFloat32V(yy1513, e) + z.F.EncMapUintptrInt64V(yy1513, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrFloat64 == nil { + if x.FMapUintptrFloat32 == nil { r.EncodeNil() } else { - yym1516 := z.EncBinary() - _ = yym1516 if false { } else { - z.F.EncMapUintptrFloat64V(x.FMapUintptrFloat64, e) + z.F.EncMapUintptrFloat32V(x.FMapUintptrFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrFloat32`) r.WriteMapElemValue() - if x.FMapUintptrFloat64 == nil { + if x.FMapUintptrFloat32 == nil { r.EncodeNil() } else { - yym1517 := z.EncBinary() - _ = yym1517 if false { } else { - z.F.EncMapUintptrFloat64V(x.FMapUintptrFloat64, e) + z.F.EncMapUintptrFloat32V(x.FMapUintptrFloat32, e) } } } var yyn1518 bool - if x.FptrMapUintptrFloat64 == nil { + if x.FptrMapUintptrFloat32 == nil { yyn1518 = true goto LABEL1518 } @@ -13406,67 +11881,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrFloat64 == nil { + if x.FptrMapUintptrFloat32 == nil { r.EncodeNil() } else { - yy1519 := *x.FptrMapUintptrFloat64 - yym1520 := z.EncBinary() - _ = yym1520 + yy1519 := *x.FptrMapUintptrFloat32 if false { } else { - z.F.EncMapUintptrFloat64V(yy1519, e) + z.F.EncMapUintptrFloat32V(yy1519, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrFloat32`) r.WriteMapElemValue() if yyn1518 { r.EncodeNil() } else { - if x.FptrMapUintptrFloat64 == nil { + if x.FptrMapUintptrFloat32 == nil { r.EncodeNil() } else { - yy1521 := *x.FptrMapUintptrFloat64 - yym1522 := z.EncBinary() - _ = yym1522 + yy1521 := *x.FptrMapUintptrFloat32 if false { } else { - z.F.EncMapUintptrFloat64V(yy1521, e) + z.F.EncMapUintptrFloat32V(yy1521, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapUintptrBool == nil { + if x.FMapUintptrFloat64 == nil { r.EncodeNil() } else { - yym1524 := z.EncBinary() - _ = yym1524 if false { } else { - z.F.EncMapUintptrBoolV(x.FMapUintptrBool, e) + z.F.EncMapUintptrFloat64V(x.FMapUintptrFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapUintptrBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrFloat64`) r.WriteMapElemValue() - if x.FMapUintptrBool == nil { + if x.FMapUintptrFloat64 == nil { r.EncodeNil() } else { - yym1525 := z.EncBinary() - _ = yym1525 if false { } else { - z.F.EncMapUintptrBoolV(x.FMapUintptrBool, e) + z.F.EncMapUintptrFloat64V(x.FMapUintptrFloat64, e) } } } var yyn1526 bool - if x.FptrMapUintptrBool == nil { + if x.FptrMapUintptrFloat64 == nil { yyn1526 = true goto LABEL1526 } @@ -13477,67 +11944,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapUintptrBool == nil { + if x.FptrMapUintptrFloat64 == nil { r.EncodeNil() } else { - yy1527 := *x.FptrMapUintptrBool - yym1528 := z.EncBinary() - _ = yym1528 + yy1527 := *x.FptrMapUintptrFloat64 if false { } else { - z.F.EncMapUintptrBoolV(yy1527, e) + z.F.EncMapUintptrFloat64V(yy1527, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapUintptrBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrFloat64`) r.WriteMapElemValue() if yyn1526 { r.EncodeNil() } else { - if x.FptrMapUintptrBool == nil { + if x.FptrMapUintptrFloat64 == nil { r.EncodeNil() } else { - yy1529 := *x.FptrMapUintptrBool - yym1530 := z.EncBinary() - _ = yym1530 + yy1529 := *x.FptrMapUintptrFloat64 if false { } else { - z.F.EncMapUintptrBoolV(yy1529, e) + z.F.EncMapUintptrFloat64V(yy1529, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntIntf == nil { + if x.FMapUintptrBool == nil { r.EncodeNil() } else { - yym1532 := z.EncBinary() - _ = yym1532 if false { } else { - z.F.EncMapIntIntfV(x.FMapIntIntf, e) + z.F.EncMapUintptrBoolV(x.FMapUintptrBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntIntf")) + r.EncodeString(codecSelferCcUTF819781, `FMapUintptrBool`) r.WriteMapElemValue() - if x.FMapIntIntf == nil { + if x.FMapUintptrBool == nil { r.EncodeNil() } else { - yym1533 := z.EncBinary() - _ = yym1533 if false { } else { - z.F.EncMapIntIntfV(x.FMapIntIntf, e) + z.F.EncMapUintptrBoolV(x.FMapUintptrBool, e) } } } var yyn1534 bool - if x.FptrMapIntIntf == nil { + if x.FptrMapUintptrBool == nil { yyn1534 = true goto LABEL1534 } @@ -13548,67 +12007,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntIntf == nil { + if x.FptrMapUintptrBool == nil { r.EncodeNil() } else { - yy1535 := *x.FptrMapIntIntf - yym1536 := z.EncBinary() - _ = yym1536 + yy1535 := *x.FptrMapUintptrBool if false { } else { - z.F.EncMapIntIntfV(yy1535, e) + z.F.EncMapUintptrBoolV(yy1535, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapUintptrBool`) r.WriteMapElemValue() if yyn1534 { r.EncodeNil() } else { - if x.FptrMapIntIntf == nil { + if x.FptrMapUintptrBool == nil { r.EncodeNil() } else { - yy1537 := *x.FptrMapIntIntf - yym1538 := z.EncBinary() - _ = yym1538 + yy1537 := *x.FptrMapUintptrBool if false { } else { - z.F.EncMapIntIntfV(yy1537, e) + z.F.EncMapUintptrBoolV(yy1537, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntString == nil { + if x.FMapIntIntf == nil { r.EncodeNil() } else { - yym1540 := z.EncBinary() - _ = yym1540 if false { } else { - z.F.EncMapIntStringV(x.FMapIntString, e) + z.F.EncMapIntIntfV(x.FMapIntIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntString")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntIntf`) r.WriteMapElemValue() - if x.FMapIntString == nil { + if x.FMapIntIntf == nil { r.EncodeNil() } else { - yym1541 := z.EncBinary() - _ = yym1541 if false { } else { - z.F.EncMapIntStringV(x.FMapIntString, e) + z.F.EncMapIntIntfV(x.FMapIntIntf, e) } } } var yyn1542 bool - if x.FptrMapIntString == nil { + if x.FptrMapIntIntf == nil { yyn1542 = true goto LABEL1542 } @@ -13619,67 +12070,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntString == nil { + if x.FptrMapIntIntf == nil { r.EncodeNil() } else { - yy1543 := *x.FptrMapIntString - yym1544 := z.EncBinary() - _ = yym1544 + yy1543 := *x.FptrMapIntIntf if false { } else { - z.F.EncMapIntStringV(yy1543, e) + z.F.EncMapIntIntfV(yy1543, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntIntf`) r.WriteMapElemValue() if yyn1542 { r.EncodeNil() } else { - if x.FptrMapIntString == nil { + if x.FptrMapIntIntf == nil { r.EncodeNil() } else { - yy1545 := *x.FptrMapIntString - yym1546 := z.EncBinary() - _ = yym1546 + yy1545 := *x.FptrMapIntIntf if false { } else { - z.F.EncMapIntStringV(yy1545, e) + z.F.EncMapIntIntfV(yy1545, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUint == nil { + if x.FMapIntString == nil { r.EncodeNil() } else { - yym1548 := z.EncBinary() - _ = yym1548 if false { } else { - z.F.EncMapIntUintV(x.FMapIntUint, e) + z.F.EncMapIntStringV(x.FMapIntString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntString`) r.WriteMapElemValue() - if x.FMapIntUint == nil { + if x.FMapIntString == nil { r.EncodeNil() } else { - yym1549 := z.EncBinary() - _ = yym1549 if false { } else { - z.F.EncMapIntUintV(x.FMapIntUint, e) + z.F.EncMapIntStringV(x.FMapIntString, e) } } } var yyn1550 bool - if x.FptrMapIntUint == nil { + if x.FptrMapIntString == nil { yyn1550 = true goto LABEL1550 } @@ -13690,67 +12133,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUint == nil { + if x.FptrMapIntString == nil { r.EncodeNil() } else { - yy1551 := *x.FptrMapIntUint - yym1552 := z.EncBinary() - _ = yym1552 + yy1551 := *x.FptrMapIntString if false { } else { - z.F.EncMapIntUintV(yy1551, e) + z.F.EncMapIntStringV(yy1551, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntString`) r.WriteMapElemValue() if yyn1550 { r.EncodeNil() } else { - if x.FptrMapIntUint == nil { + if x.FptrMapIntString == nil { r.EncodeNil() } else { - yy1553 := *x.FptrMapIntUint - yym1554 := z.EncBinary() - _ = yym1554 + yy1553 := *x.FptrMapIntString if false { } else { - z.F.EncMapIntUintV(yy1553, e) + z.F.EncMapIntStringV(yy1553, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUint8 == nil { + if x.FMapIntUint == nil { r.EncodeNil() } else { - yym1556 := z.EncBinary() - _ = yym1556 if false { } else { - z.F.EncMapIntUint8V(x.FMapIntUint8, e) + z.F.EncMapIntUintV(x.FMapIntUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUint`) r.WriteMapElemValue() - if x.FMapIntUint8 == nil { + if x.FMapIntUint == nil { r.EncodeNil() } else { - yym1557 := z.EncBinary() - _ = yym1557 if false { } else { - z.F.EncMapIntUint8V(x.FMapIntUint8, e) + z.F.EncMapIntUintV(x.FMapIntUint, e) } } } var yyn1558 bool - if x.FptrMapIntUint8 == nil { + if x.FptrMapIntUint == nil { yyn1558 = true goto LABEL1558 } @@ -13761,67 +12196,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUint8 == nil { + if x.FptrMapIntUint == nil { r.EncodeNil() } else { - yy1559 := *x.FptrMapIntUint8 - yym1560 := z.EncBinary() - _ = yym1560 + yy1559 := *x.FptrMapIntUint if false { } else { - z.F.EncMapIntUint8V(yy1559, e) + z.F.EncMapIntUintV(yy1559, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUint`) r.WriteMapElemValue() if yyn1558 { r.EncodeNil() } else { - if x.FptrMapIntUint8 == nil { + if x.FptrMapIntUint == nil { r.EncodeNil() } else { - yy1561 := *x.FptrMapIntUint8 - yym1562 := z.EncBinary() - _ = yym1562 + yy1561 := *x.FptrMapIntUint if false { } else { - z.F.EncMapIntUint8V(yy1561, e) + z.F.EncMapIntUintV(yy1561, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUint16 == nil { + if x.FMapIntUint8 == nil { r.EncodeNil() } else { - yym1564 := z.EncBinary() - _ = yym1564 if false { } else { - z.F.EncMapIntUint16V(x.FMapIntUint16, e) + z.F.EncMapIntUint8V(x.FMapIntUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUint8`) r.WriteMapElemValue() - if x.FMapIntUint16 == nil { + if x.FMapIntUint8 == nil { r.EncodeNil() } else { - yym1565 := z.EncBinary() - _ = yym1565 if false { } else { - z.F.EncMapIntUint16V(x.FMapIntUint16, e) + z.F.EncMapIntUint8V(x.FMapIntUint8, e) } } } var yyn1566 bool - if x.FptrMapIntUint16 == nil { + if x.FptrMapIntUint8 == nil { yyn1566 = true goto LABEL1566 } @@ -13832,67 +12259,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUint16 == nil { + if x.FptrMapIntUint8 == nil { r.EncodeNil() } else { - yy1567 := *x.FptrMapIntUint16 - yym1568 := z.EncBinary() - _ = yym1568 + yy1567 := *x.FptrMapIntUint8 if false { } else { - z.F.EncMapIntUint16V(yy1567, e) + z.F.EncMapIntUint8V(yy1567, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUint8`) r.WriteMapElemValue() if yyn1566 { r.EncodeNil() } else { - if x.FptrMapIntUint16 == nil { + if x.FptrMapIntUint8 == nil { r.EncodeNil() } else { - yy1569 := *x.FptrMapIntUint16 - yym1570 := z.EncBinary() - _ = yym1570 + yy1569 := *x.FptrMapIntUint8 if false { } else { - z.F.EncMapIntUint16V(yy1569, e) + z.F.EncMapIntUint8V(yy1569, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUint32 == nil { + if x.FMapIntUint16 == nil { r.EncodeNil() } else { - yym1572 := z.EncBinary() - _ = yym1572 if false { } else { - z.F.EncMapIntUint32V(x.FMapIntUint32, e) + z.F.EncMapIntUint16V(x.FMapIntUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUint16`) r.WriteMapElemValue() - if x.FMapIntUint32 == nil { + if x.FMapIntUint16 == nil { r.EncodeNil() } else { - yym1573 := z.EncBinary() - _ = yym1573 if false { } else { - z.F.EncMapIntUint32V(x.FMapIntUint32, e) + z.F.EncMapIntUint16V(x.FMapIntUint16, e) } } } var yyn1574 bool - if x.FptrMapIntUint32 == nil { + if x.FptrMapIntUint16 == nil { yyn1574 = true goto LABEL1574 } @@ -13903,67 +12322,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUint32 == nil { + if x.FptrMapIntUint16 == nil { r.EncodeNil() } else { - yy1575 := *x.FptrMapIntUint32 - yym1576 := z.EncBinary() - _ = yym1576 + yy1575 := *x.FptrMapIntUint16 if false { } else { - z.F.EncMapIntUint32V(yy1575, e) + z.F.EncMapIntUint16V(yy1575, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUint16`) r.WriteMapElemValue() if yyn1574 { r.EncodeNil() } else { - if x.FptrMapIntUint32 == nil { + if x.FptrMapIntUint16 == nil { r.EncodeNil() } else { - yy1577 := *x.FptrMapIntUint32 - yym1578 := z.EncBinary() - _ = yym1578 + yy1577 := *x.FptrMapIntUint16 if false { } else { - z.F.EncMapIntUint32V(yy1577, e) + z.F.EncMapIntUint16V(yy1577, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUint64 == nil { + if x.FMapIntUint32 == nil { r.EncodeNil() } else { - yym1580 := z.EncBinary() - _ = yym1580 if false { } else { - z.F.EncMapIntUint64V(x.FMapIntUint64, e) + z.F.EncMapIntUint32V(x.FMapIntUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUint32`) r.WriteMapElemValue() - if x.FMapIntUint64 == nil { + if x.FMapIntUint32 == nil { r.EncodeNil() } else { - yym1581 := z.EncBinary() - _ = yym1581 if false { } else { - z.F.EncMapIntUint64V(x.FMapIntUint64, e) + z.F.EncMapIntUint32V(x.FMapIntUint32, e) } } } var yyn1582 bool - if x.FptrMapIntUint64 == nil { + if x.FptrMapIntUint32 == nil { yyn1582 = true goto LABEL1582 } @@ -13974,67 +12385,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUint64 == nil { + if x.FptrMapIntUint32 == nil { r.EncodeNil() } else { - yy1583 := *x.FptrMapIntUint64 - yym1584 := z.EncBinary() - _ = yym1584 + yy1583 := *x.FptrMapIntUint32 if false { } else { - z.F.EncMapIntUint64V(yy1583, e) + z.F.EncMapIntUint32V(yy1583, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUint32`) r.WriteMapElemValue() if yyn1582 { r.EncodeNil() } else { - if x.FptrMapIntUint64 == nil { + if x.FptrMapIntUint32 == nil { r.EncodeNil() } else { - yy1585 := *x.FptrMapIntUint64 - yym1586 := z.EncBinary() - _ = yym1586 + yy1585 := *x.FptrMapIntUint32 if false { } else { - z.F.EncMapIntUint64V(yy1585, e) + z.F.EncMapIntUint32V(yy1585, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntUintptr == nil { + if x.FMapIntUint64 == nil { r.EncodeNil() } else { - yym1588 := z.EncBinary() - _ = yym1588 if false { } else { - z.F.EncMapIntUintptrV(x.FMapIntUintptr, e) + z.F.EncMapIntUint64V(x.FMapIntUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUint64`) r.WriteMapElemValue() - if x.FMapIntUintptr == nil { + if x.FMapIntUint64 == nil { r.EncodeNil() } else { - yym1589 := z.EncBinary() - _ = yym1589 if false { } else { - z.F.EncMapIntUintptrV(x.FMapIntUintptr, e) + z.F.EncMapIntUint64V(x.FMapIntUint64, e) } } } var yyn1590 bool - if x.FptrMapIntUintptr == nil { + if x.FptrMapIntUint64 == nil { yyn1590 = true goto LABEL1590 } @@ -14045,67 +12448,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntUintptr == nil { + if x.FptrMapIntUint64 == nil { r.EncodeNil() } else { - yy1591 := *x.FptrMapIntUintptr - yym1592 := z.EncBinary() - _ = yym1592 + yy1591 := *x.FptrMapIntUint64 if false { } else { - z.F.EncMapIntUintptrV(yy1591, e) + z.F.EncMapIntUint64V(yy1591, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUint64`) r.WriteMapElemValue() if yyn1590 { r.EncodeNil() } else { - if x.FptrMapIntUintptr == nil { + if x.FptrMapIntUint64 == nil { r.EncodeNil() } else { - yy1593 := *x.FptrMapIntUintptr - yym1594 := z.EncBinary() - _ = yym1594 + yy1593 := *x.FptrMapIntUint64 if false { } else { - z.F.EncMapIntUintptrV(yy1593, e) + z.F.EncMapIntUint64V(yy1593, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntInt == nil { + if x.FMapIntUintptr == nil { r.EncodeNil() } else { - yym1596 := z.EncBinary() - _ = yym1596 if false { } else { - z.F.EncMapIntIntV(x.FMapIntInt, e) + z.F.EncMapIntUintptrV(x.FMapIntUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntUintptr`) r.WriteMapElemValue() - if x.FMapIntInt == nil { + if x.FMapIntUintptr == nil { r.EncodeNil() } else { - yym1597 := z.EncBinary() - _ = yym1597 if false { } else { - z.F.EncMapIntIntV(x.FMapIntInt, e) + z.F.EncMapIntUintptrV(x.FMapIntUintptr, e) } } } var yyn1598 bool - if x.FptrMapIntInt == nil { + if x.FptrMapIntUintptr == nil { yyn1598 = true goto LABEL1598 } @@ -14116,67 +12511,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntInt == nil { + if x.FptrMapIntUintptr == nil { r.EncodeNil() } else { - yy1599 := *x.FptrMapIntInt - yym1600 := z.EncBinary() - _ = yym1600 + yy1599 := *x.FptrMapIntUintptr if false { } else { - z.F.EncMapIntIntV(yy1599, e) + z.F.EncMapIntUintptrV(yy1599, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntUintptr`) r.WriteMapElemValue() if yyn1598 { r.EncodeNil() } else { - if x.FptrMapIntInt == nil { + if x.FptrMapIntUintptr == nil { r.EncodeNil() } else { - yy1601 := *x.FptrMapIntInt - yym1602 := z.EncBinary() - _ = yym1602 + yy1601 := *x.FptrMapIntUintptr if false { } else { - z.F.EncMapIntIntV(yy1601, e) + z.F.EncMapIntUintptrV(yy1601, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntInt8 == nil { + if x.FMapIntInt == nil { r.EncodeNil() } else { - yym1604 := z.EncBinary() - _ = yym1604 if false { } else { - z.F.EncMapIntInt8V(x.FMapIntInt8, e) + z.F.EncMapIntIntV(x.FMapIntInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntInt`) r.WriteMapElemValue() - if x.FMapIntInt8 == nil { + if x.FMapIntInt == nil { r.EncodeNil() } else { - yym1605 := z.EncBinary() - _ = yym1605 if false { } else { - z.F.EncMapIntInt8V(x.FMapIntInt8, e) + z.F.EncMapIntIntV(x.FMapIntInt, e) } } } var yyn1606 bool - if x.FptrMapIntInt8 == nil { + if x.FptrMapIntInt == nil { yyn1606 = true goto LABEL1606 } @@ -14187,67 +12574,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntInt8 == nil { + if x.FptrMapIntInt == nil { r.EncodeNil() } else { - yy1607 := *x.FptrMapIntInt8 - yym1608 := z.EncBinary() - _ = yym1608 + yy1607 := *x.FptrMapIntInt if false { } else { - z.F.EncMapIntInt8V(yy1607, e) + z.F.EncMapIntIntV(yy1607, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntInt`) r.WriteMapElemValue() if yyn1606 { r.EncodeNil() } else { - if x.FptrMapIntInt8 == nil { + if x.FptrMapIntInt == nil { r.EncodeNil() } else { - yy1609 := *x.FptrMapIntInt8 - yym1610 := z.EncBinary() - _ = yym1610 + yy1609 := *x.FptrMapIntInt if false { } else { - z.F.EncMapIntInt8V(yy1609, e) + z.F.EncMapIntIntV(yy1609, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntInt16 == nil { + if x.FMapIntInt8 == nil { r.EncodeNil() } else { - yym1612 := z.EncBinary() - _ = yym1612 if false { } else { - z.F.EncMapIntInt16V(x.FMapIntInt16, e) + z.F.EncMapIntInt8V(x.FMapIntInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntInt8`) r.WriteMapElemValue() - if x.FMapIntInt16 == nil { + if x.FMapIntInt8 == nil { r.EncodeNil() } else { - yym1613 := z.EncBinary() - _ = yym1613 if false { } else { - z.F.EncMapIntInt16V(x.FMapIntInt16, e) + z.F.EncMapIntInt8V(x.FMapIntInt8, e) } } } var yyn1614 bool - if x.FptrMapIntInt16 == nil { + if x.FptrMapIntInt8 == nil { yyn1614 = true goto LABEL1614 } @@ -14258,67 +12637,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntInt16 == nil { + if x.FptrMapIntInt8 == nil { r.EncodeNil() } else { - yy1615 := *x.FptrMapIntInt16 - yym1616 := z.EncBinary() - _ = yym1616 + yy1615 := *x.FptrMapIntInt8 if false { } else { - z.F.EncMapIntInt16V(yy1615, e) + z.F.EncMapIntInt8V(yy1615, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntInt8`) r.WriteMapElemValue() if yyn1614 { r.EncodeNil() } else { - if x.FptrMapIntInt16 == nil { + if x.FptrMapIntInt8 == nil { r.EncodeNil() } else { - yy1617 := *x.FptrMapIntInt16 - yym1618 := z.EncBinary() - _ = yym1618 + yy1617 := *x.FptrMapIntInt8 if false { } else { - z.F.EncMapIntInt16V(yy1617, e) + z.F.EncMapIntInt8V(yy1617, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntInt32 == nil { + if x.FMapIntInt16 == nil { r.EncodeNil() } else { - yym1620 := z.EncBinary() - _ = yym1620 if false { } else { - z.F.EncMapIntInt32V(x.FMapIntInt32, e) + z.F.EncMapIntInt16V(x.FMapIntInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntInt16`) r.WriteMapElemValue() - if x.FMapIntInt32 == nil { + if x.FMapIntInt16 == nil { r.EncodeNil() } else { - yym1621 := z.EncBinary() - _ = yym1621 if false { } else { - z.F.EncMapIntInt32V(x.FMapIntInt32, e) + z.F.EncMapIntInt16V(x.FMapIntInt16, e) } } } var yyn1622 bool - if x.FptrMapIntInt32 == nil { + if x.FptrMapIntInt16 == nil { yyn1622 = true goto LABEL1622 } @@ -14329,67 +12700,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntInt32 == nil { + if x.FptrMapIntInt16 == nil { r.EncodeNil() } else { - yy1623 := *x.FptrMapIntInt32 - yym1624 := z.EncBinary() - _ = yym1624 + yy1623 := *x.FptrMapIntInt16 if false { } else { - z.F.EncMapIntInt32V(yy1623, e) + z.F.EncMapIntInt16V(yy1623, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntInt16`) r.WriteMapElemValue() if yyn1622 { r.EncodeNil() } else { - if x.FptrMapIntInt32 == nil { + if x.FptrMapIntInt16 == nil { r.EncodeNil() } else { - yy1625 := *x.FptrMapIntInt32 - yym1626 := z.EncBinary() - _ = yym1626 + yy1625 := *x.FptrMapIntInt16 if false { } else { - z.F.EncMapIntInt32V(yy1625, e) + z.F.EncMapIntInt16V(yy1625, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntInt64 == nil { + if x.FMapIntInt32 == nil { r.EncodeNil() } else { - yym1628 := z.EncBinary() - _ = yym1628 if false { } else { - z.F.EncMapIntInt64V(x.FMapIntInt64, e) + z.F.EncMapIntInt32V(x.FMapIntInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntInt32`) r.WriteMapElemValue() - if x.FMapIntInt64 == nil { + if x.FMapIntInt32 == nil { r.EncodeNil() } else { - yym1629 := z.EncBinary() - _ = yym1629 if false { } else { - z.F.EncMapIntInt64V(x.FMapIntInt64, e) + z.F.EncMapIntInt32V(x.FMapIntInt32, e) } } } var yyn1630 bool - if x.FptrMapIntInt64 == nil { + if x.FptrMapIntInt32 == nil { yyn1630 = true goto LABEL1630 } @@ -14400,67 +12763,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntInt64 == nil { + if x.FptrMapIntInt32 == nil { r.EncodeNil() } else { - yy1631 := *x.FptrMapIntInt64 - yym1632 := z.EncBinary() - _ = yym1632 + yy1631 := *x.FptrMapIntInt32 if false { } else { - z.F.EncMapIntInt64V(yy1631, e) + z.F.EncMapIntInt32V(yy1631, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntInt32`) r.WriteMapElemValue() if yyn1630 { r.EncodeNil() } else { - if x.FptrMapIntInt64 == nil { + if x.FptrMapIntInt32 == nil { r.EncodeNil() } else { - yy1633 := *x.FptrMapIntInt64 - yym1634 := z.EncBinary() - _ = yym1634 + yy1633 := *x.FptrMapIntInt32 if false { } else { - z.F.EncMapIntInt64V(yy1633, e) + z.F.EncMapIntInt32V(yy1633, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntFloat32 == nil { + if x.FMapIntInt64 == nil { r.EncodeNil() } else { - yym1636 := z.EncBinary() - _ = yym1636 if false { } else { - z.F.EncMapIntFloat32V(x.FMapIntFloat32, e) + z.F.EncMapIntInt64V(x.FMapIntInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntInt64`) r.WriteMapElemValue() - if x.FMapIntFloat32 == nil { + if x.FMapIntInt64 == nil { r.EncodeNil() } else { - yym1637 := z.EncBinary() - _ = yym1637 if false { } else { - z.F.EncMapIntFloat32V(x.FMapIntFloat32, e) + z.F.EncMapIntInt64V(x.FMapIntInt64, e) } } } var yyn1638 bool - if x.FptrMapIntFloat32 == nil { + if x.FptrMapIntInt64 == nil { yyn1638 = true goto LABEL1638 } @@ -14471,67 +12826,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntFloat32 == nil { + if x.FptrMapIntInt64 == nil { r.EncodeNil() } else { - yy1639 := *x.FptrMapIntFloat32 - yym1640 := z.EncBinary() - _ = yym1640 + yy1639 := *x.FptrMapIntInt64 if false { } else { - z.F.EncMapIntFloat32V(yy1639, e) + z.F.EncMapIntInt64V(yy1639, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntInt64`) r.WriteMapElemValue() if yyn1638 { r.EncodeNil() } else { - if x.FptrMapIntFloat32 == nil { + if x.FptrMapIntInt64 == nil { r.EncodeNil() } else { - yy1641 := *x.FptrMapIntFloat32 - yym1642 := z.EncBinary() - _ = yym1642 + yy1641 := *x.FptrMapIntInt64 if false { } else { - z.F.EncMapIntFloat32V(yy1641, e) + z.F.EncMapIntInt64V(yy1641, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntFloat64 == nil { + if x.FMapIntFloat32 == nil { r.EncodeNil() } else { - yym1644 := z.EncBinary() - _ = yym1644 if false { } else { - z.F.EncMapIntFloat64V(x.FMapIntFloat64, e) + z.F.EncMapIntFloat32V(x.FMapIntFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntFloat32`) r.WriteMapElemValue() - if x.FMapIntFloat64 == nil { + if x.FMapIntFloat32 == nil { r.EncodeNil() } else { - yym1645 := z.EncBinary() - _ = yym1645 if false { } else { - z.F.EncMapIntFloat64V(x.FMapIntFloat64, e) + z.F.EncMapIntFloat32V(x.FMapIntFloat32, e) } } } var yyn1646 bool - if x.FptrMapIntFloat64 == nil { + if x.FptrMapIntFloat32 == nil { yyn1646 = true goto LABEL1646 } @@ -14542,67 +12889,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntFloat64 == nil { + if x.FptrMapIntFloat32 == nil { r.EncodeNil() } else { - yy1647 := *x.FptrMapIntFloat64 - yym1648 := z.EncBinary() - _ = yym1648 + yy1647 := *x.FptrMapIntFloat32 if false { } else { - z.F.EncMapIntFloat64V(yy1647, e) + z.F.EncMapIntFloat32V(yy1647, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntFloat32`) r.WriteMapElemValue() if yyn1646 { r.EncodeNil() } else { - if x.FptrMapIntFloat64 == nil { + if x.FptrMapIntFloat32 == nil { r.EncodeNil() } else { - yy1649 := *x.FptrMapIntFloat64 - yym1650 := z.EncBinary() - _ = yym1650 + yy1649 := *x.FptrMapIntFloat32 if false { } else { - z.F.EncMapIntFloat64V(yy1649, e) + z.F.EncMapIntFloat32V(yy1649, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapIntBool == nil { + if x.FMapIntFloat64 == nil { r.EncodeNil() } else { - yym1652 := z.EncBinary() - _ = yym1652 if false { } else { - z.F.EncMapIntBoolV(x.FMapIntBool, e) + z.F.EncMapIntFloat64V(x.FMapIntFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapIntBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntFloat64`) r.WriteMapElemValue() - if x.FMapIntBool == nil { + if x.FMapIntFloat64 == nil { r.EncodeNil() } else { - yym1653 := z.EncBinary() - _ = yym1653 if false { } else { - z.F.EncMapIntBoolV(x.FMapIntBool, e) + z.F.EncMapIntFloat64V(x.FMapIntFloat64, e) } } } var yyn1654 bool - if x.FptrMapIntBool == nil { + if x.FptrMapIntFloat64 == nil { yyn1654 = true goto LABEL1654 } @@ -14613,67 +12952,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapIntBool == nil { + if x.FptrMapIntFloat64 == nil { r.EncodeNil() } else { - yy1655 := *x.FptrMapIntBool - yym1656 := z.EncBinary() - _ = yym1656 + yy1655 := *x.FptrMapIntFloat64 if false { } else { - z.F.EncMapIntBoolV(yy1655, e) + z.F.EncMapIntFloat64V(yy1655, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapIntBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntFloat64`) r.WriteMapElemValue() if yyn1654 { r.EncodeNil() } else { - if x.FptrMapIntBool == nil { + if x.FptrMapIntFloat64 == nil { r.EncodeNil() } else { - yy1657 := *x.FptrMapIntBool - yym1658 := z.EncBinary() - _ = yym1658 + yy1657 := *x.FptrMapIntFloat64 if false { } else { - z.F.EncMapIntBoolV(yy1657, e) + z.F.EncMapIntFloat64V(yy1657, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Intf == nil { + if x.FMapIntBool == nil { r.EncodeNil() } else { - yym1660 := z.EncBinary() - _ = yym1660 if false { } else { - z.F.EncMapInt8IntfV(x.FMapInt8Intf, e) + z.F.EncMapIntBoolV(x.FMapIntBool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapIntBool`) r.WriteMapElemValue() - if x.FMapInt8Intf == nil { + if x.FMapIntBool == nil { r.EncodeNil() } else { - yym1661 := z.EncBinary() - _ = yym1661 if false { } else { - z.F.EncMapInt8IntfV(x.FMapInt8Intf, e) + z.F.EncMapIntBoolV(x.FMapIntBool, e) } } } var yyn1662 bool - if x.FptrMapInt8Intf == nil { + if x.FptrMapIntBool == nil { yyn1662 = true goto LABEL1662 } @@ -14684,67 +13015,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Intf == nil { + if x.FptrMapIntBool == nil { r.EncodeNil() } else { - yy1663 := *x.FptrMapInt8Intf - yym1664 := z.EncBinary() - _ = yym1664 + yy1663 := *x.FptrMapIntBool if false { } else { - z.F.EncMapInt8IntfV(yy1663, e) + z.F.EncMapIntBoolV(yy1663, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapIntBool`) r.WriteMapElemValue() if yyn1662 { r.EncodeNil() } else { - if x.FptrMapInt8Intf == nil { + if x.FptrMapIntBool == nil { r.EncodeNil() } else { - yy1665 := *x.FptrMapInt8Intf - yym1666 := z.EncBinary() - _ = yym1666 + yy1665 := *x.FptrMapIntBool if false { } else { - z.F.EncMapInt8IntfV(yy1665, e) + z.F.EncMapIntBoolV(yy1665, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8String == nil { + if x.FMapInt8Intf == nil { r.EncodeNil() } else { - yym1668 := z.EncBinary() - _ = yym1668 if false { } else { - z.F.EncMapInt8StringV(x.FMapInt8String, e) + z.F.EncMapInt8IntfV(x.FMapInt8Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8String")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Intf`) r.WriteMapElemValue() - if x.FMapInt8String == nil { + if x.FMapInt8Intf == nil { r.EncodeNil() } else { - yym1669 := z.EncBinary() - _ = yym1669 if false { } else { - z.F.EncMapInt8StringV(x.FMapInt8String, e) + z.F.EncMapInt8IntfV(x.FMapInt8Intf, e) } } } var yyn1670 bool - if x.FptrMapInt8String == nil { + if x.FptrMapInt8Intf == nil { yyn1670 = true goto LABEL1670 } @@ -14755,67 +13078,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8String == nil { + if x.FptrMapInt8Intf == nil { r.EncodeNil() } else { - yy1671 := *x.FptrMapInt8String - yym1672 := z.EncBinary() - _ = yym1672 + yy1671 := *x.FptrMapInt8Intf if false { } else { - z.F.EncMapInt8StringV(yy1671, e) + z.F.EncMapInt8IntfV(yy1671, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Intf`) r.WriteMapElemValue() if yyn1670 { r.EncodeNil() } else { - if x.FptrMapInt8String == nil { + if x.FptrMapInt8Intf == nil { r.EncodeNil() } else { - yy1673 := *x.FptrMapInt8String - yym1674 := z.EncBinary() - _ = yym1674 + yy1673 := *x.FptrMapInt8Intf if false { } else { - z.F.EncMapInt8StringV(yy1673, e) + z.F.EncMapInt8IntfV(yy1673, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uint == nil { + if x.FMapInt8String == nil { r.EncodeNil() } else { - yym1676 := z.EncBinary() - _ = yym1676 if false { } else { - z.F.EncMapInt8UintV(x.FMapInt8Uint, e) + z.F.EncMapInt8StringV(x.FMapInt8String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8String`) r.WriteMapElemValue() - if x.FMapInt8Uint == nil { + if x.FMapInt8String == nil { r.EncodeNil() } else { - yym1677 := z.EncBinary() - _ = yym1677 if false { } else { - z.F.EncMapInt8UintV(x.FMapInt8Uint, e) + z.F.EncMapInt8StringV(x.FMapInt8String, e) } } } var yyn1678 bool - if x.FptrMapInt8Uint == nil { + if x.FptrMapInt8String == nil { yyn1678 = true goto LABEL1678 } @@ -14826,67 +13141,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uint == nil { + if x.FptrMapInt8String == nil { r.EncodeNil() } else { - yy1679 := *x.FptrMapInt8Uint - yym1680 := z.EncBinary() - _ = yym1680 + yy1679 := *x.FptrMapInt8String if false { } else { - z.F.EncMapInt8UintV(yy1679, e) + z.F.EncMapInt8StringV(yy1679, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8String`) r.WriteMapElemValue() if yyn1678 { r.EncodeNil() } else { - if x.FptrMapInt8Uint == nil { + if x.FptrMapInt8String == nil { r.EncodeNil() } else { - yy1681 := *x.FptrMapInt8Uint - yym1682 := z.EncBinary() - _ = yym1682 + yy1681 := *x.FptrMapInt8String if false { } else { - z.F.EncMapInt8UintV(yy1681, e) + z.F.EncMapInt8StringV(yy1681, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uint8 == nil { + if x.FMapInt8Uint == nil { r.EncodeNil() } else { - yym1684 := z.EncBinary() - _ = yym1684 if false { } else { - z.F.EncMapInt8Uint8V(x.FMapInt8Uint8, e) + z.F.EncMapInt8UintV(x.FMapInt8Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uint`) r.WriteMapElemValue() - if x.FMapInt8Uint8 == nil { + if x.FMapInt8Uint == nil { r.EncodeNil() } else { - yym1685 := z.EncBinary() - _ = yym1685 if false { } else { - z.F.EncMapInt8Uint8V(x.FMapInt8Uint8, e) + z.F.EncMapInt8UintV(x.FMapInt8Uint, e) } } } var yyn1686 bool - if x.FptrMapInt8Uint8 == nil { + if x.FptrMapInt8Uint == nil { yyn1686 = true goto LABEL1686 } @@ -14897,67 +13204,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uint8 == nil { + if x.FptrMapInt8Uint == nil { r.EncodeNil() } else { - yy1687 := *x.FptrMapInt8Uint8 - yym1688 := z.EncBinary() - _ = yym1688 + yy1687 := *x.FptrMapInt8Uint if false { } else { - z.F.EncMapInt8Uint8V(yy1687, e) + z.F.EncMapInt8UintV(yy1687, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uint`) r.WriteMapElemValue() if yyn1686 { r.EncodeNil() } else { - if x.FptrMapInt8Uint8 == nil { + if x.FptrMapInt8Uint == nil { r.EncodeNil() } else { - yy1689 := *x.FptrMapInt8Uint8 - yym1690 := z.EncBinary() - _ = yym1690 + yy1689 := *x.FptrMapInt8Uint if false { } else { - z.F.EncMapInt8Uint8V(yy1689, e) + z.F.EncMapInt8UintV(yy1689, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uint16 == nil { + if x.FMapInt8Uint8 == nil { r.EncodeNil() } else { - yym1692 := z.EncBinary() - _ = yym1692 if false { } else { - z.F.EncMapInt8Uint16V(x.FMapInt8Uint16, e) + z.F.EncMapInt8Uint8V(x.FMapInt8Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uint8`) r.WriteMapElemValue() - if x.FMapInt8Uint16 == nil { + if x.FMapInt8Uint8 == nil { r.EncodeNil() } else { - yym1693 := z.EncBinary() - _ = yym1693 if false { } else { - z.F.EncMapInt8Uint16V(x.FMapInt8Uint16, e) + z.F.EncMapInt8Uint8V(x.FMapInt8Uint8, e) } } } var yyn1694 bool - if x.FptrMapInt8Uint16 == nil { + if x.FptrMapInt8Uint8 == nil { yyn1694 = true goto LABEL1694 } @@ -14968,67 +13267,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uint16 == nil { + if x.FptrMapInt8Uint8 == nil { r.EncodeNil() } else { - yy1695 := *x.FptrMapInt8Uint16 - yym1696 := z.EncBinary() - _ = yym1696 + yy1695 := *x.FptrMapInt8Uint8 if false { } else { - z.F.EncMapInt8Uint16V(yy1695, e) + z.F.EncMapInt8Uint8V(yy1695, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uint8`) r.WriteMapElemValue() if yyn1694 { r.EncodeNil() } else { - if x.FptrMapInt8Uint16 == nil { + if x.FptrMapInt8Uint8 == nil { r.EncodeNil() } else { - yy1697 := *x.FptrMapInt8Uint16 - yym1698 := z.EncBinary() - _ = yym1698 + yy1697 := *x.FptrMapInt8Uint8 if false { } else { - z.F.EncMapInt8Uint16V(yy1697, e) + z.F.EncMapInt8Uint8V(yy1697, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uint32 == nil { + if x.FMapInt8Uint16 == nil { r.EncodeNil() } else { - yym1700 := z.EncBinary() - _ = yym1700 if false { } else { - z.F.EncMapInt8Uint32V(x.FMapInt8Uint32, e) + z.F.EncMapInt8Uint16V(x.FMapInt8Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uint16`) r.WriteMapElemValue() - if x.FMapInt8Uint32 == nil { + if x.FMapInt8Uint16 == nil { r.EncodeNil() } else { - yym1701 := z.EncBinary() - _ = yym1701 if false { } else { - z.F.EncMapInt8Uint32V(x.FMapInt8Uint32, e) + z.F.EncMapInt8Uint16V(x.FMapInt8Uint16, e) } } } var yyn1702 bool - if x.FptrMapInt8Uint32 == nil { + if x.FptrMapInt8Uint16 == nil { yyn1702 = true goto LABEL1702 } @@ -15039,67 +13330,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uint32 == nil { + if x.FptrMapInt8Uint16 == nil { r.EncodeNil() } else { - yy1703 := *x.FptrMapInt8Uint32 - yym1704 := z.EncBinary() - _ = yym1704 + yy1703 := *x.FptrMapInt8Uint16 if false { } else { - z.F.EncMapInt8Uint32V(yy1703, e) + z.F.EncMapInt8Uint16V(yy1703, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uint16`) r.WriteMapElemValue() if yyn1702 { r.EncodeNil() } else { - if x.FptrMapInt8Uint32 == nil { + if x.FptrMapInt8Uint16 == nil { r.EncodeNil() } else { - yy1705 := *x.FptrMapInt8Uint32 - yym1706 := z.EncBinary() - _ = yym1706 + yy1705 := *x.FptrMapInt8Uint16 if false { } else { - z.F.EncMapInt8Uint32V(yy1705, e) + z.F.EncMapInt8Uint16V(yy1705, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uint64 == nil { + if x.FMapInt8Uint32 == nil { r.EncodeNil() } else { - yym1708 := z.EncBinary() - _ = yym1708 if false { } else { - z.F.EncMapInt8Uint64V(x.FMapInt8Uint64, e) + z.F.EncMapInt8Uint32V(x.FMapInt8Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uint32`) r.WriteMapElemValue() - if x.FMapInt8Uint64 == nil { + if x.FMapInt8Uint32 == nil { r.EncodeNil() } else { - yym1709 := z.EncBinary() - _ = yym1709 if false { } else { - z.F.EncMapInt8Uint64V(x.FMapInt8Uint64, e) + z.F.EncMapInt8Uint32V(x.FMapInt8Uint32, e) } } } var yyn1710 bool - if x.FptrMapInt8Uint64 == nil { + if x.FptrMapInt8Uint32 == nil { yyn1710 = true goto LABEL1710 } @@ -15110,67 +13393,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uint64 == nil { + if x.FptrMapInt8Uint32 == nil { r.EncodeNil() } else { - yy1711 := *x.FptrMapInt8Uint64 - yym1712 := z.EncBinary() - _ = yym1712 + yy1711 := *x.FptrMapInt8Uint32 if false { } else { - z.F.EncMapInt8Uint64V(yy1711, e) + z.F.EncMapInt8Uint32V(yy1711, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uint32`) r.WriteMapElemValue() if yyn1710 { r.EncodeNil() } else { - if x.FptrMapInt8Uint64 == nil { + if x.FptrMapInt8Uint32 == nil { r.EncodeNil() } else { - yy1713 := *x.FptrMapInt8Uint64 - yym1714 := z.EncBinary() - _ = yym1714 + yy1713 := *x.FptrMapInt8Uint32 if false { } else { - z.F.EncMapInt8Uint64V(yy1713, e) + z.F.EncMapInt8Uint32V(yy1713, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Uintptr == nil { + if x.FMapInt8Uint64 == nil { r.EncodeNil() } else { - yym1716 := z.EncBinary() - _ = yym1716 if false { } else { - z.F.EncMapInt8UintptrV(x.FMapInt8Uintptr, e) + z.F.EncMapInt8Uint64V(x.FMapInt8Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uint64`) r.WriteMapElemValue() - if x.FMapInt8Uintptr == nil { + if x.FMapInt8Uint64 == nil { r.EncodeNil() } else { - yym1717 := z.EncBinary() - _ = yym1717 if false { } else { - z.F.EncMapInt8UintptrV(x.FMapInt8Uintptr, e) + z.F.EncMapInt8Uint64V(x.FMapInt8Uint64, e) } } } var yyn1718 bool - if x.FptrMapInt8Uintptr == nil { + if x.FptrMapInt8Uint64 == nil { yyn1718 = true goto LABEL1718 } @@ -15181,67 +13456,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Uintptr == nil { + if x.FptrMapInt8Uint64 == nil { r.EncodeNil() } else { - yy1719 := *x.FptrMapInt8Uintptr - yym1720 := z.EncBinary() - _ = yym1720 + yy1719 := *x.FptrMapInt8Uint64 if false { } else { - z.F.EncMapInt8UintptrV(yy1719, e) + z.F.EncMapInt8Uint64V(yy1719, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uint64`) r.WriteMapElemValue() if yyn1718 { r.EncodeNil() } else { - if x.FptrMapInt8Uintptr == nil { + if x.FptrMapInt8Uint64 == nil { r.EncodeNil() } else { - yy1721 := *x.FptrMapInt8Uintptr - yym1722 := z.EncBinary() - _ = yym1722 + yy1721 := *x.FptrMapInt8Uint64 if false { } else { - z.F.EncMapInt8UintptrV(yy1721, e) + z.F.EncMapInt8Uint64V(yy1721, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Int == nil { + if x.FMapInt8Uintptr == nil { r.EncodeNil() } else { - yym1724 := z.EncBinary() - _ = yym1724 if false { } else { - z.F.EncMapInt8IntV(x.FMapInt8Int, e) + z.F.EncMapInt8UintptrV(x.FMapInt8Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Uintptr`) r.WriteMapElemValue() - if x.FMapInt8Int == nil { + if x.FMapInt8Uintptr == nil { r.EncodeNil() } else { - yym1725 := z.EncBinary() - _ = yym1725 if false { } else { - z.F.EncMapInt8IntV(x.FMapInt8Int, e) + z.F.EncMapInt8UintptrV(x.FMapInt8Uintptr, e) } } } var yyn1726 bool - if x.FptrMapInt8Int == nil { + if x.FptrMapInt8Uintptr == nil { yyn1726 = true goto LABEL1726 } @@ -15252,67 +13519,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Int == nil { + if x.FptrMapInt8Uintptr == nil { r.EncodeNil() } else { - yy1727 := *x.FptrMapInt8Int - yym1728 := z.EncBinary() - _ = yym1728 + yy1727 := *x.FptrMapInt8Uintptr if false { } else { - z.F.EncMapInt8IntV(yy1727, e) + z.F.EncMapInt8UintptrV(yy1727, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Uintptr`) r.WriteMapElemValue() if yyn1726 { r.EncodeNil() } else { - if x.FptrMapInt8Int == nil { + if x.FptrMapInt8Uintptr == nil { r.EncodeNil() } else { - yy1729 := *x.FptrMapInt8Int - yym1730 := z.EncBinary() - _ = yym1730 + yy1729 := *x.FptrMapInt8Uintptr if false { } else { - z.F.EncMapInt8IntV(yy1729, e) + z.F.EncMapInt8UintptrV(yy1729, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Int8 == nil { + if x.FMapInt8Int == nil { r.EncodeNil() } else { - yym1732 := z.EncBinary() - _ = yym1732 if false { } else { - z.F.EncMapInt8Int8V(x.FMapInt8Int8, e) + z.F.EncMapInt8IntV(x.FMapInt8Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Int`) r.WriteMapElemValue() - if x.FMapInt8Int8 == nil { + if x.FMapInt8Int == nil { r.EncodeNil() } else { - yym1733 := z.EncBinary() - _ = yym1733 if false { } else { - z.F.EncMapInt8Int8V(x.FMapInt8Int8, e) + z.F.EncMapInt8IntV(x.FMapInt8Int, e) } } } var yyn1734 bool - if x.FptrMapInt8Int8 == nil { + if x.FptrMapInt8Int == nil { yyn1734 = true goto LABEL1734 } @@ -15323,67 +13582,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Int8 == nil { + if x.FptrMapInt8Int == nil { r.EncodeNil() } else { - yy1735 := *x.FptrMapInt8Int8 - yym1736 := z.EncBinary() - _ = yym1736 + yy1735 := *x.FptrMapInt8Int if false { } else { - z.F.EncMapInt8Int8V(yy1735, e) + z.F.EncMapInt8IntV(yy1735, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Int`) r.WriteMapElemValue() if yyn1734 { r.EncodeNil() } else { - if x.FptrMapInt8Int8 == nil { + if x.FptrMapInt8Int == nil { r.EncodeNil() } else { - yy1737 := *x.FptrMapInt8Int8 - yym1738 := z.EncBinary() - _ = yym1738 + yy1737 := *x.FptrMapInt8Int if false { } else { - z.F.EncMapInt8Int8V(yy1737, e) + z.F.EncMapInt8IntV(yy1737, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Int16 == nil { + if x.FMapInt8Int8 == nil { r.EncodeNil() } else { - yym1740 := z.EncBinary() - _ = yym1740 if false { } else { - z.F.EncMapInt8Int16V(x.FMapInt8Int16, e) + z.F.EncMapInt8Int8V(x.FMapInt8Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Int8`) r.WriteMapElemValue() - if x.FMapInt8Int16 == nil { + if x.FMapInt8Int8 == nil { r.EncodeNil() } else { - yym1741 := z.EncBinary() - _ = yym1741 if false { } else { - z.F.EncMapInt8Int16V(x.FMapInt8Int16, e) + z.F.EncMapInt8Int8V(x.FMapInt8Int8, e) } } } var yyn1742 bool - if x.FptrMapInt8Int16 == nil { + if x.FptrMapInt8Int8 == nil { yyn1742 = true goto LABEL1742 } @@ -15394,67 +13645,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Int16 == nil { + if x.FptrMapInt8Int8 == nil { r.EncodeNil() } else { - yy1743 := *x.FptrMapInt8Int16 - yym1744 := z.EncBinary() - _ = yym1744 + yy1743 := *x.FptrMapInt8Int8 if false { } else { - z.F.EncMapInt8Int16V(yy1743, e) + z.F.EncMapInt8Int8V(yy1743, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Int8`) r.WriteMapElemValue() if yyn1742 { r.EncodeNil() } else { - if x.FptrMapInt8Int16 == nil { + if x.FptrMapInt8Int8 == nil { r.EncodeNil() } else { - yy1745 := *x.FptrMapInt8Int16 - yym1746 := z.EncBinary() - _ = yym1746 + yy1745 := *x.FptrMapInt8Int8 if false { } else { - z.F.EncMapInt8Int16V(yy1745, e) + z.F.EncMapInt8Int8V(yy1745, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Int32 == nil { + if x.FMapInt8Int16 == nil { r.EncodeNil() } else { - yym1748 := z.EncBinary() - _ = yym1748 if false { } else { - z.F.EncMapInt8Int32V(x.FMapInt8Int32, e) + z.F.EncMapInt8Int16V(x.FMapInt8Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Int16`) r.WriteMapElemValue() - if x.FMapInt8Int32 == nil { + if x.FMapInt8Int16 == nil { r.EncodeNil() } else { - yym1749 := z.EncBinary() - _ = yym1749 if false { } else { - z.F.EncMapInt8Int32V(x.FMapInt8Int32, e) + z.F.EncMapInt8Int16V(x.FMapInt8Int16, e) } } } var yyn1750 bool - if x.FptrMapInt8Int32 == nil { + if x.FptrMapInt8Int16 == nil { yyn1750 = true goto LABEL1750 } @@ -15465,67 +13708,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Int32 == nil { + if x.FptrMapInt8Int16 == nil { r.EncodeNil() } else { - yy1751 := *x.FptrMapInt8Int32 - yym1752 := z.EncBinary() - _ = yym1752 + yy1751 := *x.FptrMapInt8Int16 if false { } else { - z.F.EncMapInt8Int32V(yy1751, e) + z.F.EncMapInt8Int16V(yy1751, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Int16`) r.WriteMapElemValue() if yyn1750 { r.EncodeNil() } else { - if x.FptrMapInt8Int32 == nil { + if x.FptrMapInt8Int16 == nil { r.EncodeNil() } else { - yy1753 := *x.FptrMapInt8Int32 - yym1754 := z.EncBinary() - _ = yym1754 + yy1753 := *x.FptrMapInt8Int16 if false { } else { - z.F.EncMapInt8Int32V(yy1753, e) + z.F.EncMapInt8Int16V(yy1753, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Int64 == nil { + if x.FMapInt8Int32 == nil { r.EncodeNil() } else { - yym1756 := z.EncBinary() - _ = yym1756 if false { } else { - z.F.EncMapInt8Int64V(x.FMapInt8Int64, e) + z.F.EncMapInt8Int32V(x.FMapInt8Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Int32`) r.WriteMapElemValue() - if x.FMapInt8Int64 == nil { + if x.FMapInt8Int32 == nil { r.EncodeNil() } else { - yym1757 := z.EncBinary() - _ = yym1757 if false { } else { - z.F.EncMapInt8Int64V(x.FMapInt8Int64, e) + z.F.EncMapInt8Int32V(x.FMapInt8Int32, e) } } } var yyn1758 bool - if x.FptrMapInt8Int64 == nil { + if x.FptrMapInt8Int32 == nil { yyn1758 = true goto LABEL1758 } @@ -15536,67 +13771,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Int64 == nil { + if x.FptrMapInt8Int32 == nil { r.EncodeNil() } else { - yy1759 := *x.FptrMapInt8Int64 - yym1760 := z.EncBinary() - _ = yym1760 + yy1759 := *x.FptrMapInt8Int32 if false { } else { - z.F.EncMapInt8Int64V(yy1759, e) + z.F.EncMapInt8Int32V(yy1759, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Int32`) r.WriteMapElemValue() if yyn1758 { r.EncodeNil() } else { - if x.FptrMapInt8Int64 == nil { + if x.FptrMapInt8Int32 == nil { r.EncodeNil() } else { - yy1761 := *x.FptrMapInt8Int64 - yym1762 := z.EncBinary() - _ = yym1762 + yy1761 := *x.FptrMapInt8Int32 if false { } else { - z.F.EncMapInt8Int64V(yy1761, e) + z.F.EncMapInt8Int32V(yy1761, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Float32 == nil { + if x.FMapInt8Int64 == nil { r.EncodeNil() } else { - yym1764 := z.EncBinary() - _ = yym1764 if false { } else { - z.F.EncMapInt8Float32V(x.FMapInt8Float32, e) + z.F.EncMapInt8Int64V(x.FMapInt8Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Int64`) r.WriteMapElemValue() - if x.FMapInt8Float32 == nil { + if x.FMapInt8Int64 == nil { r.EncodeNil() } else { - yym1765 := z.EncBinary() - _ = yym1765 if false { } else { - z.F.EncMapInt8Float32V(x.FMapInt8Float32, e) + z.F.EncMapInt8Int64V(x.FMapInt8Int64, e) } } } var yyn1766 bool - if x.FptrMapInt8Float32 == nil { + if x.FptrMapInt8Int64 == nil { yyn1766 = true goto LABEL1766 } @@ -15607,67 +13834,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Float32 == nil { + if x.FptrMapInt8Int64 == nil { r.EncodeNil() } else { - yy1767 := *x.FptrMapInt8Float32 - yym1768 := z.EncBinary() - _ = yym1768 + yy1767 := *x.FptrMapInt8Int64 if false { } else { - z.F.EncMapInt8Float32V(yy1767, e) + z.F.EncMapInt8Int64V(yy1767, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Int64`) r.WriteMapElemValue() if yyn1766 { r.EncodeNil() } else { - if x.FptrMapInt8Float32 == nil { + if x.FptrMapInt8Int64 == nil { r.EncodeNil() } else { - yy1769 := *x.FptrMapInt8Float32 - yym1770 := z.EncBinary() - _ = yym1770 + yy1769 := *x.FptrMapInt8Int64 if false { } else { - z.F.EncMapInt8Float32V(yy1769, e) + z.F.EncMapInt8Int64V(yy1769, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Float64 == nil { + if x.FMapInt8Float32 == nil { r.EncodeNil() } else { - yym1772 := z.EncBinary() - _ = yym1772 if false { } else { - z.F.EncMapInt8Float64V(x.FMapInt8Float64, e) + z.F.EncMapInt8Float32V(x.FMapInt8Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Float32`) r.WriteMapElemValue() - if x.FMapInt8Float64 == nil { + if x.FMapInt8Float32 == nil { r.EncodeNil() } else { - yym1773 := z.EncBinary() - _ = yym1773 if false { } else { - z.F.EncMapInt8Float64V(x.FMapInt8Float64, e) + z.F.EncMapInt8Float32V(x.FMapInt8Float32, e) } } } var yyn1774 bool - if x.FptrMapInt8Float64 == nil { + if x.FptrMapInt8Float32 == nil { yyn1774 = true goto LABEL1774 } @@ -15678,67 +13897,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Float64 == nil { + if x.FptrMapInt8Float32 == nil { r.EncodeNil() } else { - yy1775 := *x.FptrMapInt8Float64 - yym1776 := z.EncBinary() - _ = yym1776 + yy1775 := *x.FptrMapInt8Float32 if false { } else { - z.F.EncMapInt8Float64V(yy1775, e) + z.F.EncMapInt8Float32V(yy1775, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Float32`) r.WriteMapElemValue() if yyn1774 { r.EncodeNil() } else { - if x.FptrMapInt8Float64 == nil { + if x.FptrMapInt8Float32 == nil { r.EncodeNil() } else { - yy1777 := *x.FptrMapInt8Float64 - yym1778 := z.EncBinary() - _ = yym1778 + yy1777 := *x.FptrMapInt8Float32 if false { } else { - z.F.EncMapInt8Float64V(yy1777, e) + z.F.EncMapInt8Float32V(yy1777, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt8Bool == nil { + if x.FMapInt8Float64 == nil { r.EncodeNil() } else { - yym1780 := z.EncBinary() - _ = yym1780 if false { } else { - z.F.EncMapInt8BoolV(x.FMapInt8Bool, e) + z.F.EncMapInt8Float64V(x.FMapInt8Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt8Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Float64`) r.WriteMapElemValue() - if x.FMapInt8Bool == nil { + if x.FMapInt8Float64 == nil { r.EncodeNil() } else { - yym1781 := z.EncBinary() - _ = yym1781 if false { } else { - z.F.EncMapInt8BoolV(x.FMapInt8Bool, e) + z.F.EncMapInt8Float64V(x.FMapInt8Float64, e) } } } var yyn1782 bool - if x.FptrMapInt8Bool == nil { + if x.FptrMapInt8Float64 == nil { yyn1782 = true goto LABEL1782 } @@ -15749,67 +13960,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt8Bool == nil { + if x.FptrMapInt8Float64 == nil { r.EncodeNil() } else { - yy1783 := *x.FptrMapInt8Bool - yym1784 := z.EncBinary() - _ = yym1784 + yy1783 := *x.FptrMapInt8Float64 if false { } else { - z.F.EncMapInt8BoolV(yy1783, e) + z.F.EncMapInt8Float64V(yy1783, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt8Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Float64`) r.WriteMapElemValue() if yyn1782 { r.EncodeNil() } else { - if x.FptrMapInt8Bool == nil { + if x.FptrMapInt8Float64 == nil { r.EncodeNil() } else { - yy1785 := *x.FptrMapInt8Bool - yym1786 := z.EncBinary() - _ = yym1786 + yy1785 := *x.FptrMapInt8Float64 if false { } else { - z.F.EncMapInt8BoolV(yy1785, e) + z.F.EncMapInt8Float64V(yy1785, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Intf == nil { + if x.FMapInt8Bool == nil { r.EncodeNil() } else { - yym1788 := z.EncBinary() - _ = yym1788 if false { } else { - z.F.EncMapInt16IntfV(x.FMapInt16Intf, e) + z.F.EncMapInt8BoolV(x.FMapInt8Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt8Bool`) r.WriteMapElemValue() - if x.FMapInt16Intf == nil { + if x.FMapInt8Bool == nil { r.EncodeNil() } else { - yym1789 := z.EncBinary() - _ = yym1789 if false { } else { - z.F.EncMapInt16IntfV(x.FMapInt16Intf, e) + z.F.EncMapInt8BoolV(x.FMapInt8Bool, e) } } } var yyn1790 bool - if x.FptrMapInt16Intf == nil { + if x.FptrMapInt8Bool == nil { yyn1790 = true goto LABEL1790 } @@ -15820,67 +14023,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Intf == nil { + if x.FptrMapInt8Bool == nil { r.EncodeNil() } else { - yy1791 := *x.FptrMapInt16Intf - yym1792 := z.EncBinary() - _ = yym1792 + yy1791 := *x.FptrMapInt8Bool if false { } else { - z.F.EncMapInt16IntfV(yy1791, e) + z.F.EncMapInt8BoolV(yy1791, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt8Bool`) r.WriteMapElemValue() if yyn1790 { r.EncodeNil() } else { - if x.FptrMapInt16Intf == nil { + if x.FptrMapInt8Bool == nil { r.EncodeNil() } else { - yy1793 := *x.FptrMapInt16Intf - yym1794 := z.EncBinary() - _ = yym1794 + yy1793 := *x.FptrMapInt8Bool if false { } else { - z.F.EncMapInt16IntfV(yy1793, e) + z.F.EncMapInt8BoolV(yy1793, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16String == nil { + if x.FMapInt16Intf == nil { r.EncodeNil() } else { - yym1796 := z.EncBinary() - _ = yym1796 if false { } else { - z.F.EncMapInt16StringV(x.FMapInt16String, e) + z.F.EncMapInt16IntfV(x.FMapInt16Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16String")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Intf`) r.WriteMapElemValue() - if x.FMapInt16String == nil { + if x.FMapInt16Intf == nil { r.EncodeNil() } else { - yym1797 := z.EncBinary() - _ = yym1797 if false { } else { - z.F.EncMapInt16StringV(x.FMapInt16String, e) + z.F.EncMapInt16IntfV(x.FMapInt16Intf, e) } } } var yyn1798 bool - if x.FptrMapInt16String == nil { + if x.FptrMapInt16Intf == nil { yyn1798 = true goto LABEL1798 } @@ -15891,67 +14086,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16String == nil { + if x.FptrMapInt16Intf == nil { r.EncodeNil() } else { - yy1799 := *x.FptrMapInt16String - yym1800 := z.EncBinary() - _ = yym1800 + yy1799 := *x.FptrMapInt16Intf if false { } else { - z.F.EncMapInt16StringV(yy1799, e) + z.F.EncMapInt16IntfV(yy1799, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Intf`) r.WriteMapElemValue() if yyn1798 { r.EncodeNil() } else { - if x.FptrMapInt16String == nil { + if x.FptrMapInt16Intf == nil { r.EncodeNil() } else { - yy1801 := *x.FptrMapInt16String - yym1802 := z.EncBinary() - _ = yym1802 + yy1801 := *x.FptrMapInt16Intf if false { } else { - z.F.EncMapInt16StringV(yy1801, e) + z.F.EncMapInt16IntfV(yy1801, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uint == nil { + if x.FMapInt16String == nil { r.EncodeNil() } else { - yym1804 := z.EncBinary() - _ = yym1804 if false { } else { - z.F.EncMapInt16UintV(x.FMapInt16Uint, e) + z.F.EncMapInt16StringV(x.FMapInt16String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16String`) r.WriteMapElemValue() - if x.FMapInt16Uint == nil { + if x.FMapInt16String == nil { r.EncodeNil() } else { - yym1805 := z.EncBinary() - _ = yym1805 if false { } else { - z.F.EncMapInt16UintV(x.FMapInt16Uint, e) + z.F.EncMapInt16StringV(x.FMapInt16String, e) } } } var yyn1806 bool - if x.FptrMapInt16Uint == nil { + if x.FptrMapInt16String == nil { yyn1806 = true goto LABEL1806 } @@ -15962,67 +14149,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uint == nil { + if x.FptrMapInt16String == nil { r.EncodeNil() } else { - yy1807 := *x.FptrMapInt16Uint - yym1808 := z.EncBinary() - _ = yym1808 + yy1807 := *x.FptrMapInt16String if false { } else { - z.F.EncMapInt16UintV(yy1807, e) + z.F.EncMapInt16StringV(yy1807, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16String`) r.WriteMapElemValue() if yyn1806 { r.EncodeNil() } else { - if x.FptrMapInt16Uint == nil { + if x.FptrMapInt16String == nil { r.EncodeNil() } else { - yy1809 := *x.FptrMapInt16Uint - yym1810 := z.EncBinary() - _ = yym1810 + yy1809 := *x.FptrMapInt16String if false { } else { - z.F.EncMapInt16UintV(yy1809, e) + z.F.EncMapInt16StringV(yy1809, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uint8 == nil { + if x.FMapInt16Uint == nil { r.EncodeNil() } else { - yym1812 := z.EncBinary() - _ = yym1812 if false { } else { - z.F.EncMapInt16Uint8V(x.FMapInt16Uint8, e) + z.F.EncMapInt16UintV(x.FMapInt16Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uint`) r.WriteMapElemValue() - if x.FMapInt16Uint8 == nil { + if x.FMapInt16Uint == nil { r.EncodeNil() } else { - yym1813 := z.EncBinary() - _ = yym1813 if false { } else { - z.F.EncMapInt16Uint8V(x.FMapInt16Uint8, e) + z.F.EncMapInt16UintV(x.FMapInt16Uint, e) } } } var yyn1814 bool - if x.FptrMapInt16Uint8 == nil { + if x.FptrMapInt16Uint == nil { yyn1814 = true goto LABEL1814 } @@ -16033,67 +14212,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uint8 == nil { + if x.FptrMapInt16Uint == nil { r.EncodeNil() } else { - yy1815 := *x.FptrMapInt16Uint8 - yym1816 := z.EncBinary() - _ = yym1816 + yy1815 := *x.FptrMapInt16Uint if false { } else { - z.F.EncMapInt16Uint8V(yy1815, e) + z.F.EncMapInt16UintV(yy1815, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uint`) r.WriteMapElemValue() if yyn1814 { r.EncodeNil() } else { - if x.FptrMapInt16Uint8 == nil { + if x.FptrMapInt16Uint == nil { r.EncodeNil() } else { - yy1817 := *x.FptrMapInt16Uint8 - yym1818 := z.EncBinary() - _ = yym1818 + yy1817 := *x.FptrMapInt16Uint if false { } else { - z.F.EncMapInt16Uint8V(yy1817, e) + z.F.EncMapInt16UintV(yy1817, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uint16 == nil { + if x.FMapInt16Uint8 == nil { r.EncodeNil() } else { - yym1820 := z.EncBinary() - _ = yym1820 if false { } else { - z.F.EncMapInt16Uint16V(x.FMapInt16Uint16, e) + z.F.EncMapInt16Uint8V(x.FMapInt16Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uint8`) r.WriteMapElemValue() - if x.FMapInt16Uint16 == nil { + if x.FMapInt16Uint8 == nil { r.EncodeNil() } else { - yym1821 := z.EncBinary() - _ = yym1821 if false { } else { - z.F.EncMapInt16Uint16V(x.FMapInt16Uint16, e) + z.F.EncMapInt16Uint8V(x.FMapInt16Uint8, e) } } } var yyn1822 bool - if x.FptrMapInt16Uint16 == nil { + if x.FptrMapInt16Uint8 == nil { yyn1822 = true goto LABEL1822 } @@ -16104,67 +14275,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uint16 == nil { + if x.FptrMapInt16Uint8 == nil { r.EncodeNil() } else { - yy1823 := *x.FptrMapInt16Uint16 - yym1824 := z.EncBinary() - _ = yym1824 + yy1823 := *x.FptrMapInt16Uint8 if false { } else { - z.F.EncMapInt16Uint16V(yy1823, e) + z.F.EncMapInt16Uint8V(yy1823, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uint8`) r.WriteMapElemValue() if yyn1822 { r.EncodeNil() } else { - if x.FptrMapInt16Uint16 == nil { + if x.FptrMapInt16Uint8 == nil { r.EncodeNil() } else { - yy1825 := *x.FptrMapInt16Uint16 - yym1826 := z.EncBinary() - _ = yym1826 + yy1825 := *x.FptrMapInt16Uint8 if false { } else { - z.F.EncMapInt16Uint16V(yy1825, e) + z.F.EncMapInt16Uint8V(yy1825, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uint32 == nil { + if x.FMapInt16Uint16 == nil { r.EncodeNil() } else { - yym1828 := z.EncBinary() - _ = yym1828 if false { } else { - z.F.EncMapInt16Uint32V(x.FMapInt16Uint32, e) + z.F.EncMapInt16Uint16V(x.FMapInt16Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uint16`) r.WriteMapElemValue() - if x.FMapInt16Uint32 == nil { + if x.FMapInt16Uint16 == nil { r.EncodeNil() } else { - yym1829 := z.EncBinary() - _ = yym1829 if false { } else { - z.F.EncMapInt16Uint32V(x.FMapInt16Uint32, e) + z.F.EncMapInt16Uint16V(x.FMapInt16Uint16, e) } } } var yyn1830 bool - if x.FptrMapInt16Uint32 == nil { + if x.FptrMapInt16Uint16 == nil { yyn1830 = true goto LABEL1830 } @@ -16175,67 +14338,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uint32 == nil { + if x.FptrMapInt16Uint16 == nil { r.EncodeNil() } else { - yy1831 := *x.FptrMapInt16Uint32 - yym1832 := z.EncBinary() - _ = yym1832 + yy1831 := *x.FptrMapInt16Uint16 if false { } else { - z.F.EncMapInt16Uint32V(yy1831, e) + z.F.EncMapInt16Uint16V(yy1831, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uint16`) r.WriteMapElemValue() if yyn1830 { r.EncodeNil() } else { - if x.FptrMapInt16Uint32 == nil { + if x.FptrMapInt16Uint16 == nil { r.EncodeNil() } else { - yy1833 := *x.FptrMapInt16Uint32 - yym1834 := z.EncBinary() - _ = yym1834 + yy1833 := *x.FptrMapInt16Uint16 if false { } else { - z.F.EncMapInt16Uint32V(yy1833, e) + z.F.EncMapInt16Uint16V(yy1833, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uint64 == nil { + if x.FMapInt16Uint32 == nil { r.EncodeNil() } else { - yym1836 := z.EncBinary() - _ = yym1836 if false { } else { - z.F.EncMapInt16Uint64V(x.FMapInt16Uint64, e) + z.F.EncMapInt16Uint32V(x.FMapInt16Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uint32`) r.WriteMapElemValue() - if x.FMapInt16Uint64 == nil { + if x.FMapInt16Uint32 == nil { r.EncodeNil() } else { - yym1837 := z.EncBinary() - _ = yym1837 if false { } else { - z.F.EncMapInt16Uint64V(x.FMapInt16Uint64, e) + z.F.EncMapInt16Uint32V(x.FMapInt16Uint32, e) } } } var yyn1838 bool - if x.FptrMapInt16Uint64 == nil { + if x.FptrMapInt16Uint32 == nil { yyn1838 = true goto LABEL1838 } @@ -16246,67 +14401,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uint64 == nil { + if x.FptrMapInt16Uint32 == nil { r.EncodeNil() } else { - yy1839 := *x.FptrMapInt16Uint64 - yym1840 := z.EncBinary() - _ = yym1840 + yy1839 := *x.FptrMapInt16Uint32 if false { } else { - z.F.EncMapInt16Uint64V(yy1839, e) + z.F.EncMapInt16Uint32V(yy1839, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uint32`) r.WriteMapElemValue() if yyn1838 { r.EncodeNil() } else { - if x.FptrMapInt16Uint64 == nil { + if x.FptrMapInt16Uint32 == nil { r.EncodeNil() } else { - yy1841 := *x.FptrMapInt16Uint64 - yym1842 := z.EncBinary() - _ = yym1842 + yy1841 := *x.FptrMapInt16Uint32 if false { } else { - z.F.EncMapInt16Uint64V(yy1841, e) + z.F.EncMapInt16Uint32V(yy1841, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Uintptr == nil { + if x.FMapInt16Uint64 == nil { r.EncodeNil() } else { - yym1844 := z.EncBinary() - _ = yym1844 if false { } else { - z.F.EncMapInt16UintptrV(x.FMapInt16Uintptr, e) + z.F.EncMapInt16Uint64V(x.FMapInt16Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uint64`) r.WriteMapElemValue() - if x.FMapInt16Uintptr == nil { + if x.FMapInt16Uint64 == nil { r.EncodeNil() } else { - yym1845 := z.EncBinary() - _ = yym1845 if false { } else { - z.F.EncMapInt16UintptrV(x.FMapInt16Uintptr, e) + z.F.EncMapInt16Uint64V(x.FMapInt16Uint64, e) } } } var yyn1846 bool - if x.FptrMapInt16Uintptr == nil { + if x.FptrMapInt16Uint64 == nil { yyn1846 = true goto LABEL1846 } @@ -16317,67 +14464,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Uintptr == nil { + if x.FptrMapInt16Uint64 == nil { r.EncodeNil() } else { - yy1847 := *x.FptrMapInt16Uintptr - yym1848 := z.EncBinary() - _ = yym1848 + yy1847 := *x.FptrMapInt16Uint64 if false { } else { - z.F.EncMapInt16UintptrV(yy1847, e) + z.F.EncMapInt16Uint64V(yy1847, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uint64`) r.WriteMapElemValue() if yyn1846 { r.EncodeNil() } else { - if x.FptrMapInt16Uintptr == nil { + if x.FptrMapInt16Uint64 == nil { r.EncodeNil() } else { - yy1849 := *x.FptrMapInt16Uintptr - yym1850 := z.EncBinary() - _ = yym1850 + yy1849 := *x.FptrMapInt16Uint64 if false { } else { - z.F.EncMapInt16UintptrV(yy1849, e) + z.F.EncMapInt16Uint64V(yy1849, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Int == nil { + if x.FMapInt16Uintptr == nil { r.EncodeNil() } else { - yym1852 := z.EncBinary() - _ = yym1852 if false { } else { - z.F.EncMapInt16IntV(x.FMapInt16Int, e) + z.F.EncMapInt16UintptrV(x.FMapInt16Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Uintptr`) r.WriteMapElemValue() - if x.FMapInt16Int == nil { + if x.FMapInt16Uintptr == nil { r.EncodeNil() } else { - yym1853 := z.EncBinary() - _ = yym1853 if false { } else { - z.F.EncMapInt16IntV(x.FMapInt16Int, e) + z.F.EncMapInt16UintptrV(x.FMapInt16Uintptr, e) } } } var yyn1854 bool - if x.FptrMapInt16Int == nil { + if x.FptrMapInt16Uintptr == nil { yyn1854 = true goto LABEL1854 } @@ -16388,67 +14527,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Int == nil { + if x.FptrMapInt16Uintptr == nil { r.EncodeNil() } else { - yy1855 := *x.FptrMapInt16Int - yym1856 := z.EncBinary() - _ = yym1856 + yy1855 := *x.FptrMapInt16Uintptr if false { } else { - z.F.EncMapInt16IntV(yy1855, e) + z.F.EncMapInt16UintptrV(yy1855, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Uintptr`) r.WriteMapElemValue() if yyn1854 { r.EncodeNil() } else { - if x.FptrMapInt16Int == nil { + if x.FptrMapInt16Uintptr == nil { r.EncodeNil() } else { - yy1857 := *x.FptrMapInt16Int - yym1858 := z.EncBinary() - _ = yym1858 + yy1857 := *x.FptrMapInt16Uintptr if false { } else { - z.F.EncMapInt16IntV(yy1857, e) + z.F.EncMapInt16UintptrV(yy1857, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Int8 == nil { + if x.FMapInt16Int == nil { r.EncodeNil() } else { - yym1860 := z.EncBinary() - _ = yym1860 if false { } else { - z.F.EncMapInt16Int8V(x.FMapInt16Int8, e) + z.F.EncMapInt16IntV(x.FMapInt16Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Int`) r.WriteMapElemValue() - if x.FMapInt16Int8 == nil { + if x.FMapInt16Int == nil { r.EncodeNil() } else { - yym1861 := z.EncBinary() - _ = yym1861 if false { } else { - z.F.EncMapInt16Int8V(x.FMapInt16Int8, e) + z.F.EncMapInt16IntV(x.FMapInt16Int, e) } } } var yyn1862 bool - if x.FptrMapInt16Int8 == nil { + if x.FptrMapInt16Int == nil { yyn1862 = true goto LABEL1862 } @@ -16459,67 +14590,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Int8 == nil { + if x.FptrMapInt16Int == nil { r.EncodeNil() } else { - yy1863 := *x.FptrMapInt16Int8 - yym1864 := z.EncBinary() - _ = yym1864 + yy1863 := *x.FptrMapInt16Int if false { } else { - z.F.EncMapInt16Int8V(yy1863, e) + z.F.EncMapInt16IntV(yy1863, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Int`) r.WriteMapElemValue() if yyn1862 { r.EncodeNil() } else { - if x.FptrMapInt16Int8 == nil { + if x.FptrMapInt16Int == nil { r.EncodeNil() } else { - yy1865 := *x.FptrMapInt16Int8 - yym1866 := z.EncBinary() - _ = yym1866 + yy1865 := *x.FptrMapInt16Int if false { } else { - z.F.EncMapInt16Int8V(yy1865, e) + z.F.EncMapInt16IntV(yy1865, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Int16 == nil { + if x.FMapInt16Int8 == nil { r.EncodeNil() } else { - yym1868 := z.EncBinary() - _ = yym1868 if false { } else { - z.F.EncMapInt16Int16V(x.FMapInt16Int16, e) + z.F.EncMapInt16Int8V(x.FMapInt16Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Int8`) r.WriteMapElemValue() - if x.FMapInt16Int16 == nil { + if x.FMapInt16Int8 == nil { r.EncodeNil() } else { - yym1869 := z.EncBinary() - _ = yym1869 if false { } else { - z.F.EncMapInt16Int16V(x.FMapInt16Int16, e) + z.F.EncMapInt16Int8V(x.FMapInt16Int8, e) } } } var yyn1870 bool - if x.FptrMapInt16Int16 == nil { + if x.FptrMapInt16Int8 == nil { yyn1870 = true goto LABEL1870 } @@ -16530,67 +14653,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Int16 == nil { + if x.FptrMapInt16Int8 == nil { r.EncodeNil() } else { - yy1871 := *x.FptrMapInt16Int16 - yym1872 := z.EncBinary() - _ = yym1872 + yy1871 := *x.FptrMapInt16Int8 if false { } else { - z.F.EncMapInt16Int16V(yy1871, e) + z.F.EncMapInt16Int8V(yy1871, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Int8`) r.WriteMapElemValue() if yyn1870 { r.EncodeNil() } else { - if x.FptrMapInt16Int16 == nil { + if x.FptrMapInt16Int8 == nil { r.EncodeNil() } else { - yy1873 := *x.FptrMapInt16Int16 - yym1874 := z.EncBinary() - _ = yym1874 + yy1873 := *x.FptrMapInt16Int8 if false { } else { - z.F.EncMapInt16Int16V(yy1873, e) + z.F.EncMapInt16Int8V(yy1873, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Int32 == nil { + if x.FMapInt16Int16 == nil { r.EncodeNil() } else { - yym1876 := z.EncBinary() - _ = yym1876 if false { } else { - z.F.EncMapInt16Int32V(x.FMapInt16Int32, e) + z.F.EncMapInt16Int16V(x.FMapInt16Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Int16`) r.WriteMapElemValue() - if x.FMapInt16Int32 == nil { + if x.FMapInt16Int16 == nil { r.EncodeNil() } else { - yym1877 := z.EncBinary() - _ = yym1877 if false { } else { - z.F.EncMapInt16Int32V(x.FMapInt16Int32, e) + z.F.EncMapInt16Int16V(x.FMapInt16Int16, e) } } } var yyn1878 bool - if x.FptrMapInt16Int32 == nil { + if x.FptrMapInt16Int16 == nil { yyn1878 = true goto LABEL1878 } @@ -16601,67 +14716,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Int32 == nil { + if x.FptrMapInt16Int16 == nil { r.EncodeNil() } else { - yy1879 := *x.FptrMapInt16Int32 - yym1880 := z.EncBinary() - _ = yym1880 + yy1879 := *x.FptrMapInt16Int16 if false { } else { - z.F.EncMapInt16Int32V(yy1879, e) + z.F.EncMapInt16Int16V(yy1879, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Int16`) r.WriteMapElemValue() if yyn1878 { r.EncodeNil() } else { - if x.FptrMapInt16Int32 == nil { + if x.FptrMapInt16Int16 == nil { r.EncodeNil() } else { - yy1881 := *x.FptrMapInt16Int32 - yym1882 := z.EncBinary() - _ = yym1882 + yy1881 := *x.FptrMapInt16Int16 if false { } else { - z.F.EncMapInt16Int32V(yy1881, e) + z.F.EncMapInt16Int16V(yy1881, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Int64 == nil { + if x.FMapInt16Int32 == nil { r.EncodeNil() } else { - yym1884 := z.EncBinary() - _ = yym1884 if false { } else { - z.F.EncMapInt16Int64V(x.FMapInt16Int64, e) + z.F.EncMapInt16Int32V(x.FMapInt16Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Int32`) r.WriteMapElemValue() - if x.FMapInt16Int64 == nil { + if x.FMapInt16Int32 == nil { r.EncodeNil() } else { - yym1885 := z.EncBinary() - _ = yym1885 if false { } else { - z.F.EncMapInt16Int64V(x.FMapInt16Int64, e) + z.F.EncMapInt16Int32V(x.FMapInt16Int32, e) } } } var yyn1886 bool - if x.FptrMapInt16Int64 == nil { + if x.FptrMapInt16Int32 == nil { yyn1886 = true goto LABEL1886 } @@ -16672,67 +14779,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Int64 == nil { + if x.FptrMapInt16Int32 == nil { r.EncodeNil() } else { - yy1887 := *x.FptrMapInt16Int64 - yym1888 := z.EncBinary() - _ = yym1888 + yy1887 := *x.FptrMapInt16Int32 if false { } else { - z.F.EncMapInt16Int64V(yy1887, e) + z.F.EncMapInt16Int32V(yy1887, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Int32`) r.WriteMapElemValue() if yyn1886 { r.EncodeNil() } else { - if x.FptrMapInt16Int64 == nil { + if x.FptrMapInt16Int32 == nil { r.EncodeNil() } else { - yy1889 := *x.FptrMapInt16Int64 - yym1890 := z.EncBinary() - _ = yym1890 + yy1889 := *x.FptrMapInt16Int32 if false { } else { - z.F.EncMapInt16Int64V(yy1889, e) + z.F.EncMapInt16Int32V(yy1889, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Float32 == nil { + if x.FMapInt16Int64 == nil { r.EncodeNil() } else { - yym1892 := z.EncBinary() - _ = yym1892 if false { } else { - z.F.EncMapInt16Float32V(x.FMapInt16Float32, e) + z.F.EncMapInt16Int64V(x.FMapInt16Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Int64`) r.WriteMapElemValue() - if x.FMapInt16Float32 == nil { + if x.FMapInt16Int64 == nil { r.EncodeNil() } else { - yym1893 := z.EncBinary() - _ = yym1893 if false { } else { - z.F.EncMapInt16Float32V(x.FMapInt16Float32, e) + z.F.EncMapInt16Int64V(x.FMapInt16Int64, e) } } } var yyn1894 bool - if x.FptrMapInt16Float32 == nil { + if x.FptrMapInt16Int64 == nil { yyn1894 = true goto LABEL1894 } @@ -16743,67 +14842,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Float32 == nil { + if x.FptrMapInt16Int64 == nil { r.EncodeNil() } else { - yy1895 := *x.FptrMapInt16Float32 - yym1896 := z.EncBinary() - _ = yym1896 + yy1895 := *x.FptrMapInt16Int64 if false { } else { - z.F.EncMapInt16Float32V(yy1895, e) + z.F.EncMapInt16Int64V(yy1895, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Int64`) r.WriteMapElemValue() if yyn1894 { r.EncodeNil() } else { - if x.FptrMapInt16Float32 == nil { + if x.FptrMapInt16Int64 == nil { r.EncodeNil() } else { - yy1897 := *x.FptrMapInt16Float32 - yym1898 := z.EncBinary() - _ = yym1898 + yy1897 := *x.FptrMapInt16Int64 if false { } else { - z.F.EncMapInt16Float32V(yy1897, e) + z.F.EncMapInt16Int64V(yy1897, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Float64 == nil { + if x.FMapInt16Float32 == nil { r.EncodeNil() } else { - yym1900 := z.EncBinary() - _ = yym1900 if false { } else { - z.F.EncMapInt16Float64V(x.FMapInt16Float64, e) + z.F.EncMapInt16Float32V(x.FMapInt16Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Float32`) r.WriteMapElemValue() - if x.FMapInt16Float64 == nil { + if x.FMapInt16Float32 == nil { r.EncodeNil() } else { - yym1901 := z.EncBinary() - _ = yym1901 if false { } else { - z.F.EncMapInt16Float64V(x.FMapInt16Float64, e) + z.F.EncMapInt16Float32V(x.FMapInt16Float32, e) } } } var yyn1902 bool - if x.FptrMapInt16Float64 == nil { + if x.FptrMapInt16Float32 == nil { yyn1902 = true goto LABEL1902 } @@ -16814,67 +14905,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Float64 == nil { + if x.FptrMapInt16Float32 == nil { r.EncodeNil() } else { - yy1903 := *x.FptrMapInt16Float64 - yym1904 := z.EncBinary() - _ = yym1904 + yy1903 := *x.FptrMapInt16Float32 if false { } else { - z.F.EncMapInt16Float64V(yy1903, e) + z.F.EncMapInt16Float32V(yy1903, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Float32`) r.WriteMapElemValue() if yyn1902 { r.EncodeNil() } else { - if x.FptrMapInt16Float64 == nil { + if x.FptrMapInt16Float32 == nil { r.EncodeNil() } else { - yy1905 := *x.FptrMapInt16Float64 - yym1906 := z.EncBinary() - _ = yym1906 + yy1905 := *x.FptrMapInt16Float32 if false { } else { - z.F.EncMapInt16Float64V(yy1905, e) + z.F.EncMapInt16Float32V(yy1905, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt16Bool == nil { + if x.FMapInt16Float64 == nil { r.EncodeNil() } else { - yym1908 := z.EncBinary() - _ = yym1908 if false { } else { - z.F.EncMapInt16BoolV(x.FMapInt16Bool, e) + z.F.EncMapInt16Float64V(x.FMapInt16Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt16Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Float64`) r.WriteMapElemValue() - if x.FMapInt16Bool == nil { + if x.FMapInt16Float64 == nil { r.EncodeNil() } else { - yym1909 := z.EncBinary() - _ = yym1909 if false { } else { - z.F.EncMapInt16BoolV(x.FMapInt16Bool, e) + z.F.EncMapInt16Float64V(x.FMapInt16Float64, e) } } } var yyn1910 bool - if x.FptrMapInt16Bool == nil { + if x.FptrMapInt16Float64 == nil { yyn1910 = true goto LABEL1910 } @@ -16885,67 +14968,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt16Bool == nil { + if x.FptrMapInt16Float64 == nil { r.EncodeNil() } else { - yy1911 := *x.FptrMapInt16Bool - yym1912 := z.EncBinary() - _ = yym1912 + yy1911 := *x.FptrMapInt16Float64 if false { } else { - z.F.EncMapInt16BoolV(yy1911, e) + z.F.EncMapInt16Float64V(yy1911, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt16Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Float64`) r.WriteMapElemValue() if yyn1910 { r.EncodeNil() } else { - if x.FptrMapInt16Bool == nil { + if x.FptrMapInt16Float64 == nil { r.EncodeNil() } else { - yy1913 := *x.FptrMapInt16Bool - yym1914 := z.EncBinary() - _ = yym1914 + yy1913 := *x.FptrMapInt16Float64 if false { } else { - z.F.EncMapInt16BoolV(yy1913, e) + z.F.EncMapInt16Float64V(yy1913, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Intf == nil { + if x.FMapInt16Bool == nil { r.EncodeNil() } else { - yym1916 := z.EncBinary() - _ = yym1916 if false { } else { - z.F.EncMapInt32IntfV(x.FMapInt32Intf, e) + z.F.EncMapInt16BoolV(x.FMapInt16Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt16Bool`) r.WriteMapElemValue() - if x.FMapInt32Intf == nil { + if x.FMapInt16Bool == nil { r.EncodeNil() } else { - yym1917 := z.EncBinary() - _ = yym1917 if false { } else { - z.F.EncMapInt32IntfV(x.FMapInt32Intf, e) + z.F.EncMapInt16BoolV(x.FMapInt16Bool, e) } } } var yyn1918 bool - if x.FptrMapInt32Intf == nil { + if x.FptrMapInt16Bool == nil { yyn1918 = true goto LABEL1918 } @@ -16956,67 +15031,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Intf == nil { + if x.FptrMapInt16Bool == nil { r.EncodeNil() } else { - yy1919 := *x.FptrMapInt32Intf - yym1920 := z.EncBinary() - _ = yym1920 + yy1919 := *x.FptrMapInt16Bool if false { } else { - z.F.EncMapInt32IntfV(yy1919, e) + z.F.EncMapInt16BoolV(yy1919, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt16Bool`) r.WriteMapElemValue() if yyn1918 { r.EncodeNil() } else { - if x.FptrMapInt32Intf == nil { + if x.FptrMapInt16Bool == nil { r.EncodeNil() } else { - yy1921 := *x.FptrMapInt32Intf - yym1922 := z.EncBinary() - _ = yym1922 + yy1921 := *x.FptrMapInt16Bool if false { } else { - z.F.EncMapInt32IntfV(yy1921, e) + z.F.EncMapInt16BoolV(yy1921, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32String == nil { + if x.FMapInt32Intf == nil { r.EncodeNil() } else { - yym1924 := z.EncBinary() - _ = yym1924 if false { } else { - z.F.EncMapInt32StringV(x.FMapInt32String, e) + z.F.EncMapInt32IntfV(x.FMapInt32Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32String")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Intf`) r.WriteMapElemValue() - if x.FMapInt32String == nil { + if x.FMapInt32Intf == nil { r.EncodeNil() } else { - yym1925 := z.EncBinary() - _ = yym1925 if false { } else { - z.F.EncMapInt32StringV(x.FMapInt32String, e) + z.F.EncMapInt32IntfV(x.FMapInt32Intf, e) } } } var yyn1926 bool - if x.FptrMapInt32String == nil { + if x.FptrMapInt32Intf == nil { yyn1926 = true goto LABEL1926 } @@ -17027,67 +15094,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32String == nil { + if x.FptrMapInt32Intf == nil { r.EncodeNil() } else { - yy1927 := *x.FptrMapInt32String - yym1928 := z.EncBinary() - _ = yym1928 + yy1927 := *x.FptrMapInt32Intf if false { } else { - z.F.EncMapInt32StringV(yy1927, e) + z.F.EncMapInt32IntfV(yy1927, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Intf`) r.WriteMapElemValue() if yyn1926 { r.EncodeNil() } else { - if x.FptrMapInt32String == nil { + if x.FptrMapInt32Intf == nil { r.EncodeNil() } else { - yy1929 := *x.FptrMapInt32String - yym1930 := z.EncBinary() - _ = yym1930 + yy1929 := *x.FptrMapInt32Intf if false { } else { - z.F.EncMapInt32StringV(yy1929, e) + z.F.EncMapInt32IntfV(yy1929, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uint == nil { + if x.FMapInt32String == nil { r.EncodeNil() } else { - yym1932 := z.EncBinary() - _ = yym1932 if false { } else { - z.F.EncMapInt32UintV(x.FMapInt32Uint, e) + z.F.EncMapInt32StringV(x.FMapInt32String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32String`) r.WriteMapElemValue() - if x.FMapInt32Uint == nil { + if x.FMapInt32String == nil { r.EncodeNil() } else { - yym1933 := z.EncBinary() - _ = yym1933 if false { } else { - z.F.EncMapInt32UintV(x.FMapInt32Uint, e) + z.F.EncMapInt32StringV(x.FMapInt32String, e) } } } var yyn1934 bool - if x.FptrMapInt32Uint == nil { + if x.FptrMapInt32String == nil { yyn1934 = true goto LABEL1934 } @@ -17098,67 +15157,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uint == nil { + if x.FptrMapInt32String == nil { r.EncodeNil() } else { - yy1935 := *x.FptrMapInt32Uint - yym1936 := z.EncBinary() - _ = yym1936 + yy1935 := *x.FptrMapInt32String if false { } else { - z.F.EncMapInt32UintV(yy1935, e) + z.F.EncMapInt32StringV(yy1935, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32String`) r.WriteMapElemValue() if yyn1934 { r.EncodeNil() } else { - if x.FptrMapInt32Uint == nil { + if x.FptrMapInt32String == nil { r.EncodeNil() } else { - yy1937 := *x.FptrMapInt32Uint - yym1938 := z.EncBinary() - _ = yym1938 + yy1937 := *x.FptrMapInt32String if false { } else { - z.F.EncMapInt32UintV(yy1937, e) + z.F.EncMapInt32StringV(yy1937, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uint8 == nil { + if x.FMapInt32Uint == nil { r.EncodeNil() } else { - yym1940 := z.EncBinary() - _ = yym1940 if false { } else { - z.F.EncMapInt32Uint8V(x.FMapInt32Uint8, e) + z.F.EncMapInt32UintV(x.FMapInt32Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uint`) r.WriteMapElemValue() - if x.FMapInt32Uint8 == nil { + if x.FMapInt32Uint == nil { r.EncodeNil() } else { - yym1941 := z.EncBinary() - _ = yym1941 if false { } else { - z.F.EncMapInt32Uint8V(x.FMapInt32Uint8, e) + z.F.EncMapInt32UintV(x.FMapInt32Uint, e) } } } var yyn1942 bool - if x.FptrMapInt32Uint8 == nil { + if x.FptrMapInt32Uint == nil { yyn1942 = true goto LABEL1942 } @@ -17169,67 +15220,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uint8 == nil { + if x.FptrMapInt32Uint == nil { r.EncodeNil() } else { - yy1943 := *x.FptrMapInt32Uint8 - yym1944 := z.EncBinary() - _ = yym1944 + yy1943 := *x.FptrMapInt32Uint if false { } else { - z.F.EncMapInt32Uint8V(yy1943, e) + z.F.EncMapInt32UintV(yy1943, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uint`) r.WriteMapElemValue() if yyn1942 { r.EncodeNil() } else { - if x.FptrMapInt32Uint8 == nil { + if x.FptrMapInt32Uint == nil { r.EncodeNil() } else { - yy1945 := *x.FptrMapInt32Uint8 - yym1946 := z.EncBinary() - _ = yym1946 + yy1945 := *x.FptrMapInt32Uint if false { } else { - z.F.EncMapInt32Uint8V(yy1945, e) + z.F.EncMapInt32UintV(yy1945, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uint16 == nil { + if x.FMapInt32Uint8 == nil { r.EncodeNil() } else { - yym1948 := z.EncBinary() - _ = yym1948 if false { } else { - z.F.EncMapInt32Uint16V(x.FMapInt32Uint16, e) + z.F.EncMapInt32Uint8V(x.FMapInt32Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uint8`) r.WriteMapElemValue() - if x.FMapInt32Uint16 == nil { + if x.FMapInt32Uint8 == nil { r.EncodeNil() } else { - yym1949 := z.EncBinary() - _ = yym1949 if false { } else { - z.F.EncMapInt32Uint16V(x.FMapInt32Uint16, e) + z.F.EncMapInt32Uint8V(x.FMapInt32Uint8, e) } } } var yyn1950 bool - if x.FptrMapInt32Uint16 == nil { + if x.FptrMapInt32Uint8 == nil { yyn1950 = true goto LABEL1950 } @@ -17240,67 +15283,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uint16 == nil { + if x.FptrMapInt32Uint8 == nil { r.EncodeNil() } else { - yy1951 := *x.FptrMapInt32Uint16 - yym1952 := z.EncBinary() - _ = yym1952 + yy1951 := *x.FptrMapInt32Uint8 if false { } else { - z.F.EncMapInt32Uint16V(yy1951, e) + z.F.EncMapInt32Uint8V(yy1951, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uint8`) r.WriteMapElemValue() if yyn1950 { r.EncodeNil() } else { - if x.FptrMapInt32Uint16 == nil { + if x.FptrMapInt32Uint8 == nil { r.EncodeNil() } else { - yy1953 := *x.FptrMapInt32Uint16 - yym1954 := z.EncBinary() - _ = yym1954 + yy1953 := *x.FptrMapInt32Uint8 if false { } else { - z.F.EncMapInt32Uint16V(yy1953, e) + z.F.EncMapInt32Uint8V(yy1953, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uint32 == nil { + if x.FMapInt32Uint16 == nil { r.EncodeNil() } else { - yym1956 := z.EncBinary() - _ = yym1956 if false { } else { - z.F.EncMapInt32Uint32V(x.FMapInt32Uint32, e) + z.F.EncMapInt32Uint16V(x.FMapInt32Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uint16`) r.WriteMapElemValue() - if x.FMapInt32Uint32 == nil { + if x.FMapInt32Uint16 == nil { r.EncodeNil() } else { - yym1957 := z.EncBinary() - _ = yym1957 if false { } else { - z.F.EncMapInt32Uint32V(x.FMapInt32Uint32, e) + z.F.EncMapInt32Uint16V(x.FMapInt32Uint16, e) } } } var yyn1958 bool - if x.FptrMapInt32Uint32 == nil { + if x.FptrMapInt32Uint16 == nil { yyn1958 = true goto LABEL1958 } @@ -17311,67 +15346,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uint32 == nil { + if x.FptrMapInt32Uint16 == nil { r.EncodeNil() } else { - yy1959 := *x.FptrMapInt32Uint32 - yym1960 := z.EncBinary() - _ = yym1960 + yy1959 := *x.FptrMapInt32Uint16 if false { } else { - z.F.EncMapInt32Uint32V(yy1959, e) + z.F.EncMapInt32Uint16V(yy1959, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uint16`) r.WriteMapElemValue() if yyn1958 { r.EncodeNil() } else { - if x.FptrMapInt32Uint32 == nil { + if x.FptrMapInt32Uint16 == nil { r.EncodeNil() } else { - yy1961 := *x.FptrMapInt32Uint32 - yym1962 := z.EncBinary() - _ = yym1962 + yy1961 := *x.FptrMapInt32Uint16 if false { } else { - z.F.EncMapInt32Uint32V(yy1961, e) + z.F.EncMapInt32Uint16V(yy1961, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uint64 == nil { + if x.FMapInt32Uint32 == nil { r.EncodeNil() } else { - yym1964 := z.EncBinary() - _ = yym1964 if false { } else { - z.F.EncMapInt32Uint64V(x.FMapInt32Uint64, e) + z.F.EncMapInt32Uint32V(x.FMapInt32Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uint32`) r.WriteMapElemValue() - if x.FMapInt32Uint64 == nil { + if x.FMapInt32Uint32 == nil { r.EncodeNil() } else { - yym1965 := z.EncBinary() - _ = yym1965 if false { } else { - z.F.EncMapInt32Uint64V(x.FMapInt32Uint64, e) + z.F.EncMapInt32Uint32V(x.FMapInt32Uint32, e) } } } var yyn1966 bool - if x.FptrMapInt32Uint64 == nil { + if x.FptrMapInt32Uint32 == nil { yyn1966 = true goto LABEL1966 } @@ -17382,67 +15409,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uint64 == nil { + if x.FptrMapInt32Uint32 == nil { r.EncodeNil() } else { - yy1967 := *x.FptrMapInt32Uint64 - yym1968 := z.EncBinary() - _ = yym1968 + yy1967 := *x.FptrMapInt32Uint32 if false { } else { - z.F.EncMapInt32Uint64V(yy1967, e) + z.F.EncMapInt32Uint32V(yy1967, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uint32`) r.WriteMapElemValue() if yyn1966 { r.EncodeNil() } else { - if x.FptrMapInt32Uint64 == nil { + if x.FptrMapInt32Uint32 == nil { r.EncodeNil() } else { - yy1969 := *x.FptrMapInt32Uint64 - yym1970 := z.EncBinary() - _ = yym1970 + yy1969 := *x.FptrMapInt32Uint32 if false { } else { - z.F.EncMapInt32Uint64V(yy1969, e) + z.F.EncMapInt32Uint32V(yy1969, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Uintptr == nil { + if x.FMapInt32Uint64 == nil { r.EncodeNil() } else { - yym1972 := z.EncBinary() - _ = yym1972 if false { } else { - z.F.EncMapInt32UintptrV(x.FMapInt32Uintptr, e) + z.F.EncMapInt32Uint64V(x.FMapInt32Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uint64`) r.WriteMapElemValue() - if x.FMapInt32Uintptr == nil { + if x.FMapInt32Uint64 == nil { r.EncodeNil() } else { - yym1973 := z.EncBinary() - _ = yym1973 if false { } else { - z.F.EncMapInt32UintptrV(x.FMapInt32Uintptr, e) + z.F.EncMapInt32Uint64V(x.FMapInt32Uint64, e) } } } var yyn1974 bool - if x.FptrMapInt32Uintptr == nil { + if x.FptrMapInt32Uint64 == nil { yyn1974 = true goto LABEL1974 } @@ -17453,67 +15472,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Uintptr == nil { + if x.FptrMapInt32Uint64 == nil { r.EncodeNil() } else { - yy1975 := *x.FptrMapInt32Uintptr - yym1976 := z.EncBinary() - _ = yym1976 + yy1975 := *x.FptrMapInt32Uint64 if false { } else { - z.F.EncMapInt32UintptrV(yy1975, e) + z.F.EncMapInt32Uint64V(yy1975, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uint64`) r.WriteMapElemValue() if yyn1974 { r.EncodeNil() } else { - if x.FptrMapInt32Uintptr == nil { + if x.FptrMapInt32Uint64 == nil { r.EncodeNil() } else { - yy1977 := *x.FptrMapInt32Uintptr - yym1978 := z.EncBinary() - _ = yym1978 + yy1977 := *x.FptrMapInt32Uint64 if false { } else { - z.F.EncMapInt32UintptrV(yy1977, e) + z.F.EncMapInt32Uint64V(yy1977, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Int == nil { + if x.FMapInt32Uintptr == nil { r.EncodeNil() } else { - yym1980 := z.EncBinary() - _ = yym1980 if false { } else { - z.F.EncMapInt32IntV(x.FMapInt32Int, e) + z.F.EncMapInt32UintptrV(x.FMapInt32Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Uintptr`) r.WriteMapElemValue() - if x.FMapInt32Int == nil { + if x.FMapInt32Uintptr == nil { r.EncodeNil() } else { - yym1981 := z.EncBinary() - _ = yym1981 if false { } else { - z.F.EncMapInt32IntV(x.FMapInt32Int, e) + z.F.EncMapInt32UintptrV(x.FMapInt32Uintptr, e) } } } var yyn1982 bool - if x.FptrMapInt32Int == nil { + if x.FptrMapInt32Uintptr == nil { yyn1982 = true goto LABEL1982 } @@ -17524,67 +15535,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Int == nil { + if x.FptrMapInt32Uintptr == nil { r.EncodeNil() } else { - yy1983 := *x.FptrMapInt32Int - yym1984 := z.EncBinary() - _ = yym1984 + yy1983 := *x.FptrMapInt32Uintptr if false { } else { - z.F.EncMapInt32IntV(yy1983, e) + z.F.EncMapInt32UintptrV(yy1983, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Uintptr`) r.WriteMapElemValue() if yyn1982 { r.EncodeNil() } else { - if x.FptrMapInt32Int == nil { + if x.FptrMapInt32Uintptr == nil { r.EncodeNil() } else { - yy1985 := *x.FptrMapInt32Int - yym1986 := z.EncBinary() - _ = yym1986 + yy1985 := *x.FptrMapInt32Uintptr if false { } else { - z.F.EncMapInt32IntV(yy1985, e) + z.F.EncMapInt32UintptrV(yy1985, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Int8 == nil { + if x.FMapInt32Int == nil { r.EncodeNil() } else { - yym1988 := z.EncBinary() - _ = yym1988 if false { } else { - z.F.EncMapInt32Int8V(x.FMapInt32Int8, e) + z.F.EncMapInt32IntV(x.FMapInt32Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Int`) r.WriteMapElemValue() - if x.FMapInt32Int8 == nil { + if x.FMapInt32Int == nil { r.EncodeNil() } else { - yym1989 := z.EncBinary() - _ = yym1989 if false { } else { - z.F.EncMapInt32Int8V(x.FMapInt32Int8, e) + z.F.EncMapInt32IntV(x.FMapInt32Int, e) } } } var yyn1990 bool - if x.FptrMapInt32Int8 == nil { + if x.FptrMapInt32Int == nil { yyn1990 = true goto LABEL1990 } @@ -17595,67 +15598,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Int8 == nil { + if x.FptrMapInt32Int == nil { r.EncodeNil() } else { - yy1991 := *x.FptrMapInt32Int8 - yym1992 := z.EncBinary() - _ = yym1992 + yy1991 := *x.FptrMapInt32Int if false { } else { - z.F.EncMapInt32Int8V(yy1991, e) + z.F.EncMapInt32IntV(yy1991, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Int`) r.WriteMapElemValue() if yyn1990 { r.EncodeNil() } else { - if x.FptrMapInt32Int8 == nil { + if x.FptrMapInt32Int == nil { r.EncodeNil() } else { - yy1993 := *x.FptrMapInt32Int8 - yym1994 := z.EncBinary() - _ = yym1994 + yy1993 := *x.FptrMapInt32Int if false { } else { - z.F.EncMapInt32Int8V(yy1993, e) + z.F.EncMapInt32IntV(yy1993, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Int16 == nil { + if x.FMapInt32Int8 == nil { r.EncodeNil() } else { - yym1996 := z.EncBinary() - _ = yym1996 if false { } else { - z.F.EncMapInt32Int16V(x.FMapInt32Int16, e) + z.F.EncMapInt32Int8V(x.FMapInt32Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Int8`) r.WriteMapElemValue() - if x.FMapInt32Int16 == nil { + if x.FMapInt32Int8 == nil { r.EncodeNil() } else { - yym1997 := z.EncBinary() - _ = yym1997 if false { } else { - z.F.EncMapInt32Int16V(x.FMapInt32Int16, e) + z.F.EncMapInt32Int8V(x.FMapInt32Int8, e) } } } var yyn1998 bool - if x.FptrMapInt32Int16 == nil { + if x.FptrMapInt32Int8 == nil { yyn1998 = true goto LABEL1998 } @@ -17666,67 +15661,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Int16 == nil { + if x.FptrMapInt32Int8 == nil { r.EncodeNil() } else { - yy1999 := *x.FptrMapInt32Int16 - yym2000 := z.EncBinary() - _ = yym2000 + yy1999 := *x.FptrMapInt32Int8 if false { } else { - z.F.EncMapInt32Int16V(yy1999, e) + z.F.EncMapInt32Int8V(yy1999, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Int8`) r.WriteMapElemValue() if yyn1998 { r.EncodeNil() } else { - if x.FptrMapInt32Int16 == nil { + if x.FptrMapInt32Int8 == nil { r.EncodeNil() } else { - yy2001 := *x.FptrMapInt32Int16 - yym2002 := z.EncBinary() - _ = yym2002 + yy2001 := *x.FptrMapInt32Int8 if false { } else { - z.F.EncMapInt32Int16V(yy2001, e) + z.F.EncMapInt32Int8V(yy2001, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Int32 == nil { + if x.FMapInt32Int16 == nil { r.EncodeNil() } else { - yym2004 := z.EncBinary() - _ = yym2004 if false { } else { - z.F.EncMapInt32Int32V(x.FMapInt32Int32, e) + z.F.EncMapInt32Int16V(x.FMapInt32Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Int16`) r.WriteMapElemValue() - if x.FMapInt32Int32 == nil { + if x.FMapInt32Int16 == nil { r.EncodeNil() } else { - yym2005 := z.EncBinary() - _ = yym2005 if false { } else { - z.F.EncMapInt32Int32V(x.FMapInt32Int32, e) + z.F.EncMapInt32Int16V(x.FMapInt32Int16, e) } } } var yyn2006 bool - if x.FptrMapInt32Int32 == nil { + if x.FptrMapInt32Int16 == nil { yyn2006 = true goto LABEL2006 } @@ -17737,67 +15724,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Int32 == nil { + if x.FptrMapInt32Int16 == nil { r.EncodeNil() } else { - yy2007 := *x.FptrMapInt32Int32 - yym2008 := z.EncBinary() - _ = yym2008 + yy2007 := *x.FptrMapInt32Int16 if false { } else { - z.F.EncMapInt32Int32V(yy2007, e) + z.F.EncMapInt32Int16V(yy2007, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Int16`) r.WriteMapElemValue() if yyn2006 { r.EncodeNil() } else { - if x.FptrMapInt32Int32 == nil { + if x.FptrMapInt32Int16 == nil { r.EncodeNil() } else { - yy2009 := *x.FptrMapInt32Int32 - yym2010 := z.EncBinary() - _ = yym2010 + yy2009 := *x.FptrMapInt32Int16 if false { } else { - z.F.EncMapInt32Int32V(yy2009, e) + z.F.EncMapInt32Int16V(yy2009, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Int64 == nil { + if x.FMapInt32Int32 == nil { r.EncodeNil() } else { - yym2012 := z.EncBinary() - _ = yym2012 if false { } else { - z.F.EncMapInt32Int64V(x.FMapInt32Int64, e) + z.F.EncMapInt32Int32V(x.FMapInt32Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Int32`) r.WriteMapElemValue() - if x.FMapInt32Int64 == nil { + if x.FMapInt32Int32 == nil { r.EncodeNil() } else { - yym2013 := z.EncBinary() - _ = yym2013 if false { } else { - z.F.EncMapInt32Int64V(x.FMapInt32Int64, e) + z.F.EncMapInt32Int32V(x.FMapInt32Int32, e) } } } var yyn2014 bool - if x.FptrMapInt32Int64 == nil { + if x.FptrMapInt32Int32 == nil { yyn2014 = true goto LABEL2014 } @@ -17808,67 +15787,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Int64 == nil { + if x.FptrMapInt32Int32 == nil { r.EncodeNil() } else { - yy2015 := *x.FptrMapInt32Int64 - yym2016 := z.EncBinary() - _ = yym2016 + yy2015 := *x.FptrMapInt32Int32 if false { } else { - z.F.EncMapInt32Int64V(yy2015, e) + z.F.EncMapInt32Int32V(yy2015, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Int32`) r.WriteMapElemValue() if yyn2014 { r.EncodeNil() } else { - if x.FptrMapInt32Int64 == nil { + if x.FptrMapInt32Int32 == nil { r.EncodeNil() } else { - yy2017 := *x.FptrMapInt32Int64 - yym2018 := z.EncBinary() - _ = yym2018 + yy2017 := *x.FptrMapInt32Int32 if false { } else { - z.F.EncMapInt32Int64V(yy2017, e) + z.F.EncMapInt32Int32V(yy2017, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Float32 == nil { + if x.FMapInt32Int64 == nil { r.EncodeNil() } else { - yym2020 := z.EncBinary() - _ = yym2020 if false { } else { - z.F.EncMapInt32Float32V(x.FMapInt32Float32, e) + z.F.EncMapInt32Int64V(x.FMapInt32Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Int64`) r.WriteMapElemValue() - if x.FMapInt32Float32 == nil { + if x.FMapInt32Int64 == nil { r.EncodeNil() } else { - yym2021 := z.EncBinary() - _ = yym2021 if false { } else { - z.F.EncMapInt32Float32V(x.FMapInt32Float32, e) + z.F.EncMapInt32Int64V(x.FMapInt32Int64, e) } } } var yyn2022 bool - if x.FptrMapInt32Float32 == nil { + if x.FptrMapInt32Int64 == nil { yyn2022 = true goto LABEL2022 } @@ -17879,67 +15850,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Float32 == nil { + if x.FptrMapInt32Int64 == nil { r.EncodeNil() } else { - yy2023 := *x.FptrMapInt32Float32 - yym2024 := z.EncBinary() - _ = yym2024 + yy2023 := *x.FptrMapInt32Int64 if false { } else { - z.F.EncMapInt32Float32V(yy2023, e) + z.F.EncMapInt32Int64V(yy2023, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Int64`) r.WriteMapElemValue() if yyn2022 { r.EncodeNil() } else { - if x.FptrMapInt32Float32 == nil { + if x.FptrMapInt32Int64 == nil { r.EncodeNil() } else { - yy2025 := *x.FptrMapInt32Float32 - yym2026 := z.EncBinary() - _ = yym2026 + yy2025 := *x.FptrMapInt32Int64 if false { } else { - z.F.EncMapInt32Float32V(yy2025, e) + z.F.EncMapInt32Int64V(yy2025, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Float64 == nil { + if x.FMapInt32Float32 == nil { r.EncodeNil() } else { - yym2028 := z.EncBinary() - _ = yym2028 if false { } else { - z.F.EncMapInt32Float64V(x.FMapInt32Float64, e) + z.F.EncMapInt32Float32V(x.FMapInt32Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Float32`) r.WriteMapElemValue() - if x.FMapInt32Float64 == nil { + if x.FMapInt32Float32 == nil { r.EncodeNil() } else { - yym2029 := z.EncBinary() - _ = yym2029 if false { } else { - z.F.EncMapInt32Float64V(x.FMapInt32Float64, e) + z.F.EncMapInt32Float32V(x.FMapInt32Float32, e) } } } var yyn2030 bool - if x.FptrMapInt32Float64 == nil { + if x.FptrMapInt32Float32 == nil { yyn2030 = true goto LABEL2030 } @@ -17950,67 +15913,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Float64 == nil { + if x.FptrMapInt32Float32 == nil { r.EncodeNil() } else { - yy2031 := *x.FptrMapInt32Float64 - yym2032 := z.EncBinary() - _ = yym2032 + yy2031 := *x.FptrMapInt32Float32 if false { } else { - z.F.EncMapInt32Float64V(yy2031, e) + z.F.EncMapInt32Float32V(yy2031, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Float32`) r.WriteMapElemValue() if yyn2030 { r.EncodeNil() } else { - if x.FptrMapInt32Float64 == nil { + if x.FptrMapInt32Float32 == nil { r.EncodeNil() } else { - yy2033 := *x.FptrMapInt32Float64 - yym2034 := z.EncBinary() - _ = yym2034 + yy2033 := *x.FptrMapInt32Float32 if false { } else { - z.F.EncMapInt32Float64V(yy2033, e) + z.F.EncMapInt32Float32V(yy2033, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt32Bool == nil { + if x.FMapInt32Float64 == nil { r.EncodeNil() } else { - yym2036 := z.EncBinary() - _ = yym2036 if false { } else { - z.F.EncMapInt32BoolV(x.FMapInt32Bool, e) + z.F.EncMapInt32Float64V(x.FMapInt32Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Float64`) r.WriteMapElemValue() - if x.FMapInt32Bool == nil { + if x.FMapInt32Float64 == nil { r.EncodeNil() } else { - yym2037 := z.EncBinary() - _ = yym2037 if false { } else { - z.F.EncMapInt32BoolV(x.FMapInt32Bool, e) + z.F.EncMapInt32Float64V(x.FMapInt32Float64, e) } } } var yyn2038 bool - if x.FptrMapInt32Bool == nil { + if x.FptrMapInt32Float64 == nil { yyn2038 = true goto LABEL2038 } @@ -18021,67 +15976,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt32Bool == nil { + if x.FptrMapInt32Float64 == nil { r.EncodeNil() } else { - yy2039 := *x.FptrMapInt32Bool - yym2040 := z.EncBinary() - _ = yym2040 + yy2039 := *x.FptrMapInt32Float64 if false { } else { - z.F.EncMapInt32BoolV(yy2039, e) + z.F.EncMapInt32Float64V(yy2039, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt32Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Float64`) r.WriteMapElemValue() if yyn2038 { r.EncodeNil() } else { - if x.FptrMapInt32Bool == nil { + if x.FptrMapInt32Float64 == nil { r.EncodeNil() } else { - yy2041 := *x.FptrMapInt32Bool - yym2042 := z.EncBinary() - _ = yym2042 + yy2041 := *x.FptrMapInt32Float64 if false { } else { - z.F.EncMapInt32BoolV(yy2041, e) + z.F.EncMapInt32Float64V(yy2041, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Intf == nil { + if x.FMapInt32Bool == nil { r.EncodeNil() } else { - yym2044 := z.EncBinary() - _ = yym2044 if false { } else { - z.F.EncMapInt64IntfV(x.FMapInt64Intf, e) + z.F.EncMapInt32BoolV(x.FMapInt32Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt32Bool`) r.WriteMapElemValue() - if x.FMapInt64Intf == nil { + if x.FMapInt32Bool == nil { r.EncodeNil() } else { - yym2045 := z.EncBinary() - _ = yym2045 if false { } else { - z.F.EncMapInt64IntfV(x.FMapInt64Intf, e) + z.F.EncMapInt32BoolV(x.FMapInt32Bool, e) } } } var yyn2046 bool - if x.FptrMapInt64Intf == nil { + if x.FptrMapInt32Bool == nil { yyn2046 = true goto LABEL2046 } @@ -18092,67 +16039,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Intf == nil { + if x.FptrMapInt32Bool == nil { r.EncodeNil() } else { - yy2047 := *x.FptrMapInt64Intf - yym2048 := z.EncBinary() - _ = yym2048 + yy2047 := *x.FptrMapInt32Bool if false { } else { - z.F.EncMapInt64IntfV(yy2047, e) + z.F.EncMapInt32BoolV(yy2047, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Intf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt32Bool`) r.WriteMapElemValue() if yyn2046 { r.EncodeNil() } else { - if x.FptrMapInt64Intf == nil { + if x.FptrMapInt32Bool == nil { r.EncodeNil() } else { - yy2049 := *x.FptrMapInt64Intf - yym2050 := z.EncBinary() - _ = yym2050 + yy2049 := *x.FptrMapInt32Bool if false { } else { - z.F.EncMapInt64IntfV(yy2049, e) + z.F.EncMapInt32BoolV(yy2049, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64String == nil { + if x.FMapInt64Intf == nil { r.EncodeNil() } else { - yym2052 := z.EncBinary() - _ = yym2052 if false { } else { - z.F.EncMapInt64StringV(x.FMapInt64String, e) + z.F.EncMapInt64IntfV(x.FMapInt64Intf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64String")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Intf`) r.WriteMapElemValue() - if x.FMapInt64String == nil { + if x.FMapInt64Intf == nil { r.EncodeNil() } else { - yym2053 := z.EncBinary() - _ = yym2053 if false { } else { - z.F.EncMapInt64StringV(x.FMapInt64String, e) + z.F.EncMapInt64IntfV(x.FMapInt64Intf, e) } } } var yyn2054 bool - if x.FptrMapInt64String == nil { + if x.FptrMapInt64Intf == nil { yyn2054 = true goto LABEL2054 } @@ -18163,67 +16102,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64String == nil { + if x.FptrMapInt64Intf == nil { r.EncodeNil() } else { - yy2055 := *x.FptrMapInt64String - yym2056 := z.EncBinary() - _ = yym2056 + yy2055 := *x.FptrMapInt64Intf if false { } else { - z.F.EncMapInt64StringV(yy2055, e) + z.F.EncMapInt64IntfV(yy2055, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64String")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Intf`) r.WriteMapElemValue() if yyn2054 { r.EncodeNil() } else { - if x.FptrMapInt64String == nil { + if x.FptrMapInt64Intf == nil { r.EncodeNil() } else { - yy2057 := *x.FptrMapInt64String - yym2058 := z.EncBinary() - _ = yym2058 + yy2057 := *x.FptrMapInt64Intf if false { } else { - z.F.EncMapInt64StringV(yy2057, e) + z.F.EncMapInt64IntfV(yy2057, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uint == nil { + if x.FMapInt64String == nil { r.EncodeNil() } else { - yym2060 := z.EncBinary() - _ = yym2060 if false { } else { - z.F.EncMapInt64UintV(x.FMapInt64Uint, e) + z.F.EncMapInt64StringV(x.FMapInt64String, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64String`) r.WriteMapElemValue() - if x.FMapInt64Uint == nil { + if x.FMapInt64String == nil { r.EncodeNil() } else { - yym2061 := z.EncBinary() - _ = yym2061 if false { } else { - z.F.EncMapInt64UintV(x.FMapInt64Uint, e) + z.F.EncMapInt64StringV(x.FMapInt64String, e) } } } var yyn2062 bool - if x.FptrMapInt64Uint == nil { + if x.FptrMapInt64String == nil { yyn2062 = true goto LABEL2062 } @@ -18234,67 +16165,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uint == nil { + if x.FptrMapInt64String == nil { r.EncodeNil() } else { - yy2063 := *x.FptrMapInt64Uint - yym2064 := z.EncBinary() - _ = yym2064 + yy2063 := *x.FptrMapInt64String if false { } else { - z.F.EncMapInt64UintV(yy2063, e) + z.F.EncMapInt64StringV(yy2063, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64String`) r.WriteMapElemValue() if yyn2062 { r.EncodeNil() } else { - if x.FptrMapInt64Uint == nil { + if x.FptrMapInt64String == nil { r.EncodeNil() } else { - yy2065 := *x.FptrMapInt64Uint - yym2066 := z.EncBinary() - _ = yym2066 + yy2065 := *x.FptrMapInt64String if false { } else { - z.F.EncMapInt64UintV(yy2065, e) + z.F.EncMapInt64StringV(yy2065, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uint8 == nil { + if x.FMapInt64Uint == nil { r.EncodeNil() } else { - yym2068 := z.EncBinary() - _ = yym2068 if false { } else { - z.F.EncMapInt64Uint8V(x.FMapInt64Uint8, e) + z.F.EncMapInt64UintV(x.FMapInt64Uint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uint`) r.WriteMapElemValue() - if x.FMapInt64Uint8 == nil { + if x.FMapInt64Uint == nil { r.EncodeNil() } else { - yym2069 := z.EncBinary() - _ = yym2069 if false { } else { - z.F.EncMapInt64Uint8V(x.FMapInt64Uint8, e) + z.F.EncMapInt64UintV(x.FMapInt64Uint, e) } } } var yyn2070 bool - if x.FptrMapInt64Uint8 == nil { + if x.FptrMapInt64Uint == nil { yyn2070 = true goto LABEL2070 } @@ -18305,67 +16228,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uint8 == nil { + if x.FptrMapInt64Uint == nil { r.EncodeNil() } else { - yy2071 := *x.FptrMapInt64Uint8 - yym2072 := z.EncBinary() - _ = yym2072 + yy2071 := *x.FptrMapInt64Uint if false { } else { - z.F.EncMapInt64Uint8V(yy2071, e) + z.F.EncMapInt64UintV(yy2071, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uint`) r.WriteMapElemValue() if yyn2070 { r.EncodeNil() } else { - if x.FptrMapInt64Uint8 == nil { + if x.FptrMapInt64Uint == nil { r.EncodeNil() } else { - yy2073 := *x.FptrMapInt64Uint8 - yym2074 := z.EncBinary() - _ = yym2074 + yy2073 := *x.FptrMapInt64Uint if false { } else { - z.F.EncMapInt64Uint8V(yy2073, e) + z.F.EncMapInt64UintV(yy2073, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uint16 == nil { + if x.FMapInt64Uint8 == nil { r.EncodeNil() } else { - yym2076 := z.EncBinary() - _ = yym2076 if false { } else { - z.F.EncMapInt64Uint16V(x.FMapInt64Uint16, e) + z.F.EncMapInt64Uint8V(x.FMapInt64Uint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uint8`) r.WriteMapElemValue() - if x.FMapInt64Uint16 == nil { + if x.FMapInt64Uint8 == nil { r.EncodeNil() } else { - yym2077 := z.EncBinary() - _ = yym2077 if false { } else { - z.F.EncMapInt64Uint16V(x.FMapInt64Uint16, e) + z.F.EncMapInt64Uint8V(x.FMapInt64Uint8, e) } } } var yyn2078 bool - if x.FptrMapInt64Uint16 == nil { + if x.FptrMapInt64Uint8 == nil { yyn2078 = true goto LABEL2078 } @@ -18376,67 +16291,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uint16 == nil { + if x.FptrMapInt64Uint8 == nil { r.EncodeNil() } else { - yy2079 := *x.FptrMapInt64Uint16 - yym2080 := z.EncBinary() - _ = yym2080 + yy2079 := *x.FptrMapInt64Uint8 if false { } else { - z.F.EncMapInt64Uint16V(yy2079, e) + z.F.EncMapInt64Uint8V(yy2079, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uint8`) r.WriteMapElemValue() if yyn2078 { r.EncodeNil() } else { - if x.FptrMapInt64Uint16 == nil { + if x.FptrMapInt64Uint8 == nil { r.EncodeNil() } else { - yy2081 := *x.FptrMapInt64Uint16 - yym2082 := z.EncBinary() - _ = yym2082 + yy2081 := *x.FptrMapInt64Uint8 if false { } else { - z.F.EncMapInt64Uint16V(yy2081, e) + z.F.EncMapInt64Uint8V(yy2081, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uint32 == nil { + if x.FMapInt64Uint16 == nil { r.EncodeNil() } else { - yym2084 := z.EncBinary() - _ = yym2084 if false { } else { - z.F.EncMapInt64Uint32V(x.FMapInt64Uint32, e) + z.F.EncMapInt64Uint16V(x.FMapInt64Uint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uint16`) r.WriteMapElemValue() - if x.FMapInt64Uint32 == nil { + if x.FMapInt64Uint16 == nil { r.EncodeNil() } else { - yym2085 := z.EncBinary() - _ = yym2085 if false { } else { - z.F.EncMapInt64Uint32V(x.FMapInt64Uint32, e) + z.F.EncMapInt64Uint16V(x.FMapInt64Uint16, e) } } } var yyn2086 bool - if x.FptrMapInt64Uint32 == nil { + if x.FptrMapInt64Uint16 == nil { yyn2086 = true goto LABEL2086 } @@ -18447,67 +16354,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uint32 == nil { + if x.FptrMapInt64Uint16 == nil { r.EncodeNil() } else { - yy2087 := *x.FptrMapInt64Uint32 - yym2088 := z.EncBinary() - _ = yym2088 + yy2087 := *x.FptrMapInt64Uint16 if false { } else { - z.F.EncMapInt64Uint32V(yy2087, e) + z.F.EncMapInt64Uint16V(yy2087, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uint16`) r.WriteMapElemValue() if yyn2086 { r.EncodeNil() } else { - if x.FptrMapInt64Uint32 == nil { + if x.FptrMapInt64Uint16 == nil { r.EncodeNil() } else { - yy2089 := *x.FptrMapInt64Uint32 - yym2090 := z.EncBinary() - _ = yym2090 + yy2089 := *x.FptrMapInt64Uint16 if false { } else { - z.F.EncMapInt64Uint32V(yy2089, e) + z.F.EncMapInt64Uint16V(yy2089, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uint64 == nil { + if x.FMapInt64Uint32 == nil { r.EncodeNil() } else { - yym2092 := z.EncBinary() - _ = yym2092 if false { } else { - z.F.EncMapInt64Uint64V(x.FMapInt64Uint64, e) + z.F.EncMapInt64Uint32V(x.FMapInt64Uint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uint32`) r.WriteMapElemValue() - if x.FMapInt64Uint64 == nil { + if x.FMapInt64Uint32 == nil { r.EncodeNil() } else { - yym2093 := z.EncBinary() - _ = yym2093 if false { } else { - z.F.EncMapInt64Uint64V(x.FMapInt64Uint64, e) + z.F.EncMapInt64Uint32V(x.FMapInt64Uint32, e) } } } var yyn2094 bool - if x.FptrMapInt64Uint64 == nil { + if x.FptrMapInt64Uint32 == nil { yyn2094 = true goto LABEL2094 } @@ -18518,67 +16417,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uint64 == nil { + if x.FptrMapInt64Uint32 == nil { r.EncodeNil() } else { - yy2095 := *x.FptrMapInt64Uint64 - yym2096 := z.EncBinary() - _ = yym2096 + yy2095 := *x.FptrMapInt64Uint32 if false { } else { - z.F.EncMapInt64Uint64V(yy2095, e) + z.F.EncMapInt64Uint32V(yy2095, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uint32`) r.WriteMapElemValue() if yyn2094 { r.EncodeNil() } else { - if x.FptrMapInt64Uint64 == nil { + if x.FptrMapInt64Uint32 == nil { r.EncodeNil() } else { - yy2097 := *x.FptrMapInt64Uint64 - yym2098 := z.EncBinary() - _ = yym2098 + yy2097 := *x.FptrMapInt64Uint32 if false { } else { - z.F.EncMapInt64Uint64V(yy2097, e) + z.F.EncMapInt64Uint32V(yy2097, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Uintptr == nil { + if x.FMapInt64Uint64 == nil { r.EncodeNil() } else { - yym2100 := z.EncBinary() - _ = yym2100 if false { } else { - z.F.EncMapInt64UintptrV(x.FMapInt64Uintptr, e) + z.F.EncMapInt64Uint64V(x.FMapInt64Uint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uint64`) r.WriteMapElemValue() - if x.FMapInt64Uintptr == nil { + if x.FMapInt64Uint64 == nil { r.EncodeNil() } else { - yym2101 := z.EncBinary() - _ = yym2101 if false { } else { - z.F.EncMapInt64UintptrV(x.FMapInt64Uintptr, e) + z.F.EncMapInt64Uint64V(x.FMapInt64Uint64, e) } } } var yyn2102 bool - if x.FptrMapInt64Uintptr == nil { + if x.FptrMapInt64Uint64 == nil { yyn2102 = true goto LABEL2102 } @@ -18589,67 +16480,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Uintptr == nil { + if x.FptrMapInt64Uint64 == nil { r.EncodeNil() } else { - yy2103 := *x.FptrMapInt64Uintptr - yym2104 := z.EncBinary() - _ = yym2104 + yy2103 := *x.FptrMapInt64Uint64 if false { } else { - z.F.EncMapInt64UintptrV(yy2103, e) + z.F.EncMapInt64Uint64V(yy2103, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Uintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uint64`) r.WriteMapElemValue() if yyn2102 { r.EncodeNil() } else { - if x.FptrMapInt64Uintptr == nil { + if x.FptrMapInt64Uint64 == nil { r.EncodeNil() } else { - yy2105 := *x.FptrMapInt64Uintptr - yym2106 := z.EncBinary() - _ = yym2106 + yy2105 := *x.FptrMapInt64Uint64 if false { } else { - z.F.EncMapInt64UintptrV(yy2105, e) + z.F.EncMapInt64Uint64V(yy2105, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Int == nil { + if x.FMapInt64Uintptr == nil { r.EncodeNil() } else { - yym2108 := z.EncBinary() - _ = yym2108 if false { } else { - z.F.EncMapInt64IntV(x.FMapInt64Int, e) + z.F.EncMapInt64UintptrV(x.FMapInt64Uintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Int")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Uintptr`) r.WriteMapElemValue() - if x.FMapInt64Int == nil { + if x.FMapInt64Uintptr == nil { r.EncodeNil() } else { - yym2109 := z.EncBinary() - _ = yym2109 if false { } else { - z.F.EncMapInt64IntV(x.FMapInt64Int, e) + z.F.EncMapInt64UintptrV(x.FMapInt64Uintptr, e) } } } var yyn2110 bool - if x.FptrMapInt64Int == nil { + if x.FptrMapInt64Uintptr == nil { yyn2110 = true goto LABEL2110 } @@ -18660,67 +16543,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Int == nil { + if x.FptrMapInt64Uintptr == nil { r.EncodeNil() } else { - yy2111 := *x.FptrMapInt64Int - yym2112 := z.EncBinary() - _ = yym2112 + yy2111 := *x.FptrMapInt64Uintptr if false { } else { - z.F.EncMapInt64IntV(yy2111, e) + z.F.EncMapInt64UintptrV(yy2111, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Int")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Uintptr`) r.WriteMapElemValue() if yyn2110 { r.EncodeNil() } else { - if x.FptrMapInt64Int == nil { + if x.FptrMapInt64Uintptr == nil { r.EncodeNil() } else { - yy2113 := *x.FptrMapInt64Int - yym2114 := z.EncBinary() - _ = yym2114 + yy2113 := *x.FptrMapInt64Uintptr if false { } else { - z.F.EncMapInt64IntV(yy2113, e) + z.F.EncMapInt64UintptrV(yy2113, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Int8 == nil { + if x.FMapInt64Int == nil { r.EncodeNil() } else { - yym2116 := z.EncBinary() - _ = yym2116 if false { } else { - z.F.EncMapInt64Int8V(x.FMapInt64Int8, e) + z.F.EncMapInt64IntV(x.FMapInt64Int, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Int`) r.WriteMapElemValue() - if x.FMapInt64Int8 == nil { + if x.FMapInt64Int == nil { r.EncodeNil() } else { - yym2117 := z.EncBinary() - _ = yym2117 if false { } else { - z.F.EncMapInt64Int8V(x.FMapInt64Int8, e) + z.F.EncMapInt64IntV(x.FMapInt64Int, e) } } } var yyn2118 bool - if x.FptrMapInt64Int8 == nil { + if x.FptrMapInt64Int == nil { yyn2118 = true goto LABEL2118 } @@ -18731,67 +16606,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Int8 == nil { + if x.FptrMapInt64Int == nil { r.EncodeNil() } else { - yy2119 := *x.FptrMapInt64Int8 - yym2120 := z.EncBinary() - _ = yym2120 + yy2119 := *x.FptrMapInt64Int if false { } else { - z.F.EncMapInt64Int8V(yy2119, e) + z.F.EncMapInt64IntV(yy2119, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Int8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Int`) r.WriteMapElemValue() if yyn2118 { r.EncodeNil() } else { - if x.FptrMapInt64Int8 == nil { + if x.FptrMapInt64Int == nil { r.EncodeNil() } else { - yy2121 := *x.FptrMapInt64Int8 - yym2122 := z.EncBinary() - _ = yym2122 + yy2121 := *x.FptrMapInt64Int if false { } else { - z.F.EncMapInt64Int8V(yy2121, e) + z.F.EncMapInt64IntV(yy2121, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Int16 == nil { + if x.FMapInt64Int8 == nil { r.EncodeNil() } else { - yym2124 := z.EncBinary() - _ = yym2124 if false { } else { - z.F.EncMapInt64Int16V(x.FMapInt64Int16, e) + z.F.EncMapInt64Int8V(x.FMapInt64Int8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Int8`) r.WriteMapElemValue() - if x.FMapInt64Int16 == nil { + if x.FMapInt64Int8 == nil { r.EncodeNil() } else { - yym2125 := z.EncBinary() - _ = yym2125 if false { } else { - z.F.EncMapInt64Int16V(x.FMapInt64Int16, e) + z.F.EncMapInt64Int8V(x.FMapInt64Int8, e) } } } var yyn2126 bool - if x.FptrMapInt64Int16 == nil { + if x.FptrMapInt64Int8 == nil { yyn2126 = true goto LABEL2126 } @@ -18802,67 +16669,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Int16 == nil { + if x.FptrMapInt64Int8 == nil { r.EncodeNil() } else { - yy2127 := *x.FptrMapInt64Int16 - yym2128 := z.EncBinary() - _ = yym2128 + yy2127 := *x.FptrMapInt64Int8 if false { } else { - z.F.EncMapInt64Int16V(yy2127, e) + z.F.EncMapInt64Int8V(yy2127, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Int16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Int8`) r.WriteMapElemValue() if yyn2126 { r.EncodeNil() } else { - if x.FptrMapInt64Int16 == nil { + if x.FptrMapInt64Int8 == nil { r.EncodeNil() } else { - yy2129 := *x.FptrMapInt64Int16 - yym2130 := z.EncBinary() - _ = yym2130 + yy2129 := *x.FptrMapInt64Int8 if false { } else { - z.F.EncMapInt64Int16V(yy2129, e) + z.F.EncMapInt64Int8V(yy2129, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Int32 == nil { + if x.FMapInt64Int16 == nil { r.EncodeNil() } else { - yym2132 := z.EncBinary() - _ = yym2132 if false { } else { - z.F.EncMapInt64Int32V(x.FMapInt64Int32, e) + z.F.EncMapInt64Int16V(x.FMapInt64Int16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Int16`) r.WriteMapElemValue() - if x.FMapInt64Int32 == nil { + if x.FMapInt64Int16 == nil { r.EncodeNil() } else { - yym2133 := z.EncBinary() - _ = yym2133 if false { } else { - z.F.EncMapInt64Int32V(x.FMapInt64Int32, e) + z.F.EncMapInt64Int16V(x.FMapInt64Int16, e) } } } var yyn2134 bool - if x.FptrMapInt64Int32 == nil { + if x.FptrMapInt64Int16 == nil { yyn2134 = true goto LABEL2134 } @@ -18873,67 +16732,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Int32 == nil { + if x.FptrMapInt64Int16 == nil { r.EncodeNil() } else { - yy2135 := *x.FptrMapInt64Int32 - yym2136 := z.EncBinary() - _ = yym2136 + yy2135 := *x.FptrMapInt64Int16 if false { } else { - z.F.EncMapInt64Int32V(yy2135, e) + z.F.EncMapInt64Int16V(yy2135, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Int32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Int16`) r.WriteMapElemValue() if yyn2134 { r.EncodeNil() } else { - if x.FptrMapInt64Int32 == nil { + if x.FptrMapInt64Int16 == nil { r.EncodeNil() } else { - yy2137 := *x.FptrMapInt64Int32 - yym2138 := z.EncBinary() - _ = yym2138 + yy2137 := *x.FptrMapInt64Int16 if false { } else { - z.F.EncMapInt64Int32V(yy2137, e) + z.F.EncMapInt64Int16V(yy2137, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Int64 == nil { + if x.FMapInt64Int32 == nil { r.EncodeNil() } else { - yym2140 := z.EncBinary() - _ = yym2140 if false { } else { - z.F.EncMapInt64Int64V(x.FMapInt64Int64, e) + z.F.EncMapInt64Int32V(x.FMapInt64Int32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Int32`) r.WriteMapElemValue() - if x.FMapInt64Int64 == nil { + if x.FMapInt64Int32 == nil { r.EncodeNil() } else { - yym2141 := z.EncBinary() - _ = yym2141 if false { } else { - z.F.EncMapInt64Int64V(x.FMapInt64Int64, e) + z.F.EncMapInt64Int32V(x.FMapInt64Int32, e) } } } var yyn2142 bool - if x.FptrMapInt64Int64 == nil { + if x.FptrMapInt64Int32 == nil { yyn2142 = true goto LABEL2142 } @@ -18944,67 +16795,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Int64 == nil { + if x.FptrMapInt64Int32 == nil { r.EncodeNil() } else { - yy2143 := *x.FptrMapInt64Int64 - yym2144 := z.EncBinary() - _ = yym2144 + yy2143 := *x.FptrMapInt64Int32 if false { } else { - z.F.EncMapInt64Int64V(yy2143, e) + z.F.EncMapInt64Int32V(yy2143, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Int64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Int32`) r.WriteMapElemValue() if yyn2142 { r.EncodeNil() } else { - if x.FptrMapInt64Int64 == nil { + if x.FptrMapInt64Int32 == nil { r.EncodeNil() } else { - yy2145 := *x.FptrMapInt64Int64 - yym2146 := z.EncBinary() - _ = yym2146 + yy2145 := *x.FptrMapInt64Int32 if false { } else { - z.F.EncMapInt64Int64V(yy2145, e) + z.F.EncMapInt64Int32V(yy2145, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Float32 == nil { + if x.FMapInt64Int64 == nil { r.EncodeNil() } else { - yym2148 := z.EncBinary() - _ = yym2148 if false { } else { - z.F.EncMapInt64Float32V(x.FMapInt64Float32, e) + z.F.EncMapInt64Int64V(x.FMapInt64Int64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Int64`) r.WriteMapElemValue() - if x.FMapInt64Float32 == nil { + if x.FMapInt64Int64 == nil { r.EncodeNil() } else { - yym2149 := z.EncBinary() - _ = yym2149 if false { } else { - z.F.EncMapInt64Float32V(x.FMapInt64Float32, e) + z.F.EncMapInt64Int64V(x.FMapInt64Int64, e) } } } var yyn2150 bool - if x.FptrMapInt64Float32 == nil { + if x.FptrMapInt64Int64 == nil { yyn2150 = true goto LABEL2150 } @@ -19015,67 +16858,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Float32 == nil { + if x.FptrMapInt64Int64 == nil { r.EncodeNil() } else { - yy2151 := *x.FptrMapInt64Float32 - yym2152 := z.EncBinary() - _ = yym2152 + yy2151 := *x.FptrMapInt64Int64 if false { } else { - z.F.EncMapInt64Float32V(yy2151, e) + z.F.EncMapInt64Int64V(yy2151, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Float32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Int64`) r.WriteMapElemValue() if yyn2150 { r.EncodeNil() } else { - if x.FptrMapInt64Float32 == nil { + if x.FptrMapInt64Int64 == nil { r.EncodeNil() } else { - yy2153 := *x.FptrMapInt64Float32 - yym2154 := z.EncBinary() - _ = yym2154 + yy2153 := *x.FptrMapInt64Int64 if false { } else { - z.F.EncMapInt64Float32V(yy2153, e) + z.F.EncMapInt64Int64V(yy2153, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Float64 == nil { + if x.FMapInt64Float32 == nil { r.EncodeNil() } else { - yym2156 := z.EncBinary() - _ = yym2156 if false { } else { - z.F.EncMapInt64Float64V(x.FMapInt64Float64, e) + z.F.EncMapInt64Float32V(x.FMapInt64Float32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Float32`) r.WriteMapElemValue() - if x.FMapInt64Float64 == nil { + if x.FMapInt64Float32 == nil { r.EncodeNil() } else { - yym2157 := z.EncBinary() - _ = yym2157 if false { } else { - z.F.EncMapInt64Float64V(x.FMapInt64Float64, e) + z.F.EncMapInt64Float32V(x.FMapInt64Float32, e) } } } var yyn2158 bool - if x.FptrMapInt64Float64 == nil { + if x.FptrMapInt64Float32 == nil { yyn2158 = true goto LABEL2158 } @@ -19086,67 +16921,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Float64 == nil { + if x.FptrMapInt64Float32 == nil { r.EncodeNil() } else { - yy2159 := *x.FptrMapInt64Float64 - yym2160 := z.EncBinary() - _ = yym2160 + yy2159 := *x.FptrMapInt64Float32 if false { } else { - z.F.EncMapInt64Float64V(yy2159, e) + z.F.EncMapInt64Float32V(yy2159, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Float64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Float32`) r.WriteMapElemValue() if yyn2158 { r.EncodeNil() } else { - if x.FptrMapInt64Float64 == nil { + if x.FptrMapInt64Float32 == nil { r.EncodeNil() } else { - yy2161 := *x.FptrMapInt64Float64 - yym2162 := z.EncBinary() - _ = yym2162 + yy2161 := *x.FptrMapInt64Float32 if false { } else { - z.F.EncMapInt64Float64V(yy2161, e) + z.F.EncMapInt64Float32V(yy2161, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapInt64Bool == nil { + if x.FMapInt64Float64 == nil { r.EncodeNil() } else { - yym2164 := z.EncBinary() - _ = yym2164 if false { } else { - z.F.EncMapInt64BoolV(x.FMapInt64Bool, e) + z.F.EncMapInt64Float64V(x.FMapInt64Float64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapInt64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Float64`) r.WriteMapElemValue() - if x.FMapInt64Bool == nil { + if x.FMapInt64Float64 == nil { r.EncodeNil() } else { - yym2165 := z.EncBinary() - _ = yym2165 if false { } else { - z.F.EncMapInt64BoolV(x.FMapInt64Bool, e) + z.F.EncMapInt64Float64V(x.FMapInt64Float64, e) } } } var yyn2166 bool - if x.FptrMapInt64Bool == nil { + if x.FptrMapInt64Float64 == nil { yyn2166 = true goto LABEL2166 } @@ -19157,67 +16984,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapInt64Bool == nil { + if x.FptrMapInt64Float64 == nil { r.EncodeNil() } else { - yy2167 := *x.FptrMapInt64Bool - yym2168 := z.EncBinary() - _ = yym2168 + yy2167 := *x.FptrMapInt64Float64 if false { } else { - z.F.EncMapInt64BoolV(yy2167, e) + z.F.EncMapInt64Float64V(yy2167, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapInt64Bool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Float64`) r.WriteMapElemValue() if yyn2166 { r.EncodeNil() } else { - if x.FptrMapInt64Bool == nil { + if x.FptrMapInt64Float64 == nil { r.EncodeNil() } else { - yy2169 := *x.FptrMapInt64Bool - yym2170 := z.EncBinary() - _ = yym2170 + yy2169 := *x.FptrMapInt64Float64 if false { } else { - z.F.EncMapInt64BoolV(yy2169, e) + z.F.EncMapInt64Float64V(yy2169, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolIntf == nil { + if x.FMapInt64Bool == nil { r.EncodeNil() } else { - yym2172 := z.EncBinary() - _ = yym2172 if false { } else { - z.F.EncMapBoolIntfV(x.FMapBoolIntf, e) + z.F.EncMapInt64BoolV(x.FMapInt64Bool, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolIntf")) + r.EncodeString(codecSelferCcUTF819781, `FMapInt64Bool`) r.WriteMapElemValue() - if x.FMapBoolIntf == nil { + if x.FMapInt64Bool == nil { r.EncodeNil() } else { - yym2173 := z.EncBinary() - _ = yym2173 if false { } else { - z.F.EncMapBoolIntfV(x.FMapBoolIntf, e) + z.F.EncMapInt64BoolV(x.FMapInt64Bool, e) } } } var yyn2174 bool - if x.FptrMapBoolIntf == nil { + if x.FptrMapInt64Bool == nil { yyn2174 = true goto LABEL2174 } @@ -19228,67 +17047,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolIntf == nil { + if x.FptrMapInt64Bool == nil { r.EncodeNil() } else { - yy2175 := *x.FptrMapBoolIntf - yym2176 := z.EncBinary() - _ = yym2176 + yy2175 := *x.FptrMapInt64Bool if false { } else { - z.F.EncMapBoolIntfV(yy2175, e) + z.F.EncMapInt64BoolV(yy2175, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolIntf")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapInt64Bool`) r.WriteMapElemValue() if yyn2174 { r.EncodeNil() } else { - if x.FptrMapBoolIntf == nil { + if x.FptrMapInt64Bool == nil { r.EncodeNil() } else { - yy2177 := *x.FptrMapBoolIntf - yym2178 := z.EncBinary() - _ = yym2178 + yy2177 := *x.FptrMapInt64Bool if false { } else { - z.F.EncMapBoolIntfV(yy2177, e) + z.F.EncMapInt64BoolV(yy2177, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolString == nil { + if x.FMapBoolIntf == nil { r.EncodeNil() } else { - yym2180 := z.EncBinary() - _ = yym2180 if false { } else { - z.F.EncMapBoolStringV(x.FMapBoolString, e) + z.F.EncMapBoolIntfV(x.FMapBoolIntf, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolString")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolIntf`) r.WriteMapElemValue() - if x.FMapBoolString == nil { + if x.FMapBoolIntf == nil { r.EncodeNil() } else { - yym2181 := z.EncBinary() - _ = yym2181 if false { } else { - z.F.EncMapBoolStringV(x.FMapBoolString, e) + z.F.EncMapBoolIntfV(x.FMapBoolIntf, e) } } } var yyn2182 bool - if x.FptrMapBoolString == nil { + if x.FptrMapBoolIntf == nil { yyn2182 = true goto LABEL2182 } @@ -19299,67 +17110,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolString == nil { + if x.FptrMapBoolIntf == nil { r.EncodeNil() } else { - yy2183 := *x.FptrMapBoolString - yym2184 := z.EncBinary() - _ = yym2184 + yy2183 := *x.FptrMapBoolIntf if false { } else { - z.F.EncMapBoolStringV(yy2183, e) + z.F.EncMapBoolIntfV(yy2183, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolString")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolIntf`) r.WriteMapElemValue() if yyn2182 { r.EncodeNil() } else { - if x.FptrMapBoolString == nil { + if x.FptrMapBoolIntf == nil { r.EncodeNil() } else { - yy2185 := *x.FptrMapBoolString - yym2186 := z.EncBinary() - _ = yym2186 + yy2185 := *x.FptrMapBoolIntf if false { } else { - z.F.EncMapBoolStringV(yy2185, e) + z.F.EncMapBoolIntfV(yy2185, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUint == nil { + if x.FMapBoolString == nil { r.EncodeNil() } else { - yym2188 := z.EncBinary() - _ = yym2188 if false { } else { - z.F.EncMapBoolUintV(x.FMapBoolUint, e) + z.F.EncMapBoolStringV(x.FMapBoolString, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUint")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolString`) r.WriteMapElemValue() - if x.FMapBoolUint == nil { + if x.FMapBoolString == nil { r.EncodeNil() } else { - yym2189 := z.EncBinary() - _ = yym2189 if false { } else { - z.F.EncMapBoolUintV(x.FMapBoolUint, e) + z.F.EncMapBoolStringV(x.FMapBoolString, e) } } } var yyn2190 bool - if x.FptrMapBoolUint == nil { + if x.FptrMapBoolString == nil { yyn2190 = true goto LABEL2190 } @@ -19370,67 +17173,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUint == nil { + if x.FptrMapBoolString == nil { r.EncodeNil() } else { - yy2191 := *x.FptrMapBoolUint - yym2192 := z.EncBinary() - _ = yym2192 + yy2191 := *x.FptrMapBoolString if false { } else { - z.F.EncMapBoolUintV(yy2191, e) + z.F.EncMapBoolStringV(yy2191, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUint")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolString`) r.WriteMapElemValue() if yyn2190 { r.EncodeNil() } else { - if x.FptrMapBoolUint == nil { + if x.FptrMapBoolString == nil { r.EncodeNil() } else { - yy2193 := *x.FptrMapBoolUint - yym2194 := z.EncBinary() - _ = yym2194 + yy2193 := *x.FptrMapBoolString if false { } else { - z.F.EncMapBoolUintV(yy2193, e) + z.F.EncMapBoolStringV(yy2193, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUint8 == nil { + if x.FMapBoolUint == nil { r.EncodeNil() } else { - yym2196 := z.EncBinary() - _ = yym2196 if false { } else { - z.F.EncMapBoolUint8V(x.FMapBoolUint8, e) + z.F.EncMapBoolUintV(x.FMapBoolUint, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUint8")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUint`) r.WriteMapElemValue() - if x.FMapBoolUint8 == nil { + if x.FMapBoolUint == nil { r.EncodeNil() } else { - yym2197 := z.EncBinary() - _ = yym2197 if false { } else { - z.F.EncMapBoolUint8V(x.FMapBoolUint8, e) + z.F.EncMapBoolUintV(x.FMapBoolUint, e) } } } var yyn2198 bool - if x.FptrMapBoolUint8 == nil { + if x.FptrMapBoolUint == nil { yyn2198 = true goto LABEL2198 } @@ -19441,67 +17236,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUint8 == nil { + if x.FptrMapBoolUint == nil { r.EncodeNil() } else { - yy2199 := *x.FptrMapBoolUint8 - yym2200 := z.EncBinary() - _ = yym2200 + yy2199 := *x.FptrMapBoolUint if false { } else { - z.F.EncMapBoolUint8V(yy2199, e) + z.F.EncMapBoolUintV(yy2199, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUint8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUint`) r.WriteMapElemValue() if yyn2198 { r.EncodeNil() } else { - if x.FptrMapBoolUint8 == nil { + if x.FptrMapBoolUint == nil { r.EncodeNil() } else { - yy2201 := *x.FptrMapBoolUint8 - yym2202 := z.EncBinary() - _ = yym2202 + yy2201 := *x.FptrMapBoolUint if false { } else { - z.F.EncMapBoolUint8V(yy2201, e) + z.F.EncMapBoolUintV(yy2201, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUint16 == nil { + if x.FMapBoolUint8 == nil { r.EncodeNil() } else { - yym2204 := z.EncBinary() - _ = yym2204 if false { } else { - z.F.EncMapBoolUint16V(x.FMapBoolUint16, e) + z.F.EncMapBoolUint8V(x.FMapBoolUint8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUint16")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUint8`) r.WriteMapElemValue() - if x.FMapBoolUint16 == nil { + if x.FMapBoolUint8 == nil { r.EncodeNil() } else { - yym2205 := z.EncBinary() - _ = yym2205 if false { } else { - z.F.EncMapBoolUint16V(x.FMapBoolUint16, e) + z.F.EncMapBoolUint8V(x.FMapBoolUint8, e) } } } var yyn2206 bool - if x.FptrMapBoolUint16 == nil { + if x.FptrMapBoolUint8 == nil { yyn2206 = true goto LABEL2206 } @@ -19512,67 +17299,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUint16 == nil { + if x.FptrMapBoolUint8 == nil { r.EncodeNil() } else { - yy2207 := *x.FptrMapBoolUint16 - yym2208 := z.EncBinary() - _ = yym2208 + yy2207 := *x.FptrMapBoolUint8 if false { } else { - z.F.EncMapBoolUint16V(yy2207, e) + z.F.EncMapBoolUint8V(yy2207, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUint16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUint8`) r.WriteMapElemValue() if yyn2206 { r.EncodeNil() } else { - if x.FptrMapBoolUint16 == nil { + if x.FptrMapBoolUint8 == nil { r.EncodeNil() } else { - yy2209 := *x.FptrMapBoolUint16 - yym2210 := z.EncBinary() - _ = yym2210 + yy2209 := *x.FptrMapBoolUint8 if false { } else { - z.F.EncMapBoolUint16V(yy2209, e) + z.F.EncMapBoolUint8V(yy2209, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUint32 == nil { + if x.FMapBoolUint16 == nil { r.EncodeNil() } else { - yym2212 := z.EncBinary() - _ = yym2212 if false { } else { - z.F.EncMapBoolUint32V(x.FMapBoolUint32, e) + z.F.EncMapBoolUint16V(x.FMapBoolUint16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUint32")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUint16`) r.WriteMapElemValue() - if x.FMapBoolUint32 == nil { + if x.FMapBoolUint16 == nil { r.EncodeNil() } else { - yym2213 := z.EncBinary() - _ = yym2213 if false { } else { - z.F.EncMapBoolUint32V(x.FMapBoolUint32, e) + z.F.EncMapBoolUint16V(x.FMapBoolUint16, e) } } } var yyn2214 bool - if x.FptrMapBoolUint32 == nil { + if x.FptrMapBoolUint16 == nil { yyn2214 = true goto LABEL2214 } @@ -19583,67 +17362,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUint32 == nil { + if x.FptrMapBoolUint16 == nil { r.EncodeNil() } else { - yy2215 := *x.FptrMapBoolUint32 - yym2216 := z.EncBinary() - _ = yym2216 + yy2215 := *x.FptrMapBoolUint16 if false { } else { - z.F.EncMapBoolUint32V(yy2215, e) + z.F.EncMapBoolUint16V(yy2215, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUint32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUint16`) r.WriteMapElemValue() if yyn2214 { r.EncodeNil() } else { - if x.FptrMapBoolUint32 == nil { + if x.FptrMapBoolUint16 == nil { r.EncodeNil() } else { - yy2217 := *x.FptrMapBoolUint32 - yym2218 := z.EncBinary() - _ = yym2218 + yy2217 := *x.FptrMapBoolUint16 if false { } else { - z.F.EncMapBoolUint32V(yy2217, e) + z.F.EncMapBoolUint16V(yy2217, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUint64 == nil { + if x.FMapBoolUint32 == nil { r.EncodeNil() } else { - yym2220 := z.EncBinary() - _ = yym2220 if false { } else { - z.F.EncMapBoolUint64V(x.FMapBoolUint64, e) + z.F.EncMapBoolUint32V(x.FMapBoolUint32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUint64")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUint32`) r.WriteMapElemValue() - if x.FMapBoolUint64 == nil { + if x.FMapBoolUint32 == nil { r.EncodeNil() } else { - yym2221 := z.EncBinary() - _ = yym2221 if false { } else { - z.F.EncMapBoolUint64V(x.FMapBoolUint64, e) + z.F.EncMapBoolUint32V(x.FMapBoolUint32, e) } } } var yyn2222 bool - if x.FptrMapBoolUint64 == nil { + if x.FptrMapBoolUint32 == nil { yyn2222 = true goto LABEL2222 } @@ -19654,67 +17425,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUint64 == nil { + if x.FptrMapBoolUint32 == nil { r.EncodeNil() } else { - yy2223 := *x.FptrMapBoolUint64 - yym2224 := z.EncBinary() - _ = yym2224 + yy2223 := *x.FptrMapBoolUint32 if false { } else { - z.F.EncMapBoolUint64V(yy2223, e) + z.F.EncMapBoolUint32V(yy2223, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUint64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUint32`) r.WriteMapElemValue() if yyn2222 { r.EncodeNil() } else { - if x.FptrMapBoolUint64 == nil { + if x.FptrMapBoolUint32 == nil { r.EncodeNil() } else { - yy2225 := *x.FptrMapBoolUint64 - yym2226 := z.EncBinary() - _ = yym2226 + yy2225 := *x.FptrMapBoolUint32 if false { } else { - z.F.EncMapBoolUint64V(yy2225, e) + z.F.EncMapBoolUint32V(yy2225, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolUintptr == nil { + if x.FMapBoolUint64 == nil { r.EncodeNil() } else { - yym2228 := z.EncBinary() - _ = yym2228 if false { } else { - z.F.EncMapBoolUintptrV(x.FMapBoolUintptr, e) + z.F.EncMapBoolUint64V(x.FMapBoolUint64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUint64`) r.WriteMapElemValue() - if x.FMapBoolUintptr == nil { + if x.FMapBoolUint64 == nil { r.EncodeNil() } else { - yym2229 := z.EncBinary() - _ = yym2229 if false { } else { - z.F.EncMapBoolUintptrV(x.FMapBoolUintptr, e) + z.F.EncMapBoolUint64V(x.FMapBoolUint64, e) } } } var yyn2230 bool - if x.FptrMapBoolUintptr == nil { + if x.FptrMapBoolUint64 == nil { yyn2230 = true goto LABEL2230 } @@ -19725,67 +17488,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolUintptr == nil { + if x.FptrMapBoolUint64 == nil { r.EncodeNil() } else { - yy2231 := *x.FptrMapBoolUintptr - yym2232 := z.EncBinary() - _ = yym2232 + yy2231 := *x.FptrMapBoolUint64 if false { } else { - z.F.EncMapBoolUintptrV(yy2231, e) + z.F.EncMapBoolUint64V(yy2231, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolUintptr")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUint64`) r.WriteMapElemValue() if yyn2230 { r.EncodeNil() } else { - if x.FptrMapBoolUintptr == nil { + if x.FptrMapBoolUint64 == nil { r.EncodeNil() } else { - yy2233 := *x.FptrMapBoolUintptr - yym2234 := z.EncBinary() - _ = yym2234 + yy2233 := *x.FptrMapBoolUint64 if false { } else { - z.F.EncMapBoolUintptrV(yy2233, e) + z.F.EncMapBoolUint64V(yy2233, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolInt == nil { + if x.FMapBoolUintptr == nil { r.EncodeNil() } else { - yym2236 := z.EncBinary() - _ = yym2236 if false { } else { - z.F.EncMapBoolIntV(x.FMapBoolInt, e) + z.F.EncMapBoolUintptrV(x.FMapBoolUintptr, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolInt")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolUintptr`) r.WriteMapElemValue() - if x.FMapBoolInt == nil { + if x.FMapBoolUintptr == nil { r.EncodeNil() } else { - yym2237 := z.EncBinary() - _ = yym2237 if false { } else { - z.F.EncMapBoolIntV(x.FMapBoolInt, e) + z.F.EncMapBoolUintptrV(x.FMapBoolUintptr, e) } } } var yyn2238 bool - if x.FptrMapBoolInt == nil { + if x.FptrMapBoolUintptr == nil { yyn2238 = true goto LABEL2238 } @@ -19796,67 +17551,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolInt == nil { + if x.FptrMapBoolUintptr == nil { r.EncodeNil() } else { - yy2239 := *x.FptrMapBoolInt - yym2240 := z.EncBinary() - _ = yym2240 + yy2239 := *x.FptrMapBoolUintptr if false { } else { - z.F.EncMapBoolIntV(yy2239, e) + z.F.EncMapBoolUintptrV(yy2239, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolInt")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolUintptr`) r.WriteMapElemValue() if yyn2238 { r.EncodeNil() } else { - if x.FptrMapBoolInt == nil { + if x.FptrMapBoolUintptr == nil { r.EncodeNil() } else { - yy2241 := *x.FptrMapBoolInt - yym2242 := z.EncBinary() - _ = yym2242 + yy2241 := *x.FptrMapBoolUintptr if false { } else { - z.F.EncMapBoolIntV(yy2241, e) + z.F.EncMapBoolUintptrV(yy2241, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolInt8 == nil { + if x.FMapBoolInt == nil { r.EncodeNil() } else { - yym2244 := z.EncBinary() - _ = yym2244 if false { } else { - z.F.EncMapBoolInt8V(x.FMapBoolInt8, e) + z.F.EncMapBoolIntV(x.FMapBoolInt, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolInt8")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolInt`) r.WriteMapElemValue() - if x.FMapBoolInt8 == nil { + if x.FMapBoolInt == nil { r.EncodeNil() } else { - yym2245 := z.EncBinary() - _ = yym2245 if false { } else { - z.F.EncMapBoolInt8V(x.FMapBoolInt8, e) + z.F.EncMapBoolIntV(x.FMapBoolInt, e) } } } var yyn2246 bool - if x.FptrMapBoolInt8 == nil { + if x.FptrMapBoolInt == nil { yyn2246 = true goto LABEL2246 } @@ -19867,67 +17614,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolInt8 == nil { + if x.FptrMapBoolInt == nil { r.EncodeNil() } else { - yy2247 := *x.FptrMapBoolInt8 - yym2248 := z.EncBinary() - _ = yym2248 + yy2247 := *x.FptrMapBoolInt if false { } else { - z.F.EncMapBoolInt8V(yy2247, e) + z.F.EncMapBoolIntV(yy2247, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolInt8")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolInt`) r.WriteMapElemValue() if yyn2246 { r.EncodeNil() } else { - if x.FptrMapBoolInt8 == nil { + if x.FptrMapBoolInt == nil { r.EncodeNil() } else { - yy2249 := *x.FptrMapBoolInt8 - yym2250 := z.EncBinary() - _ = yym2250 + yy2249 := *x.FptrMapBoolInt if false { } else { - z.F.EncMapBoolInt8V(yy2249, e) + z.F.EncMapBoolIntV(yy2249, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolInt16 == nil { + if x.FMapBoolInt8 == nil { r.EncodeNil() } else { - yym2252 := z.EncBinary() - _ = yym2252 if false { } else { - z.F.EncMapBoolInt16V(x.FMapBoolInt16, e) + z.F.EncMapBoolInt8V(x.FMapBoolInt8, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolInt16")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolInt8`) r.WriteMapElemValue() - if x.FMapBoolInt16 == nil { + if x.FMapBoolInt8 == nil { r.EncodeNil() } else { - yym2253 := z.EncBinary() - _ = yym2253 if false { } else { - z.F.EncMapBoolInt16V(x.FMapBoolInt16, e) + z.F.EncMapBoolInt8V(x.FMapBoolInt8, e) } } } var yyn2254 bool - if x.FptrMapBoolInt16 == nil { + if x.FptrMapBoolInt8 == nil { yyn2254 = true goto LABEL2254 } @@ -19938,67 +17677,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolInt16 == nil { + if x.FptrMapBoolInt8 == nil { r.EncodeNil() } else { - yy2255 := *x.FptrMapBoolInt16 - yym2256 := z.EncBinary() - _ = yym2256 + yy2255 := *x.FptrMapBoolInt8 if false { } else { - z.F.EncMapBoolInt16V(yy2255, e) + z.F.EncMapBoolInt8V(yy2255, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolInt16")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolInt8`) r.WriteMapElemValue() if yyn2254 { r.EncodeNil() } else { - if x.FptrMapBoolInt16 == nil { + if x.FptrMapBoolInt8 == nil { r.EncodeNil() } else { - yy2257 := *x.FptrMapBoolInt16 - yym2258 := z.EncBinary() - _ = yym2258 + yy2257 := *x.FptrMapBoolInt8 if false { } else { - z.F.EncMapBoolInt16V(yy2257, e) + z.F.EncMapBoolInt8V(yy2257, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolInt32 == nil { + if x.FMapBoolInt16 == nil { r.EncodeNil() } else { - yym2260 := z.EncBinary() - _ = yym2260 if false { } else { - z.F.EncMapBoolInt32V(x.FMapBoolInt32, e) + z.F.EncMapBoolInt16V(x.FMapBoolInt16, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolInt32")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolInt16`) r.WriteMapElemValue() - if x.FMapBoolInt32 == nil { + if x.FMapBoolInt16 == nil { r.EncodeNil() } else { - yym2261 := z.EncBinary() - _ = yym2261 if false { } else { - z.F.EncMapBoolInt32V(x.FMapBoolInt32, e) + z.F.EncMapBoolInt16V(x.FMapBoolInt16, e) } } } var yyn2262 bool - if x.FptrMapBoolInt32 == nil { + if x.FptrMapBoolInt16 == nil { yyn2262 = true goto LABEL2262 } @@ -20009,67 +17740,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolInt32 == nil { + if x.FptrMapBoolInt16 == nil { r.EncodeNil() } else { - yy2263 := *x.FptrMapBoolInt32 - yym2264 := z.EncBinary() - _ = yym2264 + yy2263 := *x.FptrMapBoolInt16 if false { } else { - z.F.EncMapBoolInt32V(yy2263, e) + z.F.EncMapBoolInt16V(yy2263, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolInt32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolInt16`) r.WriteMapElemValue() if yyn2262 { r.EncodeNil() } else { - if x.FptrMapBoolInt32 == nil { + if x.FptrMapBoolInt16 == nil { r.EncodeNil() } else { - yy2265 := *x.FptrMapBoolInt32 - yym2266 := z.EncBinary() - _ = yym2266 + yy2265 := *x.FptrMapBoolInt16 if false { } else { - z.F.EncMapBoolInt32V(yy2265, e) + z.F.EncMapBoolInt16V(yy2265, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolInt64 == nil { + if x.FMapBoolInt32 == nil { r.EncodeNil() } else { - yym2268 := z.EncBinary() - _ = yym2268 if false { } else { - z.F.EncMapBoolInt64V(x.FMapBoolInt64, e) + z.F.EncMapBoolInt32V(x.FMapBoolInt32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolInt64")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolInt32`) r.WriteMapElemValue() - if x.FMapBoolInt64 == nil { + if x.FMapBoolInt32 == nil { r.EncodeNil() } else { - yym2269 := z.EncBinary() - _ = yym2269 if false { } else { - z.F.EncMapBoolInt64V(x.FMapBoolInt64, e) + z.F.EncMapBoolInt32V(x.FMapBoolInt32, e) } } } var yyn2270 bool - if x.FptrMapBoolInt64 == nil { + if x.FptrMapBoolInt32 == nil { yyn2270 = true goto LABEL2270 } @@ -20080,67 +17803,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolInt64 == nil { + if x.FptrMapBoolInt32 == nil { r.EncodeNil() } else { - yy2271 := *x.FptrMapBoolInt64 - yym2272 := z.EncBinary() - _ = yym2272 + yy2271 := *x.FptrMapBoolInt32 if false { } else { - z.F.EncMapBoolInt64V(yy2271, e) + z.F.EncMapBoolInt32V(yy2271, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolInt64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolInt32`) r.WriteMapElemValue() if yyn2270 { r.EncodeNil() } else { - if x.FptrMapBoolInt64 == nil { + if x.FptrMapBoolInt32 == nil { r.EncodeNil() } else { - yy2273 := *x.FptrMapBoolInt64 - yym2274 := z.EncBinary() - _ = yym2274 + yy2273 := *x.FptrMapBoolInt32 if false { } else { - z.F.EncMapBoolInt64V(yy2273, e) + z.F.EncMapBoolInt32V(yy2273, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolFloat32 == nil { + if x.FMapBoolInt64 == nil { r.EncodeNil() } else { - yym2276 := z.EncBinary() - _ = yym2276 if false { } else { - z.F.EncMapBoolFloat32V(x.FMapBoolFloat32, e) + z.F.EncMapBoolInt64V(x.FMapBoolInt64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolInt64`) r.WriteMapElemValue() - if x.FMapBoolFloat32 == nil { + if x.FMapBoolInt64 == nil { r.EncodeNil() } else { - yym2277 := z.EncBinary() - _ = yym2277 if false { } else { - z.F.EncMapBoolFloat32V(x.FMapBoolFloat32, e) + z.F.EncMapBoolInt64V(x.FMapBoolInt64, e) } } } var yyn2278 bool - if x.FptrMapBoolFloat32 == nil { + if x.FptrMapBoolInt64 == nil { yyn2278 = true goto LABEL2278 } @@ -20151,67 +17866,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolFloat32 == nil { + if x.FptrMapBoolInt64 == nil { r.EncodeNil() } else { - yy2279 := *x.FptrMapBoolFloat32 - yym2280 := z.EncBinary() - _ = yym2280 + yy2279 := *x.FptrMapBoolInt64 if false { } else { - z.F.EncMapBoolFloat32V(yy2279, e) + z.F.EncMapBoolInt64V(yy2279, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolFloat32")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolInt64`) r.WriteMapElemValue() if yyn2278 { r.EncodeNil() } else { - if x.FptrMapBoolFloat32 == nil { + if x.FptrMapBoolInt64 == nil { r.EncodeNil() } else { - yy2281 := *x.FptrMapBoolFloat32 - yym2282 := z.EncBinary() - _ = yym2282 + yy2281 := *x.FptrMapBoolInt64 if false { } else { - z.F.EncMapBoolFloat32V(yy2281, e) + z.F.EncMapBoolInt64V(yy2281, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolFloat64 == nil { + if x.FMapBoolFloat32 == nil { r.EncodeNil() } else { - yym2284 := z.EncBinary() - _ = yym2284 if false { } else { - z.F.EncMapBoolFloat64V(x.FMapBoolFloat64, e) + z.F.EncMapBoolFloat32V(x.FMapBoolFloat32, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolFloat32`) r.WriteMapElemValue() - if x.FMapBoolFloat64 == nil { + if x.FMapBoolFloat32 == nil { r.EncodeNil() } else { - yym2285 := z.EncBinary() - _ = yym2285 if false { } else { - z.F.EncMapBoolFloat64V(x.FMapBoolFloat64, e) + z.F.EncMapBoolFloat32V(x.FMapBoolFloat32, e) } } } var yyn2286 bool - if x.FptrMapBoolFloat64 == nil { + if x.FptrMapBoolFloat32 == nil { yyn2286 = true goto LABEL2286 } @@ -20222,67 +17929,59 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolFloat64 == nil { + if x.FptrMapBoolFloat32 == nil { r.EncodeNil() } else { - yy2287 := *x.FptrMapBoolFloat64 - yym2288 := z.EncBinary() - _ = yym2288 + yy2287 := *x.FptrMapBoolFloat32 if false { } else { - z.F.EncMapBoolFloat64V(yy2287, e) + z.F.EncMapBoolFloat32V(yy2287, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolFloat64")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolFloat32`) r.WriteMapElemValue() if yyn2286 { r.EncodeNil() } else { - if x.FptrMapBoolFloat64 == nil { + if x.FptrMapBoolFloat32 == nil { r.EncodeNil() } else { - yy2289 := *x.FptrMapBoolFloat64 - yym2290 := z.EncBinary() - _ = yym2290 + yy2289 := *x.FptrMapBoolFloat32 if false { } else { - z.F.EncMapBoolFloat64V(yy2289, e) + z.F.EncMapBoolFloat32V(yy2289, e) } } } } if yyr2 || yy2arr2 { r.WriteArrayElem() - if x.FMapBoolBool == nil { + if x.FMapBoolFloat64 == nil { r.EncodeNil() } else { - yym2292 := z.EncBinary() - _ = yym2292 if false { } else { - z.F.EncMapBoolBoolV(x.FMapBoolBool, e) + z.F.EncMapBoolFloat64V(x.FMapBoolFloat64, e) } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FMapBoolBool")) + r.EncodeString(codecSelferCcUTF819781, `FMapBoolFloat64`) r.WriteMapElemValue() - if x.FMapBoolBool == nil { + if x.FMapBoolFloat64 == nil { r.EncodeNil() } else { - yym2293 := z.EncBinary() - _ = yym2293 if false { } else { - z.F.EncMapBoolBoolV(x.FMapBoolBool, e) + z.F.EncMapBoolFloat64V(x.FMapBoolFloat64, e) } } } var yyn2294 bool - if x.FptrMapBoolBool == nil { + if x.FptrMapBoolFloat64 == nil { yyn2294 = true goto LABEL2294 } @@ -20293,34 +17992,93 @@ func (x *TestMammoth2) CodecEncodeSelf(e *Encoder) { r.EncodeNil() } else { r.WriteArrayElem() - if x.FptrMapBoolBool == nil { + if x.FptrMapBoolFloat64 == nil { r.EncodeNil() } else { - yy2295 := *x.FptrMapBoolBool - yym2296 := z.EncBinary() - _ = yym2296 + yy2295 := *x.FptrMapBoolFloat64 if false { } else { - z.F.EncMapBoolBoolV(yy2295, e) + z.F.EncMapBoolFloat64V(yy2295, e) } } } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("FptrMapBoolBool")) + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolFloat64`) r.WriteMapElemValue() if yyn2294 { r.EncodeNil() + } else { + if x.FptrMapBoolFloat64 == nil { + r.EncodeNil() + } else { + yy2297 := *x.FptrMapBoolFloat64 + if false { + } else { + z.F.EncMapBoolFloat64V(yy2297, e) + } + } + } + } + if yyr2 || yy2arr2 { + r.WriteArrayElem() + if x.FMapBoolBool == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncMapBoolBoolV(x.FMapBoolBool, e) + } + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferCcUTF819781, `FMapBoolBool`) + r.WriteMapElemValue() + if x.FMapBoolBool == nil { + r.EncodeNil() + } else { + if false { + } else { + z.F.EncMapBoolBoolV(x.FMapBoolBool, e) + } + } + } + var yyn2302 bool + if x.FptrMapBoolBool == nil { + yyn2302 = true + goto LABEL2302 + } + LABEL2302: + if yyr2 || yy2arr2 { + if yyn2302 { + r.WriteArrayElem() + r.EncodeNil() + } else { + r.WriteArrayElem() + if x.FptrMapBoolBool == nil { + r.EncodeNil() + } else { + yy2303 := *x.FptrMapBoolBool + if false { + } else { + z.F.EncMapBoolBoolV(yy2303, e) + } + } + } + } else { + r.WriteMapElemKey() + r.EncodeString(codecSelferCcUTF819781, `FptrMapBoolBool`) + r.WriteMapElemValue() + if yyn2302 { + r.EncodeNil() } else { if x.FptrMapBoolBool == nil { r.EncodeNil() } else { - yy2297 := *x.FptrMapBoolBool - yym2298 := z.EncBinary() - _ = yym2298 + yy2305 := *x.FptrMapBoolBool if false { } else { - z.F.EncMapBoolBoolV(yy2297, e) + z.F.EncMapBoolBoolV(yy2305, e) } } } @@ -20338,10 +18096,9 @@ func (x *TestMammoth2) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) } else { yyct2 := r.ContainerType() if yyct2 == codecSelferValueTypeMap19781 { @@ -20359,7 +18116,7 @@ func (x *TestMammoth2) CodecDecodeSelf(d *Decoder) { x.codecDecodeSelfFromArray(yyl2, d) } } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr19781) + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19781) } } } @@ -20368,8 +18125,6 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc var yyhl3 bool = l >= 0 for yyj3 := 0; ; yyj3++ { if yyhl3 { @@ -20382,36 +18137,28 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { } } r.ReadMapElemKey() - yys3Slc = r.DecodeStringAsBytes() - yys3 := string(yys3Slc) + yys3 := z.StringView(r.DecodeStringAsBytes()) r.ReadMapElemValue() switch yys3 { case "FIntf": if r.TryDecodeAsNil() { x.FIntf = nil } else { - yyv4 := &x.FIntf - yym5 := z.DecBinary() - _ = yym5 if false { } else { - z.DecFallback(yyv4, true) + z.DecFallback(&x.FIntf, true) } } case "FptrIntf": - if x.FptrIntf == nil { - x.FptrIntf = new(interface{}) - } if r.TryDecodeAsNil() { - if x.FptrIntf != nil { + if true && x.FptrIntf != nil { x.FptrIntf = nil } } else { if x.FptrIntf == nil { x.FptrIntf = new(interface{}) } - yym7 := z.DecBinary() - _ = yym7 + if false { } else { z.DecFallback(x.FptrIntf, true) @@ -20421,493 +18168,336 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FString = "" } else { - yyv8 := &x.FString - yym9 := z.DecBinary() - _ = yym9 - if false { - } else { - *((*string)(yyv8)) = r.DecodeString() - } + x.FString = (string)(r.DecodeString()) } case "FptrString": - if x.FptrString == nil { - x.FptrString = new(string) - } if r.TryDecodeAsNil() { - if x.FptrString != nil { + if true && x.FptrString != nil { x.FptrString = nil } } else { if x.FptrString == nil { x.FptrString = new(string) } - yym11 := z.DecBinary() - _ = yym11 + if false { } else { - *((*string)(x.FptrString)) = r.DecodeString() + *x.FptrString = (string)(r.DecodeString()) } } case "FFloat32": if r.TryDecodeAsNil() { x.FFloat32 = 0 } else { - yyv12 := &x.FFloat32 - yym13 := z.DecBinary() - _ = yym13 - if false { - } else { - *((*float32)(yyv12)) = float32(r.DecodeFloat(true)) - } + x.FFloat32 = (float32)(r.DecodeFloat32As64()) } case "FptrFloat32": - if x.FptrFloat32 == nil { - x.FptrFloat32 = new(float32) - } if r.TryDecodeAsNil() { - if x.FptrFloat32 != nil { + if true && x.FptrFloat32 != nil { x.FptrFloat32 = nil } } else { if x.FptrFloat32 == nil { x.FptrFloat32 = new(float32) } - yym15 := z.DecBinary() - _ = yym15 + if false { } else { - *((*float32)(x.FptrFloat32)) = float32(r.DecodeFloat(true)) + *x.FptrFloat32 = (float32)(r.DecodeFloat32As64()) } } case "FFloat64": if r.TryDecodeAsNil() { x.FFloat64 = 0 } else { - yyv16 := &x.FFloat64 - yym17 := z.DecBinary() - _ = yym17 - if false { - } else { - *((*float64)(yyv16)) = float64(r.DecodeFloat(false)) - } + x.FFloat64 = (float64)(r.DecodeFloat64()) } case "FptrFloat64": - if x.FptrFloat64 == nil { - x.FptrFloat64 = new(float64) - } if r.TryDecodeAsNil() { - if x.FptrFloat64 != nil { + if true && x.FptrFloat64 != nil { x.FptrFloat64 = nil } } else { if x.FptrFloat64 == nil { x.FptrFloat64 = new(float64) } - yym19 := z.DecBinary() - _ = yym19 + if false { } else { - *((*float64)(x.FptrFloat64)) = float64(r.DecodeFloat(false)) + *x.FptrFloat64 = (float64)(r.DecodeFloat64()) } } case "FUint": if r.TryDecodeAsNil() { x.FUint = 0 } else { - yyv20 := &x.FUint - yym21 := z.DecBinary() - _ = yym21 - if false { - } else { - *((*uint)(yyv20)) = uint(r.DecodeUint(codecSelferBitsize19781)) - } + x.FUint = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } case "FptrUint": - if x.FptrUint == nil { - x.FptrUint = new(uint) - } if r.TryDecodeAsNil() { - if x.FptrUint != nil { + if true && x.FptrUint != nil { x.FptrUint = nil } } else { if x.FptrUint == nil { x.FptrUint = new(uint) } - yym23 := z.DecBinary() - _ = yym23 + if false { } else { - *((*uint)(x.FptrUint)) = uint(r.DecodeUint(codecSelferBitsize19781)) + *x.FptrUint = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } } case "FUint8": if r.TryDecodeAsNil() { x.FUint8 = 0 } else { - yyv24 := &x.FUint8 - yym25 := z.DecBinary() - _ = yym25 - if false { - } else { - *((*uint8)(yyv24)) = uint8(r.DecodeUint(8)) - } + x.FUint8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) } case "FptrUint8": - if x.FptrUint8 == nil { - x.FptrUint8 = new(uint8) - } if r.TryDecodeAsNil() { - if x.FptrUint8 != nil { + if true && x.FptrUint8 != nil { x.FptrUint8 = nil } } else { if x.FptrUint8 == nil { x.FptrUint8 = new(uint8) } - yym27 := z.DecBinary() - _ = yym27 + if false { } else { - *((*uint8)(x.FptrUint8)) = uint8(r.DecodeUint(8)) + *x.FptrUint8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) } } case "FUint16": if r.TryDecodeAsNil() { x.FUint16 = 0 } else { - yyv28 := &x.FUint16 - yym29 := z.DecBinary() - _ = yym29 - if false { - } else { - *((*uint16)(yyv28)) = uint16(r.DecodeUint(16)) - } + x.FUint16 = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) } case "FptrUint16": - if x.FptrUint16 == nil { - x.FptrUint16 = new(uint16) - } if r.TryDecodeAsNil() { - if x.FptrUint16 != nil { + if true && x.FptrUint16 != nil { x.FptrUint16 = nil } } else { if x.FptrUint16 == nil { x.FptrUint16 = new(uint16) } - yym31 := z.DecBinary() - _ = yym31 + if false { } else { - *((*uint16)(x.FptrUint16)) = uint16(r.DecodeUint(16)) + *x.FptrUint16 = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) } } case "FUint32": if r.TryDecodeAsNil() { x.FUint32 = 0 } else { - yyv32 := &x.FUint32 - yym33 := z.DecBinary() - _ = yym33 - if false { - } else { - *((*uint32)(yyv32)) = uint32(r.DecodeUint(32)) - } + x.FUint32 = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) } case "FptrUint32": - if x.FptrUint32 == nil { - x.FptrUint32 = new(uint32) - } if r.TryDecodeAsNil() { - if x.FptrUint32 != nil { + if true && x.FptrUint32 != nil { x.FptrUint32 = nil } } else { if x.FptrUint32 == nil { x.FptrUint32 = new(uint32) } - yym35 := z.DecBinary() - _ = yym35 + if false { } else { - *((*uint32)(x.FptrUint32)) = uint32(r.DecodeUint(32)) + *x.FptrUint32 = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) } } case "FUint64": if r.TryDecodeAsNil() { x.FUint64 = 0 } else { - yyv36 := &x.FUint64 - yym37 := z.DecBinary() - _ = yym37 - if false { - } else { - *((*uint64)(yyv36)) = uint64(r.DecodeUint(64)) - } + x.FUint64 = (uint64)(r.DecodeUint64()) } case "FptrUint64": - if x.FptrUint64 == nil { - x.FptrUint64 = new(uint64) - } if r.TryDecodeAsNil() { - if x.FptrUint64 != nil { + if true && x.FptrUint64 != nil { x.FptrUint64 = nil } } else { if x.FptrUint64 == nil { x.FptrUint64 = new(uint64) } - yym39 := z.DecBinary() - _ = yym39 + if false { } else { - *((*uint64)(x.FptrUint64)) = uint64(r.DecodeUint(64)) + *x.FptrUint64 = (uint64)(r.DecodeUint64()) } } case "FUintptr": if r.TryDecodeAsNil() { x.FUintptr = 0 } else { - yyv40 := &x.FUintptr - yym41 := z.DecBinary() - _ = yym41 - if false { - } else { - *((*uintptr)(yyv40)) = uintptr(r.DecodeUint(codecSelferBitsize19781)) - } + x.FUintptr = (uintptr)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } case "FptrUintptr": - if x.FptrUintptr == nil { - x.FptrUintptr = new(uintptr) - } if r.TryDecodeAsNil() { - if x.FptrUintptr != nil { + if true && x.FptrUintptr != nil { x.FptrUintptr = nil } } else { if x.FptrUintptr == nil { x.FptrUintptr = new(uintptr) } - yym43 := z.DecBinary() - _ = yym43 + if false { } else { - *((*uintptr)(x.FptrUintptr)) = uintptr(r.DecodeUint(codecSelferBitsize19781)) + *x.FptrUintptr = (uintptr)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } } case "FInt": if r.TryDecodeAsNil() { x.FInt = 0 } else { - yyv44 := &x.FInt - yym45 := z.DecBinary() - _ = yym45 - if false { - } else { - *((*int)(yyv44)) = int(r.DecodeInt(codecSelferBitsize19781)) - } + x.FInt = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19781)) } case "FptrInt": - if x.FptrInt == nil { - x.FptrInt = new(int) - } if r.TryDecodeAsNil() { - if x.FptrInt != nil { + if true && x.FptrInt != nil { x.FptrInt = nil } } else { if x.FptrInt == nil { x.FptrInt = new(int) } - yym47 := z.DecBinary() - _ = yym47 + if false { } else { - *((*int)(x.FptrInt)) = int(r.DecodeInt(codecSelferBitsize19781)) + *x.FptrInt = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19781)) } } case "FInt8": if r.TryDecodeAsNil() { x.FInt8 = 0 } else { - yyv48 := &x.FInt8 - yym49 := z.DecBinary() - _ = yym49 - if false { - } else { - *((*int8)(yyv48)) = int8(r.DecodeInt(8)) - } + x.FInt8 = (int8)(z.C.IntV(r.DecodeInt64(), 8)) } case "FptrInt8": - if x.FptrInt8 == nil { - x.FptrInt8 = new(int8) - } if r.TryDecodeAsNil() { - if x.FptrInt8 != nil { + if true && x.FptrInt8 != nil { x.FptrInt8 = nil } } else { if x.FptrInt8 == nil { x.FptrInt8 = new(int8) } - yym51 := z.DecBinary() - _ = yym51 + if false { } else { - *((*int8)(x.FptrInt8)) = int8(r.DecodeInt(8)) + *x.FptrInt8 = (int8)(z.C.IntV(r.DecodeInt64(), 8)) } } case "FInt16": if r.TryDecodeAsNil() { x.FInt16 = 0 } else { - yyv52 := &x.FInt16 - yym53 := z.DecBinary() - _ = yym53 - if false { - } else { - *((*int16)(yyv52)) = int16(r.DecodeInt(16)) - } + x.FInt16 = (int16)(z.C.IntV(r.DecodeInt64(), 16)) } case "FptrInt16": - if x.FptrInt16 == nil { - x.FptrInt16 = new(int16) - } if r.TryDecodeAsNil() { - if x.FptrInt16 != nil { + if true && x.FptrInt16 != nil { x.FptrInt16 = nil } } else { if x.FptrInt16 == nil { x.FptrInt16 = new(int16) } - yym55 := z.DecBinary() - _ = yym55 + if false { } else { - *((*int16)(x.FptrInt16)) = int16(r.DecodeInt(16)) + *x.FptrInt16 = (int16)(z.C.IntV(r.DecodeInt64(), 16)) } } case "FInt32": if r.TryDecodeAsNil() { x.FInt32 = 0 } else { - yyv56 := &x.FInt32 - yym57 := z.DecBinary() - _ = yym57 - if false { - } else { - *((*int32)(yyv56)) = int32(r.DecodeInt(32)) - } + x.FInt32 = (int32)(z.C.IntV(r.DecodeInt64(), 32)) } case "FptrInt32": - if x.FptrInt32 == nil { - x.FptrInt32 = new(int32) - } if r.TryDecodeAsNil() { - if x.FptrInt32 != nil { + if true && x.FptrInt32 != nil { x.FptrInt32 = nil } } else { if x.FptrInt32 == nil { x.FptrInt32 = new(int32) } - yym59 := z.DecBinary() - _ = yym59 + if false { } else { - *((*int32)(x.FptrInt32)) = int32(r.DecodeInt(32)) + *x.FptrInt32 = (int32)(z.C.IntV(r.DecodeInt64(), 32)) } } case "FInt64": if r.TryDecodeAsNil() { x.FInt64 = 0 } else { - yyv60 := &x.FInt64 - yym61 := z.DecBinary() - _ = yym61 - if false { - } else { - *((*int64)(yyv60)) = int64(r.DecodeInt(64)) - } + x.FInt64 = (int64)(r.DecodeInt64()) } case "FptrInt64": - if x.FptrInt64 == nil { - x.FptrInt64 = new(int64) - } if r.TryDecodeAsNil() { - if x.FptrInt64 != nil { + if true && x.FptrInt64 != nil { x.FptrInt64 = nil } } else { if x.FptrInt64 == nil { x.FptrInt64 = new(int64) } - yym63 := z.DecBinary() - _ = yym63 + if false { } else { - *((*int64)(x.FptrInt64)) = int64(r.DecodeInt(64)) + *x.FptrInt64 = (int64)(r.DecodeInt64()) } } case "FBool": if r.TryDecodeAsNil() { x.FBool = false } else { - yyv64 := &x.FBool - yym65 := z.DecBinary() - _ = yym65 - if false { - } else { - *((*bool)(yyv64)) = r.DecodeBool() - } + x.FBool = (bool)(r.DecodeBool()) } case "FptrBool": - if x.FptrBool == nil { - x.FptrBool = new(bool) - } if r.TryDecodeAsNil() { - if x.FptrBool != nil { + if true && x.FptrBool != nil { x.FptrBool = nil } } else { if x.FptrBool == nil { x.FptrBool = new(bool) } - yym67 := z.DecBinary() - _ = yym67 + if false { } else { - *((*bool)(x.FptrBool)) = r.DecodeBool() + *x.FptrBool = (bool)(r.DecodeBool()) } } case "FSliceIntf": if r.TryDecodeAsNil() { x.FSliceIntf = nil } else { - yyv68 := &x.FSliceIntf - yym69 := z.DecBinary() - _ = yym69 if false { } else { - z.F.DecSliceIntfX(yyv68, d) + z.F.DecSliceIntfX(&x.FSliceIntf, d) } } case "FptrSliceIntf": - if x.FptrSliceIntf == nil { - x.FptrSliceIntf = new([]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrSliceIntf != nil { + if true && x.FptrSliceIntf != nil { x.FptrSliceIntf = nil } } else { if x.FptrSliceIntf == nil { x.FptrSliceIntf = new([]interface{}) } - yym71 := z.DecBinary() - _ = yym71 + if false { } else { z.F.DecSliceIntfX(x.FptrSliceIntf, d) @@ -20917,28 +18507,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceString = nil } else { - yyv72 := &x.FSliceString - yym73 := z.DecBinary() - _ = yym73 if false { } else { - z.F.DecSliceStringX(yyv72, d) + z.F.DecSliceStringX(&x.FSliceString, d) } } case "FptrSliceString": - if x.FptrSliceString == nil { - x.FptrSliceString = new([]string) - } if r.TryDecodeAsNil() { - if x.FptrSliceString != nil { + if true && x.FptrSliceString != nil { x.FptrSliceString = nil } } else { if x.FptrSliceString == nil { x.FptrSliceString = new([]string) } - yym75 := z.DecBinary() - _ = yym75 + if false { } else { z.F.DecSliceStringX(x.FptrSliceString, d) @@ -20948,28 +18531,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceFloat32 = nil } else { - yyv76 := &x.FSliceFloat32 - yym77 := z.DecBinary() - _ = yym77 if false { } else { - z.F.DecSliceFloat32X(yyv76, d) + z.F.DecSliceFloat32X(&x.FSliceFloat32, d) } } case "FptrSliceFloat32": - if x.FptrSliceFloat32 == nil { - x.FptrSliceFloat32 = new([]float32) - } if r.TryDecodeAsNil() { - if x.FptrSliceFloat32 != nil { + if true && x.FptrSliceFloat32 != nil { x.FptrSliceFloat32 = nil } } else { if x.FptrSliceFloat32 == nil { x.FptrSliceFloat32 = new([]float32) } - yym79 := z.DecBinary() - _ = yym79 + if false { } else { z.F.DecSliceFloat32X(x.FptrSliceFloat32, d) @@ -20979,28 +18555,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceFloat64 = nil } else { - yyv80 := &x.FSliceFloat64 - yym81 := z.DecBinary() - _ = yym81 if false { } else { - z.F.DecSliceFloat64X(yyv80, d) + z.F.DecSliceFloat64X(&x.FSliceFloat64, d) } } case "FptrSliceFloat64": - if x.FptrSliceFloat64 == nil { - x.FptrSliceFloat64 = new([]float64) - } if r.TryDecodeAsNil() { - if x.FptrSliceFloat64 != nil { + if true && x.FptrSliceFloat64 != nil { x.FptrSliceFloat64 = nil } } else { if x.FptrSliceFloat64 == nil { x.FptrSliceFloat64 = new([]float64) } - yym83 := z.DecBinary() - _ = yym83 + if false { } else { z.F.DecSliceFloat64X(x.FptrSliceFloat64, d) @@ -21010,59 +18579,69 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint = nil } else { - yyv84 := &x.FSliceUint - yym85 := z.DecBinary() - _ = yym85 if false { } else { - z.F.DecSliceUintX(yyv84, d) + z.F.DecSliceUintX(&x.FSliceUint, d) } } case "FptrSliceUint": - if x.FptrSliceUint == nil { - x.FptrSliceUint = new([]uint) - } if r.TryDecodeAsNil() { - if x.FptrSliceUint != nil { + if true && x.FptrSliceUint != nil { x.FptrSliceUint = nil } } else { if x.FptrSliceUint == nil { x.FptrSliceUint = new([]uint) } - yym87 := z.DecBinary() - _ = yym87 + if false { } else { z.F.DecSliceUintX(x.FptrSliceUint, d) } } + case "FSliceUint8": + if r.TryDecodeAsNil() { + x.FSliceUint8 = nil + } else { + if false { + } else { + x.FSliceUint8 = r.DecodeBytes(([]byte)(x.FSliceUint8), false) + } + } + case "FptrSliceUint8": + if r.TryDecodeAsNil() { + if true && x.FptrSliceUint8 != nil { + x.FptrSliceUint8 = nil + } + } else { + if x.FptrSliceUint8 == nil { + x.FptrSliceUint8 = new([]uint8) + } + + if false { + } else { + *x.FptrSliceUint8 = r.DecodeBytes(*(*[]byte)(x.FptrSliceUint8), false) + } + } case "FSliceUint16": if r.TryDecodeAsNil() { x.FSliceUint16 = nil } else { - yyv88 := &x.FSliceUint16 - yym89 := z.DecBinary() - _ = yym89 if false { } else { - z.F.DecSliceUint16X(yyv88, d) + z.F.DecSliceUint16X(&x.FSliceUint16, d) } } case "FptrSliceUint16": - if x.FptrSliceUint16 == nil { - x.FptrSliceUint16 = new([]uint16) - } if r.TryDecodeAsNil() { - if x.FptrSliceUint16 != nil { + if true && x.FptrSliceUint16 != nil { x.FptrSliceUint16 = nil } } else { if x.FptrSliceUint16 == nil { x.FptrSliceUint16 = new([]uint16) } - yym91 := z.DecBinary() - _ = yym91 + if false { } else { z.F.DecSliceUint16X(x.FptrSliceUint16, d) @@ -21072,28 +18651,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint32 = nil } else { - yyv92 := &x.FSliceUint32 - yym93 := z.DecBinary() - _ = yym93 if false { } else { - z.F.DecSliceUint32X(yyv92, d) + z.F.DecSliceUint32X(&x.FSliceUint32, d) } } case "FptrSliceUint32": - if x.FptrSliceUint32 == nil { - x.FptrSliceUint32 = new([]uint32) - } if r.TryDecodeAsNil() { - if x.FptrSliceUint32 != nil { + if true && x.FptrSliceUint32 != nil { x.FptrSliceUint32 = nil } } else { if x.FptrSliceUint32 == nil { x.FptrSliceUint32 = new([]uint32) } - yym95 := z.DecBinary() - _ = yym95 + if false { } else { z.F.DecSliceUint32X(x.FptrSliceUint32, d) @@ -21103,28 +18675,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint64 = nil } else { - yyv96 := &x.FSliceUint64 - yym97 := z.DecBinary() - _ = yym97 if false { } else { - z.F.DecSliceUint64X(yyv96, d) + z.F.DecSliceUint64X(&x.FSliceUint64, d) } } case "FptrSliceUint64": - if x.FptrSliceUint64 == nil { - x.FptrSliceUint64 = new([]uint64) - } if r.TryDecodeAsNil() { - if x.FptrSliceUint64 != nil { + if true && x.FptrSliceUint64 != nil { x.FptrSliceUint64 = nil } } else { if x.FptrSliceUint64 == nil { x.FptrSliceUint64 = new([]uint64) } - yym99 := z.DecBinary() - _ = yym99 + if false { } else { z.F.DecSliceUint64X(x.FptrSliceUint64, d) @@ -21134,28 +18699,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUintptr = nil } else { - yyv100 := &x.FSliceUintptr - yym101 := z.DecBinary() - _ = yym101 if false { } else { - z.F.DecSliceUintptrX(yyv100, d) + z.F.DecSliceUintptrX(&x.FSliceUintptr, d) } } case "FptrSliceUintptr": - if x.FptrSliceUintptr == nil { - x.FptrSliceUintptr = new([]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrSliceUintptr != nil { + if true && x.FptrSliceUintptr != nil { x.FptrSliceUintptr = nil } } else { if x.FptrSliceUintptr == nil { x.FptrSliceUintptr = new([]uintptr) } - yym103 := z.DecBinary() - _ = yym103 + if false { } else { z.F.DecSliceUintptrX(x.FptrSliceUintptr, d) @@ -21165,28 +18723,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt = nil } else { - yyv104 := &x.FSliceInt - yym105 := z.DecBinary() - _ = yym105 if false { } else { - z.F.DecSliceIntX(yyv104, d) + z.F.DecSliceIntX(&x.FSliceInt, d) } } case "FptrSliceInt": - if x.FptrSliceInt == nil { - x.FptrSliceInt = new([]int) - } if r.TryDecodeAsNil() { - if x.FptrSliceInt != nil { + if true && x.FptrSliceInt != nil { x.FptrSliceInt = nil } } else { if x.FptrSliceInt == nil { x.FptrSliceInt = new([]int) } - yym107 := z.DecBinary() - _ = yym107 + if false { } else { z.F.DecSliceIntX(x.FptrSliceInt, d) @@ -21196,28 +18747,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt8 = nil } else { - yyv108 := &x.FSliceInt8 - yym109 := z.DecBinary() - _ = yym109 if false { } else { - z.F.DecSliceInt8X(yyv108, d) + z.F.DecSliceInt8X(&x.FSliceInt8, d) } } case "FptrSliceInt8": - if x.FptrSliceInt8 == nil { - x.FptrSliceInt8 = new([]int8) - } if r.TryDecodeAsNil() { - if x.FptrSliceInt8 != nil { + if true && x.FptrSliceInt8 != nil { x.FptrSliceInt8 = nil } } else { if x.FptrSliceInt8 == nil { x.FptrSliceInt8 = new([]int8) } - yym111 := z.DecBinary() - _ = yym111 + if false { } else { z.F.DecSliceInt8X(x.FptrSliceInt8, d) @@ -21227,28 +18771,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt16 = nil } else { - yyv112 := &x.FSliceInt16 - yym113 := z.DecBinary() - _ = yym113 if false { } else { - z.F.DecSliceInt16X(yyv112, d) + z.F.DecSliceInt16X(&x.FSliceInt16, d) } } case "FptrSliceInt16": - if x.FptrSliceInt16 == nil { - x.FptrSliceInt16 = new([]int16) - } if r.TryDecodeAsNil() { - if x.FptrSliceInt16 != nil { + if true && x.FptrSliceInt16 != nil { x.FptrSliceInt16 = nil } } else { if x.FptrSliceInt16 == nil { x.FptrSliceInt16 = new([]int16) } - yym115 := z.DecBinary() - _ = yym115 + if false { } else { z.F.DecSliceInt16X(x.FptrSliceInt16, d) @@ -21258,28 +18795,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt32 = nil } else { - yyv116 := &x.FSliceInt32 - yym117 := z.DecBinary() - _ = yym117 if false { } else { - z.F.DecSliceInt32X(yyv116, d) + z.F.DecSliceInt32X(&x.FSliceInt32, d) } } case "FptrSliceInt32": - if x.FptrSliceInt32 == nil { - x.FptrSliceInt32 = new([]int32) - } if r.TryDecodeAsNil() { - if x.FptrSliceInt32 != nil { + if true && x.FptrSliceInt32 != nil { x.FptrSliceInt32 = nil } } else { if x.FptrSliceInt32 == nil { x.FptrSliceInt32 = new([]int32) } - yym119 := z.DecBinary() - _ = yym119 + if false { } else { z.F.DecSliceInt32X(x.FptrSliceInt32, d) @@ -21289,28 +18819,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt64 = nil } else { - yyv120 := &x.FSliceInt64 - yym121 := z.DecBinary() - _ = yym121 if false { } else { - z.F.DecSliceInt64X(yyv120, d) + z.F.DecSliceInt64X(&x.FSliceInt64, d) } } case "FptrSliceInt64": - if x.FptrSliceInt64 == nil { - x.FptrSliceInt64 = new([]int64) - } if r.TryDecodeAsNil() { - if x.FptrSliceInt64 != nil { + if true && x.FptrSliceInt64 != nil { x.FptrSliceInt64 = nil } } else { if x.FptrSliceInt64 == nil { x.FptrSliceInt64 = new([]int64) } - yym123 := z.DecBinary() - _ = yym123 + if false { } else { z.F.DecSliceInt64X(x.FptrSliceInt64, d) @@ -21320,28 +18843,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceBool = nil } else { - yyv124 := &x.FSliceBool - yym125 := z.DecBinary() - _ = yym125 if false { } else { - z.F.DecSliceBoolX(yyv124, d) + z.F.DecSliceBoolX(&x.FSliceBool, d) } } case "FptrSliceBool": - if x.FptrSliceBool == nil { - x.FptrSliceBool = new([]bool) - } if r.TryDecodeAsNil() { - if x.FptrSliceBool != nil { + if true && x.FptrSliceBool != nil { x.FptrSliceBool = nil } } else { if x.FptrSliceBool == nil { x.FptrSliceBool = new([]bool) } - yym127 := z.DecBinary() - _ = yym127 + if false { } else { z.F.DecSliceBoolX(x.FptrSliceBool, d) @@ -21351,28 +18867,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfIntf = nil } else { - yyv128 := &x.FMapIntfIntf - yym129 := z.DecBinary() - _ = yym129 if false { } else { - z.F.DecMapIntfIntfX(yyv128, d) + z.F.DecMapIntfIntfX(&x.FMapIntfIntf, d) } } case "FptrMapIntfIntf": - if x.FptrMapIntfIntf == nil { - x.FptrMapIntfIntf = new(map[interface{}]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfIntf != nil { + if true && x.FptrMapIntfIntf != nil { x.FptrMapIntfIntf = nil } } else { if x.FptrMapIntfIntf == nil { x.FptrMapIntfIntf = new(map[interface{}]interface{}) } - yym131 := z.DecBinary() - _ = yym131 + if false { } else { z.F.DecMapIntfIntfX(x.FptrMapIntfIntf, d) @@ -21382,28 +18891,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfString = nil } else { - yyv132 := &x.FMapIntfString - yym133 := z.DecBinary() - _ = yym133 if false { } else { - z.F.DecMapIntfStringX(yyv132, d) + z.F.DecMapIntfStringX(&x.FMapIntfString, d) } } case "FptrMapIntfString": - if x.FptrMapIntfString == nil { - x.FptrMapIntfString = new(map[interface{}]string) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfString != nil { + if true && x.FptrMapIntfString != nil { x.FptrMapIntfString = nil } } else { if x.FptrMapIntfString == nil { x.FptrMapIntfString = new(map[interface{}]string) } - yym135 := z.DecBinary() - _ = yym135 + if false { } else { z.F.DecMapIntfStringX(x.FptrMapIntfString, d) @@ -21413,28 +18915,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint = nil } else { - yyv136 := &x.FMapIntfUint - yym137 := z.DecBinary() - _ = yym137 if false { } else { - z.F.DecMapIntfUintX(yyv136, d) + z.F.DecMapIntfUintX(&x.FMapIntfUint, d) } } case "FptrMapIntfUint": - if x.FptrMapIntfUint == nil { - x.FptrMapIntfUint = new(map[interface{}]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUint != nil { + if true && x.FptrMapIntfUint != nil { x.FptrMapIntfUint = nil } } else { if x.FptrMapIntfUint == nil { x.FptrMapIntfUint = new(map[interface{}]uint) } - yym139 := z.DecBinary() - _ = yym139 + if false { } else { z.F.DecMapIntfUintX(x.FptrMapIntfUint, d) @@ -21444,28 +18939,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint8 = nil } else { - yyv140 := &x.FMapIntfUint8 - yym141 := z.DecBinary() - _ = yym141 if false { } else { - z.F.DecMapIntfUint8X(yyv140, d) + z.F.DecMapIntfUint8X(&x.FMapIntfUint8, d) } } case "FptrMapIntfUint8": - if x.FptrMapIntfUint8 == nil { - x.FptrMapIntfUint8 = new(map[interface{}]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUint8 != nil { + if true && x.FptrMapIntfUint8 != nil { x.FptrMapIntfUint8 = nil } } else { if x.FptrMapIntfUint8 == nil { x.FptrMapIntfUint8 = new(map[interface{}]uint8) } - yym143 := z.DecBinary() - _ = yym143 + if false { } else { z.F.DecMapIntfUint8X(x.FptrMapIntfUint8, d) @@ -21475,28 +18963,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint16 = nil } else { - yyv144 := &x.FMapIntfUint16 - yym145 := z.DecBinary() - _ = yym145 if false { } else { - z.F.DecMapIntfUint16X(yyv144, d) + z.F.DecMapIntfUint16X(&x.FMapIntfUint16, d) } } case "FptrMapIntfUint16": - if x.FptrMapIntfUint16 == nil { - x.FptrMapIntfUint16 = new(map[interface{}]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUint16 != nil { + if true && x.FptrMapIntfUint16 != nil { x.FptrMapIntfUint16 = nil } } else { if x.FptrMapIntfUint16 == nil { x.FptrMapIntfUint16 = new(map[interface{}]uint16) } - yym147 := z.DecBinary() - _ = yym147 + if false { } else { z.F.DecMapIntfUint16X(x.FptrMapIntfUint16, d) @@ -21506,28 +18987,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint32 = nil } else { - yyv148 := &x.FMapIntfUint32 - yym149 := z.DecBinary() - _ = yym149 if false { } else { - z.F.DecMapIntfUint32X(yyv148, d) + z.F.DecMapIntfUint32X(&x.FMapIntfUint32, d) } } case "FptrMapIntfUint32": - if x.FptrMapIntfUint32 == nil { - x.FptrMapIntfUint32 = new(map[interface{}]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUint32 != nil { + if true && x.FptrMapIntfUint32 != nil { x.FptrMapIntfUint32 = nil } } else { if x.FptrMapIntfUint32 == nil { x.FptrMapIntfUint32 = new(map[interface{}]uint32) } - yym151 := z.DecBinary() - _ = yym151 + if false { } else { z.F.DecMapIntfUint32X(x.FptrMapIntfUint32, d) @@ -21537,28 +19011,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint64 = nil } else { - yyv152 := &x.FMapIntfUint64 - yym153 := z.DecBinary() - _ = yym153 if false { } else { - z.F.DecMapIntfUint64X(yyv152, d) + z.F.DecMapIntfUint64X(&x.FMapIntfUint64, d) } } case "FptrMapIntfUint64": - if x.FptrMapIntfUint64 == nil { - x.FptrMapIntfUint64 = new(map[interface{}]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUint64 != nil { + if true && x.FptrMapIntfUint64 != nil { x.FptrMapIntfUint64 = nil } } else { if x.FptrMapIntfUint64 == nil { x.FptrMapIntfUint64 = new(map[interface{}]uint64) } - yym155 := z.DecBinary() - _ = yym155 + if false { } else { z.F.DecMapIntfUint64X(x.FptrMapIntfUint64, d) @@ -21568,28 +19035,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUintptr = nil } else { - yyv156 := &x.FMapIntfUintptr - yym157 := z.DecBinary() - _ = yym157 if false { } else { - z.F.DecMapIntfUintptrX(yyv156, d) + z.F.DecMapIntfUintptrX(&x.FMapIntfUintptr, d) } } case "FptrMapIntfUintptr": - if x.FptrMapIntfUintptr == nil { - x.FptrMapIntfUintptr = new(map[interface{}]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfUintptr != nil { + if true && x.FptrMapIntfUintptr != nil { x.FptrMapIntfUintptr = nil } } else { if x.FptrMapIntfUintptr == nil { x.FptrMapIntfUintptr = new(map[interface{}]uintptr) } - yym159 := z.DecBinary() - _ = yym159 + if false { } else { z.F.DecMapIntfUintptrX(x.FptrMapIntfUintptr, d) @@ -21599,28 +19059,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt = nil } else { - yyv160 := &x.FMapIntfInt - yym161 := z.DecBinary() - _ = yym161 if false { } else { - z.F.DecMapIntfIntX(yyv160, d) + z.F.DecMapIntfIntX(&x.FMapIntfInt, d) } } case "FptrMapIntfInt": - if x.FptrMapIntfInt == nil { - x.FptrMapIntfInt = new(map[interface{}]int) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfInt != nil { + if true && x.FptrMapIntfInt != nil { x.FptrMapIntfInt = nil } } else { if x.FptrMapIntfInt == nil { x.FptrMapIntfInt = new(map[interface{}]int) } - yym163 := z.DecBinary() - _ = yym163 + if false { } else { z.F.DecMapIntfIntX(x.FptrMapIntfInt, d) @@ -21630,28 +19083,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt8 = nil } else { - yyv164 := &x.FMapIntfInt8 - yym165 := z.DecBinary() - _ = yym165 if false { } else { - z.F.DecMapIntfInt8X(yyv164, d) + z.F.DecMapIntfInt8X(&x.FMapIntfInt8, d) } } case "FptrMapIntfInt8": - if x.FptrMapIntfInt8 == nil { - x.FptrMapIntfInt8 = new(map[interface{}]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfInt8 != nil { + if true && x.FptrMapIntfInt8 != nil { x.FptrMapIntfInt8 = nil } } else { if x.FptrMapIntfInt8 == nil { x.FptrMapIntfInt8 = new(map[interface{}]int8) } - yym167 := z.DecBinary() - _ = yym167 + if false { } else { z.F.DecMapIntfInt8X(x.FptrMapIntfInt8, d) @@ -21661,28 +19107,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt16 = nil } else { - yyv168 := &x.FMapIntfInt16 - yym169 := z.DecBinary() - _ = yym169 if false { } else { - z.F.DecMapIntfInt16X(yyv168, d) + z.F.DecMapIntfInt16X(&x.FMapIntfInt16, d) } } case "FptrMapIntfInt16": - if x.FptrMapIntfInt16 == nil { - x.FptrMapIntfInt16 = new(map[interface{}]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfInt16 != nil { + if true && x.FptrMapIntfInt16 != nil { x.FptrMapIntfInt16 = nil } } else { if x.FptrMapIntfInt16 == nil { x.FptrMapIntfInt16 = new(map[interface{}]int16) } - yym171 := z.DecBinary() - _ = yym171 + if false { } else { z.F.DecMapIntfInt16X(x.FptrMapIntfInt16, d) @@ -21692,28 +19131,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt32 = nil } else { - yyv172 := &x.FMapIntfInt32 - yym173 := z.DecBinary() - _ = yym173 if false { } else { - z.F.DecMapIntfInt32X(yyv172, d) + z.F.DecMapIntfInt32X(&x.FMapIntfInt32, d) } } case "FptrMapIntfInt32": - if x.FptrMapIntfInt32 == nil { - x.FptrMapIntfInt32 = new(map[interface{}]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfInt32 != nil { + if true && x.FptrMapIntfInt32 != nil { x.FptrMapIntfInt32 = nil } } else { if x.FptrMapIntfInt32 == nil { x.FptrMapIntfInt32 = new(map[interface{}]int32) } - yym175 := z.DecBinary() - _ = yym175 + if false { } else { z.F.DecMapIntfInt32X(x.FptrMapIntfInt32, d) @@ -21723,28 +19155,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt64 = nil } else { - yyv176 := &x.FMapIntfInt64 - yym177 := z.DecBinary() - _ = yym177 if false { } else { - z.F.DecMapIntfInt64X(yyv176, d) + z.F.DecMapIntfInt64X(&x.FMapIntfInt64, d) } } case "FptrMapIntfInt64": - if x.FptrMapIntfInt64 == nil { - x.FptrMapIntfInt64 = new(map[interface{}]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfInt64 != nil { + if true && x.FptrMapIntfInt64 != nil { x.FptrMapIntfInt64 = nil } } else { if x.FptrMapIntfInt64 == nil { x.FptrMapIntfInt64 = new(map[interface{}]int64) } - yym179 := z.DecBinary() - _ = yym179 + if false { } else { z.F.DecMapIntfInt64X(x.FptrMapIntfInt64, d) @@ -21754,28 +19179,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfFloat32 = nil } else { - yyv180 := &x.FMapIntfFloat32 - yym181 := z.DecBinary() - _ = yym181 if false { } else { - z.F.DecMapIntfFloat32X(yyv180, d) + z.F.DecMapIntfFloat32X(&x.FMapIntfFloat32, d) } } case "FptrMapIntfFloat32": - if x.FptrMapIntfFloat32 == nil { - x.FptrMapIntfFloat32 = new(map[interface{}]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfFloat32 != nil { + if true && x.FptrMapIntfFloat32 != nil { x.FptrMapIntfFloat32 = nil } } else { if x.FptrMapIntfFloat32 == nil { x.FptrMapIntfFloat32 = new(map[interface{}]float32) } - yym183 := z.DecBinary() - _ = yym183 + if false { } else { z.F.DecMapIntfFloat32X(x.FptrMapIntfFloat32, d) @@ -21785,28 +19203,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfFloat64 = nil } else { - yyv184 := &x.FMapIntfFloat64 - yym185 := z.DecBinary() - _ = yym185 if false { } else { - z.F.DecMapIntfFloat64X(yyv184, d) + z.F.DecMapIntfFloat64X(&x.FMapIntfFloat64, d) } } case "FptrMapIntfFloat64": - if x.FptrMapIntfFloat64 == nil { - x.FptrMapIntfFloat64 = new(map[interface{}]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfFloat64 != nil { + if true && x.FptrMapIntfFloat64 != nil { x.FptrMapIntfFloat64 = nil } } else { if x.FptrMapIntfFloat64 == nil { x.FptrMapIntfFloat64 = new(map[interface{}]float64) } - yym187 := z.DecBinary() - _ = yym187 + if false { } else { z.F.DecMapIntfFloat64X(x.FptrMapIntfFloat64, d) @@ -21816,28 +19227,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfBool = nil } else { - yyv188 := &x.FMapIntfBool - yym189 := z.DecBinary() - _ = yym189 if false { } else { - z.F.DecMapIntfBoolX(yyv188, d) + z.F.DecMapIntfBoolX(&x.FMapIntfBool, d) } } case "FptrMapIntfBool": - if x.FptrMapIntfBool == nil { - x.FptrMapIntfBool = new(map[interface{}]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapIntfBool != nil { + if true && x.FptrMapIntfBool != nil { x.FptrMapIntfBool = nil } } else { if x.FptrMapIntfBool == nil { x.FptrMapIntfBool = new(map[interface{}]bool) } - yym191 := z.DecBinary() - _ = yym191 + if false { } else { z.F.DecMapIntfBoolX(x.FptrMapIntfBool, d) @@ -21847,28 +19251,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringIntf = nil } else { - yyv192 := &x.FMapStringIntf - yym193 := z.DecBinary() - _ = yym193 if false { } else { - z.F.DecMapStringIntfX(yyv192, d) + z.F.DecMapStringIntfX(&x.FMapStringIntf, d) } } case "FptrMapStringIntf": - if x.FptrMapStringIntf == nil { - x.FptrMapStringIntf = new(map[string]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapStringIntf != nil { + if true && x.FptrMapStringIntf != nil { x.FptrMapStringIntf = nil } } else { if x.FptrMapStringIntf == nil { x.FptrMapStringIntf = new(map[string]interface{}) } - yym195 := z.DecBinary() - _ = yym195 + if false { } else { z.F.DecMapStringIntfX(x.FptrMapStringIntf, d) @@ -21878,28 +19275,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringString = nil } else { - yyv196 := &x.FMapStringString - yym197 := z.DecBinary() - _ = yym197 if false { } else { - z.F.DecMapStringStringX(yyv196, d) + z.F.DecMapStringStringX(&x.FMapStringString, d) } } case "FptrMapStringString": - if x.FptrMapStringString == nil { - x.FptrMapStringString = new(map[string]string) - } if r.TryDecodeAsNil() { - if x.FptrMapStringString != nil { + if true && x.FptrMapStringString != nil { x.FptrMapStringString = nil } } else { if x.FptrMapStringString == nil { x.FptrMapStringString = new(map[string]string) } - yym199 := z.DecBinary() - _ = yym199 + if false { } else { z.F.DecMapStringStringX(x.FptrMapStringString, d) @@ -21909,28 +19299,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint = nil } else { - yyv200 := &x.FMapStringUint - yym201 := z.DecBinary() - _ = yym201 if false { } else { - z.F.DecMapStringUintX(yyv200, d) + z.F.DecMapStringUintX(&x.FMapStringUint, d) } } case "FptrMapStringUint": - if x.FptrMapStringUint == nil { - x.FptrMapStringUint = new(map[string]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUint != nil { + if true && x.FptrMapStringUint != nil { x.FptrMapStringUint = nil } } else { if x.FptrMapStringUint == nil { x.FptrMapStringUint = new(map[string]uint) } - yym203 := z.DecBinary() - _ = yym203 + if false { } else { z.F.DecMapStringUintX(x.FptrMapStringUint, d) @@ -21940,28 +19323,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint8 = nil } else { - yyv204 := &x.FMapStringUint8 - yym205 := z.DecBinary() - _ = yym205 if false { } else { - z.F.DecMapStringUint8X(yyv204, d) + z.F.DecMapStringUint8X(&x.FMapStringUint8, d) } } case "FptrMapStringUint8": - if x.FptrMapStringUint8 == nil { - x.FptrMapStringUint8 = new(map[string]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUint8 != nil { + if true && x.FptrMapStringUint8 != nil { x.FptrMapStringUint8 = nil } } else { if x.FptrMapStringUint8 == nil { x.FptrMapStringUint8 = new(map[string]uint8) } - yym207 := z.DecBinary() - _ = yym207 + if false { } else { z.F.DecMapStringUint8X(x.FptrMapStringUint8, d) @@ -21971,28 +19347,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint16 = nil } else { - yyv208 := &x.FMapStringUint16 - yym209 := z.DecBinary() - _ = yym209 if false { } else { - z.F.DecMapStringUint16X(yyv208, d) + z.F.DecMapStringUint16X(&x.FMapStringUint16, d) } } case "FptrMapStringUint16": - if x.FptrMapStringUint16 == nil { - x.FptrMapStringUint16 = new(map[string]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUint16 != nil { + if true && x.FptrMapStringUint16 != nil { x.FptrMapStringUint16 = nil } } else { if x.FptrMapStringUint16 == nil { x.FptrMapStringUint16 = new(map[string]uint16) } - yym211 := z.DecBinary() - _ = yym211 + if false { } else { z.F.DecMapStringUint16X(x.FptrMapStringUint16, d) @@ -22002,28 +19371,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint32 = nil } else { - yyv212 := &x.FMapStringUint32 - yym213 := z.DecBinary() - _ = yym213 if false { } else { - z.F.DecMapStringUint32X(yyv212, d) + z.F.DecMapStringUint32X(&x.FMapStringUint32, d) } } case "FptrMapStringUint32": - if x.FptrMapStringUint32 == nil { - x.FptrMapStringUint32 = new(map[string]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUint32 != nil { + if true && x.FptrMapStringUint32 != nil { x.FptrMapStringUint32 = nil } } else { if x.FptrMapStringUint32 == nil { x.FptrMapStringUint32 = new(map[string]uint32) } - yym215 := z.DecBinary() - _ = yym215 + if false { } else { z.F.DecMapStringUint32X(x.FptrMapStringUint32, d) @@ -22033,28 +19395,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint64 = nil } else { - yyv216 := &x.FMapStringUint64 - yym217 := z.DecBinary() - _ = yym217 if false { } else { - z.F.DecMapStringUint64X(yyv216, d) + z.F.DecMapStringUint64X(&x.FMapStringUint64, d) } } case "FptrMapStringUint64": - if x.FptrMapStringUint64 == nil { - x.FptrMapStringUint64 = new(map[string]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUint64 != nil { + if true && x.FptrMapStringUint64 != nil { x.FptrMapStringUint64 = nil } } else { if x.FptrMapStringUint64 == nil { x.FptrMapStringUint64 = new(map[string]uint64) } - yym219 := z.DecBinary() - _ = yym219 + if false { } else { z.F.DecMapStringUint64X(x.FptrMapStringUint64, d) @@ -22064,28 +19419,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUintptr = nil } else { - yyv220 := &x.FMapStringUintptr - yym221 := z.DecBinary() - _ = yym221 if false { } else { - z.F.DecMapStringUintptrX(yyv220, d) + z.F.DecMapStringUintptrX(&x.FMapStringUintptr, d) } } case "FptrMapStringUintptr": - if x.FptrMapStringUintptr == nil { - x.FptrMapStringUintptr = new(map[string]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapStringUintptr != nil { + if true && x.FptrMapStringUintptr != nil { x.FptrMapStringUintptr = nil } } else { if x.FptrMapStringUintptr == nil { x.FptrMapStringUintptr = new(map[string]uintptr) } - yym223 := z.DecBinary() - _ = yym223 + if false { } else { z.F.DecMapStringUintptrX(x.FptrMapStringUintptr, d) @@ -22095,28 +19443,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt = nil } else { - yyv224 := &x.FMapStringInt - yym225 := z.DecBinary() - _ = yym225 if false { } else { - z.F.DecMapStringIntX(yyv224, d) + z.F.DecMapStringIntX(&x.FMapStringInt, d) } } case "FptrMapStringInt": - if x.FptrMapStringInt == nil { - x.FptrMapStringInt = new(map[string]int) - } if r.TryDecodeAsNil() { - if x.FptrMapStringInt != nil { + if true && x.FptrMapStringInt != nil { x.FptrMapStringInt = nil } } else { if x.FptrMapStringInt == nil { x.FptrMapStringInt = new(map[string]int) } - yym227 := z.DecBinary() - _ = yym227 + if false { } else { z.F.DecMapStringIntX(x.FptrMapStringInt, d) @@ -22126,28 +19467,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt8 = nil } else { - yyv228 := &x.FMapStringInt8 - yym229 := z.DecBinary() - _ = yym229 if false { } else { - z.F.DecMapStringInt8X(yyv228, d) + z.F.DecMapStringInt8X(&x.FMapStringInt8, d) } } case "FptrMapStringInt8": - if x.FptrMapStringInt8 == nil { - x.FptrMapStringInt8 = new(map[string]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapStringInt8 != nil { + if true && x.FptrMapStringInt8 != nil { x.FptrMapStringInt8 = nil } } else { if x.FptrMapStringInt8 == nil { x.FptrMapStringInt8 = new(map[string]int8) } - yym231 := z.DecBinary() - _ = yym231 + if false { } else { z.F.DecMapStringInt8X(x.FptrMapStringInt8, d) @@ -22157,28 +19491,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt16 = nil } else { - yyv232 := &x.FMapStringInt16 - yym233 := z.DecBinary() - _ = yym233 if false { } else { - z.F.DecMapStringInt16X(yyv232, d) + z.F.DecMapStringInt16X(&x.FMapStringInt16, d) } } case "FptrMapStringInt16": - if x.FptrMapStringInt16 == nil { - x.FptrMapStringInt16 = new(map[string]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapStringInt16 != nil { + if true && x.FptrMapStringInt16 != nil { x.FptrMapStringInt16 = nil } } else { if x.FptrMapStringInt16 == nil { x.FptrMapStringInt16 = new(map[string]int16) } - yym235 := z.DecBinary() - _ = yym235 + if false { } else { z.F.DecMapStringInt16X(x.FptrMapStringInt16, d) @@ -22188,28 +19515,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt32 = nil } else { - yyv236 := &x.FMapStringInt32 - yym237 := z.DecBinary() - _ = yym237 if false { } else { - z.F.DecMapStringInt32X(yyv236, d) + z.F.DecMapStringInt32X(&x.FMapStringInt32, d) } } case "FptrMapStringInt32": - if x.FptrMapStringInt32 == nil { - x.FptrMapStringInt32 = new(map[string]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapStringInt32 != nil { + if true && x.FptrMapStringInt32 != nil { x.FptrMapStringInt32 = nil } } else { if x.FptrMapStringInt32 == nil { x.FptrMapStringInt32 = new(map[string]int32) } - yym239 := z.DecBinary() - _ = yym239 + if false { } else { z.F.DecMapStringInt32X(x.FptrMapStringInt32, d) @@ -22219,28 +19539,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt64 = nil } else { - yyv240 := &x.FMapStringInt64 - yym241 := z.DecBinary() - _ = yym241 if false { } else { - z.F.DecMapStringInt64X(yyv240, d) + z.F.DecMapStringInt64X(&x.FMapStringInt64, d) } } case "FptrMapStringInt64": - if x.FptrMapStringInt64 == nil { - x.FptrMapStringInt64 = new(map[string]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapStringInt64 != nil { + if true && x.FptrMapStringInt64 != nil { x.FptrMapStringInt64 = nil } } else { if x.FptrMapStringInt64 == nil { x.FptrMapStringInt64 = new(map[string]int64) } - yym243 := z.DecBinary() - _ = yym243 + if false { } else { z.F.DecMapStringInt64X(x.FptrMapStringInt64, d) @@ -22250,28 +19563,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringFloat32 = nil } else { - yyv244 := &x.FMapStringFloat32 - yym245 := z.DecBinary() - _ = yym245 if false { } else { - z.F.DecMapStringFloat32X(yyv244, d) + z.F.DecMapStringFloat32X(&x.FMapStringFloat32, d) } } case "FptrMapStringFloat32": - if x.FptrMapStringFloat32 == nil { - x.FptrMapStringFloat32 = new(map[string]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapStringFloat32 != nil { + if true && x.FptrMapStringFloat32 != nil { x.FptrMapStringFloat32 = nil } } else { if x.FptrMapStringFloat32 == nil { x.FptrMapStringFloat32 = new(map[string]float32) } - yym247 := z.DecBinary() - _ = yym247 + if false { } else { z.F.DecMapStringFloat32X(x.FptrMapStringFloat32, d) @@ -22281,28 +19587,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringFloat64 = nil } else { - yyv248 := &x.FMapStringFloat64 - yym249 := z.DecBinary() - _ = yym249 if false { } else { - z.F.DecMapStringFloat64X(yyv248, d) + z.F.DecMapStringFloat64X(&x.FMapStringFloat64, d) } } case "FptrMapStringFloat64": - if x.FptrMapStringFloat64 == nil { - x.FptrMapStringFloat64 = new(map[string]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapStringFloat64 != nil { + if true && x.FptrMapStringFloat64 != nil { x.FptrMapStringFloat64 = nil } } else { if x.FptrMapStringFloat64 == nil { x.FptrMapStringFloat64 = new(map[string]float64) } - yym251 := z.DecBinary() - _ = yym251 + if false { } else { z.F.DecMapStringFloat64X(x.FptrMapStringFloat64, d) @@ -22312,28 +19611,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringBool = nil } else { - yyv252 := &x.FMapStringBool - yym253 := z.DecBinary() - _ = yym253 if false { } else { - z.F.DecMapStringBoolX(yyv252, d) + z.F.DecMapStringBoolX(&x.FMapStringBool, d) } } case "FptrMapStringBool": - if x.FptrMapStringBool == nil { - x.FptrMapStringBool = new(map[string]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapStringBool != nil { + if true && x.FptrMapStringBool != nil { x.FptrMapStringBool = nil } } else { if x.FptrMapStringBool == nil { x.FptrMapStringBool = new(map[string]bool) } - yym255 := z.DecBinary() - _ = yym255 + if false { } else { z.F.DecMapStringBoolX(x.FptrMapStringBool, d) @@ -22343,28 +19635,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Intf = nil } else { - yyv256 := &x.FMapFloat32Intf - yym257 := z.DecBinary() - _ = yym257 if false { } else { - z.F.DecMapFloat32IntfX(yyv256, d) + z.F.DecMapFloat32IntfX(&x.FMapFloat32Intf, d) } } case "FptrMapFloat32Intf": - if x.FptrMapFloat32Intf == nil { - x.FptrMapFloat32Intf = new(map[float32]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Intf != nil { + if true && x.FptrMapFloat32Intf != nil { x.FptrMapFloat32Intf = nil } } else { if x.FptrMapFloat32Intf == nil { x.FptrMapFloat32Intf = new(map[float32]interface{}) } - yym259 := z.DecBinary() - _ = yym259 + if false { } else { z.F.DecMapFloat32IntfX(x.FptrMapFloat32Intf, d) @@ -22374,28 +19659,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32String = nil } else { - yyv260 := &x.FMapFloat32String - yym261 := z.DecBinary() - _ = yym261 if false { } else { - z.F.DecMapFloat32StringX(yyv260, d) + z.F.DecMapFloat32StringX(&x.FMapFloat32String, d) } } case "FptrMapFloat32String": - if x.FptrMapFloat32String == nil { - x.FptrMapFloat32String = new(map[float32]string) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32String != nil { + if true && x.FptrMapFloat32String != nil { x.FptrMapFloat32String = nil } } else { if x.FptrMapFloat32String == nil { x.FptrMapFloat32String = new(map[float32]string) } - yym263 := z.DecBinary() - _ = yym263 + if false { } else { z.F.DecMapFloat32StringX(x.FptrMapFloat32String, d) @@ -22405,28 +19683,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint = nil } else { - yyv264 := &x.FMapFloat32Uint - yym265 := z.DecBinary() - _ = yym265 if false { } else { - z.F.DecMapFloat32UintX(yyv264, d) + z.F.DecMapFloat32UintX(&x.FMapFloat32Uint, d) } } case "FptrMapFloat32Uint": - if x.FptrMapFloat32Uint == nil { - x.FptrMapFloat32Uint = new(map[float32]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint != nil { + if true && x.FptrMapFloat32Uint != nil { x.FptrMapFloat32Uint = nil } } else { if x.FptrMapFloat32Uint == nil { x.FptrMapFloat32Uint = new(map[float32]uint) } - yym267 := z.DecBinary() - _ = yym267 + if false { } else { z.F.DecMapFloat32UintX(x.FptrMapFloat32Uint, d) @@ -22436,28 +19707,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint8 = nil } else { - yyv268 := &x.FMapFloat32Uint8 - yym269 := z.DecBinary() - _ = yym269 if false { } else { - z.F.DecMapFloat32Uint8X(yyv268, d) + z.F.DecMapFloat32Uint8X(&x.FMapFloat32Uint8, d) } } case "FptrMapFloat32Uint8": - if x.FptrMapFloat32Uint8 == nil { - x.FptrMapFloat32Uint8 = new(map[float32]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint8 != nil { + if true && x.FptrMapFloat32Uint8 != nil { x.FptrMapFloat32Uint8 = nil } } else { if x.FptrMapFloat32Uint8 == nil { x.FptrMapFloat32Uint8 = new(map[float32]uint8) } - yym271 := z.DecBinary() - _ = yym271 + if false { } else { z.F.DecMapFloat32Uint8X(x.FptrMapFloat32Uint8, d) @@ -22467,28 +19731,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint16 = nil } else { - yyv272 := &x.FMapFloat32Uint16 - yym273 := z.DecBinary() - _ = yym273 if false { } else { - z.F.DecMapFloat32Uint16X(yyv272, d) + z.F.DecMapFloat32Uint16X(&x.FMapFloat32Uint16, d) } } case "FptrMapFloat32Uint16": - if x.FptrMapFloat32Uint16 == nil { - x.FptrMapFloat32Uint16 = new(map[float32]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint16 != nil { + if true && x.FptrMapFloat32Uint16 != nil { x.FptrMapFloat32Uint16 = nil } } else { if x.FptrMapFloat32Uint16 == nil { x.FptrMapFloat32Uint16 = new(map[float32]uint16) } - yym275 := z.DecBinary() - _ = yym275 + if false { } else { z.F.DecMapFloat32Uint16X(x.FptrMapFloat32Uint16, d) @@ -22498,28 +19755,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint32 = nil } else { - yyv276 := &x.FMapFloat32Uint32 - yym277 := z.DecBinary() - _ = yym277 if false { } else { - z.F.DecMapFloat32Uint32X(yyv276, d) + z.F.DecMapFloat32Uint32X(&x.FMapFloat32Uint32, d) } } case "FptrMapFloat32Uint32": - if x.FptrMapFloat32Uint32 == nil { - x.FptrMapFloat32Uint32 = new(map[float32]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint32 != nil { + if true && x.FptrMapFloat32Uint32 != nil { x.FptrMapFloat32Uint32 = nil } } else { if x.FptrMapFloat32Uint32 == nil { x.FptrMapFloat32Uint32 = new(map[float32]uint32) } - yym279 := z.DecBinary() - _ = yym279 + if false { } else { z.F.DecMapFloat32Uint32X(x.FptrMapFloat32Uint32, d) @@ -22529,28 +19779,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint64 = nil } else { - yyv280 := &x.FMapFloat32Uint64 - yym281 := z.DecBinary() - _ = yym281 if false { } else { - z.F.DecMapFloat32Uint64X(yyv280, d) + z.F.DecMapFloat32Uint64X(&x.FMapFloat32Uint64, d) } } case "FptrMapFloat32Uint64": - if x.FptrMapFloat32Uint64 == nil { - x.FptrMapFloat32Uint64 = new(map[float32]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint64 != nil { + if true && x.FptrMapFloat32Uint64 != nil { x.FptrMapFloat32Uint64 = nil } } else { if x.FptrMapFloat32Uint64 == nil { x.FptrMapFloat32Uint64 = new(map[float32]uint64) } - yym283 := z.DecBinary() - _ = yym283 + if false { } else { z.F.DecMapFloat32Uint64X(x.FptrMapFloat32Uint64, d) @@ -22560,28 +19803,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uintptr = nil } else { - yyv284 := &x.FMapFloat32Uintptr - yym285 := z.DecBinary() - _ = yym285 if false { } else { - z.F.DecMapFloat32UintptrX(yyv284, d) + z.F.DecMapFloat32UintptrX(&x.FMapFloat32Uintptr, d) } } case "FptrMapFloat32Uintptr": - if x.FptrMapFloat32Uintptr == nil { - x.FptrMapFloat32Uintptr = new(map[float32]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uintptr != nil { + if true && x.FptrMapFloat32Uintptr != nil { x.FptrMapFloat32Uintptr = nil } } else { if x.FptrMapFloat32Uintptr == nil { x.FptrMapFloat32Uintptr = new(map[float32]uintptr) } - yym287 := z.DecBinary() - _ = yym287 + if false { } else { z.F.DecMapFloat32UintptrX(x.FptrMapFloat32Uintptr, d) @@ -22591,28 +19827,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int = nil } else { - yyv288 := &x.FMapFloat32Int - yym289 := z.DecBinary() - _ = yym289 if false { } else { - z.F.DecMapFloat32IntX(yyv288, d) + z.F.DecMapFloat32IntX(&x.FMapFloat32Int, d) } } case "FptrMapFloat32Int": - if x.FptrMapFloat32Int == nil { - x.FptrMapFloat32Int = new(map[float32]int) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int != nil { + if true && x.FptrMapFloat32Int != nil { x.FptrMapFloat32Int = nil } } else { if x.FptrMapFloat32Int == nil { x.FptrMapFloat32Int = new(map[float32]int) } - yym291 := z.DecBinary() - _ = yym291 + if false { } else { z.F.DecMapFloat32IntX(x.FptrMapFloat32Int, d) @@ -22622,28 +19851,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int8 = nil } else { - yyv292 := &x.FMapFloat32Int8 - yym293 := z.DecBinary() - _ = yym293 if false { } else { - z.F.DecMapFloat32Int8X(yyv292, d) + z.F.DecMapFloat32Int8X(&x.FMapFloat32Int8, d) } } case "FptrMapFloat32Int8": - if x.FptrMapFloat32Int8 == nil { - x.FptrMapFloat32Int8 = new(map[float32]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int8 != nil { + if true && x.FptrMapFloat32Int8 != nil { x.FptrMapFloat32Int8 = nil } } else { if x.FptrMapFloat32Int8 == nil { x.FptrMapFloat32Int8 = new(map[float32]int8) } - yym295 := z.DecBinary() - _ = yym295 + if false { } else { z.F.DecMapFloat32Int8X(x.FptrMapFloat32Int8, d) @@ -22653,28 +19875,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int16 = nil } else { - yyv296 := &x.FMapFloat32Int16 - yym297 := z.DecBinary() - _ = yym297 if false { } else { - z.F.DecMapFloat32Int16X(yyv296, d) + z.F.DecMapFloat32Int16X(&x.FMapFloat32Int16, d) } } case "FptrMapFloat32Int16": - if x.FptrMapFloat32Int16 == nil { - x.FptrMapFloat32Int16 = new(map[float32]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int16 != nil { + if true && x.FptrMapFloat32Int16 != nil { x.FptrMapFloat32Int16 = nil } } else { if x.FptrMapFloat32Int16 == nil { x.FptrMapFloat32Int16 = new(map[float32]int16) } - yym299 := z.DecBinary() - _ = yym299 + if false { } else { z.F.DecMapFloat32Int16X(x.FptrMapFloat32Int16, d) @@ -22684,28 +19899,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int32 = nil } else { - yyv300 := &x.FMapFloat32Int32 - yym301 := z.DecBinary() - _ = yym301 if false { } else { - z.F.DecMapFloat32Int32X(yyv300, d) + z.F.DecMapFloat32Int32X(&x.FMapFloat32Int32, d) } } case "FptrMapFloat32Int32": - if x.FptrMapFloat32Int32 == nil { - x.FptrMapFloat32Int32 = new(map[float32]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int32 != nil { + if true && x.FptrMapFloat32Int32 != nil { x.FptrMapFloat32Int32 = nil } } else { if x.FptrMapFloat32Int32 == nil { x.FptrMapFloat32Int32 = new(map[float32]int32) } - yym303 := z.DecBinary() - _ = yym303 + if false { } else { z.F.DecMapFloat32Int32X(x.FptrMapFloat32Int32, d) @@ -22715,28 +19923,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int64 = nil } else { - yyv304 := &x.FMapFloat32Int64 - yym305 := z.DecBinary() - _ = yym305 if false { } else { - z.F.DecMapFloat32Int64X(yyv304, d) + z.F.DecMapFloat32Int64X(&x.FMapFloat32Int64, d) } } case "FptrMapFloat32Int64": - if x.FptrMapFloat32Int64 == nil { - x.FptrMapFloat32Int64 = new(map[float32]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int64 != nil { + if true && x.FptrMapFloat32Int64 != nil { x.FptrMapFloat32Int64 = nil } } else { if x.FptrMapFloat32Int64 == nil { x.FptrMapFloat32Int64 = new(map[float32]int64) } - yym307 := z.DecBinary() - _ = yym307 + if false { } else { z.F.DecMapFloat32Int64X(x.FptrMapFloat32Int64, d) @@ -22746,28 +19947,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Float32 = nil } else { - yyv308 := &x.FMapFloat32Float32 - yym309 := z.DecBinary() - _ = yym309 if false { } else { - z.F.DecMapFloat32Float32X(yyv308, d) + z.F.DecMapFloat32Float32X(&x.FMapFloat32Float32, d) } } case "FptrMapFloat32Float32": - if x.FptrMapFloat32Float32 == nil { - x.FptrMapFloat32Float32 = new(map[float32]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Float32 != nil { + if true && x.FptrMapFloat32Float32 != nil { x.FptrMapFloat32Float32 = nil } } else { if x.FptrMapFloat32Float32 == nil { x.FptrMapFloat32Float32 = new(map[float32]float32) } - yym311 := z.DecBinary() - _ = yym311 + if false { } else { z.F.DecMapFloat32Float32X(x.FptrMapFloat32Float32, d) @@ -22777,28 +19971,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Float64 = nil } else { - yyv312 := &x.FMapFloat32Float64 - yym313 := z.DecBinary() - _ = yym313 if false { } else { - z.F.DecMapFloat32Float64X(yyv312, d) + z.F.DecMapFloat32Float64X(&x.FMapFloat32Float64, d) } } case "FptrMapFloat32Float64": - if x.FptrMapFloat32Float64 == nil { - x.FptrMapFloat32Float64 = new(map[float32]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Float64 != nil { + if true && x.FptrMapFloat32Float64 != nil { x.FptrMapFloat32Float64 = nil } } else { if x.FptrMapFloat32Float64 == nil { x.FptrMapFloat32Float64 = new(map[float32]float64) } - yym315 := z.DecBinary() - _ = yym315 + if false { } else { z.F.DecMapFloat32Float64X(x.FptrMapFloat32Float64, d) @@ -22808,28 +19995,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Bool = nil } else { - yyv316 := &x.FMapFloat32Bool - yym317 := z.DecBinary() - _ = yym317 if false { } else { - z.F.DecMapFloat32BoolX(yyv316, d) + z.F.DecMapFloat32BoolX(&x.FMapFloat32Bool, d) } } case "FptrMapFloat32Bool": - if x.FptrMapFloat32Bool == nil { - x.FptrMapFloat32Bool = new(map[float32]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat32Bool != nil { + if true && x.FptrMapFloat32Bool != nil { x.FptrMapFloat32Bool = nil } } else { if x.FptrMapFloat32Bool == nil { x.FptrMapFloat32Bool = new(map[float32]bool) } - yym319 := z.DecBinary() - _ = yym319 + if false { } else { z.F.DecMapFloat32BoolX(x.FptrMapFloat32Bool, d) @@ -22839,28 +20019,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Intf = nil } else { - yyv320 := &x.FMapFloat64Intf - yym321 := z.DecBinary() - _ = yym321 if false { } else { - z.F.DecMapFloat64IntfX(yyv320, d) + z.F.DecMapFloat64IntfX(&x.FMapFloat64Intf, d) } } case "FptrMapFloat64Intf": - if x.FptrMapFloat64Intf == nil { - x.FptrMapFloat64Intf = new(map[float64]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Intf != nil { + if true && x.FptrMapFloat64Intf != nil { x.FptrMapFloat64Intf = nil } } else { if x.FptrMapFloat64Intf == nil { x.FptrMapFloat64Intf = new(map[float64]interface{}) } - yym323 := z.DecBinary() - _ = yym323 + if false { } else { z.F.DecMapFloat64IntfX(x.FptrMapFloat64Intf, d) @@ -22870,28 +20043,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64String = nil } else { - yyv324 := &x.FMapFloat64String - yym325 := z.DecBinary() - _ = yym325 if false { } else { - z.F.DecMapFloat64StringX(yyv324, d) + z.F.DecMapFloat64StringX(&x.FMapFloat64String, d) } } case "FptrMapFloat64String": - if x.FptrMapFloat64String == nil { - x.FptrMapFloat64String = new(map[float64]string) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64String != nil { + if true && x.FptrMapFloat64String != nil { x.FptrMapFloat64String = nil } } else { if x.FptrMapFloat64String == nil { x.FptrMapFloat64String = new(map[float64]string) } - yym327 := z.DecBinary() - _ = yym327 + if false { } else { z.F.DecMapFloat64StringX(x.FptrMapFloat64String, d) @@ -22901,28 +20067,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint = nil } else { - yyv328 := &x.FMapFloat64Uint - yym329 := z.DecBinary() - _ = yym329 if false { } else { - z.F.DecMapFloat64UintX(yyv328, d) + z.F.DecMapFloat64UintX(&x.FMapFloat64Uint, d) } } case "FptrMapFloat64Uint": - if x.FptrMapFloat64Uint == nil { - x.FptrMapFloat64Uint = new(map[float64]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint != nil { + if true && x.FptrMapFloat64Uint != nil { x.FptrMapFloat64Uint = nil } } else { if x.FptrMapFloat64Uint == nil { x.FptrMapFloat64Uint = new(map[float64]uint) } - yym331 := z.DecBinary() - _ = yym331 + if false { } else { z.F.DecMapFloat64UintX(x.FptrMapFloat64Uint, d) @@ -22932,28 +20091,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint8 = nil } else { - yyv332 := &x.FMapFloat64Uint8 - yym333 := z.DecBinary() - _ = yym333 if false { } else { - z.F.DecMapFloat64Uint8X(yyv332, d) + z.F.DecMapFloat64Uint8X(&x.FMapFloat64Uint8, d) } } case "FptrMapFloat64Uint8": - if x.FptrMapFloat64Uint8 == nil { - x.FptrMapFloat64Uint8 = new(map[float64]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint8 != nil { + if true && x.FptrMapFloat64Uint8 != nil { x.FptrMapFloat64Uint8 = nil } } else { if x.FptrMapFloat64Uint8 == nil { x.FptrMapFloat64Uint8 = new(map[float64]uint8) } - yym335 := z.DecBinary() - _ = yym335 + if false { } else { z.F.DecMapFloat64Uint8X(x.FptrMapFloat64Uint8, d) @@ -22963,28 +20115,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint16 = nil } else { - yyv336 := &x.FMapFloat64Uint16 - yym337 := z.DecBinary() - _ = yym337 if false { } else { - z.F.DecMapFloat64Uint16X(yyv336, d) + z.F.DecMapFloat64Uint16X(&x.FMapFloat64Uint16, d) } } case "FptrMapFloat64Uint16": - if x.FptrMapFloat64Uint16 == nil { - x.FptrMapFloat64Uint16 = new(map[float64]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint16 != nil { + if true && x.FptrMapFloat64Uint16 != nil { x.FptrMapFloat64Uint16 = nil } } else { if x.FptrMapFloat64Uint16 == nil { x.FptrMapFloat64Uint16 = new(map[float64]uint16) } - yym339 := z.DecBinary() - _ = yym339 + if false { } else { z.F.DecMapFloat64Uint16X(x.FptrMapFloat64Uint16, d) @@ -22994,28 +20139,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint32 = nil } else { - yyv340 := &x.FMapFloat64Uint32 - yym341 := z.DecBinary() - _ = yym341 if false { } else { - z.F.DecMapFloat64Uint32X(yyv340, d) + z.F.DecMapFloat64Uint32X(&x.FMapFloat64Uint32, d) } } case "FptrMapFloat64Uint32": - if x.FptrMapFloat64Uint32 == nil { - x.FptrMapFloat64Uint32 = new(map[float64]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint32 != nil { + if true && x.FptrMapFloat64Uint32 != nil { x.FptrMapFloat64Uint32 = nil } } else { if x.FptrMapFloat64Uint32 == nil { x.FptrMapFloat64Uint32 = new(map[float64]uint32) } - yym343 := z.DecBinary() - _ = yym343 + if false { } else { z.F.DecMapFloat64Uint32X(x.FptrMapFloat64Uint32, d) @@ -23025,28 +20163,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint64 = nil } else { - yyv344 := &x.FMapFloat64Uint64 - yym345 := z.DecBinary() - _ = yym345 if false { } else { - z.F.DecMapFloat64Uint64X(yyv344, d) + z.F.DecMapFloat64Uint64X(&x.FMapFloat64Uint64, d) } } case "FptrMapFloat64Uint64": - if x.FptrMapFloat64Uint64 == nil { - x.FptrMapFloat64Uint64 = new(map[float64]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint64 != nil { + if true && x.FptrMapFloat64Uint64 != nil { x.FptrMapFloat64Uint64 = nil } } else { if x.FptrMapFloat64Uint64 == nil { x.FptrMapFloat64Uint64 = new(map[float64]uint64) } - yym347 := z.DecBinary() - _ = yym347 + if false { } else { z.F.DecMapFloat64Uint64X(x.FptrMapFloat64Uint64, d) @@ -23056,28 +20187,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uintptr = nil } else { - yyv348 := &x.FMapFloat64Uintptr - yym349 := z.DecBinary() - _ = yym349 if false { } else { - z.F.DecMapFloat64UintptrX(yyv348, d) + z.F.DecMapFloat64UintptrX(&x.FMapFloat64Uintptr, d) } } case "FptrMapFloat64Uintptr": - if x.FptrMapFloat64Uintptr == nil { - x.FptrMapFloat64Uintptr = new(map[float64]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uintptr != nil { + if true && x.FptrMapFloat64Uintptr != nil { x.FptrMapFloat64Uintptr = nil } } else { if x.FptrMapFloat64Uintptr == nil { x.FptrMapFloat64Uintptr = new(map[float64]uintptr) } - yym351 := z.DecBinary() - _ = yym351 + if false { } else { z.F.DecMapFloat64UintptrX(x.FptrMapFloat64Uintptr, d) @@ -23087,28 +20211,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int = nil } else { - yyv352 := &x.FMapFloat64Int - yym353 := z.DecBinary() - _ = yym353 if false { } else { - z.F.DecMapFloat64IntX(yyv352, d) + z.F.DecMapFloat64IntX(&x.FMapFloat64Int, d) } } case "FptrMapFloat64Int": - if x.FptrMapFloat64Int == nil { - x.FptrMapFloat64Int = new(map[float64]int) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int != nil { + if true && x.FptrMapFloat64Int != nil { x.FptrMapFloat64Int = nil } } else { if x.FptrMapFloat64Int == nil { x.FptrMapFloat64Int = new(map[float64]int) } - yym355 := z.DecBinary() - _ = yym355 + if false { } else { z.F.DecMapFloat64IntX(x.FptrMapFloat64Int, d) @@ -23118,28 +20235,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int8 = nil } else { - yyv356 := &x.FMapFloat64Int8 - yym357 := z.DecBinary() - _ = yym357 if false { } else { - z.F.DecMapFloat64Int8X(yyv356, d) + z.F.DecMapFloat64Int8X(&x.FMapFloat64Int8, d) } } case "FptrMapFloat64Int8": - if x.FptrMapFloat64Int8 == nil { - x.FptrMapFloat64Int8 = new(map[float64]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int8 != nil { + if true && x.FptrMapFloat64Int8 != nil { x.FptrMapFloat64Int8 = nil } } else { if x.FptrMapFloat64Int8 == nil { x.FptrMapFloat64Int8 = new(map[float64]int8) } - yym359 := z.DecBinary() - _ = yym359 + if false { } else { z.F.DecMapFloat64Int8X(x.FptrMapFloat64Int8, d) @@ -23149,28 +20259,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int16 = nil } else { - yyv360 := &x.FMapFloat64Int16 - yym361 := z.DecBinary() - _ = yym361 if false { } else { - z.F.DecMapFloat64Int16X(yyv360, d) + z.F.DecMapFloat64Int16X(&x.FMapFloat64Int16, d) } } case "FptrMapFloat64Int16": - if x.FptrMapFloat64Int16 == nil { - x.FptrMapFloat64Int16 = new(map[float64]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int16 != nil { + if true && x.FptrMapFloat64Int16 != nil { x.FptrMapFloat64Int16 = nil } } else { if x.FptrMapFloat64Int16 == nil { x.FptrMapFloat64Int16 = new(map[float64]int16) } - yym363 := z.DecBinary() - _ = yym363 + if false { } else { z.F.DecMapFloat64Int16X(x.FptrMapFloat64Int16, d) @@ -23180,28 +20283,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int32 = nil } else { - yyv364 := &x.FMapFloat64Int32 - yym365 := z.DecBinary() - _ = yym365 if false { } else { - z.F.DecMapFloat64Int32X(yyv364, d) + z.F.DecMapFloat64Int32X(&x.FMapFloat64Int32, d) } } case "FptrMapFloat64Int32": - if x.FptrMapFloat64Int32 == nil { - x.FptrMapFloat64Int32 = new(map[float64]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int32 != nil { + if true && x.FptrMapFloat64Int32 != nil { x.FptrMapFloat64Int32 = nil } } else { if x.FptrMapFloat64Int32 == nil { x.FptrMapFloat64Int32 = new(map[float64]int32) } - yym367 := z.DecBinary() - _ = yym367 + if false { } else { z.F.DecMapFloat64Int32X(x.FptrMapFloat64Int32, d) @@ -23211,28 +20307,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int64 = nil } else { - yyv368 := &x.FMapFloat64Int64 - yym369 := z.DecBinary() - _ = yym369 if false { } else { - z.F.DecMapFloat64Int64X(yyv368, d) + z.F.DecMapFloat64Int64X(&x.FMapFloat64Int64, d) } } case "FptrMapFloat64Int64": - if x.FptrMapFloat64Int64 == nil { - x.FptrMapFloat64Int64 = new(map[float64]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int64 != nil { + if true && x.FptrMapFloat64Int64 != nil { x.FptrMapFloat64Int64 = nil } } else { if x.FptrMapFloat64Int64 == nil { x.FptrMapFloat64Int64 = new(map[float64]int64) } - yym371 := z.DecBinary() - _ = yym371 + if false { } else { z.F.DecMapFloat64Int64X(x.FptrMapFloat64Int64, d) @@ -23242,28 +20331,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Float32 = nil } else { - yyv372 := &x.FMapFloat64Float32 - yym373 := z.DecBinary() - _ = yym373 if false { } else { - z.F.DecMapFloat64Float32X(yyv372, d) + z.F.DecMapFloat64Float32X(&x.FMapFloat64Float32, d) } } case "FptrMapFloat64Float32": - if x.FptrMapFloat64Float32 == nil { - x.FptrMapFloat64Float32 = new(map[float64]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Float32 != nil { + if true && x.FptrMapFloat64Float32 != nil { x.FptrMapFloat64Float32 = nil } } else { if x.FptrMapFloat64Float32 == nil { x.FptrMapFloat64Float32 = new(map[float64]float32) } - yym375 := z.DecBinary() - _ = yym375 + if false { } else { z.F.DecMapFloat64Float32X(x.FptrMapFloat64Float32, d) @@ -23273,28 +20355,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Float64 = nil } else { - yyv376 := &x.FMapFloat64Float64 - yym377 := z.DecBinary() - _ = yym377 if false { } else { - z.F.DecMapFloat64Float64X(yyv376, d) + z.F.DecMapFloat64Float64X(&x.FMapFloat64Float64, d) } } case "FptrMapFloat64Float64": - if x.FptrMapFloat64Float64 == nil { - x.FptrMapFloat64Float64 = new(map[float64]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Float64 != nil { + if true && x.FptrMapFloat64Float64 != nil { x.FptrMapFloat64Float64 = nil } } else { if x.FptrMapFloat64Float64 == nil { x.FptrMapFloat64Float64 = new(map[float64]float64) } - yym379 := z.DecBinary() - _ = yym379 + if false { } else { z.F.DecMapFloat64Float64X(x.FptrMapFloat64Float64, d) @@ -23304,28 +20379,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Bool = nil } else { - yyv380 := &x.FMapFloat64Bool - yym381 := z.DecBinary() - _ = yym381 if false { } else { - z.F.DecMapFloat64BoolX(yyv380, d) + z.F.DecMapFloat64BoolX(&x.FMapFloat64Bool, d) } } case "FptrMapFloat64Bool": - if x.FptrMapFloat64Bool == nil { - x.FptrMapFloat64Bool = new(map[float64]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapFloat64Bool != nil { + if true && x.FptrMapFloat64Bool != nil { x.FptrMapFloat64Bool = nil } } else { if x.FptrMapFloat64Bool == nil { x.FptrMapFloat64Bool = new(map[float64]bool) } - yym383 := z.DecBinary() - _ = yym383 + if false { } else { z.F.DecMapFloat64BoolX(x.FptrMapFloat64Bool, d) @@ -23335,28 +20403,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintIntf = nil } else { - yyv384 := &x.FMapUintIntf - yym385 := z.DecBinary() - _ = yym385 if false { } else { - z.F.DecMapUintIntfX(yyv384, d) + z.F.DecMapUintIntfX(&x.FMapUintIntf, d) } } case "FptrMapUintIntf": - if x.FptrMapUintIntf == nil { - x.FptrMapUintIntf = new(map[uint]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUintIntf != nil { + if true && x.FptrMapUintIntf != nil { x.FptrMapUintIntf = nil } } else { if x.FptrMapUintIntf == nil { x.FptrMapUintIntf = new(map[uint]interface{}) } - yym387 := z.DecBinary() - _ = yym387 + if false { } else { z.F.DecMapUintIntfX(x.FptrMapUintIntf, d) @@ -23366,28 +20427,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintString = nil } else { - yyv388 := &x.FMapUintString - yym389 := z.DecBinary() - _ = yym389 if false { } else { - z.F.DecMapUintStringX(yyv388, d) + z.F.DecMapUintStringX(&x.FMapUintString, d) } } case "FptrMapUintString": - if x.FptrMapUintString == nil { - x.FptrMapUintString = new(map[uint]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUintString != nil { + if true && x.FptrMapUintString != nil { x.FptrMapUintString = nil } } else { if x.FptrMapUintString == nil { x.FptrMapUintString = new(map[uint]string) } - yym391 := z.DecBinary() - _ = yym391 + if false { } else { z.F.DecMapUintStringX(x.FptrMapUintString, d) @@ -23397,28 +20451,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint = nil } else { - yyv392 := &x.FMapUintUint - yym393 := z.DecBinary() - _ = yym393 if false { } else { - z.F.DecMapUintUintX(yyv392, d) + z.F.DecMapUintUintX(&x.FMapUintUint, d) } } case "FptrMapUintUint": - if x.FptrMapUintUint == nil { - x.FptrMapUintUint = new(map[uint]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUint != nil { + if true && x.FptrMapUintUint != nil { x.FptrMapUintUint = nil } } else { if x.FptrMapUintUint == nil { x.FptrMapUintUint = new(map[uint]uint) } - yym395 := z.DecBinary() - _ = yym395 + if false { } else { z.F.DecMapUintUintX(x.FptrMapUintUint, d) @@ -23428,28 +20475,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint8 = nil } else { - yyv396 := &x.FMapUintUint8 - yym397 := z.DecBinary() - _ = yym397 if false { } else { - z.F.DecMapUintUint8X(yyv396, d) + z.F.DecMapUintUint8X(&x.FMapUintUint8, d) } } case "FptrMapUintUint8": - if x.FptrMapUintUint8 == nil { - x.FptrMapUintUint8 = new(map[uint]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUint8 != nil { + if true && x.FptrMapUintUint8 != nil { x.FptrMapUintUint8 = nil } } else { if x.FptrMapUintUint8 == nil { x.FptrMapUintUint8 = new(map[uint]uint8) } - yym399 := z.DecBinary() - _ = yym399 + if false { } else { z.F.DecMapUintUint8X(x.FptrMapUintUint8, d) @@ -23459,28 +20499,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint16 = nil } else { - yyv400 := &x.FMapUintUint16 - yym401 := z.DecBinary() - _ = yym401 if false { } else { - z.F.DecMapUintUint16X(yyv400, d) + z.F.DecMapUintUint16X(&x.FMapUintUint16, d) } } case "FptrMapUintUint16": - if x.FptrMapUintUint16 == nil { - x.FptrMapUintUint16 = new(map[uint]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUint16 != nil { + if true && x.FptrMapUintUint16 != nil { x.FptrMapUintUint16 = nil } } else { if x.FptrMapUintUint16 == nil { x.FptrMapUintUint16 = new(map[uint]uint16) } - yym403 := z.DecBinary() - _ = yym403 + if false { } else { z.F.DecMapUintUint16X(x.FptrMapUintUint16, d) @@ -23490,28 +20523,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint32 = nil } else { - yyv404 := &x.FMapUintUint32 - yym405 := z.DecBinary() - _ = yym405 if false { } else { - z.F.DecMapUintUint32X(yyv404, d) + z.F.DecMapUintUint32X(&x.FMapUintUint32, d) } } case "FptrMapUintUint32": - if x.FptrMapUintUint32 == nil { - x.FptrMapUintUint32 = new(map[uint]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUint32 != nil { + if true && x.FptrMapUintUint32 != nil { x.FptrMapUintUint32 = nil } } else { if x.FptrMapUintUint32 == nil { x.FptrMapUintUint32 = new(map[uint]uint32) } - yym407 := z.DecBinary() - _ = yym407 + if false { } else { z.F.DecMapUintUint32X(x.FptrMapUintUint32, d) @@ -23521,28 +20547,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint64 = nil } else { - yyv408 := &x.FMapUintUint64 - yym409 := z.DecBinary() - _ = yym409 if false { } else { - z.F.DecMapUintUint64X(yyv408, d) + z.F.DecMapUintUint64X(&x.FMapUintUint64, d) } } case "FptrMapUintUint64": - if x.FptrMapUintUint64 == nil { - x.FptrMapUintUint64 = new(map[uint]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUint64 != nil { + if true && x.FptrMapUintUint64 != nil { x.FptrMapUintUint64 = nil } } else { if x.FptrMapUintUint64 == nil { x.FptrMapUintUint64 = new(map[uint]uint64) } - yym411 := z.DecBinary() - _ = yym411 + if false { } else { z.F.DecMapUintUint64X(x.FptrMapUintUint64, d) @@ -23552,28 +20571,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUintptr = nil } else { - yyv412 := &x.FMapUintUintptr - yym413 := z.DecBinary() - _ = yym413 if false { } else { - z.F.DecMapUintUintptrX(yyv412, d) + z.F.DecMapUintUintptrX(&x.FMapUintUintptr, d) } } case "FptrMapUintUintptr": - if x.FptrMapUintUintptr == nil { - x.FptrMapUintUintptr = new(map[uint]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUintUintptr != nil { + if true && x.FptrMapUintUintptr != nil { x.FptrMapUintUintptr = nil } } else { if x.FptrMapUintUintptr == nil { x.FptrMapUintUintptr = new(map[uint]uintptr) } - yym415 := z.DecBinary() - _ = yym415 + if false { } else { z.F.DecMapUintUintptrX(x.FptrMapUintUintptr, d) @@ -23583,28 +20595,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt = nil } else { - yyv416 := &x.FMapUintInt - yym417 := z.DecBinary() - _ = yym417 if false { } else { - z.F.DecMapUintIntX(yyv416, d) + z.F.DecMapUintIntX(&x.FMapUintInt, d) } } case "FptrMapUintInt": - if x.FptrMapUintInt == nil { - x.FptrMapUintInt = new(map[uint]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUintInt != nil { + if true && x.FptrMapUintInt != nil { x.FptrMapUintInt = nil } } else { if x.FptrMapUintInt == nil { x.FptrMapUintInt = new(map[uint]int) } - yym419 := z.DecBinary() - _ = yym419 + if false { } else { z.F.DecMapUintIntX(x.FptrMapUintInt, d) @@ -23614,28 +20619,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt8 = nil } else { - yyv420 := &x.FMapUintInt8 - yym421 := z.DecBinary() - _ = yym421 if false { } else { - z.F.DecMapUintInt8X(yyv420, d) + z.F.DecMapUintInt8X(&x.FMapUintInt8, d) } } case "FptrMapUintInt8": - if x.FptrMapUintInt8 == nil { - x.FptrMapUintInt8 = new(map[uint]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUintInt8 != nil { + if true && x.FptrMapUintInt8 != nil { x.FptrMapUintInt8 = nil } } else { if x.FptrMapUintInt8 == nil { x.FptrMapUintInt8 = new(map[uint]int8) } - yym423 := z.DecBinary() - _ = yym423 + if false { } else { z.F.DecMapUintInt8X(x.FptrMapUintInt8, d) @@ -23645,28 +20643,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt16 = nil } else { - yyv424 := &x.FMapUintInt16 - yym425 := z.DecBinary() - _ = yym425 if false { } else { - z.F.DecMapUintInt16X(yyv424, d) + z.F.DecMapUintInt16X(&x.FMapUintInt16, d) } } case "FptrMapUintInt16": - if x.FptrMapUintInt16 == nil { - x.FptrMapUintInt16 = new(map[uint]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUintInt16 != nil { + if true && x.FptrMapUintInt16 != nil { x.FptrMapUintInt16 = nil } } else { if x.FptrMapUintInt16 == nil { x.FptrMapUintInt16 = new(map[uint]int16) } - yym427 := z.DecBinary() - _ = yym427 + if false { } else { z.F.DecMapUintInt16X(x.FptrMapUintInt16, d) @@ -23676,28 +20667,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt32 = nil } else { - yyv428 := &x.FMapUintInt32 - yym429 := z.DecBinary() - _ = yym429 if false { } else { - z.F.DecMapUintInt32X(yyv428, d) + z.F.DecMapUintInt32X(&x.FMapUintInt32, d) } } case "FptrMapUintInt32": - if x.FptrMapUintInt32 == nil { - x.FptrMapUintInt32 = new(map[uint]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintInt32 != nil { + if true && x.FptrMapUintInt32 != nil { x.FptrMapUintInt32 = nil } } else { if x.FptrMapUintInt32 == nil { x.FptrMapUintInt32 = new(map[uint]int32) } - yym431 := z.DecBinary() - _ = yym431 + if false { } else { z.F.DecMapUintInt32X(x.FptrMapUintInt32, d) @@ -23707,28 +20691,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt64 = nil } else { - yyv432 := &x.FMapUintInt64 - yym433 := z.DecBinary() - _ = yym433 if false { } else { - z.F.DecMapUintInt64X(yyv432, d) + z.F.DecMapUintInt64X(&x.FMapUintInt64, d) } } case "FptrMapUintInt64": - if x.FptrMapUintInt64 == nil { - x.FptrMapUintInt64 = new(map[uint]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintInt64 != nil { + if true && x.FptrMapUintInt64 != nil { x.FptrMapUintInt64 = nil } } else { if x.FptrMapUintInt64 == nil { x.FptrMapUintInt64 = new(map[uint]int64) } - yym435 := z.DecBinary() - _ = yym435 + if false { } else { z.F.DecMapUintInt64X(x.FptrMapUintInt64, d) @@ -23738,28 +20715,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintFloat32 = nil } else { - yyv436 := &x.FMapUintFloat32 - yym437 := z.DecBinary() - _ = yym437 if false { } else { - z.F.DecMapUintFloat32X(yyv436, d) + z.F.DecMapUintFloat32X(&x.FMapUintFloat32, d) } } case "FptrMapUintFloat32": - if x.FptrMapUintFloat32 == nil { - x.FptrMapUintFloat32 = new(map[uint]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintFloat32 != nil { + if true && x.FptrMapUintFloat32 != nil { x.FptrMapUintFloat32 = nil } } else { if x.FptrMapUintFloat32 == nil { x.FptrMapUintFloat32 = new(map[uint]float32) } - yym439 := z.DecBinary() - _ = yym439 + if false { } else { z.F.DecMapUintFloat32X(x.FptrMapUintFloat32, d) @@ -23769,28 +20739,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintFloat64 = nil } else { - yyv440 := &x.FMapUintFloat64 - yym441 := z.DecBinary() - _ = yym441 if false { } else { - z.F.DecMapUintFloat64X(yyv440, d) + z.F.DecMapUintFloat64X(&x.FMapUintFloat64, d) } } case "FptrMapUintFloat64": - if x.FptrMapUintFloat64 == nil { - x.FptrMapUintFloat64 = new(map[uint]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintFloat64 != nil { + if true && x.FptrMapUintFloat64 != nil { x.FptrMapUintFloat64 = nil } } else { if x.FptrMapUintFloat64 == nil { x.FptrMapUintFloat64 = new(map[uint]float64) } - yym443 := z.DecBinary() - _ = yym443 + if false { } else { z.F.DecMapUintFloat64X(x.FptrMapUintFloat64, d) @@ -23800,28 +20763,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintBool = nil } else { - yyv444 := &x.FMapUintBool - yym445 := z.DecBinary() - _ = yym445 if false { } else { - z.F.DecMapUintBoolX(yyv444, d) + z.F.DecMapUintBoolX(&x.FMapUintBool, d) } } case "FptrMapUintBool": - if x.FptrMapUintBool == nil { - x.FptrMapUintBool = new(map[uint]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUintBool != nil { + if true && x.FptrMapUintBool != nil { x.FptrMapUintBool = nil } } else { if x.FptrMapUintBool == nil { x.FptrMapUintBool = new(map[uint]bool) } - yym447 := z.DecBinary() - _ = yym447 + if false { } else { z.F.DecMapUintBoolX(x.FptrMapUintBool, d) @@ -23831,28 +20787,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Intf = nil } else { - yyv448 := &x.FMapUint8Intf - yym449 := z.DecBinary() - _ = yym449 if false { } else { - z.F.DecMapUint8IntfX(yyv448, d) + z.F.DecMapUint8IntfX(&x.FMapUint8Intf, d) } } case "FptrMapUint8Intf": - if x.FptrMapUint8Intf == nil { - x.FptrMapUint8Intf = new(map[uint8]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Intf != nil { + if true && x.FptrMapUint8Intf != nil { x.FptrMapUint8Intf = nil } } else { if x.FptrMapUint8Intf == nil { x.FptrMapUint8Intf = new(map[uint8]interface{}) } - yym451 := z.DecBinary() - _ = yym451 + if false { } else { z.F.DecMapUint8IntfX(x.FptrMapUint8Intf, d) @@ -23862,28 +20811,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8String = nil } else { - yyv452 := &x.FMapUint8String - yym453 := z.DecBinary() - _ = yym453 if false { } else { - z.F.DecMapUint8StringX(yyv452, d) + z.F.DecMapUint8StringX(&x.FMapUint8String, d) } } case "FptrMapUint8String": - if x.FptrMapUint8String == nil { - x.FptrMapUint8String = new(map[uint8]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8String != nil { + if true && x.FptrMapUint8String != nil { x.FptrMapUint8String = nil } } else { if x.FptrMapUint8String == nil { x.FptrMapUint8String = new(map[uint8]string) } - yym455 := z.DecBinary() - _ = yym455 + if false { } else { z.F.DecMapUint8StringX(x.FptrMapUint8String, d) @@ -23893,28 +20835,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint = nil } else { - yyv456 := &x.FMapUint8Uint - yym457 := z.DecBinary() - _ = yym457 if false { } else { - z.F.DecMapUint8UintX(yyv456, d) + z.F.DecMapUint8UintX(&x.FMapUint8Uint, d) } } case "FptrMapUint8Uint": - if x.FptrMapUint8Uint == nil { - x.FptrMapUint8Uint = new(map[uint8]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint != nil { + if true && x.FptrMapUint8Uint != nil { x.FptrMapUint8Uint = nil } } else { if x.FptrMapUint8Uint == nil { x.FptrMapUint8Uint = new(map[uint8]uint) } - yym459 := z.DecBinary() - _ = yym459 + if false { } else { z.F.DecMapUint8UintX(x.FptrMapUint8Uint, d) @@ -23924,28 +20859,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint8 = nil } else { - yyv460 := &x.FMapUint8Uint8 - yym461 := z.DecBinary() - _ = yym461 if false { } else { - z.F.DecMapUint8Uint8X(yyv460, d) + z.F.DecMapUint8Uint8X(&x.FMapUint8Uint8, d) } } case "FptrMapUint8Uint8": - if x.FptrMapUint8Uint8 == nil { - x.FptrMapUint8Uint8 = new(map[uint8]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint8 != nil { + if true && x.FptrMapUint8Uint8 != nil { x.FptrMapUint8Uint8 = nil } } else { if x.FptrMapUint8Uint8 == nil { x.FptrMapUint8Uint8 = new(map[uint8]uint8) } - yym463 := z.DecBinary() - _ = yym463 + if false { } else { z.F.DecMapUint8Uint8X(x.FptrMapUint8Uint8, d) @@ -23955,28 +20883,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint16 = nil } else { - yyv464 := &x.FMapUint8Uint16 - yym465 := z.DecBinary() - _ = yym465 if false { } else { - z.F.DecMapUint8Uint16X(yyv464, d) + z.F.DecMapUint8Uint16X(&x.FMapUint8Uint16, d) } } case "FptrMapUint8Uint16": - if x.FptrMapUint8Uint16 == nil { - x.FptrMapUint8Uint16 = new(map[uint8]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint16 != nil { + if true && x.FptrMapUint8Uint16 != nil { x.FptrMapUint8Uint16 = nil } } else { if x.FptrMapUint8Uint16 == nil { x.FptrMapUint8Uint16 = new(map[uint8]uint16) } - yym467 := z.DecBinary() - _ = yym467 + if false { } else { z.F.DecMapUint8Uint16X(x.FptrMapUint8Uint16, d) @@ -23986,28 +20907,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint32 = nil } else { - yyv468 := &x.FMapUint8Uint32 - yym469 := z.DecBinary() - _ = yym469 if false { } else { - z.F.DecMapUint8Uint32X(yyv468, d) + z.F.DecMapUint8Uint32X(&x.FMapUint8Uint32, d) } } case "FptrMapUint8Uint32": - if x.FptrMapUint8Uint32 == nil { - x.FptrMapUint8Uint32 = new(map[uint8]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint32 != nil { + if true && x.FptrMapUint8Uint32 != nil { x.FptrMapUint8Uint32 = nil } } else { if x.FptrMapUint8Uint32 == nil { x.FptrMapUint8Uint32 = new(map[uint8]uint32) } - yym471 := z.DecBinary() - _ = yym471 + if false { } else { z.F.DecMapUint8Uint32X(x.FptrMapUint8Uint32, d) @@ -24017,28 +20931,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint64 = nil } else { - yyv472 := &x.FMapUint8Uint64 - yym473 := z.DecBinary() - _ = yym473 if false { } else { - z.F.DecMapUint8Uint64X(yyv472, d) + z.F.DecMapUint8Uint64X(&x.FMapUint8Uint64, d) } } case "FptrMapUint8Uint64": - if x.FptrMapUint8Uint64 == nil { - x.FptrMapUint8Uint64 = new(map[uint8]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint64 != nil { + if true && x.FptrMapUint8Uint64 != nil { x.FptrMapUint8Uint64 = nil } } else { if x.FptrMapUint8Uint64 == nil { x.FptrMapUint8Uint64 = new(map[uint8]uint64) } - yym475 := z.DecBinary() - _ = yym475 + if false { } else { z.F.DecMapUint8Uint64X(x.FptrMapUint8Uint64, d) @@ -24048,28 +20955,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uintptr = nil } else { - yyv476 := &x.FMapUint8Uintptr - yym477 := z.DecBinary() - _ = yym477 if false { } else { - z.F.DecMapUint8UintptrX(yyv476, d) + z.F.DecMapUint8UintptrX(&x.FMapUint8Uintptr, d) } } case "FptrMapUint8Uintptr": - if x.FptrMapUint8Uintptr == nil { - x.FptrMapUint8Uintptr = new(map[uint8]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Uintptr != nil { + if true && x.FptrMapUint8Uintptr != nil { x.FptrMapUint8Uintptr = nil } } else { if x.FptrMapUint8Uintptr == nil { x.FptrMapUint8Uintptr = new(map[uint8]uintptr) } - yym479 := z.DecBinary() - _ = yym479 + if false { } else { z.F.DecMapUint8UintptrX(x.FptrMapUint8Uintptr, d) @@ -24079,28 +20979,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int = nil } else { - yyv480 := &x.FMapUint8Int - yym481 := z.DecBinary() - _ = yym481 if false { } else { - z.F.DecMapUint8IntX(yyv480, d) + z.F.DecMapUint8IntX(&x.FMapUint8Int, d) } } case "FptrMapUint8Int": - if x.FptrMapUint8Int == nil { - x.FptrMapUint8Int = new(map[uint8]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Int != nil { + if true && x.FptrMapUint8Int != nil { x.FptrMapUint8Int = nil } } else { if x.FptrMapUint8Int == nil { x.FptrMapUint8Int = new(map[uint8]int) } - yym483 := z.DecBinary() - _ = yym483 + if false { } else { z.F.DecMapUint8IntX(x.FptrMapUint8Int, d) @@ -24110,28 +21003,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int8 = nil } else { - yyv484 := &x.FMapUint8Int8 - yym485 := z.DecBinary() - _ = yym485 if false { } else { - z.F.DecMapUint8Int8X(yyv484, d) + z.F.DecMapUint8Int8X(&x.FMapUint8Int8, d) } } case "FptrMapUint8Int8": - if x.FptrMapUint8Int8 == nil { - x.FptrMapUint8Int8 = new(map[uint8]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Int8 != nil { + if true && x.FptrMapUint8Int8 != nil { x.FptrMapUint8Int8 = nil } } else { if x.FptrMapUint8Int8 == nil { x.FptrMapUint8Int8 = new(map[uint8]int8) } - yym487 := z.DecBinary() - _ = yym487 + if false { } else { z.F.DecMapUint8Int8X(x.FptrMapUint8Int8, d) @@ -24141,28 +21027,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int16 = nil } else { - yyv488 := &x.FMapUint8Int16 - yym489 := z.DecBinary() - _ = yym489 if false { } else { - z.F.DecMapUint8Int16X(yyv488, d) + z.F.DecMapUint8Int16X(&x.FMapUint8Int16, d) } } case "FptrMapUint8Int16": - if x.FptrMapUint8Int16 == nil { - x.FptrMapUint8Int16 = new(map[uint8]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Int16 != nil { + if true && x.FptrMapUint8Int16 != nil { x.FptrMapUint8Int16 = nil } } else { if x.FptrMapUint8Int16 == nil { x.FptrMapUint8Int16 = new(map[uint8]int16) } - yym491 := z.DecBinary() - _ = yym491 + if false { } else { z.F.DecMapUint8Int16X(x.FptrMapUint8Int16, d) @@ -24172,28 +21051,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int32 = nil } else { - yyv492 := &x.FMapUint8Int32 - yym493 := z.DecBinary() - _ = yym493 if false { } else { - z.F.DecMapUint8Int32X(yyv492, d) + z.F.DecMapUint8Int32X(&x.FMapUint8Int32, d) } } case "FptrMapUint8Int32": - if x.FptrMapUint8Int32 == nil { - x.FptrMapUint8Int32 = new(map[uint8]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Int32 != nil { + if true && x.FptrMapUint8Int32 != nil { x.FptrMapUint8Int32 = nil } } else { if x.FptrMapUint8Int32 == nil { x.FptrMapUint8Int32 = new(map[uint8]int32) } - yym495 := z.DecBinary() - _ = yym495 + if false { } else { z.F.DecMapUint8Int32X(x.FptrMapUint8Int32, d) @@ -24203,28 +21075,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int64 = nil } else { - yyv496 := &x.FMapUint8Int64 - yym497 := z.DecBinary() - _ = yym497 if false { } else { - z.F.DecMapUint8Int64X(yyv496, d) + z.F.DecMapUint8Int64X(&x.FMapUint8Int64, d) } } case "FptrMapUint8Int64": - if x.FptrMapUint8Int64 == nil { - x.FptrMapUint8Int64 = new(map[uint8]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Int64 != nil { + if true && x.FptrMapUint8Int64 != nil { x.FptrMapUint8Int64 = nil } } else { if x.FptrMapUint8Int64 == nil { x.FptrMapUint8Int64 = new(map[uint8]int64) } - yym499 := z.DecBinary() - _ = yym499 + if false { } else { z.F.DecMapUint8Int64X(x.FptrMapUint8Int64, d) @@ -24234,28 +21099,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Float32 = nil } else { - yyv500 := &x.FMapUint8Float32 - yym501 := z.DecBinary() - _ = yym501 if false { } else { - z.F.DecMapUint8Float32X(yyv500, d) + z.F.DecMapUint8Float32X(&x.FMapUint8Float32, d) } } case "FptrMapUint8Float32": - if x.FptrMapUint8Float32 == nil { - x.FptrMapUint8Float32 = new(map[uint8]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Float32 != nil { + if true && x.FptrMapUint8Float32 != nil { x.FptrMapUint8Float32 = nil } } else { if x.FptrMapUint8Float32 == nil { x.FptrMapUint8Float32 = new(map[uint8]float32) } - yym503 := z.DecBinary() - _ = yym503 + if false { } else { z.F.DecMapUint8Float32X(x.FptrMapUint8Float32, d) @@ -24265,28 +21123,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Float64 = nil } else { - yyv504 := &x.FMapUint8Float64 - yym505 := z.DecBinary() - _ = yym505 if false { } else { - z.F.DecMapUint8Float64X(yyv504, d) + z.F.DecMapUint8Float64X(&x.FMapUint8Float64, d) } } case "FptrMapUint8Float64": - if x.FptrMapUint8Float64 == nil { - x.FptrMapUint8Float64 = new(map[uint8]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Float64 != nil { + if true && x.FptrMapUint8Float64 != nil { x.FptrMapUint8Float64 = nil } } else { if x.FptrMapUint8Float64 == nil { x.FptrMapUint8Float64 = new(map[uint8]float64) } - yym507 := z.DecBinary() - _ = yym507 + if false { } else { z.F.DecMapUint8Float64X(x.FptrMapUint8Float64, d) @@ -24296,28 +21147,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Bool = nil } else { - yyv508 := &x.FMapUint8Bool - yym509 := z.DecBinary() - _ = yym509 if false { } else { - z.F.DecMapUint8BoolX(yyv508, d) + z.F.DecMapUint8BoolX(&x.FMapUint8Bool, d) } } case "FptrMapUint8Bool": - if x.FptrMapUint8Bool == nil { - x.FptrMapUint8Bool = new(map[uint8]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUint8Bool != nil { + if true && x.FptrMapUint8Bool != nil { x.FptrMapUint8Bool = nil } } else { if x.FptrMapUint8Bool == nil { x.FptrMapUint8Bool = new(map[uint8]bool) } - yym511 := z.DecBinary() - _ = yym511 + if false { } else { z.F.DecMapUint8BoolX(x.FptrMapUint8Bool, d) @@ -24327,28 +21171,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Intf = nil } else { - yyv512 := &x.FMapUint16Intf - yym513 := z.DecBinary() - _ = yym513 if false { } else { - z.F.DecMapUint16IntfX(yyv512, d) + z.F.DecMapUint16IntfX(&x.FMapUint16Intf, d) } } case "FptrMapUint16Intf": - if x.FptrMapUint16Intf == nil { - x.FptrMapUint16Intf = new(map[uint16]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Intf != nil { + if true && x.FptrMapUint16Intf != nil { x.FptrMapUint16Intf = nil } } else { if x.FptrMapUint16Intf == nil { x.FptrMapUint16Intf = new(map[uint16]interface{}) } - yym515 := z.DecBinary() - _ = yym515 + if false { } else { z.F.DecMapUint16IntfX(x.FptrMapUint16Intf, d) @@ -24358,28 +21195,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16String = nil } else { - yyv516 := &x.FMapUint16String - yym517 := z.DecBinary() - _ = yym517 if false { } else { - z.F.DecMapUint16StringX(yyv516, d) + z.F.DecMapUint16StringX(&x.FMapUint16String, d) } } case "FptrMapUint16String": - if x.FptrMapUint16String == nil { - x.FptrMapUint16String = new(map[uint16]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16String != nil { + if true && x.FptrMapUint16String != nil { x.FptrMapUint16String = nil } } else { if x.FptrMapUint16String == nil { x.FptrMapUint16String = new(map[uint16]string) } - yym519 := z.DecBinary() - _ = yym519 + if false { } else { z.F.DecMapUint16StringX(x.FptrMapUint16String, d) @@ -24389,28 +21219,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint = nil } else { - yyv520 := &x.FMapUint16Uint - yym521 := z.DecBinary() - _ = yym521 if false { } else { - z.F.DecMapUint16UintX(yyv520, d) + z.F.DecMapUint16UintX(&x.FMapUint16Uint, d) } } case "FptrMapUint16Uint": - if x.FptrMapUint16Uint == nil { - x.FptrMapUint16Uint = new(map[uint16]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint != nil { + if true && x.FptrMapUint16Uint != nil { x.FptrMapUint16Uint = nil } } else { if x.FptrMapUint16Uint == nil { x.FptrMapUint16Uint = new(map[uint16]uint) } - yym523 := z.DecBinary() - _ = yym523 + if false { } else { z.F.DecMapUint16UintX(x.FptrMapUint16Uint, d) @@ -24420,28 +21243,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint8 = nil } else { - yyv524 := &x.FMapUint16Uint8 - yym525 := z.DecBinary() - _ = yym525 if false { } else { - z.F.DecMapUint16Uint8X(yyv524, d) + z.F.DecMapUint16Uint8X(&x.FMapUint16Uint8, d) } } case "FptrMapUint16Uint8": - if x.FptrMapUint16Uint8 == nil { - x.FptrMapUint16Uint8 = new(map[uint16]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint8 != nil { + if true && x.FptrMapUint16Uint8 != nil { x.FptrMapUint16Uint8 = nil } } else { if x.FptrMapUint16Uint8 == nil { x.FptrMapUint16Uint8 = new(map[uint16]uint8) } - yym527 := z.DecBinary() - _ = yym527 + if false { } else { z.F.DecMapUint16Uint8X(x.FptrMapUint16Uint8, d) @@ -24451,28 +21267,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint16 = nil } else { - yyv528 := &x.FMapUint16Uint16 - yym529 := z.DecBinary() - _ = yym529 if false { } else { - z.F.DecMapUint16Uint16X(yyv528, d) + z.F.DecMapUint16Uint16X(&x.FMapUint16Uint16, d) } } case "FptrMapUint16Uint16": - if x.FptrMapUint16Uint16 == nil { - x.FptrMapUint16Uint16 = new(map[uint16]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint16 != nil { + if true && x.FptrMapUint16Uint16 != nil { x.FptrMapUint16Uint16 = nil } } else { if x.FptrMapUint16Uint16 == nil { x.FptrMapUint16Uint16 = new(map[uint16]uint16) } - yym531 := z.DecBinary() - _ = yym531 + if false { } else { z.F.DecMapUint16Uint16X(x.FptrMapUint16Uint16, d) @@ -24482,28 +21291,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint32 = nil } else { - yyv532 := &x.FMapUint16Uint32 - yym533 := z.DecBinary() - _ = yym533 if false { } else { - z.F.DecMapUint16Uint32X(yyv532, d) + z.F.DecMapUint16Uint32X(&x.FMapUint16Uint32, d) } } case "FptrMapUint16Uint32": - if x.FptrMapUint16Uint32 == nil { - x.FptrMapUint16Uint32 = new(map[uint16]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint32 != nil { + if true && x.FptrMapUint16Uint32 != nil { x.FptrMapUint16Uint32 = nil } } else { if x.FptrMapUint16Uint32 == nil { x.FptrMapUint16Uint32 = new(map[uint16]uint32) } - yym535 := z.DecBinary() - _ = yym535 + if false { } else { z.F.DecMapUint16Uint32X(x.FptrMapUint16Uint32, d) @@ -24513,28 +21315,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint64 = nil } else { - yyv536 := &x.FMapUint16Uint64 - yym537 := z.DecBinary() - _ = yym537 if false { } else { - z.F.DecMapUint16Uint64X(yyv536, d) + z.F.DecMapUint16Uint64X(&x.FMapUint16Uint64, d) } } case "FptrMapUint16Uint64": - if x.FptrMapUint16Uint64 == nil { - x.FptrMapUint16Uint64 = new(map[uint16]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint64 != nil { + if true && x.FptrMapUint16Uint64 != nil { x.FptrMapUint16Uint64 = nil } } else { if x.FptrMapUint16Uint64 == nil { x.FptrMapUint16Uint64 = new(map[uint16]uint64) } - yym539 := z.DecBinary() - _ = yym539 + if false { } else { z.F.DecMapUint16Uint64X(x.FptrMapUint16Uint64, d) @@ -24544,28 +21339,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uintptr = nil } else { - yyv540 := &x.FMapUint16Uintptr - yym541 := z.DecBinary() - _ = yym541 if false { } else { - z.F.DecMapUint16UintptrX(yyv540, d) + z.F.DecMapUint16UintptrX(&x.FMapUint16Uintptr, d) } } case "FptrMapUint16Uintptr": - if x.FptrMapUint16Uintptr == nil { - x.FptrMapUint16Uintptr = new(map[uint16]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Uintptr != nil { + if true && x.FptrMapUint16Uintptr != nil { x.FptrMapUint16Uintptr = nil } } else { if x.FptrMapUint16Uintptr == nil { x.FptrMapUint16Uintptr = new(map[uint16]uintptr) } - yym543 := z.DecBinary() - _ = yym543 + if false { } else { z.F.DecMapUint16UintptrX(x.FptrMapUint16Uintptr, d) @@ -24575,28 +21363,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int = nil } else { - yyv544 := &x.FMapUint16Int - yym545 := z.DecBinary() - _ = yym545 if false { } else { - z.F.DecMapUint16IntX(yyv544, d) + z.F.DecMapUint16IntX(&x.FMapUint16Int, d) } } case "FptrMapUint16Int": - if x.FptrMapUint16Int == nil { - x.FptrMapUint16Int = new(map[uint16]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Int != nil { + if true && x.FptrMapUint16Int != nil { x.FptrMapUint16Int = nil } } else { if x.FptrMapUint16Int == nil { x.FptrMapUint16Int = new(map[uint16]int) } - yym547 := z.DecBinary() - _ = yym547 + if false { } else { z.F.DecMapUint16IntX(x.FptrMapUint16Int, d) @@ -24606,28 +21387,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int8 = nil } else { - yyv548 := &x.FMapUint16Int8 - yym549 := z.DecBinary() - _ = yym549 if false { } else { - z.F.DecMapUint16Int8X(yyv548, d) + z.F.DecMapUint16Int8X(&x.FMapUint16Int8, d) } } case "FptrMapUint16Int8": - if x.FptrMapUint16Int8 == nil { - x.FptrMapUint16Int8 = new(map[uint16]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Int8 != nil { + if true && x.FptrMapUint16Int8 != nil { x.FptrMapUint16Int8 = nil } } else { if x.FptrMapUint16Int8 == nil { x.FptrMapUint16Int8 = new(map[uint16]int8) } - yym551 := z.DecBinary() - _ = yym551 + if false { } else { z.F.DecMapUint16Int8X(x.FptrMapUint16Int8, d) @@ -24637,28 +21411,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int16 = nil } else { - yyv552 := &x.FMapUint16Int16 - yym553 := z.DecBinary() - _ = yym553 if false { } else { - z.F.DecMapUint16Int16X(yyv552, d) + z.F.DecMapUint16Int16X(&x.FMapUint16Int16, d) } } case "FptrMapUint16Int16": - if x.FptrMapUint16Int16 == nil { - x.FptrMapUint16Int16 = new(map[uint16]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Int16 != nil { + if true && x.FptrMapUint16Int16 != nil { x.FptrMapUint16Int16 = nil } } else { if x.FptrMapUint16Int16 == nil { x.FptrMapUint16Int16 = new(map[uint16]int16) } - yym555 := z.DecBinary() - _ = yym555 + if false { } else { z.F.DecMapUint16Int16X(x.FptrMapUint16Int16, d) @@ -24668,28 +21435,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int32 = nil } else { - yyv556 := &x.FMapUint16Int32 - yym557 := z.DecBinary() - _ = yym557 if false { } else { - z.F.DecMapUint16Int32X(yyv556, d) + z.F.DecMapUint16Int32X(&x.FMapUint16Int32, d) } } case "FptrMapUint16Int32": - if x.FptrMapUint16Int32 == nil { - x.FptrMapUint16Int32 = new(map[uint16]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Int32 != nil { + if true && x.FptrMapUint16Int32 != nil { x.FptrMapUint16Int32 = nil } } else { if x.FptrMapUint16Int32 == nil { x.FptrMapUint16Int32 = new(map[uint16]int32) } - yym559 := z.DecBinary() - _ = yym559 + if false { } else { z.F.DecMapUint16Int32X(x.FptrMapUint16Int32, d) @@ -24699,28 +21459,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int64 = nil } else { - yyv560 := &x.FMapUint16Int64 - yym561 := z.DecBinary() - _ = yym561 if false { } else { - z.F.DecMapUint16Int64X(yyv560, d) + z.F.DecMapUint16Int64X(&x.FMapUint16Int64, d) } } case "FptrMapUint16Int64": - if x.FptrMapUint16Int64 == nil { - x.FptrMapUint16Int64 = new(map[uint16]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Int64 != nil { + if true && x.FptrMapUint16Int64 != nil { x.FptrMapUint16Int64 = nil } } else { if x.FptrMapUint16Int64 == nil { x.FptrMapUint16Int64 = new(map[uint16]int64) } - yym563 := z.DecBinary() - _ = yym563 + if false { } else { z.F.DecMapUint16Int64X(x.FptrMapUint16Int64, d) @@ -24730,28 +21483,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Float32 = nil } else { - yyv564 := &x.FMapUint16Float32 - yym565 := z.DecBinary() - _ = yym565 if false { } else { - z.F.DecMapUint16Float32X(yyv564, d) + z.F.DecMapUint16Float32X(&x.FMapUint16Float32, d) } } case "FptrMapUint16Float32": - if x.FptrMapUint16Float32 == nil { - x.FptrMapUint16Float32 = new(map[uint16]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Float32 != nil { + if true && x.FptrMapUint16Float32 != nil { x.FptrMapUint16Float32 = nil } } else { if x.FptrMapUint16Float32 == nil { x.FptrMapUint16Float32 = new(map[uint16]float32) } - yym567 := z.DecBinary() - _ = yym567 + if false { } else { z.F.DecMapUint16Float32X(x.FptrMapUint16Float32, d) @@ -24761,28 +21507,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Float64 = nil } else { - yyv568 := &x.FMapUint16Float64 - yym569 := z.DecBinary() - _ = yym569 if false { } else { - z.F.DecMapUint16Float64X(yyv568, d) + z.F.DecMapUint16Float64X(&x.FMapUint16Float64, d) } } case "FptrMapUint16Float64": - if x.FptrMapUint16Float64 == nil { - x.FptrMapUint16Float64 = new(map[uint16]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Float64 != nil { + if true && x.FptrMapUint16Float64 != nil { x.FptrMapUint16Float64 = nil } } else { if x.FptrMapUint16Float64 == nil { x.FptrMapUint16Float64 = new(map[uint16]float64) } - yym571 := z.DecBinary() - _ = yym571 + if false { } else { z.F.DecMapUint16Float64X(x.FptrMapUint16Float64, d) @@ -24792,28 +21531,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Bool = nil } else { - yyv572 := &x.FMapUint16Bool - yym573 := z.DecBinary() - _ = yym573 if false { } else { - z.F.DecMapUint16BoolX(yyv572, d) + z.F.DecMapUint16BoolX(&x.FMapUint16Bool, d) } } case "FptrMapUint16Bool": - if x.FptrMapUint16Bool == nil { - x.FptrMapUint16Bool = new(map[uint16]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUint16Bool != nil { + if true && x.FptrMapUint16Bool != nil { x.FptrMapUint16Bool = nil } } else { if x.FptrMapUint16Bool == nil { x.FptrMapUint16Bool = new(map[uint16]bool) } - yym575 := z.DecBinary() - _ = yym575 + if false { } else { z.F.DecMapUint16BoolX(x.FptrMapUint16Bool, d) @@ -24823,28 +21555,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Intf = nil } else { - yyv576 := &x.FMapUint32Intf - yym577 := z.DecBinary() - _ = yym577 if false { } else { - z.F.DecMapUint32IntfX(yyv576, d) + z.F.DecMapUint32IntfX(&x.FMapUint32Intf, d) } } case "FptrMapUint32Intf": - if x.FptrMapUint32Intf == nil { - x.FptrMapUint32Intf = new(map[uint32]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Intf != nil { + if true && x.FptrMapUint32Intf != nil { x.FptrMapUint32Intf = nil } } else { if x.FptrMapUint32Intf == nil { x.FptrMapUint32Intf = new(map[uint32]interface{}) } - yym579 := z.DecBinary() - _ = yym579 + if false { } else { z.F.DecMapUint32IntfX(x.FptrMapUint32Intf, d) @@ -24854,28 +21579,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32String = nil } else { - yyv580 := &x.FMapUint32String - yym581 := z.DecBinary() - _ = yym581 if false { } else { - z.F.DecMapUint32StringX(yyv580, d) + z.F.DecMapUint32StringX(&x.FMapUint32String, d) } } case "FptrMapUint32String": - if x.FptrMapUint32String == nil { - x.FptrMapUint32String = new(map[uint32]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32String != nil { + if true && x.FptrMapUint32String != nil { x.FptrMapUint32String = nil } } else { if x.FptrMapUint32String == nil { x.FptrMapUint32String = new(map[uint32]string) } - yym583 := z.DecBinary() - _ = yym583 + if false { } else { z.F.DecMapUint32StringX(x.FptrMapUint32String, d) @@ -24885,28 +21603,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint = nil } else { - yyv584 := &x.FMapUint32Uint - yym585 := z.DecBinary() - _ = yym585 if false { } else { - z.F.DecMapUint32UintX(yyv584, d) + z.F.DecMapUint32UintX(&x.FMapUint32Uint, d) } } case "FptrMapUint32Uint": - if x.FptrMapUint32Uint == nil { - x.FptrMapUint32Uint = new(map[uint32]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint != nil { + if true && x.FptrMapUint32Uint != nil { x.FptrMapUint32Uint = nil } } else { if x.FptrMapUint32Uint == nil { x.FptrMapUint32Uint = new(map[uint32]uint) } - yym587 := z.DecBinary() - _ = yym587 + if false { } else { z.F.DecMapUint32UintX(x.FptrMapUint32Uint, d) @@ -24916,28 +21627,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint8 = nil } else { - yyv588 := &x.FMapUint32Uint8 - yym589 := z.DecBinary() - _ = yym589 if false { } else { - z.F.DecMapUint32Uint8X(yyv588, d) + z.F.DecMapUint32Uint8X(&x.FMapUint32Uint8, d) } } case "FptrMapUint32Uint8": - if x.FptrMapUint32Uint8 == nil { - x.FptrMapUint32Uint8 = new(map[uint32]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint8 != nil { + if true && x.FptrMapUint32Uint8 != nil { x.FptrMapUint32Uint8 = nil } } else { if x.FptrMapUint32Uint8 == nil { x.FptrMapUint32Uint8 = new(map[uint32]uint8) } - yym591 := z.DecBinary() - _ = yym591 + if false { } else { z.F.DecMapUint32Uint8X(x.FptrMapUint32Uint8, d) @@ -24947,28 +21651,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint16 = nil } else { - yyv592 := &x.FMapUint32Uint16 - yym593 := z.DecBinary() - _ = yym593 if false { } else { - z.F.DecMapUint32Uint16X(yyv592, d) + z.F.DecMapUint32Uint16X(&x.FMapUint32Uint16, d) } } case "FptrMapUint32Uint16": - if x.FptrMapUint32Uint16 == nil { - x.FptrMapUint32Uint16 = new(map[uint32]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint16 != nil { + if true && x.FptrMapUint32Uint16 != nil { x.FptrMapUint32Uint16 = nil } } else { if x.FptrMapUint32Uint16 == nil { x.FptrMapUint32Uint16 = new(map[uint32]uint16) } - yym595 := z.DecBinary() - _ = yym595 + if false { } else { z.F.DecMapUint32Uint16X(x.FptrMapUint32Uint16, d) @@ -24978,28 +21675,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint32 = nil } else { - yyv596 := &x.FMapUint32Uint32 - yym597 := z.DecBinary() - _ = yym597 if false { } else { - z.F.DecMapUint32Uint32X(yyv596, d) + z.F.DecMapUint32Uint32X(&x.FMapUint32Uint32, d) } } case "FptrMapUint32Uint32": - if x.FptrMapUint32Uint32 == nil { - x.FptrMapUint32Uint32 = new(map[uint32]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint32 != nil { + if true && x.FptrMapUint32Uint32 != nil { x.FptrMapUint32Uint32 = nil } } else { if x.FptrMapUint32Uint32 == nil { x.FptrMapUint32Uint32 = new(map[uint32]uint32) } - yym599 := z.DecBinary() - _ = yym599 + if false { } else { z.F.DecMapUint32Uint32X(x.FptrMapUint32Uint32, d) @@ -25009,28 +21699,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint64 = nil } else { - yyv600 := &x.FMapUint32Uint64 - yym601 := z.DecBinary() - _ = yym601 if false { } else { - z.F.DecMapUint32Uint64X(yyv600, d) + z.F.DecMapUint32Uint64X(&x.FMapUint32Uint64, d) } } case "FptrMapUint32Uint64": - if x.FptrMapUint32Uint64 == nil { - x.FptrMapUint32Uint64 = new(map[uint32]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint64 != nil { + if true && x.FptrMapUint32Uint64 != nil { x.FptrMapUint32Uint64 = nil } } else { if x.FptrMapUint32Uint64 == nil { x.FptrMapUint32Uint64 = new(map[uint32]uint64) } - yym603 := z.DecBinary() - _ = yym603 + if false { } else { z.F.DecMapUint32Uint64X(x.FptrMapUint32Uint64, d) @@ -25040,28 +21723,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uintptr = nil } else { - yyv604 := &x.FMapUint32Uintptr - yym605 := z.DecBinary() - _ = yym605 if false { } else { - z.F.DecMapUint32UintptrX(yyv604, d) + z.F.DecMapUint32UintptrX(&x.FMapUint32Uintptr, d) } } case "FptrMapUint32Uintptr": - if x.FptrMapUint32Uintptr == nil { - x.FptrMapUint32Uintptr = new(map[uint32]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Uintptr != nil { + if true && x.FptrMapUint32Uintptr != nil { x.FptrMapUint32Uintptr = nil } } else { if x.FptrMapUint32Uintptr == nil { x.FptrMapUint32Uintptr = new(map[uint32]uintptr) } - yym607 := z.DecBinary() - _ = yym607 + if false { } else { z.F.DecMapUint32UintptrX(x.FptrMapUint32Uintptr, d) @@ -25071,28 +21747,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int = nil } else { - yyv608 := &x.FMapUint32Int - yym609 := z.DecBinary() - _ = yym609 if false { } else { - z.F.DecMapUint32IntX(yyv608, d) + z.F.DecMapUint32IntX(&x.FMapUint32Int, d) } } case "FptrMapUint32Int": - if x.FptrMapUint32Int == nil { - x.FptrMapUint32Int = new(map[uint32]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Int != nil { + if true && x.FptrMapUint32Int != nil { x.FptrMapUint32Int = nil } } else { if x.FptrMapUint32Int == nil { x.FptrMapUint32Int = new(map[uint32]int) } - yym611 := z.DecBinary() - _ = yym611 + if false { } else { z.F.DecMapUint32IntX(x.FptrMapUint32Int, d) @@ -25102,28 +21771,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int8 = nil } else { - yyv612 := &x.FMapUint32Int8 - yym613 := z.DecBinary() - _ = yym613 if false { } else { - z.F.DecMapUint32Int8X(yyv612, d) + z.F.DecMapUint32Int8X(&x.FMapUint32Int8, d) } } case "FptrMapUint32Int8": - if x.FptrMapUint32Int8 == nil { - x.FptrMapUint32Int8 = new(map[uint32]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Int8 != nil { + if true && x.FptrMapUint32Int8 != nil { x.FptrMapUint32Int8 = nil } } else { if x.FptrMapUint32Int8 == nil { x.FptrMapUint32Int8 = new(map[uint32]int8) } - yym615 := z.DecBinary() - _ = yym615 + if false { } else { z.F.DecMapUint32Int8X(x.FptrMapUint32Int8, d) @@ -25133,28 +21795,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int16 = nil } else { - yyv616 := &x.FMapUint32Int16 - yym617 := z.DecBinary() - _ = yym617 if false { } else { - z.F.DecMapUint32Int16X(yyv616, d) + z.F.DecMapUint32Int16X(&x.FMapUint32Int16, d) } } case "FptrMapUint32Int16": - if x.FptrMapUint32Int16 == nil { - x.FptrMapUint32Int16 = new(map[uint32]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Int16 != nil { + if true && x.FptrMapUint32Int16 != nil { x.FptrMapUint32Int16 = nil } } else { if x.FptrMapUint32Int16 == nil { x.FptrMapUint32Int16 = new(map[uint32]int16) } - yym619 := z.DecBinary() - _ = yym619 + if false { } else { z.F.DecMapUint32Int16X(x.FptrMapUint32Int16, d) @@ -25164,28 +21819,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int32 = nil } else { - yyv620 := &x.FMapUint32Int32 - yym621 := z.DecBinary() - _ = yym621 if false { } else { - z.F.DecMapUint32Int32X(yyv620, d) + z.F.DecMapUint32Int32X(&x.FMapUint32Int32, d) } } case "FptrMapUint32Int32": - if x.FptrMapUint32Int32 == nil { - x.FptrMapUint32Int32 = new(map[uint32]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Int32 != nil { + if true && x.FptrMapUint32Int32 != nil { x.FptrMapUint32Int32 = nil } } else { if x.FptrMapUint32Int32 == nil { x.FptrMapUint32Int32 = new(map[uint32]int32) } - yym623 := z.DecBinary() - _ = yym623 + if false { } else { z.F.DecMapUint32Int32X(x.FptrMapUint32Int32, d) @@ -25195,28 +21843,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int64 = nil } else { - yyv624 := &x.FMapUint32Int64 - yym625 := z.DecBinary() - _ = yym625 if false { } else { - z.F.DecMapUint32Int64X(yyv624, d) + z.F.DecMapUint32Int64X(&x.FMapUint32Int64, d) } } case "FptrMapUint32Int64": - if x.FptrMapUint32Int64 == nil { - x.FptrMapUint32Int64 = new(map[uint32]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Int64 != nil { + if true && x.FptrMapUint32Int64 != nil { x.FptrMapUint32Int64 = nil } } else { if x.FptrMapUint32Int64 == nil { x.FptrMapUint32Int64 = new(map[uint32]int64) } - yym627 := z.DecBinary() - _ = yym627 + if false { } else { z.F.DecMapUint32Int64X(x.FptrMapUint32Int64, d) @@ -25226,28 +21867,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Float32 = nil } else { - yyv628 := &x.FMapUint32Float32 - yym629 := z.DecBinary() - _ = yym629 if false { } else { - z.F.DecMapUint32Float32X(yyv628, d) + z.F.DecMapUint32Float32X(&x.FMapUint32Float32, d) } } case "FptrMapUint32Float32": - if x.FptrMapUint32Float32 == nil { - x.FptrMapUint32Float32 = new(map[uint32]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Float32 != nil { + if true && x.FptrMapUint32Float32 != nil { x.FptrMapUint32Float32 = nil } } else { if x.FptrMapUint32Float32 == nil { x.FptrMapUint32Float32 = new(map[uint32]float32) } - yym631 := z.DecBinary() - _ = yym631 + if false { } else { z.F.DecMapUint32Float32X(x.FptrMapUint32Float32, d) @@ -25257,28 +21891,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Float64 = nil } else { - yyv632 := &x.FMapUint32Float64 - yym633 := z.DecBinary() - _ = yym633 if false { } else { - z.F.DecMapUint32Float64X(yyv632, d) + z.F.DecMapUint32Float64X(&x.FMapUint32Float64, d) } } case "FptrMapUint32Float64": - if x.FptrMapUint32Float64 == nil { - x.FptrMapUint32Float64 = new(map[uint32]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Float64 != nil { + if true && x.FptrMapUint32Float64 != nil { x.FptrMapUint32Float64 = nil } } else { if x.FptrMapUint32Float64 == nil { x.FptrMapUint32Float64 = new(map[uint32]float64) } - yym635 := z.DecBinary() - _ = yym635 + if false { } else { z.F.DecMapUint32Float64X(x.FptrMapUint32Float64, d) @@ -25288,28 +21915,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Bool = nil } else { - yyv636 := &x.FMapUint32Bool - yym637 := z.DecBinary() - _ = yym637 if false { } else { - z.F.DecMapUint32BoolX(yyv636, d) + z.F.DecMapUint32BoolX(&x.FMapUint32Bool, d) } } case "FptrMapUint32Bool": - if x.FptrMapUint32Bool == nil { - x.FptrMapUint32Bool = new(map[uint32]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUint32Bool != nil { + if true && x.FptrMapUint32Bool != nil { x.FptrMapUint32Bool = nil } } else { if x.FptrMapUint32Bool == nil { x.FptrMapUint32Bool = new(map[uint32]bool) } - yym639 := z.DecBinary() - _ = yym639 + if false { } else { z.F.DecMapUint32BoolX(x.FptrMapUint32Bool, d) @@ -25319,28 +21939,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Intf = nil } else { - yyv640 := &x.FMapUint64Intf - yym641 := z.DecBinary() - _ = yym641 if false { } else { - z.F.DecMapUint64IntfX(yyv640, d) + z.F.DecMapUint64IntfX(&x.FMapUint64Intf, d) } } case "FptrMapUint64Intf": - if x.FptrMapUint64Intf == nil { - x.FptrMapUint64Intf = new(map[uint64]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Intf != nil { + if true && x.FptrMapUint64Intf != nil { x.FptrMapUint64Intf = nil } } else { if x.FptrMapUint64Intf == nil { x.FptrMapUint64Intf = new(map[uint64]interface{}) } - yym643 := z.DecBinary() - _ = yym643 + if false { } else { z.F.DecMapUint64IntfX(x.FptrMapUint64Intf, d) @@ -25350,28 +21963,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64String = nil } else { - yyv644 := &x.FMapUint64String - yym645 := z.DecBinary() - _ = yym645 if false { } else { - z.F.DecMapUint64StringX(yyv644, d) + z.F.DecMapUint64StringX(&x.FMapUint64String, d) } } case "FptrMapUint64String": - if x.FptrMapUint64String == nil { - x.FptrMapUint64String = new(map[uint64]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64String != nil { + if true && x.FptrMapUint64String != nil { x.FptrMapUint64String = nil } } else { if x.FptrMapUint64String == nil { x.FptrMapUint64String = new(map[uint64]string) } - yym647 := z.DecBinary() - _ = yym647 + if false { } else { z.F.DecMapUint64StringX(x.FptrMapUint64String, d) @@ -25381,28 +21987,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint = nil } else { - yyv648 := &x.FMapUint64Uint - yym649 := z.DecBinary() - _ = yym649 if false { } else { - z.F.DecMapUint64UintX(yyv648, d) + z.F.DecMapUint64UintX(&x.FMapUint64Uint, d) } } case "FptrMapUint64Uint": - if x.FptrMapUint64Uint == nil { - x.FptrMapUint64Uint = new(map[uint64]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint != nil { + if true && x.FptrMapUint64Uint != nil { x.FptrMapUint64Uint = nil } } else { if x.FptrMapUint64Uint == nil { x.FptrMapUint64Uint = new(map[uint64]uint) } - yym651 := z.DecBinary() - _ = yym651 + if false { } else { z.F.DecMapUint64UintX(x.FptrMapUint64Uint, d) @@ -25412,28 +22011,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint8 = nil } else { - yyv652 := &x.FMapUint64Uint8 - yym653 := z.DecBinary() - _ = yym653 if false { } else { - z.F.DecMapUint64Uint8X(yyv652, d) + z.F.DecMapUint64Uint8X(&x.FMapUint64Uint8, d) } } case "FptrMapUint64Uint8": - if x.FptrMapUint64Uint8 == nil { - x.FptrMapUint64Uint8 = new(map[uint64]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint8 != nil { + if true && x.FptrMapUint64Uint8 != nil { x.FptrMapUint64Uint8 = nil } } else { if x.FptrMapUint64Uint8 == nil { x.FptrMapUint64Uint8 = new(map[uint64]uint8) } - yym655 := z.DecBinary() - _ = yym655 + if false { } else { z.F.DecMapUint64Uint8X(x.FptrMapUint64Uint8, d) @@ -25443,28 +22035,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint16 = nil } else { - yyv656 := &x.FMapUint64Uint16 - yym657 := z.DecBinary() - _ = yym657 if false { } else { - z.F.DecMapUint64Uint16X(yyv656, d) + z.F.DecMapUint64Uint16X(&x.FMapUint64Uint16, d) } } case "FptrMapUint64Uint16": - if x.FptrMapUint64Uint16 == nil { - x.FptrMapUint64Uint16 = new(map[uint64]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint16 != nil { + if true && x.FptrMapUint64Uint16 != nil { x.FptrMapUint64Uint16 = nil } } else { if x.FptrMapUint64Uint16 == nil { x.FptrMapUint64Uint16 = new(map[uint64]uint16) } - yym659 := z.DecBinary() - _ = yym659 + if false { } else { z.F.DecMapUint64Uint16X(x.FptrMapUint64Uint16, d) @@ -25474,28 +22059,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint32 = nil } else { - yyv660 := &x.FMapUint64Uint32 - yym661 := z.DecBinary() - _ = yym661 if false { } else { - z.F.DecMapUint64Uint32X(yyv660, d) + z.F.DecMapUint64Uint32X(&x.FMapUint64Uint32, d) } } case "FptrMapUint64Uint32": - if x.FptrMapUint64Uint32 == nil { - x.FptrMapUint64Uint32 = new(map[uint64]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint32 != nil { + if true && x.FptrMapUint64Uint32 != nil { x.FptrMapUint64Uint32 = nil } } else { if x.FptrMapUint64Uint32 == nil { x.FptrMapUint64Uint32 = new(map[uint64]uint32) } - yym663 := z.DecBinary() - _ = yym663 + if false { } else { z.F.DecMapUint64Uint32X(x.FptrMapUint64Uint32, d) @@ -25505,28 +22083,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint64 = nil } else { - yyv664 := &x.FMapUint64Uint64 - yym665 := z.DecBinary() - _ = yym665 if false { } else { - z.F.DecMapUint64Uint64X(yyv664, d) + z.F.DecMapUint64Uint64X(&x.FMapUint64Uint64, d) } } case "FptrMapUint64Uint64": - if x.FptrMapUint64Uint64 == nil { - x.FptrMapUint64Uint64 = new(map[uint64]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint64 != nil { + if true && x.FptrMapUint64Uint64 != nil { x.FptrMapUint64Uint64 = nil } } else { if x.FptrMapUint64Uint64 == nil { x.FptrMapUint64Uint64 = new(map[uint64]uint64) } - yym667 := z.DecBinary() - _ = yym667 + if false { } else { z.F.DecMapUint64Uint64X(x.FptrMapUint64Uint64, d) @@ -25536,28 +22107,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uintptr = nil } else { - yyv668 := &x.FMapUint64Uintptr - yym669 := z.DecBinary() - _ = yym669 if false { } else { - z.F.DecMapUint64UintptrX(yyv668, d) + z.F.DecMapUint64UintptrX(&x.FMapUint64Uintptr, d) } } case "FptrMapUint64Uintptr": - if x.FptrMapUint64Uintptr == nil { - x.FptrMapUint64Uintptr = new(map[uint64]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Uintptr != nil { + if true && x.FptrMapUint64Uintptr != nil { x.FptrMapUint64Uintptr = nil } } else { if x.FptrMapUint64Uintptr == nil { x.FptrMapUint64Uintptr = new(map[uint64]uintptr) } - yym671 := z.DecBinary() - _ = yym671 + if false { } else { z.F.DecMapUint64UintptrX(x.FptrMapUint64Uintptr, d) @@ -25567,28 +22131,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int = nil } else { - yyv672 := &x.FMapUint64Int - yym673 := z.DecBinary() - _ = yym673 if false { } else { - z.F.DecMapUint64IntX(yyv672, d) + z.F.DecMapUint64IntX(&x.FMapUint64Int, d) } } case "FptrMapUint64Int": - if x.FptrMapUint64Int == nil { - x.FptrMapUint64Int = new(map[uint64]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Int != nil { + if true && x.FptrMapUint64Int != nil { x.FptrMapUint64Int = nil } } else { if x.FptrMapUint64Int == nil { x.FptrMapUint64Int = new(map[uint64]int) } - yym675 := z.DecBinary() - _ = yym675 + if false { } else { z.F.DecMapUint64IntX(x.FptrMapUint64Int, d) @@ -25598,28 +22155,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int8 = nil } else { - yyv676 := &x.FMapUint64Int8 - yym677 := z.DecBinary() - _ = yym677 if false { } else { - z.F.DecMapUint64Int8X(yyv676, d) + z.F.DecMapUint64Int8X(&x.FMapUint64Int8, d) } } case "FptrMapUint64Int8": - if x.FptrMapUint64Int8 == nil { - x.FptrMapUint64Int8 = new(map[uint64]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Int8 != nil { + if true && x.FptrMapUint64Int8 != nil { x.FptrMapUint64Int8 = nil } } else { if x.FptrMapUint64Int8 == nil { x.FptrMapUint64Int8 = new(map[uint64]int8) } - yym679 := z.DecBinary() - _ = yym679 + if false { } else { z.F.DecMapUint64Int8X(x.FptrMapUint64Int8, d) @@ -25629,28 +22179,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int16 = nil } else { - yyv680 := &x.FMapUint64Int16 - yym681 := z.DecBinary() - _ = yym681 if false { } else { - z.F.DecMapUint64Int16X(yyv680, d) + z.F.DecMapUint64Int16X(&x.FMapUint64Int16, d) } } case "FptrMapUint64Int16": - if x.FptrMapUint64Int16 == nil { - x.FptrMapUint64Int16 = new(map[uint64]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Int16 != nil { + if true && x.FptrMapUint64Int16 != nil { x.FptrMapUint64Int16 = nil } } else { if x.FptrMapUint64Int16 == nil { x.FptrMapUint64Int16 = new(map[uint64]int16) } - yym683 := z.DecBinary() - _ = yym683 + if false { } else { z.F.DecMapUint64Int16X(x.FptrMapUint64Int16, d) @@ -25660,28 +22203,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int32 = nil } else { - yyv684 := &x.FMapUint64Int32 - yym685 := z.DecBinary() - _ = yym685 if false { } else { - z.F.DecMapUint64Int32X(yyv684, d) + z.F.DecMapUint64Int32X(&x.FMapUint64Int32, d) } } case "FptrMapUint64Int32": - if x.FptrMapUint64Int32 == nil { - x.FptrMapUint64Int32 = new(map[uint64]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Int32 != nil { + if true && x.FptrMapUint64Int32 != nil { x.FptrMapUint64Int32 = nil } } else { if x.FptrMapUint64Int32 == nil { x.FptrMapUint64Int32 = new(map[uint64]int32) } - yym687 := z.DecBinary() - _ = yym687 + if false { } else { z.F.DecMapUint64Int32X(x.FptrMapUint64Int32, d) @@ -25691,28 +22227,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int64 = nil } else { - yyv688 := &x.FMapUint64Int64 - yym689 := z.DecBinary() - _ = yym689 if false { } else { - z.F.DecMapUint64Int64X(yyv688, d) + z.F.DecMapUint64Int64X(&x.FMapUint64Int64, d) } } case "FptrMapUint64Int64": - if x.FptrMapUint64Int64 == nil { - x.FptrMapUint64Int64 = new(map[uint64]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Int64 != nil { + if true && x.FptrMapUint64Int64 != nil { x.FptrMapUint64Int64 = nil } } else { if x.FptrMapUint64Int64 == nil { x.FptrMapUint64Int64 = new(map[uint64]int64) } - yym691 := z.DecBinary() - _ = yym691 + if false { } else { z.F.DecMapUint64Int64X(x.FptrMapUint64Int64, d) @@ -25722,28 +22251,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Float32 = nil } else { - yyv692 := &x.FMapUint64Float32 - yym693 := z.DecBinary() - _ = yym693 if false { } else { - z.F.DecMapUint64Float32X(yyv692, d) + z.F.DecMapUint64Float32X(&x.FMapUint64Float32, d) } } case "FptrMapUint64Float32": - if x.FptrMapUint64Float32 == nil { - x.FptrMapUint64Float32 = new(map[uint64]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Float32 != nil { + if true && x.FptrMapUint64Float32 != nil { x.FptrMapUint64Float32 = nil } } else { if x.FptrMapUint64Float32 == nil { x.FptrMapUint64Float32 = new(map[uint64]float32) } - yym695 := z.DecBinary() - _ = yym695 + if false { } else { z.F.DecMapUint64Float32X(x.FptrMapUint64Float32, d) @@ -25753,28 +22275,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Float64 = nil } else { - yyv696 := &x.FMapUint64Float64 - yym697 := z.DecBinary() - _ = yym697 if false { } else { - z.F.DecMapUint64Float64X(yyv696, d) + z.F.DecMapUint64Float64X(&x.FMapUint64Float64, d) } } case "FptrMapUint64Float64": - if x.FptrMapUint64Float64 == nil { - x.FptrMapUint64Float64 = new(map[uint64]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Float64 != nil { + if true && x.FptrMapUint64Float64 != nil { x.FptrMapUint64Float64 = nil } } else { if x.FptrMapUint64Float64 == nil { x.FptrMapUint64Float64 = new(map[uint64]float64) } - yym699 := z.DecBinary() - _ = yym699 + if false { } else { z.F.DecMapUint64Float64X(x.FptrMapUint64Float64, d) @@ -25784,28 +22299,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Bool = nil } else { - yyv700 := &x.FMapUint64Bool - yym701 := z.DecBinary() - _ = yym701 if false { } else { - z.F.DecMapUint64BoolX(yyv700, d) + z.F.DecMapUint64BoolX(&x.FMapUint64Bool, d) } } case "FptrMapUint64Bool": - if x.FptrMapUint64Bool == nil { - x.FptrMapUint64Bool = new(map[uint64]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUint64Bool != nil { + if true && x.FptrMapUint64Bool != nil { x.FptrMapUint64Bool = nil } } else { if x.FptrMapUint64Bool == nil { x.FptrMapUint64Bool = new(map[uint64]bool) } - yym703 := z.DecBinary() - _ = yym703 + if false { } else { z.F.DecMapUint64BoolX(x.FptrMapUint64Bool, d) @@ -25815,28 +22323,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrIntf = nil } else { - yyv704 := &x.FMapUintptrIntf - yym705 := z.DecBinary() - _ = yym705 if false { } else { - z.F.DecMapUintptrIntfX(yyv704, d) + z.F.DecMapUintptrIntfX(&x.FMapUintptrIntf, d) } } case "FptrMapUintptrIntf": - if x.FptrMapUintptrIntf == nil { - x.FptrMapUintptrIntf = new(map[uintptr]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrIntf != nil { + if true && x.FptrMapUintptrIntf != nil { x.FptrMapUintptrIntf = nil } } else { if x.FptrMapUintptrIntf == nil { x.FptrMapUintptrIntf = new(map[uintptr]interface{}) } - yym707 := z.DecBinary() - _ = yym707 + if false { } else { z.F.DecMapUintptrIntfX(x.FptrMapUintptrIntf, d) @@ -25846,28 +22347,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrString = nil } else { - yyv708 := &x.FMapUintptrString - yym709 := z.DecBinary() - _ = yym709 if false { } else { - z.F.DecMapUintptrStringX(yyv708, d) + z.F.DecMapUintptrStringX(&x.FMapUintptrString, d) } } case "FptrMapUintptrString": - if x.FptrMapUintptrString == nil { - x.FptrMapUintptrString = new(map[uintptr]string) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrString != nil { + if true && x.FptrMapUintptrString != nil { x.FptrMapUintptrString = nil } } else { if x.FptrMapUintptrString == nil { x.FptrMapUintptrString = new(map[uintptr]string) } - yym711 := z.DecBinary() - _ = yym711 + if false { } else { z.F.DecMapUintptrStringX(x.FptrMapUintptrString, d) @@ -25877,28 +22371,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint = nil } else { - yyv712 := &x.FMapUintptrUint - yym713 := z.DecBinary() - _ = yym713 if false { } else { - z.F.DecMapUintptrUintX(yyv712, d) + z.F.DecMapUintptrUintX(&x.FMapUintptrUint, d) } } case "FptrMapUintptrUint": - if x.FptrMapUintptrUint == nil { - x.FptrMapUintptrUint = new(map[uintptr]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint != nil { + if true && x.FptrMapUintptrUint != nil { x.FptrMapUintptrUint = nil } } else { if x.FptrMapUintptrUint == nil { x.FptrMapUintptrUint = new(map[uintptr]uint) } - yym715 := z.DecBinary() - _ = yym715 + if false { } else { z.F.DecMapUintptrUintX(x.FptrMapUintptrUint, d) @@ -25908,28 +22395,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint8 = nil } else { - yyv716 := &x.FMapUintptrUint8 - yym717 := z.DecBinary() - _ = yym717 if false { } else { - z.F.DecMapUintptrUint8X(yyv716, d) + z.F.DecMapUintptrUint8X(&x.FMapUintptrUint8, d) } } case "FptrMapUintptrUint8": - if x.FptrMapUintptrUint8 == nil { - x.FptrMapUintptrUint8 = new(map[uintptr]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint8 != nil { + if true && x.FptrMapUintptrUint8 != nil { x.FptrMapUintptrUint8 = nil } } else { if x.FptrMapUintptrUint8 == nil { x.FptrMapUintptrUint8 = new(map[uintptr]uint8) } - yym719 := z.DecBinary() - _ = yym719 + if false { } else { z.F.DecMapUintptrUint8X(x.FptrMapUintptrUint8, d) @@ -25939,28 +22419,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint16 = nil } else { - yyv720 := &x.FMapUintptrUint16 - yym721 := z.DecBinary() - _ = yym721 if false { } else { - z.F.DecMapUintptrUint16X(yyv720, d) + z.F.DecMapUintptrUint16X(&x.FMapUintptrUint16, d) } } case "FptrMapUintptrUint16": - if x.FptrMapUintptrUint16 == nil { - x.FptrMapUintptrUint16 = new(map[uintptr]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint16 != nil { + if true && x.FptrMapUintptrUint16 != nil { x.FptrMapUintptrUint16 = nil } } else { if x.FptrMapUintptrUint16 == nil { x.FptrMapUintptrUint16 = new(map[uintptr]uint16) } - yym723 := z.DecBinary() - _ = yym723 + if false { } else { z.F.DecMapUintptrUint16X(x.FptrMapUintptrUint16, d) @@ -25970,28 +22443,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint32 = nil } else { - yyv724 := &x.FMapUintptrUint32 - yym725 := z.DecBinary() - _ = yym725 if false { } else { - z.F.DecMapUintptrUint32X(yyv724, d) + z.F.DecMapUintptrUint32X(&x.FMapUintptrUint32, d) } } case "FptrMapUintptrUint32": - if x.FptrMapUintptrUint32 == nil { - x.FptrMapUintptrUint32 = new(map[uintptr]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint32 != nil { + if true && x.FptrMapUintptrUint32 != nil { x.FptrMapUintptrUint32 = nil } } else { if x.FptrMapUintptrUint32 == nil { x.FptrMapUintptrUint32 = new(map[uintptr]uint32) } - yym727 := z.DecBinary() - _ = yym727 + if false { } else { z.F.DecMapUintptrUint32X(x.FptrMapUintptrUint32, d) @@ -26001,28 +22467,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint64 = nil } else { - yyv728 := &x.FMapUintptrUint64 - yym729 := z.DecBinary() - _ = yym729 if false { } else { - z.F.DecMapUintptrUint64X(yyv728, d) + z.F.DecMapUintptrUint64X(&x.FMapUintptrUint64, d) } } case "FptrMapUintptrUint64": - if x.FptrMapUintptrUint64 == nil { - x.FptrMapUintptrUint64 = new(map[uintptr]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint64 != nil { + if true && x.FptrMapUintptrUint64 != nil { x.FptrMapUintptrUint64 = nil } } else { if x.FptrMapUintptrUint64 == nil { x.FptrMapUintptrUint64 = new(map[uintptr]uint64) } - yym731 := z.DecBinary() - _ = yym731 + if false { } else { z.F.DecMapUintptrUint64X(x.FptrMapUintptrUint64, d) @@ -26032,28 +22491,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUintptr = nil } else { - yyv732 := &x.FMapUintptrUintptr - yym733 := z.DecBinary() - _ = yym733 if false { } else { - z.F.DecMapUintptrUintptrX(yyv732, d) + z.F.DecMapUintptrUintptrX(&x.FMapUintptrUintptr, d) } } case "FptrMapUintptrUintptr": - if x.FptrMapUintptrUintptr == nil { - x.FptrMapUintptrUintptr = new(map[uintptr]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrUintptr != nil { + if true && x.FptrMapUintptrUintptr != nil { x.FptrMapUintptrUintptr = nil } } else { if x.FptrMapUintptrUintptr == nil { x.FptrMapUintptrUintptr = new(map[uintptr]uintptr) } - yym735 := z.DecBinary() - _ = yym735 + if false { } else { z.F.DecMapUintptrUintptrX(x.FptrMapUintptrUintptr, d) @@ -26063,28 +22515,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt = nil } else { - yyv736 := &x.FMapUintptrInt - yym737 := z.DecBinary() - _ = yym737 if false { } else { - z.F.DecMapUintptrIntX(yyv736, d) + z.F.DecMapUintptrIntX(&x.FMapUintptrInt, d) } } case "FptrMapUintptrInt": - if x.FptrMapUintptrInt == nil { - x.FptrMapUintptrInt = new(map[uintptr]int) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt != nil { + if true && x.FptrMapUintptrInt != nil { x.FptrMapUintptrInt = nil } } else { if x.FptrMapUintptrInt == nil { x.FptrMapUintptrInt = new(map[uintptr]int) } - yym739 := z.DecBinary() - _ = yym739 + if false { } else { z.F.DecMapUintptrIntX(x.FptrMapUintptrInt, d) @@ -26094,28 +22539,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt8 = nil } else { - yyv740 := &x.FMapUintptrInt8 - yym741 := z.DecBinary() - _ = yym741 if false { } else { - z.F.DecMapUintptrInt8X(yyv740, d) + z.F.DecMapUintptrInt8X(&x.FMapUintptrInt8, d) } } case "FptrMapUintptrInt8": - if x.FptrMapUintptrInt8 == nil { - x.FptrMapUintptrInt8 = new(map[uintptr]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt8 != nil { + if true && x.FptrMapUintptrInt8 != nil { x.FptrMapUintptrInt8 = nil } } else { if x.FptrMapUintptrInt8 == nil { x.FptrMapUintptrInt8 = new(map[uintptr]int8) } - yym743 := z.DecBinary() - _ = yym743 + if false { } else { z.F.DecMapUintptrInt8X(x.FptrMapUintptrInt8, d) @@ -26125,28 +22563,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt16 = nil } else { - yyv744 := &x.FMapUintptrInt16 - yym745 := z.DecBinary() - _ = yym745 if false { } else { - z.F.DecMapUintptrInt16X(yyv744, d) + z.F.DecMapUintptrInt16X(&x.FMapUintptrInt16, d) } } case "FptrMapUintptrInt16": - if x.FptrMapUintptrInt16 == nil { - x.FptrMapUintptrInt16 = new(map[uintptr]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt16 != nil { + if true && x.FptrMapUintptrInt16 != nil { x.FptrMapUintptrInt16 = nil } } else { if x.FptrMapUintptrInt16 == nil { x.FptrMapUintptrInt16 = new(map[uintptr]int16) } - yym747 := z.DecBinary() - _ = yym747 + if false { } else { z.F.DecMapUintptrInt16X(x.FptrMapUintptrInt16, d) @@ -26156,28 +22587,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt32 = nil } else { - yyv748 := &x.FMapUintptrInt32 - yym749 := z.DecBinary() - _ = yym749 if false { } else { - z.F.DecMapUintptrInt32X(yyv748, d) + z.F.DecMapUintptrInt32X(&x.FMapUintptrInt32, d) } } case "FptrMapUintptrInt32": - if x.FptrMapUintptrInt32 == nil { - x.FptrMapUintptrInt32 = new(map[uintptr]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt32 != nil { + if true && x.FptrMapUintptrInt32 != nil { x.FptrMapUintptrInt32 = nil } } else { if x.FptrMapUintptrInt32 == nil { x.FptrMapUintptrInt32 = new(map[uintptr]int32) } - yym751 := z.DecBinary() - _ = yym751 + if false { } else { z.F.DecMapUintptrInt32X(x.FptrMapUintptrInt32, d) @@ -26187,28 +22611,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt64 = nil } else { - yyv752 := &x.FMapUintptrInt64 - yym753 := z.DecBinary() - _ = yym753 if false { } else { - z.F.DecMapUintptrInt64X(yyv752, d) + z.F.DecMapUintptrInt64X(&x.FMapUintptrInt64, d) } } case "FptrMapUintptrInt64": - if x.FptrMapUintptrInt64 == nil { - x.FptrMapUintptrInt64 = new(map[uintptr]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt64 != nil { + if true && x.FptrMapUintptrInt64 != nil { x.FptrMapUintptrInt64 = nil } } else { if x.FptrMapUintptrInt64 == nil { x.FptrMapUintptrInt64 = new(map[uintptr]int64) } - yym755 := z.DecBinary() - _ = yym755 + if false { } else { z.F.DecMapUintptrInt64X(x.FptrMapUintptrInt64, d) @@ -26218,28 +22635,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrFloat32 = nil } else { - yyv756 := &x.FMapUintptrFloat32 - yym757 := z.DecBinary() - _ = yym757 if false { } else { - z.F.DecMapUintptrFloat32X(yyv756, d) + z.F.DecMapUintptrFloat32X(&x.FMapUintptrFloat32, d) } } case "FptrMapUintptrFloat32": - if x.FptrMapUintptrFloat32 == nil { - x.FptrMapUintptrFloat32 = new(map[uintptr]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrFloat32 != nil { + if true && x.FptrMapUintptrFloat32 != nil { x.FptrMapUintptrFloat32 = nil } } else { if x.FptrMapUintptrFloat32 == nil { x.FptrMapUintptrFloat32 = new(map[uintptr]float32) } - yym759 := z.DecBinary() - _ = yym759 + if false { } else { z.F.DecMapUintptrFloat32X(x.FptrMapUintptrFloat32, d) @@ -26249,28 +22659,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrFloat64 = nil } else { - yyv760 := &x.FMapUintptrFloat64 - yym761 := z.DecBinary() - _ = yym761 if false { } else { - z.F.DecMapUintptrFloat64X(yyv760, d) + z.F.DecMapUintptrFloat64X(&x.FMapUintptrFloat64, d) } } case "FptrMapUintptrFloat64": - if x.FptrMapUintptrFloat64 == nil { - x.FptrMapUintptrFloat64 = new(map[uintptr]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrFloat64 != nil { + if true && x.FptrMapUintptrFloat64 != nil { x.FptrMapUintptrFloat64 = nil } } else { if x.FptrMapUintptrFloat64 == nil { x.FptrMapUintptrFloat64 = new(map[uintptr]float64) } - yym763 := z.DecBinary() - _ = yym763 + if false { } else { z.F.DecMapUintptrFloat64X(x.FptrMapUintptrFloat64, d) @@ -26280,28 +22683,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrBool = nil } else { - yyv764 := &x.FMapUintptrBool - yym765 := z.DecBinary() - _ = yym765 if false { } else { - z.F.DecMapUintptrBoolX(yyv764, d) + z.F.DecMapUintptrBoolX(&x.FMapUintptrBool, d) } } case "FptrMapUintptrBool": - if x.FptrMapUintptrBool == nil { - x.FptrMapUintptrBool = new(map[uintptr]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapUintptrBool != nil { + if true && x.FptrMapUintptrBool != nil { x.FptrMapUintptrBool = nil } } else { if x.FptrMapUintptrBool == nil { x.FptrMapUintptrBool = new(map[uintptr]bool) } - yym767 := z.DecBinary() - _ = yym767 + if false { } else { z.F.DecMapUintptrBoolX(x.FptrMapUintptrBool, d) @@ -26311,28 +22707,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntIntf = nil } else { - yyv768 := &x.FMapIntIntf - yym769 := z.DecBinary() - _ = yym769 if false { } else { - z.F.DecMapIntIntfX(yyv768, d) + z.F.DecMapIntIntfX(&x.FMapIntIntf, d) } } case "FptrMapIntIntf": - if x.FptrMapIntIntf == nil { - x.FptrMapIntIntf = new(map[int]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapIntIntf != nil { + if true && x.FptrMapIntIntf != nil { x.FptrMapIntIntf = nil } } else { if x.FptrMapIntIntf == nil { x.FptrMapIntIntf = new(map[int]interface{}) } - yym771 := z.DecBinary() - _ = yym771 + if false { } else { z.F.DecMapIntIntfX(x.FptrMapIntIntf, d) @@ -26342,28 +22731,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntString = nil } else { - yyv772 := &x.FMapIntString - yym773 := z.DecBinary() - _ = yym773 if false { } else { - z.F.DecMapIntStringX(yyv772, d) + z.F.DecMapIntStringX(&x.FMapIntString, d) } } case "FptrMapIntString": - if x.FptrMapIntString == nil { - x.FptrMapIntString = new(map[int]string) - } if r.TryDecodeAsNil() { - if x.FptrMapIntString != nil { + if true && x.FptrMapIntString != nil { x.FptrMapIntString = nil } } else { if x.FptrMapIntString == nil { x.FptrMapIntString = new(map[int]string) } - yym775 := z.DecBinary() - _ = yym775 + if false { } else { z.F.DecMapIntStringX(x.FptrMapIntString, d) @@ -26373,28 +22755,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint = nil } else { - yyv776 := &x.FMapIntUint - yym777 := z.DecBinary() - _ = yym777 if false { } else { - z.F.DecMapIntUintX(yyv776, d) + z.F.DecMapIntUintX(&x.FMapIntUint, d) } } case "FptrMapIntUint": - if x.FptrMapIntUint == nil { - x.FptrMapIntUint = new(map[int]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUint != nil { + if true && x.FptrMapIntUint != nil { x.FptrMapIntUint = nil } } else { if x.FptrMapIntUint == nil { x.FptrMapIntUint = new(map[int]uint) } - yym779 := z.DecBinary() - _ = yym779 + if false { } else { z.F.DecMapIntUintX(x.FptrMapIntUint, d) @@ -26404,28 +22779,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint8 = nil } else { - yyv780 := &x.FMapIntUint8 - yym781 := z.DecBinary() - _ = yym781 if false { } else { - z.F.DecMapIntUint8X(yyv780, d) + z.F.DecMapIntUint8X(&x.FMapIntUint8, d) } } case "FptrMapIntUint8": - if x.FptrMapIntUint8 == nil { - x.FptrMapIntUint8 = new(map[int]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUint8 != nil { + if true && x.FptrMapIntUint8 != nil { x.FptrMapIntUint8 = nil } } else { if x.FptrMapIntUint8 == nil { x.FptrMapIntUint8 = new(map[int]uint8) } - yym783 := z.DecBinary() - _ = yym783 + if false { } else { z.F.DecMapIntUint8X(x.FptrMapIntUint8, d) @@ -26435,28 +22803,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint16 = nil } else { - yyv784 := &x.FMapIntUint16 - yym785 := z.DecBinary() - _ = yym785 if false { } else { - z.F.DecMapIntUint16X(yyv784, d) + z.F.DecMapIntUint16X(&x.FMapIntUint16, d) } } case "FptrMapIntUint16": - if x.FptrMapIntUint16 == nil { - x.FptrMapIntUint16 = new(map[int]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUint16 != nil { + if true && x.FptrMapIntUint16 != nil { x.FptrMapIntUint16 = nil } } else { if x.FptrMapIntUint16 == nil { x.FptrMapIntUint16 = new(map[int]uint16) } - yym787 := z.DecBinary() - _ = yym787 + if false { } else { z.F.DecMapIntUint16X(x.FptrMapIntUint16, d) @@ -26466,28 +22827,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint32 = nil } else { - yyv788 := &x.FMapIntUint32 - yym789 := z.DecBinary() - _ = yym789 if false { } else { - z.F.DecMapIntUint32X(yyv788, d) + z.F.DecMapIntUint32X(&x.FMapIntUint32, d) } } case "FptrMapIntUint32": - if x.FptrMapIntUint32 == nil { - x.FptrMapIntUint32 = new(map[int]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUint32 != nil { + if true && x.FptrMapIntUint32 != nil { x.FptrMapIntUint32 = nil } } else { if x.FptrMapIntUint32 == nil { x.FptrMapIntUint32 = new(map[int]uint32) } - yym791 := z.DecBinary() - _ = yym791 + if false { } else { z.F.DecMapIntUint32X(x.FptrMapIntUint32, d) @@ -26497,28 +22851,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint64 = nil } else { - yyv792 := &x.FMapIntUint64 - yym793 := z.DecBinary() - _ = yym793 if false { } else { - z.F.DecMapIntUint64X(yyv792, d) + z.F.DecMapIntUint64X(&x.FMapIntUint64, d) } } case "FptrMapIntUint64": - if x.FptrMapIntUint64 == nil { - x.FptrMapIntUint64 = new(map[int]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUint64 != nil { + if true && x.FptrMapIntUint64 != nil { x.FptrMapIntUint64 = nil } } else { if x.FptrMapIntUint64 == nil { x.FptrMapIntUint64 = new(map[int]uint64) } - yym795 := z.DecBinary() - _ = yym795 + if false { } else { z.F.DecMapIntUint64X(x.FptrMapIntUint64, d) @@ -26528,28 +22875,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUintptr = nil } else { - yyv796 := &x.FMapIntUintptr - yym797 := z.DecBinary() - _ = yym797 if false { } else { - z.F.DecMapIntUintptrX(yyv796, d) + z.F.DecMapIntUintptrX(&x.FMapIntUintptr, d) } } case "FptrMapIntUintptr": - if x.FptrMapIntUintptr == nil { - x.FptrMapIntUintptr = new(map[int]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapIntUintptr != nil { + if true && x.FptrMapIntUintptr != nil { x.FptrMapIntUintptr = nil } } else { if x.FptrMapIntUintptr == nil { x.FptrMapIntUintptr = new(map[int]uintptr) } - yym799 := z.DecBinary() - _ = yym799 + if false { } else { z.F.DecMapIntUintptrX(x.FptrMapIntUintptr, d) @@ -26559,28 +22899,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt = nil } else { - yyv800 := &x.FMapIntInt - yym801 := z.DecBinary() - _ = yym801 if false { } else { - z.F.DecMapIntIntX(yyv800, d) + z.F.DecMapIntIntX(&x.FMapIntInt, d) } } case "FptrMapIntInt": - if x.FptrMapIntInt == nil { - x.FptrMapIntInt = new(map[int]int) - } if r.TryDecodeAsNil() { - if x.FptrMapIntInt != nil { + if true && x.FptrMapIntInt != nil { x.FptrMapIntInt = nil } } else { if x.FptrMapIntInt == nil { x.FptrMapIntInt = new(map[int]int) } - yym803 := z.DecBinary() - _ = yym803 + if false { } else { z.F.DecMapIntIntX(x.FptrMapIntInt, d) @@ -26590,28 +22923,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt8 = nil } else { - yyv804 := &x.FMapIntInt8 - yym805 := z.DecBinary() - _ = yym805 if false { } else { - z.F.DecMapIntInt8X(yyv804, d) + z.F.DecMapIntInt8X(&x.FMapIntInt8, d) } } case "FptrMapIntInt8": - if x.FptrMapIntInt8 == nil { - x.FptrMapIntInt8 = new(map[int]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapIntInt8 != nil { + if true && x.FptrMapIntInt8 != nil { x.FptrMapIntInt8 = nil } } else { if x.FptrMapIntInt8 == nil { x.FptrMapIntInt8 = new(map[int]int8) } - yym807 := z.DecBinary() - _ = yym807 + if false { } else { z.F.DecMapIntInt8X(x.FptrMapIntInt8, d) @@ -26621,28 +22947,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt16 = nil } else { - yyv808 := &x.FMapIntInt16 - yym809 := z.DecBinary() - _ = yym809 if false { } else { - z.F.DecMapIntInt16X(yyv808, d) + z.F.DecMapIntInt16X(&x.FMapIntInt16, d) } } case "FptrMapIntInt16": - if x.FptrMapIntInt16 == nil { - x.FptrMapIntInt16 = new(map[int]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapIntInt16 != nil { + if true && x.FptrMapIntInt16 != nil { x.FptrMapIntInt16 = nil } } else { if x.FptrMapIntInt16 == nil { x.FptrMapIntInt16 = new(map[int]int16) } - yym811 := z.DecBinary() - _ = yym811 + if false { } else { z.F.DecMapIntInt16X(x.FptrMapIntInt16, d) @@ -26652,28 +22971,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt32 = nil } else { - yyv812 := &x.FMapIntInt32 - yym813 := z.DecBinary() - _ = yym813 if false { } else { - z.F.DecMapIntInt32X(yyv812, d) + z.F.DecMapIntInt32X(&x.FMapIntInt32, d) } } case "FptrMapIntInt32": - if x.FptrMapIntInt32 == nil { - x.FptrMapIntInt32 = new(map[int]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntInt32 != nil { + if true && x.FptrMapIntInt32 != nil { x.FptrMapIntInt32 = nil } } else { if x.FptrMapIntInt32 == nil { x.FptrMapIntInt32 = new(map[int]int32) } - yym815 := z.DecBinary() - _ = yym815 + if false { } else { z.F.DecMapIntInt32X(x.FptrMapIntInt32, d) @@ -26683,28 +22995,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt64 = nil } else { - yyv816 := &x.FMapIntInt64 - yym817 := z.DecBinary() - _ = yym817 if false { } else { - z.F.DecMapIntInt64X(yyv816, d) + z.F.DecMapIntInt64X(&x.FMapIntInt64, d) } } case "FptrMapIntInt64": - if x.FptrMapIntInt64 == nil { - x.FptrMapIntInt64 = new(map[int]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntInt64 != nil { + if true && x.FptrMapIntInt64 != nil { x.FptrMapIntInt64 = nil } } else { if x.FptrMapIntInt64 == nil { x.FptrMapIntInt64 = new(map[int]int64) } - yym819 := z.DecBinary() - _ = yym819 + if false { } else { z.F.DecMapIntInt64X(x.FptrMapIntInt64, d) @@ -26714,28 +23019,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntFloat32 = nil } else { - yyv820 := &x.FMapIntFloat32 - yym821 := z.DecBinary() - _ = yym821 if false { } else { - z.F.DecMapIntFloat32X(yyv820, d) + z.F.DecMapIntFloat32X(&x.FMapIntFloat32, d) } } case "FptrMapIntFloat32": - if x.FptrMapIntFloat32 == nil { - x.FptrMapIntFloat32 = new(map[int]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapIntFloat32 != nil { + if true && x.FptrMapIntFloat32 != nil { x.FptrMapIntFloat32 = nil } } else { if x.FptrMapIntFloat32 == nil { x.FptrMapIntFloat32 = new(map[int]float32) } - yym823 := z.DecBinary() - _ = yym823 + if false { } else { z.F.DecMapIntFloat32X(x.FptrMapIntFloat32, d) @@ -26745,28 +23043,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntFloat64 = nil } else { - yyv824 := &x.FMapIntFloat64 - yym825 := z.DecBinary() - _ = yym825 if false { } else { - z.F.DecMapIntFloat64X(yyv824, d) + z.F.DecMapIntFloat64X(&x.FMapIntFloat64, d) } } case "FptrMapIntFloat64": - if x.FptrMapIntFloat64 == nil { - x.FptrMapIntFloat64 = new(map[int]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapIntFloat64 != nil { + if true && x.FptrMapIntFloat64 != nil { x.FptrMapIntFloat64 = nil } } else { if x.FptrMapIntFloat64 == nil { x.FptrMapIntFloat64 = new(map[int]float64) } - yym827 := z.DecBinary() - _ = yym827 + if false { } else { z.F.DecMapIntFloat64X(x.FptrMapIntFloat64, d) @@ -26776,28 +23067,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntBool = nil } else { - yyv828 := &x.FMapIntBool - yym829 := z.DecBinary() - _ = yym829 if false { } else { - z.F.DecMapIntBoolX(yyv828, d) + z.F.DecMapIntBoolX(&x.FMapIntBool, d) } } case "FptrMapIntBool": - if x.FptrMapIntBool == nil { - x.FptrMapIntBool = new(map[int]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapIntBool != nil { + if true && x.FptrMapIntBool != nil { x.FptrMapIntBool = nil } } else { if x.FptrMapIntBool == nil { x.FptrMapIntBool = new(map[int]bool) } - yym831 := z.DecBinary() - _ = yym831 + if false { } else { z.F.DecMapIntBoolX(x.FptrMapIntBool, d) @@ -26807,28 +23091,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Intf = nil } else { - yyv832 := &x.FMapInt8Intf - yym833 := z.DecBinary() - _ = yym833 if false { } else { - z.F.DecMapInt8IntfX(yyv832, d) + z.F.DecMapInt8IntfX(&x.FMapInt8Intf, d) } } case "FptrMapInt8Intf": - if x.FptrMapInt8Intf == nil { - x.FptrMapInt8Intf = new(map[int8]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Intf != nil { + if true && x.FptrMapInt8Intf != nil { x.FptrMapInt8Intf = nil } } else { if x.FptrMapInt8Intf == nil { x.FptrMapInt8Intf = new(map[int8]interface{}) } - yym835 := z.DecBinary() - _ = yym835 + if false { } else { z.F.DecMapInt8IntfX(x.FptrMapInt8Intf, d) @@ -26838,28 +23115,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8String = nil } else { - yyv836 := &x.FMapInt8String - yym837 := z.DecBinary() - _ = yym837 if false { } else { - z.F.DecMapInt8StringX(yyv836, d) + z.F.DecMapInt8StringX(&x.FMapInt8String, d) } } case "FptrMapInt8String": - if x.FptrMapInt8String == nil { - x.FptrMapInt8String = new(map[int8]string) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8String != nil { + if true && x.FptrMapInt8String != nil { x.FptrMapInt8String = nil } } else { if x.FptrMapInt8String == nil { x.FptrMapInt8String = new(map[int8]string) } - yym839 := z.DecBinary() - _ = yym839 + if false { } else { z.F.DecMapInt8StringX(x.FptrMapInt8String, d) @@ -26869,28 +23139,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint = nil } else { - yyv840 := &x.FMapInt8Uint - yym841 := z.DecBinary() - _ = yym841 if false { } else { - z.F.DecMapInt8UintX(yyv840, d) + z.F.DecMapInt8UintX(&x.FMapInt8Uint, d) } } case "FptrMapInt8Uint": - if x.FptrMapInt8Uint == nil { - x.FptrMapInt8Uint = new(map[int8]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint != nil { + if true && x.FptrMapInt8Uint != nil { x.FptrMapInt8Uint = nil } } else { if x.FptrMapInt8Uint == nil { x.FptrMapInt8Uint = new(map[int8]uint) } - yym843 := z.DecBinary() - _ = yym843 + if false { } else { z.F.DecMapInt8UintX(x.FptrMapInt8Uint, d) @@ -26900,28 +23163,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint8 = nil } else { - yyv844 := &x.FMapInt8Uint8 - yym845 := z.DecBinary() - _ = yym845 if false { } else { - z.F.DecMapInt8Uint8X(yyv844, d) + z.F.DecMapInt8Uint8X(&x.FMapInt8Uint8, d) } } case "FptrMapInt8Uint8": - if x.FptrMapInt8Uint8 == nil { - x.FptrMapInt8Uint8 = new(map[int8]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint8 != nil { + if true && x.FptrMapInt8Uint8 != nil { x.FptrMapInt8Uint8 = nil } } else { if x.FptrMapInt8Uint8 == nil { x.FptrMapInt8Uint8 = new(map[int8]uint8) } - yym847 := z.DecBinary() - _ = yym847 + if false { } else { z.F.DecMapInt8Uint8X(x.FptrMapInt8Uint8, d) @@ -26931,28 +23187,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint16 = nil } else { - yyv848 := &x.FMapInt8Uint16 - yym849 := z.DecBinary() - _ = yym849 if false { } else { - z.F.DecMapInt8Uint16X(yyv848, d) + z.F.DecMapInt8Uint16X(&x.FMapInt8Uint16, d) } } case "FptrMapInt8Uint16": - if x.FptrMapInt8Uint16 == nil { - x.FptrMapInt8Uint16 = new(map[int8]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint16 != nil { + if true && x.FptrMapInt8Uint16 != nil { x.FptrMapInt8Uint16 = nil } } else { if x.FptrMapInt8Uint16 == nil { x.FptrMapInt8Uint16 = new(map[int8]uint16) } - yym851 := z.DecBinary() - _ = yym851 + if false { } else { z.F.DecMapInt8Uint16X(x.FptrMapInt8Uint16, d) @@ -26962,28 +23211,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint32 = nil } else { - yyv852 := &x.FMapInt8Uint32 - yym853 := z.DecBinary() - _ = yym853 if false { } else { - z.F.DecMapInt8Uint32X(yyv852, d) + z.F.DecMapInt8Uint32X(&x.FMapInt8Uint32, d) } } case "FptrMapInt8Uint32": - if x.FptrMapInt8Uint32 == nil { - x.FptrMapInt8Uint32 = new(map[int8]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint32 != nil { + if true && x.FptrMapInt8Uint32 != nil { x.FptrMapInt8Uint32 = nil } } else { if x.FptrMapInt8Uint32 == nil { x.FptrMapInt8Uint32 = new(map[int8]uint32) } - yym855 := z.DecBinary() - _ = yym855 + if false { } else { z.F.DecMapInt8Uint32X(x.FptrMapInt8Uint32, d) @@ -26993,28 +23235,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint64 = nil } else { - yyv856 := &x.FMapInt8Uint64 - yym857 := z.DecBinary() - _ = yym857 if false { } else { - z.F.DecMapInt8Uint64X(yyv856, d) + z.F.DecMapInt8Uint64X(&x.FMapInt8Uint64, d) } } case "FptrMapInt8Uint64": - if x.FptrMapInt8Uint64 == nil { - x.FptrMapInt8Uint64 = new(map[int8]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint64 != nil { + if true && x.FptrMapInt8Uint64 != nil { x.FptrMapInt8Uint64 = nil } } else { if x.FptrMapInt8Uint64 == nil { x.FptrMapInt8Uint64 = new(map[int8]uint64) } - yym859 := z.DecBinary() - _ = yym859 + if false { } else { z.F.DecMapInt8Uint64X(x.FptrMapInt8Uint64, d) @@ -27024,28 +23259,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uintptr = nil } else { - yyv860 := &x.FMapInt8Uintptr - yym861 := z.DecBinary() - _ = yym861 if false { } else { - z.F.DecMapInt8UintptrX(yyv860, d) + z.F.DecMapInt8UintptrX(&x.FMapInt8Uintptr, d) } } case "FptrMapInt8Uintptr": - if x.FptrMapInt8Uintptr == nil { - x.FptrMapInt8Uintptr = new(map[int8]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Uintptr != nil { + if true && x.FptrMapInt8Uintptr != nil { x.FptrMapInt8Uintptr = nil } } else { if x.FptrMapInt8Uintptr == nil { x.FptrMapInt8Uintptr = new(map[int8]uintptr) } - yym863 := z.DecBinary() - _ = yym863 + if false { } else { z.F.DecMapInt8UintptrX(x.FptrMapInt8Uintptr, d) @@ -27055,28 +23283,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int = nil } else { - yyv864 := &x.FMapInt8Int - yym865 := z.DecBinary() - _ = yym865 if false { } else { - z.F.DecMapInt8IntX(yyv864, d) + z.F.DecMapInt8IntX(&x.FMapInt8Int, d) } } case "FptrMapInt8Int": - if x.FptrMapInt8Int == nil { - x.FptrMapInt8Int = new(map[int8]int) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Int != nil { + if true && x.FptrMapInt8Int != nil { x.FptrMapInt8Int = nil } } else { if x.FptrMapInt8Int == nil { x.FptrMapInt8Int = new(map[int8]int) } - yym867 := z.DecBinary() - _ = yym867 + if false { } else { z.F.DecMapInt8IntX(x.FptrMapInt8Int, d) @@ -27086,28 +23307,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int8 = nil } else { - yyv868 := &x.FMapInt8Int8 - yym869 := z.DecBinary() - _ = yym869 if false { } else { - z.F.DecMapInt8Int8X(yyv868, d) + z.F.DecMapInt8Int8X(&x.FMapInt8Int8, d) } } case "FptrMapInt8Int8": - if x.FptrMapInt8Int8 == nil { - x.FptrMapInt8Int8 = new(map[int8]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Int8 != nil { + if true && x.FptrMapInt8Int8 != nil { x.FptrMapInt8Int8 = nil } } else { if x.FptrMapInt8Int8 == nil { x.FptrMapInt8Int8 = new(map[int8]int8) } - yym871 := z.DecBinary() - _ = yym871 + if false { } else { z.F.DecMapInt8Int8X(x.FptrMapInt8Int8, d) @@ -27117,28 +23331,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int16 = nil } else { - yyv872 := &x.FMapInt8Int16 - yym873 := z.DecBinary() - _ = yym873 if false { } else { - z.F.DecMapInt8Int16X(yyv872, d) + z.F.DecMapInt8Int16X(&x.FMapInt8Int16, d) } } case "FptrMapInt8Int16": - if x.FptrMapInt8Int16 == nil { - x.FptrMapInt8Int16 = new(map[int8]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Int16 != nil { + if true && x.FptrMapInt8Int16 != nil { x.FptrMapInt8Int16 = nil } } else { if x.FptrMapInt8Int16 == nil { x.FptrMapInt8Int16 = new(map[int8]int16) } - yym875 := z.DecBinary() - _ = yym875 + if false { } else { z.F.DecMapInt8Int16X(x.FptrMapInt8Int16, d) @@ -27148,28 +23355,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int32 = nil } else { - yyv876 := &x.FMapInt8Int32 - yym877 := z.DecBinary() - _ = yym877 if false { } else { - z.F.DecMapInt8Int32X(yyv876, d) + z.F.DecMapInt8Int32X(&x.FMapInt8Int32, d) } } case "FptrMapInt8Int32": - if x.FptrMapInt8Int32 == nil { - x.FptrMapInt8Int32 = new(map[int8]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Int32 != nil { + if true && x.FptrMapInt8Int32 != nil { x.FptrMapInt8Int32 = nil } } else { if x.FptrMapInt8Int32 == nil { x.FptrMapInt8Int32 = new(map[int8]int32) } - yym879 := z.DecBinary() - _ = yym879 + if false { } else { z.F.DecMapInt8Int32X(x.FptrMapInt8Int32, d) @@ -27179,28 +23379,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int64 = nil } else { - yyv880 := &x.FMapInt8Int64 - yym881 := z.DecBinary() - _ = yym881 if false { } else { - z.F.DecMapInt8Int64X(yyv880, d) + z.F.DecMapInt8Int64X(&x.FMapInt8Int64, d) } } case "FptrMapInt8Int64": - if x.FptrMapInt8Int64 == nil { - x.FptrMapInt8Int64 = new(map[int8]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Int64 != nil { + if true && x.FptrMapInt8Int64 != nil { x.FptrMapInt8Int64 = nil } } else { if x.FptrMapInt8Int64 == nil { x.FptrMapInt8Int64 = new(map[int8]int64) } - yym883 := z.DecBinary() - _ = yym883 + if false { } else { z.F.DecMapInt8Int64X(x.FptrMapInt8Int64, d) @@ -27210,28 +23403,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Float32 = nil } else { - yyv884 := &x.FMapInt8Float32 - yym885 := z.DecBinary() - _ = yym885 if false { } else { - z.F.DecMapInt8Float32X(yyv884, d) + z.F.DecMapInt8Float32X(&x.FMapInt8Float32, d) } } case "FptrMapInt8Float32": - if x.FptrMapInt8Float32 == nil { - x.FptrMapInt8Float32 = new(map[int8]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Float32 != nil { + if true && x.FptrMapInt8Float32 != nil { x.FptrMapInt8Float32 = nil } } else { if x.FptrMapInt8Float32 == nil { x.FptrMapInt8Float32 = new(map[int8]float32) } - yym887 := z.DecBinary() - _ = yym887 + if false { } else { z.F.DecMapInt8Float32X(x.FptrMapInt8Float32, d) @@ -27241,28 +23427,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Float64 = nil } else { - yyv888 := &x.FMapInt8Float64 - yym889 := z.DecBinary() - _ = yym889 if false { } else { - z.F.DecMapInt8Float64X(yyv888, d) + z.F.DecMapInt8Float64X(&x.FMapInt8Float64, d) } } case "FptrMapInt8Float64": - if x.FptrMapInt8Float64 == nil { - x.FptrMapInt8Float64 = new(map[int8]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Float64 != nil { + if true && x.FptrMapInt8Float64 != nil { x.FptrMapInt8Float64 = nil } } else { if x.FptrMapInt8Float64 == nil { x.FptrMapInt8Float64 = new(map[int8]float64) } - yym891 := z.DecBinary() - _ = yym891 + if false { } else { z.F.DecMapInt8Float64X(x.FptrMapInt8Float64, d) @@ -27272,28 +23451,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Bool = nil } else { - yyv892 := &x.FMapInt8Bool - yym893 := z.DecBinary() - _ = yym893 if false { } else { - z.F.DecMapInt8BoolX(yyv892, d) + z.F.DecMapInt8BoolX(&x.FMapInt8Bool, d) } } case "FptrMapInt8Bool": - if x.FptrMapInt8Bool == nil { - x.FptrMapInt8Bool = new(map[int8]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapInt8Bool != nil { + if true && x.FptrMapInt8Bool != nil { x.FptrMapInt8Bool = nil } } else { if x.FptrMapInt8Bool == nil { x.FptrMapInt8Bool = new(map[int8]bool) } - yym895 := z.DecBinary() - _ = yym895 + if false { } else { z.F.DecMapInt8BoolX(x.FptrMapInt8Bool, d) @@ -27303,28 +23475,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Intf = nil } else { - yyv896 := &x.FMapInt16Intf - yym897 := z.DecBinary() - _ = yym897 if false { } else { - z.F.DecMapInt16IntfX(yyv896, d) + z.F.DecMapInt16IntfX(&x.FMapInt16Intf, d) } } case "FptrMapInt16Intf": - if x.FptrMapInt16Intf == nil { - x.FptrMapInt16Intf = new(map[int16]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Intf != nil { + if true && x.FptrMapInt16Intf != nil { x.FptrMapInt16Intf = nil } } else { if x.FptrMapInt16Intf == nil { x.FptrMapInt16Intf = new(map[int16]interface{}) } - yym899 := z.DecBinary() - _ = yym899 + if false { } else { z.F.DecMapInt16IntfX(x.FptrMapInt16Intf, d) @@ -27334,28 +23499,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16String = nil } else { - yyv900 := &x.FMapInt16String - yym901 := z.DecBinary() - _ = yym901 if false { } else { - z.F.DecMapInt16StringX(yyv900, d) + z.F.DecMapInt16StringX(&x.FMapInt16String, d) } } case "FptrMapInt16String": - if x.FptrMapInt16String == nil { - x.FptrMapInt16String = new(map[int16]string) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16String != nil { + if true && x.FptrMapInt16String != nil { x.FptrMapInt16String = nil } } else { if x.FptrMapInt16String == nil { x.FptrMapInt16String = new(map[int16]string) } - yym903 := z.DecBinary() - _ = yym903 + if false { } else { z.F.DecMapInt16StringX(x.FptrMapInt16String, d) @@ -27365,28 +23523,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint = nil } else { - yyv904 := &x.FMapInt16Uint - yym905 := z.DecBinary() - _ = yym905 if false { } else { - z.F.DecMapInt16UintX(yyv904, d) + z.F.DecMapInt16UintX(&x.FMapInt16Uint, d) } } case "FptrMapInt16Uint": - if x.FptrMapInt16Uint == nil { - x.FptrMapInt16Uint = new(map[int16]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint != nil { + if true && x.FptrMapInt16Uint != nil { x.FptrMapInt16Uint = nil } } else { if x.FptrMapInt16Uint == nil { x.FptrMapInt16Uint = new(map[int16]uint) } - yym907 := z.DecBinary() - _ = yym907 + if false { } else { z.F.DecMapInt16UintX(x.FptrMapInt16Uint, d) @@ -27396,28 +23547,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint8 = nil } else { - yyv908 := &x.FMapInt16Uint8 - yym909 := z.DecBinary() - _ = yym909 if false { } else { - z.F.DecMapInt16Uint8X(yyv908, d) + z.F.DecMapInt16Uint8X(&x.FMapInt16Uint8, d) } } case "FptrMapInt16Uint8": - if x.FptrMapInt16Uint8 == nil { - x.FptrMapInt16Uint8 = new(map[int16]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint8 != nil { + if true && x.FptrMapInt16Uint8 != nil { x.FptrMapInt16Uint8 = nil } } else { if x.FptrMapInt16Uint8 == nil { x.FptrMapInt16Uint8 = new(map[int16]uint8) } - yym911 := z.DecBinary() - _ = yym911 + if false { } else { z.F.DecMapInt16Uint8X(x.FptrMapInt16Uint8, d) @@ -27427,28 +23571,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint16 = nil } else { - yyv912 := &x.FMapInt16Uint16 - yym913 := z.DecBinary() - _ = yym913 if false { } else { - z.F.DecMapInt16Uint16X(yyv912, d) + z.F.DecMapInt16Uint16X(&x.FMapInt16Uint16, d) } } case "FptrMapInt16Uint16": - if x.FptrMapInt16Uint16 == nil { - x.FptrMapInt16Uint16 = new(map[int16]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint16 != nil { + if true && x.FptrMapInt16Uint16 != nil { x.FptrMapInt16Uint16 = nil } } else { if x.FptrMapInt16Uint16 == nil { x.FptrMapInt16Uint16 = new(map[int16]uint16) } - yym915 := z.DecBinary() - _ = yym915 + if false { } else { z.F.DecMapInt16Uint16X(x.FptrMapInt16Uint16, d) @@ -27458,28 +23595,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint32 = nil } else { - yyv916 := &x.FMapInt16Uint32 - yym917 := z.DecBinary() - _ = yym917 if false { } else { - z.F.DecMapInt16Uint32X(yyv916, d) + z.F.DecMapInt16Uint32X(&x.FMapInt16Uint32, d) } } case "FptrMapInt16Uint32": - if x.FptrMapInt16Uint32 == nil { - x.FptrMapInt16Uint32 = new(map[int16]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint32 != nil { + if true && x.FptrMapInt16Uint32 != nil { x.FptrMapInt16Uint32 = nil } } else { if x.FptrMapInt16Uint32 == nil { x.FptrMapInt16Uint32 = new(map[int16]uint32) } - yym919 := z.DecBinary() - _ = yym919 + if false { } else { z.F.DecMapInt16Uint32X(x.FptrMapInt16Uint32, d) @@ -27489,28 +23619,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint64 = nil } else { - yyv920 := &x.FMapInt16Uint64 - yym921 := z.DecBinary() - _ = yym921 if false { } else { - z.F.DecMapInt16Uint64X(yyv920, d) + z.F.DecMapInt16Uint64X(&x.FMapInt16Uint64, d) } } case "FptrMapInt16Uint64": - if x.FptrMapInt16Uint64 == nil { - x.FptrMapInt16Uint64 = new(map[int16]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint64 != nil { + if true && x.FptrMapInt16Uint64 != nil { x.FptrMapInt16Uint64 = nil } } else { if x.FptrMapInt16Uint64 == nil { x.FptrMapInt16Uint64 = new(map[int16]uint64) } - yym923 := z.DecBinary() - _ = yym923 + if false { } else { z.F.DecMapInt16Uint64X(x.FptrMapInt16Uint64, d) @@ -27520,28 +23643,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uintptr = nil } else { - yyv924 := &x.FMapInt16Uintptr - yym925 := z.DecBinary() - _ = yym925 if false { } else { - z.F.DecMapInt16UintptrX(yyv924, d) + z.F.DecMapInt16UintptrX(&x.FMapInt16Uintptr, d) } } case "FptrMapInt16Uintptr": - if x.FptrMapInt16Uintptr == nil { - x.FptrMapInt16Uintptr = new(map[int16]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Uintptr != nil { + if true && x.FptrMapInt16Uintptr != nil { x.FptrMapInt16Uintptr = nil } } else { if x.FptrMapInt16Uintptr == nil { x.FptrMapInt16Uintptr = new(map[int16]uintptr) } - yym927 := z.DecBinary() - _ = yym927 + if false { } else { z.F.DecMapInt16UintptrX(x.FptrMapInt16Uintptr, d) @@ -27551,28 +23667,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int = nil } else { - yyv928 := &x.FMapInt16Int - yym929 := z.DecBinary() - _ = yym929 if false { } else { - z.F.DecMapInt16IntX(yyv928, d) + z.F.DecMapInt16IntX(&x.FMapInt16Int, d) } } case "FptrMapInt16Int": - if x.FptrMapInt16Int == nil { - x.FptrMapInt16Int = new(map[int16]int) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Int != nil { + if true && x.FptrMapInt16Int != nil { x.FptrMapInt16Int = nil } } else { if x.FptrMapInt16Int == nil { x.FptrMapInt16Int = new(map[int16]int) } - yym931 := z.DecBinary() - _ = yym931 + if false { } else { z.F.DecMapInt16IntX(x.FptrMapInt16Int, d) @@ -27582,28 +23691,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int8 = nil } else { - yyv932 := &x.FMapInt16Int8 - yym933 := z.DecBinary() - _ = yym933 if false { } else { - z.F.DecMapInt16Int8X(yyv932, d) + z.F.DecMapInt16Int8X(&x.FMapInt16Int8, d) } } case "FptrMapInt16Int8": - if x.FptrMapInt16Int8 == nil { - x.FptrMapInt16Int8 = new(map[int16]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Int8 != nil { + if true && x.FptrMapInt16Int8 != nil { x.FptrMapInt16Int8 = nil } } else { if x.FptrMapInt16Int8 == nil { x.FptrMapInt16Int8 = new(map[int16]int8) } - yym935 := z.DecBinary() - _ = yym935 + if false { } else { z.F.DecMapInt16Int8X(x.FptrMapInt16Int8, d) @@ -27613,28 +23715,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int16 = nil } else { - yyv936 := &x.FMapInt16Int16 - yym937 := z.DecBinary() - _ = yym937 if false { } else { - z.F.DecMapInt16Int16X(yyv936, d) + z.F.DecMapInt16Int16X(&x.FMapInt16Int16, d) } } case "FptrMapInt16Int16": - if x.FptrMapInt16Int16 == nil { - x.FptrMapInt16Int16 = new(map[int16]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Int16 != nil { + if true && x.FptrMapInt16Int16 != nil { x.FptrMapInt16Int16 = nil } } else { if x.FptrMapInt16Int16 == nil { x.FptrMapInt16Int16 = new(map[int16]int16) } - yym939 := z.DecBinary() - _ = yym939 + if false { } else { z.F.DecMapInt16Int16X(x.FptrMapInt16Int16, d) @@ -27644,28 +23739,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int32 = nil } else { - yyv940 := &x.FMapInt16Int32 - yym941 := z.DecBinary() - _ = yym941 if false { } else { - z.F.DecMapInt16Int32X(yyv940, d) + z.F.DecMapInt16Int32X(&x.FMapInt16Int32, d) } } case "FptrMapInt16Int32": - if x.FptrMapInt16Int32 == nil { - x.FptrMapInt16Int32 = new(map[int16]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Int32 != nil { + if true && x.FptrMapInt16Int32 != nil { x.FptrMapInt16Int32 = nil } } else { if x.FptrMapInt16Int32 == nil { x.FptrMapInt16Int32 = new(map[int16]int32) } - yym943 := z.DecBinary() - _ = yym943 + if false { } else { z.F.DecMapInt16Int32X(x.FptrMapInt16Int32, d) @@ -27675,28 +23763,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int64 = nil } else { - yyv944 := &x.FMapInt16Int64 - yym945 := z.DecBinary() - _ = yym945 if false { } else { - z.F.DecMapInt16Int64X(yyv944, d) + z.F.DecMapInt16Int64X(&x.FMapInt16Int64, d) } } case "FptrMapInt16Int64": - if x.FptrMapInt16Int64 == nil { - x.FptrMapInt16Int64 = new(map[int16]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Int64 != nil { + if true && x.FptrMapInt16Int64 != nil { x.FptrMapInt16Int64 = nil } } else { if x.FptrMapInt16Int64 == nil { x.FptrMapInt16Int64 = new(map[int16]int64) } - yym947 := z.DecBinary() - _ = yym947 + if false { } else { z.F.DecMapInt16Int64X(x.FptrMapInt16Int64, d) @@ -27706,28 +23787,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Float32 = nil } else { - yyv948 := &x.FMapInt16Float32 - yym949 := z.DecBinary() - _ = yym949 if false { } else { - z.F.DecMapInt16Float32X(yyv948, d) + z.F.DecMapInt16Float32X(&x.FMapInt16Float32, d) } } case "FptrMapInt16Float32": - if x.FptrMapInt16Float32 == nil { - x.FptrMapInt16Float32 = new(map[int16]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Float32 != nil { + if true && x.FptrMapInt16Float32 != nil { x.FptrMapInt16Float32 = nil } } else { if x.FptrMapInt16Float32 == nil { x.FptrMapInt16Float32 = new(map[int16]float32) } - yym951 := z.DecBinary() - _ = yym951 + if false { } else { z.F.DecMapInt16Float32X(x.FptrMapInt16Float32, d) @@ -27737,28 +23811,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Float64 = nil } else { - yyv952 := &x.FMapInt16Float64 - yym953 := z.DecBinary() - _ = yym953 if false { } else { - z.F.DecMapInt16Float64X(yyv952, d) + z.F.DecMapInt16Float64X(&x.FMapInt16Float64, d) } } case "FptrMapInt16Float64": - if x.FptrMapInt16Float64 == nil { - x.FptrMapInt16Float64 = new(map[int16]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Float64 != nil { + if true && x.FptrMapInt16Float64 != nil { x.FptrMapInt16Float64 = nil } } else { if x.FptrMapInt16Float64 == nil { x.FptrMapInt16Float64 = new(map[int16]float64) } - yym955 := z.DecBinary() - _ = yym955 + if false { } else { z.F.DecMapInt16Float64X(x.FptrMapInt16Float64, d) @@ -27768,28 +23835,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Bool = nil } else { - yyv956 := &x.FMapInt16Bool - yym957 := z.DecBinary() - _ = yym957 if false { } else { - z.F.DecMapInt16BoolX(yyv956, d) + z.F.DecMapInt16BoolX(&x.FMapInt16Bool, d) } } case "FptrMapInt16Bool": - if x.FptrMapInt16Bool == nil { - x.FptrMapInt16Bool = new(map[int16]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapInt16Bool != nil { + if true && x.FptrMapInt16Bool != nil { x.FptrMapInt16Bool = nil } } else { if x.FptrMapInt16Bool == nil { x.FptrMapInt16Bool = new(map[int16]bool) } - yym959 := z.DecBinary() - _ = yym959 + if false { } else { z.F.DecMapInt16BoolX(x.FptrMapInt16Bool, d) @@ -27799,28 +23859,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Intf = nil } else { - yyv960 := &x.FMapInt32Intf - yym961 := z.DecBinary() - _ = yym961 if false { } else { - z.F.DecMapInt32IntfX(yyv960, d) + z.F.DecMapInt32IntfX(&x.FMapInt32Intf, d) } } case "FptrMapInt32Intf": - if x.FptrMapInt32Intf == nil { - x.FptrMapInt32Intf = new(map[int32]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Intf != nil { + if true && x.FptrMapInt32Intf != nil { x.FptrMapInt32Intf = nil } } else { if x.FptrMapInt32Intf == nil { x.FptrMapInt32Intf = new(map[int32]interface{}) } - yym963 := z.DecBinary() - _ = yym963 + if false { } else { z.F.DecMapInt32IntfX(x.FptrMapInt32Intf, d) @@ -27830,28 +23883,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32String = nil } else { - yyv964 := &x.FMapInt32String - yym965 := z.DecBinary() - _ = yym965 if false { } else { - z.F.DecMapInt32StringX(yyv964, d) + z.F.DecMapInt32StringX(&x.FMapInt32String, d) } } case "FptrMapInt32String": - if x.FptrMapInt32String == nil { - x.FptrMapInt32String = new(map[int32]string) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32String != nil { + if true && x.FptrMapInt32String != nil { x.FptrMapInt32String = nil } } else { if x.FptrMapInt32String == nil { x.FptrMapInt32String = new(map[int32]string) } - yym967 := z.DecBinary() - _ = yym967 + if false { } else { z.F.DecMapInt32StringX(x.FptrMapInt32String, d) @@ -27861,28 +23907,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint = nil } else { - yyv968 := &x.FMapInt32Uint - yym969 := z.DecBinary() - _ = yym969 if false { } else { - z.F.DecMapInt32UintX(yyv968, d) + z.F.DecMapInt32UintX(&x.FMapInt32Uint, d) } } case "FptrMapInt32Uint": - if x.FptrMapInt32Uint == nil { - x.FptrMapInt32Uint = new(map[int32]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint != nil { + if true && x.FptrMapInt32Uint != nil { x.FptrMapInt32Uint = nil } } else { if x.FptrMapInt32Uint == nil { x.FptrMapInt32Uint = new(map[int32]uint) } - yym971 := z.DecBinary() - _ = yym971 + if false { } else { z.F.DecMapInt32UintX(x.FptrMapInt32Uint, d) @@ -27892,28 +23931,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint8 = nil } else { - yyv972 := &x.FMapInt32Uint8 - yym973 := z.DecBinary() - _ = yym973 if false { } else { - z.F.DecMapInt32Uint8X(yyv972, d) + z.F.DecMapInt32Uint8X(&x.FMapInt32Uint8, d) } } case "FptrMapInt32Uint8": - if x.FptrMapInt32Uint8 == nil { - x.FptrMapInt32Uint8 = new(map[int32]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint8 != nil { + if true && x.FptrMapInt32Uint8 != nil { x.FptrMapInt32Uint8 = nil } } else { if x.FptrMapInt32Uint8 == nil { x.FptrMapInt32Uint8 = new(map[int32]uint8) } - yym975 := z.DecBinary() - _ = yym975 + if false { } else { z.F.DecMapInt32Uint8X(x.FptrMapInt32Uint8, d) @@ -27923,28 +23955,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint16 = nil } else { - yyv976 := &x.FMapInt32Uint16 - yym977 := z.DecBinary() - _ = yym977 if false { } else { - z.F.DecMapInt32Uint16X(yyv976, d) + z.F.DecMapInt32Uint16X(&x.FMapInt32Uint16, d) } } case "FptrMapInt32Uint16": - if x.FptrMapInt32Uint16 == nil { - x.FptrMapInt32Uint16 = new(map[int32]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint16 != nil { + if true && x.FptrMapInt32Uint16 != nil { x.FptrMapInt32Uint16 = nil } } else { if x.FptrMapInt32Uint16 == nil { x.FptrMapInt32Uint16 = new(map[int32]uint16) } - yym979 := z.DecBinary() - _ = yym979 + if false { } else { z.F.DecMapInt32Uint16X(x.FptrMapInt32Uint16, d) @@ -27954,28 +23979,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint32 = nil } else { - yyv980 := &x.FMapInt32Uint32 - yym981 := z.DecBinary() - _ = yym981 if false { } else { - z.F.DecMapInt32Uint32X(yyv980, d) + z.F.DecMapInt32Uint32X(&x.FMapInt32Uint32, d) } } case "FptrMapInt32Uint32": - if x.FptrMapInt32Uint32 == nil { - x.FptrMapInt32Uint32 = new(map[int32]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint32 != nil { + if true && x.FptrMapInt32Uint32 != nil { x.FptrMapInt32Uint32 = nil } } else { if x.FptrMapInt32Uint32 == nil { x.FptrMapInt32Uint32 = new(map[int32]uint32) } - yym983 := z.DecBinary() - _ = yym983 + if false { } else { z.F.DecMapInt32Uint32X(x.FptrMapInt32Uint32, d) @@ -27985,28 +24003,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint64 = nil } else { - yyv984 := &x.FMapInt32Uint64 - yym985 := z.DecBinary() - _ = yym985 if false { } else { - z.F.DecMapInt32Uint64X(yyv984, d) + z.F.DecMapInt32Uint64X(&x.FMapInt32Uint64, d) } } case "FptrMapInt32Uint64": - if x.FptrMapInt32Uint64 == nil { - x.FptrMapInt32Uint64 = new(map[int32]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint64 != nil { + if true && x.FptrMapInt32Uint64 != nil { x.FptrMapInt32Uint64 = nil } } else { if x.FptrMapInt32Uint64 == nil { x.FptrMapInt32Uint64 = new(map[int32]uint64) } - yym987 := z.DecBinary() - _ = yym987 + if false { } else { z.F.DecMapInt32Uint64X(x.FptrMapInt32Uint64, d) @@ -28016,28 +24027,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uintptr = nil } else { - yyv988 := &x.FMapInt32Uintptr - yym989 := z.DecBinary() - _ = yym989 if false { } else { - z.F.DecMapInt32UintptrX(yyv988, d) + z.F.DecMapInt32UintptrX(&x.FMapInt32Uintptr, d) } } case "FptrMapInt32Uintptr": - if x.FptrMapInt32Uintptr == nil { - x.FptrMapInt32Uintptr = new(map[int32]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Uintptr != nil { + if true && x.FptrMapInt32Uintptr != nil { x.FptrMapInt32Uintptr = nil } } else { if x.FptrMapInt32Uintptr == nil { x.FptrMapInt32Uintptr = new(map[int32]uintptr) } - yym991 := z.DecBinary() - _ = yym991 + if false { } else { z.F.DecMapInt32UintptrX(x.FptrMapInt32Uintptr, d) @@ -28047,28 +24051,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int = nil } else { - yyv992 := &x.FMapInt32Int - yym993 := z.DecBinary() - _ = yym993 if false { } else { - z.F.DecMapInt32IntX(yyv992, d) + z.F.DecMapInt32IntX(&x.FMapInt32Int, d) } } case "FptrMapInt32Int": - if x.FptrMapInt32Int == nil { - x.FptrMapInt32Int = new(map[int32]int) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Int != nil { + if true && x.FptrMapInt32Int != nil { x.FptrMapInt32Int = nil } } else { if x.FptrMapInt32Int == nil { x.FptrMapInt32Int = new(map[int32]int) } - yym995 := z.DecBinary() - _ = yym995 + if false { } else { z.F.DecMapInt32IntX(x.FptrMapInt32Int, d) @@ -28078,28 +24075,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int8 = nil } else { - yyv996 := &x.FMapInt32Int8 - yym997 := z.DecBinary() - _ = yym997 if false { } else { - z.F.DecMapInt32Int8X(yyv996, d) + z.F.DecMapInt32Int8X(&x.FMapInt32Int8, d) } } case "FptrMapInt32Int8": - if x.FptrMapInt32Int8 == nil { - x.FptrMapInt32Int8 = new(map[int32]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Int8 != nil { + if true && x.FptrMapInt32Int8 != nil { x.FptrMapInt32Int8 = nil } } else { if x.FptrMapInt32Int8 == nil { x.FptrMapInt32Int8 = new(map[int32]int8) } - yym999 := z.DecBinary() - _ = yym999 + if false { } else { z.F.DecMapInt32Int8X(x.FptrMapInt32Int8, d) @@ -28109,28 +24099,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int16 = nil } else { - yyv1000 := &x.FMapInt32Int16 - yym1001 := z.DecBinary() - _ = yym1001 if false { } else { - z.F.DecMapInt32Int16X(yyv1000, d) + z.F.DecMapInt32Int16X(&x.FMapInt32Int16, d) } } case "FptrMapInt32Int16": - if x.FptrMapInt32Int16 == nil { - x.FptrMapInt32Int16 = new(map[int32]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Int16 != nil { + if true && x.FptrMapInt32Int16 != nil { x.FptrMapInt32Int16 = nil } } else { if x.FptrMapInt32Int16 == nil { x.FptrMapInt32Int16 = new(map[int32]int16) } - yym1003 := z.DecBinary() - _ = yym1003 + if false { } else { z.F.DecMapInt32Int16X(x.FptrMapInt32Int16, d) @@ -28140,28 +24123,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int32 = nil } else { - yyv1004 := &x.FMapInt32Int32 - yym1005 := z.DecBinary() - _ = yym1005 if false { } else { - z.F.DecMapInt32Int32X(yyv1004, d) + z.F.DecMapInt32Int32X(&x.FMapInt32Int32, d) } } case "FptrMapInt32Int32": - if x.FptrMapInt32Int32 == nil { - x.FptrMapInt32Int32 = new(map[int32]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Int32 != nil { + if true && x.FptrMapInt32Int32 != nil { x.FptrMapInt32Int32 = nil } } else { if x.FptrMapInt32Int32 == nil { x.FptrMapInt32Int32 = new(map[int32]int32) } - yym1007 := z.DecBinary() - _ = yym1007 + if false { } else { z.F.DecMapInt32Int32X(x.FptrMapInt32Int32, d) @@ -28171,28 +24147,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int64 = nil } else { - yyv1008 := &x.FMapInt32Int64 - yym1009 := z.DecBinary() - _ = yym1009 if false { } else { - z.F.DecMapInt32Int64X(yyv1008, d) + z.F.DecMapInt32Int64X(&x.FMapInt32Int64, d) } } case "FptrMapInt32Int64": - if x.FptrMapInt32Int64 == nil { - x.FptrMapInt32Int64 = new(map[int32]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Int64 != nil { + if true && x.FptrMapInt32Int64 != nil { x.FptrMapInt32Int64 = nil } } else { if x.FptrMapInt32Int64 == nil { x.FptrMapInt32Int64 = new(map[int32]int64) } - yym1011 := z.DecBinary() - _ = yym1011 + if false { } else { z.F.DecMapInt32Int64X(x.FptrMapInt32Int64, d) @@ -28202,28 +24171,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Float32 = nil } else { - yyv1012 := &x.FMapInt32Float32 - yym1013 := z.DecBinary() - _ = yym1013 if false { } else { - z.F.DecMapInt32Float32X(yyv1012, d) + z.F.DecMapInt32Float32X(&x.FMapInt32Float32, d) } } case "FptrMapInt32Float32": - if x.FptrMapInt32Float32 == nil { - x.FptrMapInt32Float32 = new(map[int32]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Float32 != nil { + if true && x.FptrMapInt32Float32 != nil { x.FptrMapInt32Float32 = nil } } else { if x.FptrMapInt32Float32 == nil { x.FptrMapInt32Float32 = new(map[int32]float32) } - yym1015 := z.DecBinary() - _ = yym1015 + if false { } else { z.F.DecMapInt32Float32X(x.FptrMapInt32Float32, d) @@ -28233,28 +24195,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Float64 = nil } else { - yyv1016 := &x.FMapInt32Float64 - yym1017 := z.DecBinary() - _ = yym1017 if false { } else { - z.F.DecMapInt32Float64X(yyv1016, d) + z.F.DecMapInt32Float64X(&x.FMapInt32Float64, d) } } case "FptrMapInt32Float64": - if x.FptrMapInt32Float64 == nil { - x.FptrMapInt32Float64 = new(map[int32]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Float64 != nil { + if true && x.FptrMapInt32Float64 != nil { x.FptrMapInt32Float64 = nil } } else { if x.FptrMapInt32Float64 == nil { x.FptrMapInt32Float64 = new(map[int32]float64) } - yym1019 := z.DecBinary() - _ = yym1019 + if false { } else { z.F.DecMapInt32Float64X(x.FptrMapInt32Float64, d) @@ -28264,28 +24219,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Bool = nil } else { - yyv1020 := &x.FMapInt32Bool - yym1021 := z.DecBinary() - _ = yym1021 if false { } else { - z.F.DecMapInt32BoolX(yyv1020, d) + z.F.DecMapInt32BoolX(&x.FMapInt32Bool, d) } } case "FptrMapInt32Bool": - if x.FptrMapInt32Bool == nil { - x.FptrMapInt32Bool = new(map[int32]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapInt32Bool != nil { + if true && x.FptrMapInt32Bool != nil { x.FptrMapInt32Bool = nil } } else { if x.FptrMapInt32Bool == nil { x.FptrMapInt32Bool = new(map[int32]bool) } - yym1023 := z.DecBinary() - _ = yym1023 + if false { } else { z.F.DecMapInt32BoolX(x.FptrMapInt32Bool, d) @@ -28295,28 +24243,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Intf = nil } else { - yyv1024 := &x.FMapInt64Intf - yym1025 := z.DecBinary() - _ = yym1025 if false { } else { - z.F.DecMapInt64IntfX(yyv1024, d) + z.F.DecMapInt64IntfX(&x.FMapInt64Intf, d) } } case "FptrMapInt64Intf": - if x.FptrMapInt64Intf == nil { - x.FptrMapInt64Intf = new(map[int64]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Intf != nil { + if true && x.FptrMapInt64Intf != nil { x.FptrMapInt64Intf = nil } } else { if x.FptrMapInt64Intf == nil { x.FptrMapInt64Intf = new(map[int64]interface{}) } - yym1027 := z.DecBinary() - _ = yym1027 + if false { } else { z.F.DecMapInt64IntfX(x.FptrMapInt64Intf, d) @@ -28326,28 +24267,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64String = nil } else { - yyv1028 := &x.FMapInt64String - yym1029 := z.DecBinary() - _ = yym1029 if false { } else { - z.F.DecMapInt64StringX(yyv1028, d) + z.F.DecMapInt64StringX(&x.FMapInt64String, d) } } case "FptrMapInt64String": - if x.FptrMapInt64String == nil { - x.FptrMapInt64String = new(map[int64]string) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64String != nil { + if true && x.FptrMapInt64String != nil { x.FptrMapInt64String = nil } } else { if x.FptrMapInt64String == nil { x.FptrMapInt64String = new(map[int64]string) } - yym1031 := z.DecBinary() - _ = yym1031 + if false { } else { z.F.DecMapInt64StringX(x.FptrMapInt64String, d) @@ -28357,28 +24291,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint = nil } else { - yyv1032 := &x.FMapInt64Uint - yym1033 := z.DecBinary() - _ = yym1033 if false { } else { - z.F.DecMapInt64UintX(yyv1032, d) + z.F.DecMapInt64UintX(&x.FMapInt64Uint, d) } } case "FptrMapInt64Uint": - if x.FptrMapInt64Uint == nil { - x.FptrMapInt64Uint = new(map[int64]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint != nil { + if true && x.FptrMapInt64Uint != nil { x.FptrMapInt64Uint = nil } } else { if x.FptrMapInt64Uint == nil { x.FptrMapInt64Uint = new(map[int64]uint) } - yym1035 := z.DecBinary() - _ = yym1035 + if false { } else { z.F.DecMapInt64UintX(x.FptrMapInt64Uint, d) @@ -28388,28 +24315,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint8 = nil } else { - yyv1036 := &x.FMapInt64Uint8 - yym1037 := z.DecBinary() - _ = yym1037 if false { } else { - z.F.DecMapInt64Uint8X(yyv1036, d) + z.F.DecMapInt64Uint8X(&x.FMapInt64Uint8, d) } } case "FptrMapInt64Uint8": - if x.FptrMapInt64Uint8 == nil { - x.FptrMapInt64Uint8 = new(map[int64]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint8 != nil { + if true && x.FptrMapInt64Uint8 != nil { x.FptrMapInt64Uint8 = nil } } else { if x.FptrMapInt64Uint8 == nil { x.FptrMapInt64Uint8 = new(map[int64]uint8) } - yym1039 := z.DecBinary() - _ = yym1039 + if false { } else { z.F.DecMapInt64Uint8X(x.FptrMapInt64Uint8, d) @@ -28419,28 +24339,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint16 = nil } else { - yyv1040 := &x.FMapInt64Uint16 - yym1041 := z.DecBinary() - _ = yym1041 if false { } else { - z.F.DecMapInt64Uint16X(yyv1040, d) + z.F.DecMapInt64Uint16X(&x.FMapInt64Uint16, d) } } case "FptrMapInt64Uint16": - if x.FptrMapInt64Uint16 == nil { - x.FptrMapInt64Uint16 = new(map[int64]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint16 != nil { + if true && x.FptrMapInt64Uint16 != nil { x.FptrMapInt64Uint16 = nil } } else { if x.FptrMapInt64Uint16 == nil { x.FptrMapInt64Uint16 = new(map[int64]uint16) } - yym1043 := z.DecBinary() - _ = yym1043 + if false { } else { z.F.DecMapInt64Uint16X(x.FptrMapInt64Uint16, d) @@ -28450,28 +24363,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint32 = nil } else { - yyv1044 := &x.FMapInt64Uint32 - yym1045 := z.DecBinary() - _ = yym1045 if false { } else { - z.F.DecMapInt64Uint32X(yyv1044, d) + z.F.DecMapInt64Uint32X(&x.FMapInt64Uint32, d) } } case "FptrMapInt64Uint32": - if x.FptrMapInt64Uint32 == nil { - x.FptrMapInt64Uint32 = new(map[int64]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint32 != nil { + if true && x.FptrMapInt64Uint32 != nil { x.FptrMapInt64Uint32 = nil } } else { if x.FptrMapInt64Uint32 == nil { x.FptrMapInt64Uint32 = new(map[int64]uint32) } - yym1047 := z.DecBinary() - _ = yym1047 + if false { } else { z.F.DecMapInt64Uint32X(x.FptrMapInt64Uint32, d) @@ -28481,28 +24387,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint64 = nil } else { - yyv1048 := &x.FMapInt64Uint64 - yym1049 := z.DecBinary() - _ = yym1049 if false { } else { - z.F.DecMapInt64Uint64X(yyv1048, d) + z.F.DecMapInt64Uint64X(&x.FMapInt64Uint64, d) } } case "FptrMapInt64Uint64": - if x.FptrMapInt64Uint64 == nil { - x.FptrMapInt64Uint64 = new(map[int64]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint64 != nil { + if true && x.FptrMapInt64Uint64 != nil { x.FptrMapInt64Uint64 = nil } } else { if x.FptrMapInt64Uint64 == nil { x.FptrMapInt64Uint64 = new(map[int64]uint64) } - yym1051 := z.DecBinary() - _ = yym1051 + if false { } else { z.F.DecMapInt64Uint64X(x.FptrMapInt64Uint64, d) @@ -28512,28 +24411,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uintptr = nil } else { - yyv1052 := &x.FMapInt64Uintptr - yym1053 := z.DecBinary() - _ = yym1053 if false { } else { - z.F.DecMapInt64UintptrX(yyv1052, d) + z.F.DecMapInt64UintptrX(&x.FMapInt64Uintptr, d) } } case "FptrMapInt64Uintptr": - if x.FptrMapInt64Uintptr == nil { - x.FptrMapInt64Uintptr = new(map[int64]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Uintptr != nil { + if true && x.FptrMapInt64Uintptr != nil { x.FptrMapInt64Uintptr = nil } } else { if x.FptrMapInt64Uintptr == nil { x.FptrMapInt64Uintptr = new(map[int64]uintptr) } - yym1055 := z.DecBinary() - _ = yym1055 + if false { } else { z.F.DecMapInt64UintptrX(x.FptrMapInt64Uintptr, d) @@ -28543,28 +24435,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int = nil } else { - yyv1056 := &x.FMapInt64Int - yym1057 := z.DecBinary() - _ = yym1057 if false { } else { - z.F.DecMapInt64IntX(yyv1056, d) + z.F.DecMapInt64IntX(&x.FMapInt64Int, d) } } case "FptrMapInt64Int": - if x.FptrMapInt64Int == nil { - x.FptrMapInt64Int = new(map[int64]int) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Int != nil { + if true && x.FptrMapInt64Int != nil { x.FptrMapInt64Int = nil } } else { if x.FptrMapInt64Int == nil { x.FptrMapInt64Int = new(map[int64]int) } - yym1059 := z.DecBinary() - _ = yym1059 + if false { } else { z.F.DecMapInt64IntX(x.FptrMapInt64Int, d) @@ -28574,28 +24459,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int8 = nil } else { - yyv1060 := &x.FMapInt64Int8 - yym1061 := z.DecBinary() - _ = yym1061 if false { } else { - z.F.DecMapInt64Int8X(yyv1060, d) + z.F.DecMapInt64Int8X(&x.FMapInt64Int8, d) } } case "FptrMapInt64Int8": - if x.FptrMapInt64Int8 == nil { - x.FptrMapInt64Int8 = new(map[int64]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Int8 != nil { + if true && x.FptrMapInt64Int8 != nil { x.FptrMapInt64Int8 = nil } } else { if x.FptrMapInt64Int8 == nil { x.FptrMapInt64Int8 = new(map[int64]int8) } - yym1063 := z.DecBinary() - _ = yym1063 + if false { } else { z.F.DecMapInt64Int8X(x.FptrMapInt64Int8, d) @@ -28605,28 +24483,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int16 = nil } else { - yyv1064 := &x.FMapInt64Int16 - yym1065 := z.DecBinary() - _ = yym1065 if false { } else { - z.F.DecMapInt64Int16X(yyv1064, d) + z.F.DecMapInt64Int16X(&x.FMapInt64Int16, d) } } case "FptrMapInt64Int16": - if x.FptrMapInt64Int16 == nil { - x.FptrMapInt64Int16 = new(map[int64]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Int16 != nil { + if true && x.FptrMapInt64Int16 != nil { x.FptrMapInt64Int16 = nil } } else { if x.FptrMapInt64Int16 == nil { x.FptrMapInt64Int16 = new(map[int64]int16) } - yym1067 := z.DecBinary() - _ = yym1067 + if false { } else { z.F.DecMapInt64Int16X(x.FptrMapInt64Int16, d) @@ -28636,28 +24507,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int32 = nil } else { - yyv1068 := &x.FMapInt64Int32 - yym1069 := z.DecBinary() - _ = yym1069 if false { } else { - z.F.DecMapInt64Int32X(yyv1068, d) + z.F.DecMapInt64Int32X(&x.FMapInt64Int32, d) } } case "FptrMapInt64Int32": - if x.FptrMapInt64Int32 == nil { - x.FptrMapInt64Int32 = new(map[int64]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Int32 != nil { + if true && x.FptrMapInt64Int32 != nil { x.FptrMapInt64Int32 = nil } } else { if x.FptrMapInt64Int32 == nil { x.FptrMapInt64Int32 = new(map[int64]int32) } - yym1071 := z.DecBinary() - _ = yym1071 + if false { } else { z.F.DecMapInt64Int32X(x.FptrMapInt64Int32, d) @@ -28667,28 +24531,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int64 = nil } else { - yyv1072 := &x.FMapInt64Int64 - yym1073 := z.DecBinary() - _ = yym1073 if false { } else { - z.F.DecMapInt64Int64X(yyv1072, d) + z.F.DecMapInt64Int64X(&x.FMapInt64Int64, d) } } case "FptrMapInt64Int64": - if x.FptrMapInt64Int64 == nil { - x.FptrMapInt64Int64 = new(map[int64]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Int64 != nil { + if true && x.FptrMapInt64Int64 != nil { x.FptrMapInt64Int64 = nil } } else { if x.FptrMapInt64Int64 == nil { x.FptrMapInt64Int64 = new(map[int64]int64) } - yym1075 := z.DecBinary() - _ = yym1075 + if false { } else { z.F.DecMapInt64Int64X(x.FptrMapInt64Int64, d) @@ -28698,28 +24555,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Float32 = nil } else { - yyv1076 := &x.FMapInt64Float32 - yym1077 := z.DecBinary() - _ = yym1077 if false { } else { - z.F.DecMapInt64Float32X(yyv1076, d) + z.F.DecMapInt64Float32X(&x.FMapInt64Float32, d) } } case "FptrMapInt64Float32": - if x.FptrMapInt64Float32 == nil { - x.FptrMapInt64Float32 = new(map[int64]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Float32 != nil { + if true && x.FptrMapInt64Float32 != nil { x.FptrMapInt64Float32 = nil } } else { if x.FptrMapInt64Float32 == nil { x.FptrMapInt64Float32 = new(map[int64]float32) } - yym1079 := z.DecBinary() - _ = yym1079 + if false { } else { z.F.DecMapInt64Float32X(x.FptrMapInt64Float32, d) @@ -28729,28 +24579,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Float64 = nil } else { - yyv1080 := &x.FMapInt64Float64 - yym1081 := z.DecBinary() - _ = yym1081 if false { } else { - z.F.DecMapInt64Float64X(yyv1080, d) + z.F.DecMapInt64Float64X(&x.FMapInt64Float64, d) } } case "FptrMapInt64Float64": - if x.FptrMapInt64Float64 == nil { - x.FptrMapInt64Float64 = new(map[int64]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Float64 != nil { + if true && x.FptrMapInt64Float64 != nil { x.FptrMapInt64Float64 = nil } } else { if x.FptrMapInt64Float64 == nil { x.FptrMapInt64Float64 = new(map[int64]float64) } - yym1083 := z.DecBinary() - _ = yym1083 + if false { } else { z.F.DecMapInt64Float64X(x.FptrMapInt64Float64, d) @@ -28760,28 +24603,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Bool = nil } else { - yyv1084 := &x.FMapInt64Bool - yym1085 := z.DecBinary() - _ = yym1085 if false { } else { - z.F.DecMapInt64BoolX(yyv1084, d) + z.F.DecMapInt64BoolX(&x.FMapInt64Bool, d) } } case "FptrMapInt64Bool": - if x.FptrMapInt64Bool == nil { - x.FptrMapInt64Bool = new(map[int64]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapInt64Bool != nil { + if true && x.FptrMapInt64Bool != nil { x.FptrMapInt64Bool = nil } } else { if x.FptrMapInt64Bool == nil { x.FptrMapInt64Bool = new(map[int64]bool) } - yym1087 := z.DecBinary() - _ = yym1087 + if false { } else { z.F.DecMapInt64BoolX(x.FptrMapInt64Bool, d) @@ -28791,28 +24627,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolIntf = nil } else { - yyv1088 := &x.FMapBoolIntf - yym1089 := z.DecBinary() - _ = yym1089 if false { } else { - z.F.DecMapBoolIntfX(yyv1088, d) + z.F.DecMapBoolIntfX(&x.FMapBoolIntf, d) } } case "FptrMapBoolIntf": - if x.FptrMapBoolIntf == nil { - x.FptrMapBoolIntf = new(map[bool]interface{}) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolIntf != nil { + if true && x.FptrMapBoolIntf != nil { x.FptrMapBoolIntf = nil } } else { if x.FptrMapBoolIntf == nil { x.FptrMapBoolIntf = new(map[bool]interface{}) } - yym1091 := z.DecBinary() - _ = yym1091 + if false { } else { z.F.DecMapBoolIntfX(x.FptrMapBoolIntf, d) @@ -28822,28 +24651,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolString = nil } else { - yyv1092 := &x.FMapBoolString - yym1093 := z.DecBinary() - _ = yym1093 if false { } else { - z.F.DecMapBoolStringX(yyv1092, d) + z.F.DecMapBoolStringX(&x.FMapBoolString, d) } } case "FptrMapBoolString": - if x.FptrMapBoolString == nil { - x.FptrMapBoolString = new(map[bool]string) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolString != nil { + if true && x.FptrMapBoolString != nil { x.FptrMapBoolString = nil } } else { if x.FptrMapBoolString == nil { x.FptrMapBoolString = new(map[bool]string) } - yym1095 := z.DecBinary() - _ = yym1095 + if false { } else { z.F.DecMapBoolStringX(x.FptrMapBoolString, d) @@ -28853,28 +24675,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint = nil } else { - yyv1096 := &x.FMapBoolUint - yym1097 := z.DecBinary() - _ = yym1097 if false { } else { - z.F.DecMapBoolUintX(yyv1096, d) + z.F.DecMapBoolUintX(&x.FMapBoolUint, d) } } case "FptrMapBoolUint": - if x.FptrMapBoolUint == nil { - x.FptrMapBoolUint = new(map[bool]uint) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUint != nil { + if true && x.FptrMapBoolUint != nil { x.FptrMapBoolUint = nil } } else { if x.FptrMapBoolUint == nil { x.FptrMapBoolUint = new(map[bool]uint) } - yym1099 := z.DecBinary() - _ = yym1099 + if false { } else { z.F.DecMapBoolUintX(x.FptrMapBoolUint, d) @@ -28884,28 +24699,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint8 = nil } else { - yyv1100 := &x.FMapBoolUint8 - yym1101 := z.DecBinary() - _ = yym1101 if false { } else { - z.F.DecMapBoolUint8X(yyv1100, d) + z.F.DecMapBoolUint8X(&x.FMapBoolUint8, d) } } case "FptrMapBoolUint8": - if x.FptrMapBoolUint8 == nil { - x.FptrMapBoolUint8 = new(map[bool]uint8) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUint8 != nil { + if true && x.FptrMapBoolUint8 != nil { x.FptrMapBoolUint8 = nil } } else { if x.FptrMapBoolUint8 == nil { x.FptrMapBoolUint8 = new(map[bool]uint8) } - yym1103 := z.DecBinary() - _ = yym1103 + if false { } else { z.F.DecMapBoolUint8X(x.FptrMapBoolUint8, d) @@ -28915,28 +24723,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint16 = nil } else { - yyv1104 := &x.FMapBoolUint16 - yym1105 := z.DecBinary() - _ = yym1105 if false { } else { - z.F.DecMapBoolUint16X(yyv1104, d) + z.F.DecMapBoolUint16X(&x.FMapBoolUint16, d) } } case "FptrMapBoolUint16": - if x.FptrMapBoolUint16 == nil { - x.FptrMapBoolUint16 = new(map[bool]uint16) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUint16 != nil { + if true && x.FptrMapBoolUint16 != nil { x.FptrMapBoolUint16 = nil } } else { if x.FptrMapBoolUint16 == nil { x.FptrMapBoolUint16 = new(map[bool]uint16) } - yym1107 := z.DecBinary() - _ = yym1107 + if false { } else { z.F.DecMapBoolUint16X(x.FptrMapBoolUint16, d) @@ -28946,28 +24747,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint32 = nil } else { - yyv1108 := &x.FMapBoolUint32 - yym1109 := z.DecBinary() - _ = yym1109 if false { } else { - z.F.DecMapBoolUint32X(yyv1108, d) + z.F.DecMapBoolUint32X(&x.FMapBoolUint32, d) } } case "FptrMapBoolUint32": - if x.FptrMapBoolUint32 == nil { - x.FptrMapBoolUint32 = new(map[bool]uint32) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUint32 != nil { + if true && x.FptrMapBoolUint32 != nil { x.FptrMapBoolUint32 = nil } } else { if x.FptrMapBoolUint32 == nil { x.FptrMapBoolUint32 = new(map[bool]uint32) } - yym1111 := z.DecBinary() - _ = yym1111 + if false { } else { z.F.DecMapBoolUint32X(x.FptrMapBoolUint32, d) @@ -28977,28 +24771,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint64 = nil } else { - yyv1112 := &x.FMapBoolUint64 - yym1113 := z.DecBinary() - _ = yym1113 if false { } else { - z.F.DecMapBoolUint64X(yyv1112, d) + z.F.DecMapBoolUint64X(&x.FMapBoolUint64, d) } } case "FptrMapBoolUint64": - if x.FptrMapBoolUint64 == nil { - x.FptrMapBoolUint64 = new(map[bool]uint64) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUint64 != nil { + if true && x.FptrMapBoolUint64 != nil { x.FptrMapBoolUint64 = nil } } else { if x.FptrMapBoolUint64 == nil { x.FptrMapBoolUint64 = new(map[bool]uint64) } - yym1115 := z.DecBinary() - _ = yym1115 + if false { } else { z.F.DecMapBoolUint64X(x.FptrMapBoolUint64, d) @@ -29008,28 +24795,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUintptr = nil } else { - yyv1116 := &x.FMapBoolUintptr - yym1117 := z.DecBinary() - _ = yym1117 if false { } else { - z.F.DecMapBoolUintptrX(yyv1116, d) + z.F.DecMapBoolUintptrX(&x.FMapBoolUintptr, d) } } case "FptrMapBoolUintptr": - if x.FptrMapBoolUintptr == nil { - x.FptrMapBoolUintptr = new(map[bool]uintptr) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolUintptr != nil { + if true && x.FptrMapBoolUintptr != nil { x.FptrMapBoolUintptr = nil } } else { if x.FptrMapBoolUintptr == nil { x.FptrMapBoolUintptr = new(map[bool]uintptr) } - yym1119 := z.DecBinary() - _ = yym1119 + if false { } else { z.F.DecMapBoolUintptrX(x.FptrMapBoolUintptr, d) @@ -29039,28 +24819,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt = nil } else { - yyv1120 := &x.FMapBoolInt - yym1121 := z.DecBinary() - _ = yym1121 if false { } else { - z.F.DecMapBoolIntX(yyv1120, d) + z.F.DecMapBoolIntX(&x.FMapBoolInt, d) } } case "FptrMapBoolInt": - if x.FptrMapBoolInt == nil { - x.FptrMapBoolInt = new(map[bool]int) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolInt != nil { + if true && x.FptrMapBoolInt != nil { x.FptrMapBoolInt = nil } } else { if x.FptrMapBoolInt == nil { x.FptrMapBoolInt = new(map[bool]int) } - yym1123 := z.DecBinary() - _ = yym1123 + if false { } else { z.F.DecMapBoolIntX(x.FptrMapBoolInt, d) @@ -29070,28 +24843,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt8 = nil } else { - yyv1124 := &x.FMapBoolInt8 - yym1125 := z.DecBinary() - _ = yym1125 if false { } else { - z.F.DecMapBoolInt8X(yyv1124, d) + z.F.DecMapBoolInt8X(&x.FMapBoolInt8, d) } } case "FptrMapBoolInt8": - if x.FptrMapBoolInt8 == nil { - x.FptrMapBoolInt8 = new(map[bool]int8) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolInt8 != nil { + if true && x.FptrMapBoolInt8 != nil { x.FptrMapBoolInt8 = nil } } else { if x.FptrMapBoolInt8 == nil { x.FptrMapBoolInt8 = new(map[bool]int8) } - yym1127 := z.DecBinary() - _ = yym1127 + if false { } else { z.F.DecMapBoolInt8X(x.FptrMapBoolInt8, d) @@ -29101,28 +24867,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt16 = nil } else { - yyv1128 := &x.FMapBoolInt16 - yym1129 := z.DecBinary() - _ = yym1129 if false { } else { - z.F.DecMapBoolInt16X(yyv1128, d) + z.F.DecMapBoolInt16X(&x.FMapBoolInt16, d) } } case "FptrMapBoolInt16": - if x.FptrMapBoolInt16 == nil { - x.FptrMapBoolInt16 = new(map[bool]int16) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolInt16 != nil { + if true && x.FptrMapBoolInt16 != nil { x.FptrMapBoolInt16 = nil } } else { if x.FptrMapBoolInt16 == nil { x.FptrMapBoolInt16 = new(map[bool]int16) } - yym1131 := z.DecBinary() - _ = yym1131 + if false { } else { z.F.DecMapBoolInt16X(x.FptrMapBoolInt16, d) @@ -29132,28 +24891,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt32 = nil } else { - yyv1132 := &x.FMapBoolInt32 - yym1133 := z.DecBinary() - _ = yym1133 if false { } else { - z.F.DecMapBoolInt32X(yyv1132, d) + z.F.DecMapBoolInt32X(&x.FMapBoolInt32, d) } } case "FptrMapBoolInt32": - if x.FptrMapBoolInt32 == nil { - x.FptrMapBoolInt32 = new(map[bool]int32) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolInt32 != nil { + if true && x.FptrMapBoolInt32 != nil { x.FptrMapBoolInt32 = nil } } else { if x.FptrMapBoolInt32 == nil { x.FptrMapBoolInt32 = new(map[bool]int32) } - yym1135 := z.DecBinary() - _ = yym1135 + if false { } else { z.F.DecMapBoolInt32X(x.FptrMapBoolInt32, d) @@ -29163,28 +24915,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt64 = nil } else { - yyv1136 := &x.FMapBoolInt64 - yym1137 := z.DecBinary() - _ = yym1137 if false { } else { - z.F.DecMapBoolInt64X(yyv1136, d) + z.F.DecMapBoolInt64X(&x.FMapBoolInt64, d) } } case "FptrMapBoolInt64": - if x.FptrMapBoolInt64 == nil { - x.FptrMapBoolInt64 = new(map[bool]int64) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolInt64 != nil { + if true && x.FptrMapBoolInt64 != nil { x.FptrMapBoolInt64 = nil } } else { if x.FptrMapBoolInt64 == nil { x.FptrMapBoolInt64 = new(map[bool]int64) } - yym1139 := z.DecBinary() - _ = yym1139 + if false { } else { z.F.DecMapBoolInt64X(x.FptrMapBoolInt64, d) @@ -29194,28 +24939,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolFloat32 = nil } else { - yyv1140 := &x.FMapBoolFloat32 - yym1141 := z.DecBinary() - _ = yym1141 if false { } else { - z.F.DecMapBoolFloat32X(yyv1140, d) + z.F.DecMapBoolFloat32X(&x.FMapBoolFloat32, d) } } case "FptrMapBoolFloat32": - if x.FptrMapBoolFloat32 == nil { - x.FptrMapBoolFloat32 = new(map[bool]float32) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolFloat32 != nil { + if true && x.FptrMapBoolFloat32 != nil { x.FptrMapBoolFloat32 = nil } } else { if x.FptrMapBoolFloat32 == nil { x.FptrMapBoolFloat32 = new(map[bool]float32) } - yym1143 := z.DecBinary() - _ = yym1143 + if false { } else { z.F.DecMapBoolFloat32X(x.FptrMapBoolFloat32, d) @@ -29225,28 +24963,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolFloat64 = nil } else { - yyv1144 := &x.FMapBoolFloat64 - yym1145 := z.DecBinary() - _ = yym1145 if false { } else { - z.F.DecMapBoolFloat64X(yyv1144, d) + z.F.DecMapBoolFloat64X(&x.FMapBoolFloat64, d) } } case "FptrMapBoolFloat64": - if x.FptrMapBoolFloat64 == nil { - x.FptrMapBoolFloat64 = new(map[bool]float64) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolFloat64 != nil { + if true && x.FptrMapBoolFloat64 != nil { x.FptrMapBoolFloat64 = nil } } else { if x.FptrMapBoolFloat64 == nil { x.FptrMapBoolFloat64 = new(map[bool]float64) } - yym1147 := z.DecBinary() - _ = yym1147 + if false { } else { z.F.DecMapBoolFloat64X(x.FptrMapBoolFloat64, d) @@ -29256,28 +24987,21 @@ func (x *TestMammoth2) codecDecodeSelfFromMap(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolBool = nil } else { - yyv1148 := &x.FMapBoolBool - yym1149 := z.DecBinary() - _ = yym1149 if false { } else { - z.F.DecMapBoolBoolX(yyv1148, d) + z.F.DecMapBoolBoolX(&x.FMapBoolBool, d) } } case "FptrMapBoolBool": - if x.FptrMapBoolBool == nil { - x.FptrMapBoolBool = new(map[bool]bool) - } if r.TryDecodeAsNil() { - if x.FptrMapBoolBool != nil { + if true && x.FptrMapBoolBool != nil { x.FptrMapBoolBool = nil } } else { if x.FptrMapBoolBool == nil { x.FptrMapBoolBool = new(map[bool]bool) } - yym1151 := z.DecBinary() - _ = yym1151 + if false { } else { z.F.DecMapBoolBoolX(x.FptrMapBoolBool, d) @@ -29294,16 +25018,16 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - var yyj1152 int - var yyb1152 bool - var yyhl1152 bool = l >= 0 - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + var yyj1141 int + var yyb1141 bool + var yyhl1141 bool = l >= 0 + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29311,50 +25035,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FIntf = nil } else { - yyv1153 := &x.FIntf - yym1154 := z.DecBinary() - _ = yym1154 if false { } else { - z.DecFallback(yyv1153, true) + z.DecFallback(&x.FIntf, true) } } - if x.FptrIntf == nil { - x.FptrIntf = new(interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrIntf != nil { + if true && x.FptrIntf != nil { x.FptrIntf = nil } } else { if x.FptrIntf == nil { x.FptrIntf = new(interface{}) } - yym1156 := z.DecBinary() - _ = yym1156 + if false { } else { z.DecFallback(x.FptrIntf, true) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29362,50 +25079,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FString = "" } else { - yyv1157 := &x.FString - yym1158 := z.DecBinary() - _ = yym1158 - if false { - } else { - *((*string)(yyv1157)) = r.DecodeString() - } + x.FString = (string)(r.DecodeString()) } - if x.FptrString == nil { - x.FptrString = new(string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrString != nil { + if true && x.FptrString != nil { x.FptrString = nil } } else { if x.FptrString == nil { x.FptrString = new(string) } - yym1160 := z.DecBinary() - _ = yym1160 + if false { } else { - *((*string)(x.FptrString)) = r.DecodeString() + *x.FptrString = (string)(r.DecodeString()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29413,50 +25120,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FFloat32 = 0 } else { - yyv1161 := &x.FFloat32 - yym1162 := z.DecBinary() - _ = yym1162 - if false { - } else { - *((*float32)(yyv1161)) = float32(r.DecodeFloat(true)) - } + x.FFloat32 = (float32)(r.DecodeFloat32As64()) } - if x.FptrFloat32 == nil { - x.FptrFloat32 = new(float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrFloat32 != nil { + if true && x.FptrFloat32 != nil { x.FptrFloat32 = nil } } else { if x.FptrFloat32 == nil { x.FptrFloat32 = new(float32) } - yym1164 := z.DecBinary() - _ = yym1164 + if false { } else { - *((*float32)(x.FptrFloat32)) = float32(r.DecodeFloat(true)) + *x.FptrFloat32 = (float32)(r.DecodeFloat32As64()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29464,50 +25161,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FFloat64 = 0 } else { - yyv1165 := &x.FFloat64 - yym1166 := z.DecBinary() - _ = yym1166 - if false { - } else { - *((*float64)(yyv1165)) = float64(r.DecodeFloat(false)) - } + x.FFloat64 = (float64)(r.DecodeFloat64()) } - if x.FptrFloat64 == nil { - x.FptrFloat64 = new(float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrFloat64 != nil { + if true && x.FptrFloat64 != nil { x.FptrFloat64 = nil } } else { if x.FptrFloat64 == nil { x.FptrFloat64 = new(float64) } - yym1168 := z.DecBinary() - _ = yym1168 + if false { } else { - *((*float64)(x.FptrFloat64)) = float64(r.DecodeFloat(false)) + *x.FptrFloat64 = (float64)(r.DecodeFloat64()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29515,50 +25202,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUint = 0 } else { - yyv1169 := &x.FUint - yym1170 := z.DecBinary() - _ = yym1170 - if false { - } else { - *((*uint)(yyv1169)) = uint(r.DecodeUint(codecSelferBitsize19781)) - } + x.FUint = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } - if x.FptrUint == nil { - x.FptrUint = new(uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUint != nil { + if true && x.FptrUint != nil { x.FptrUint = nil } } else { if x.FptrUint == nil { x.FptrUint = new(uint) } - yym1172 := z.DecBinary() - _ = yym1172 + if false { } else { - *((*uint)(x.FptrUint)) = uint(r.DecodeUint(codecSelferBitsize19781)) + *x.FptrUint = (uint)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29566,50 +25243,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUint8 = 0 } else { - yyv1173 := &x.FUint8 - yym1174 := z.DecBinary() - _ = yym1174 - if false { - } else { - *((*uint8)(yyv1173)) = uint8(r.DecodeUint(8)) - } + x.FUint8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) } - if x.FptrUint8 == nil { - x.FptrUint8 = new(uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUint8 != nil { + if true && x.FptrUint8 != nil { x.FptrUint8 = nil } } else { if x.FptrUint8 == nil { x.FptrUint8 = new(uint8) } - yym1176 := z.DecBinary() - _ = yym1176 + if false { } else { - *((*uint8)(x.FptrUint8)) = uint8(r.DecodeUint(8)) + *x.FptrUint8 = (uint8)(z.C.UintV(r.DecodeUint64(), 8)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29617,50 +25284,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUint16 = 0 } else { - yyv1177 := &x.FUint16 - yym1178 := z.DecBinary() - _ = yym1178 - if false { - } else { - *((*uint16)(yyv1177)) = uint16(r.DecodeUint(16)) - } + x.FUint16 = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) } - if x.FptrUint16 == nil { - x.FptrUint16 = new(uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUint16 != nil { + if true && x.FptrUint16 != nil { x.FptrUint16 = nil } } else { if x.FptrUint16 == nil { x.FptrUint16 = new(uint16) } - yym1180 := z.DecBinary() - _ = yym1180 + if false { } else { - *((*uint16)(x.FptrUint16)) = uint16(r.DecodeUint(16)) + *x.FptrUint16 = (uint16)(z.C.UintV(r.DecodeUint64(), 16)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29668,50 +25325,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUint32 = 0 } else { - yyv1181 := &x.FUint32 - yym1182 := z.DecBinary() - _ = yym1182 - if false { - } else { - *((*uint32)(yyv1181)) = uint32(r.DecodeUint(32)) - } + x.FUint32 = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) } - if x.FptrUint32 == nil { - x.FptrUint32 = new(uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUint32 != nil { + if true && x.FptrUint32 != nil { x.FptrUint32 = nil } } else { if x.FptrUint32 == nil { x.FptrUint32 = new(uint32) } - yym1184 := z.DecBinary() - _ = yym1184 + if false { } else { - *((*uint32)(x.FptrUint32)) = uint32(r.DecodeUint(32)) + *x.FptrUint32 = (uint32)(z.C.UintV(r.DecodeUint64(), 32)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29719,50 +25366,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUint64 = 0 } else { - yyv1185 := &x.FUint64 - yym1186 := z.DecBinary() - _ = yym1186 - if false { - } else { - *((*uint64)(yyv1185)) = uint64(r.DecodeUint(64)) - } + x.FUint64 = (uint64)(r.DecodeUint64()) } - if x.FptrUint64 == nil { - x.FptrUint64 = new(uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUint64 != nil { + if true && x.FptrUint64 != nil { x.FptrUint64 = nil } } else { if x.FptrUint64 == nil { x.FptrUint64 = new(uint64) } - yym1188 := z.DecBinary() - _ = yym1188 + if false { } else { - *((*uint64)(x.FptrUint64)) = uint64(r.DecodeUint(64)) + *x.FptrUint64 = (uint64)(r.DecodeUint64()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29770,50 +25407,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FUintptr = 0 } else { - yyv1189 := &x.FUintptr - yym1190 := z.DecBinary() - _ = yym1190 - if false { - } else { - *((*uintptr)(yyv1189)) = uintptr(r.DecodeUint(codecSelferBitsize19781)) - } + x.FUintptr = (uintptr)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } - if x.FptrUintptr == nil { - x.FptrUintptr = new(uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrUintptr != nil { + if true && x.FptrUintptr != nil { x.FptrUintptr = nil } } else { if x.FptrUintptr == nil { x.FptrUintptr = new(uintptr) } - yym1192 := z.DecBinary() - _ = yym1192 + if false { } else { - *((*uintptr)(x.FptrUintptr)) = uintptr(r.DecodeUint(codecSelferBitsize19781)) + *x.FptrUintptr = (uintptr)(z.C.UintV(r.DecodeUint64(), codecSelferBitsize19781)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29821,50 +25448,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FInt = 0 } else { - yyv1193 := &x.FInt - yym1194 := z.DecBinary() - _ = yym1194 - if false { - } else { - *((*int)(yyv1193)) = int(r.DecodeInt(codecSelferBitsize19781)) - } + x.FInt = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19781)) } - if x.FptrInt == nil { - x.FptrInt = new(int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrInt != nil { + if true && x.FptrInt != nil { x.FptrInt = nil } } else { if x.FptrInt == nil { x.FptrInt = new(int) } - yym1196 := z.DecBinary() - _ = yym1196 + if false { } else { - *((*int)(x.FptrInt)) = int(r.DecodeInt(codecSelferBitsize19781)) + *x.FptrInt = (int)(z.C.IntV(r.DecodeInt64(), codecSelferBitsize19781)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29872,50 +25489,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FInt8 = 0 } else { - yyv1197 := &x.FInt8 - yym1198 := z.DecBinary() - _ = yym1198 - if false { - } else { - *((*int8)(yyv1197)) = int8(r.DecodeInt(8)) - } + x.FInt8 = (int8)(z.C.IntV(r.DecodeInt64(), 8)) } - if x.FptrInt8 == nil { - x.FptrInt8 = new(int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrInt8 != nil { + if true && x.FptrInt8 != nil { x.FptrInt8 = nil } } else { if x.FptrInt8 == nil { x.FptrInt8 = new(int8) } - yym1200 := z.DecBinary() - _ = yym1200 + if false { } else { - *((*int8)(x.FptrInt8)) = int8(r.DecodeInt(8)) + *x.FptrInt8 = (int8)(z.C.IntV(r.DecodeInt64(), 8)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29923,50 +25530,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FInt16 = 0 } else { - yyv1201 := &x.FInt16 - yym1202 := z.DecBinary() - _ = yym1202 - if false { - } else { - *((*int16)(yyv1201)) = int16(r.DecodeInt(16)) - } + x.FInt16 = (int16)(z.C.IntV(r.DecodeInt64(), 16)) } - if x.FptrInt16 == nil { - x.FptrInt16 = new(int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrInt16 != nil { + if true && x.FptrInt16 != nil { x.FptrInt16 = nil } } else { if x.FptrInt16 == nil { x.FptrInt16 = new(int16) } - yym1204 := z.DecBinary() - _ = yym1204 + if false { } else { - *((*int16)(x.FptrInt16)) = int16(r.DecodeInt(16)) + *x.FptrInt16 = (int16)(z.C.IntV(r.DecodeInt64(), 16)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -29974,50 +25571,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FInt32 = 0 } else { - yyv1205 := &x.FInt32 - yym1206 := z.DecBinary() - _ = yym1206 - if false { - } else { - *((*int32)(yyv1205)) = int32(r.DecodeInt(32)) - } + x.FInt32 = (int32)(z.C.IntV(r.DecodeInt64(), 32)) } - if x.FptrInt32 == nil { - x.FptrInt32 = new(int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrInt32 != nil { + if true && x.FptrInt32 != nil { x.FptrInt32 = nil } } else { if x.FptrInt32 == nil { x.FptrInt32 = new(int32) } - yym1208 := z.DecBinary() - _ = yym1208 + if false { } else { - *((*int32)(x.FptrInt32)) = int32(r.DecodeInt(32)) + *x.FptrInt32 = (int32)(z.C.IntV(r.DecodeInt64(), 32)) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30025,50 +25612,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FInt64 = 0 } else { - yyv1209 := &x.FInt64 - yym1210 := z.DecBinary() - _ = yym1210 - if false { - } else { - *((*int64)(yyv1209)) = int64(r.DecodeInt(64)) - } + x.FInt64 = (int64)(r.DecodeInt64()) } - if x.FptrInt64 == nil { - x.FptrInt64 = new(int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrInt64 != nil { + if true && x.FptrInt64 != nil { x.FptrInt64 = nil } } else { if x.FptrInt64 == nil { x.FptrInt64 = new(int64) } - yym1212 := z.DecBinary() - _ = yym1212 + if false { } else { - *((*int64)(x.FptrInt64)) = int64(r.DecodeInt(64)) + *x.FptrInt64 = (int64)(r.DecodeInt64()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30076,50 +25653,40 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FBool = false } else { - yyv1213 := &x.FBool - yym1214 := z.DecBinary() - _ = yym1214 - if false { - } else { - *((*bool)(yyv1213)) = r.DecodeBool() - } + x.FBool = (bool)(r.DecodeBool()) } - if x.FptrBool == nil { - x.FptrBool = new(bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrBool != nil { + if true && x.FptrBool != nil { x.FptrBool = nil } } else { if x.FptrBool == nil { x.FptrBool = new(bool) } - yym1216 := z.DecBinary() - _ = yym1216 + if false { } else { - *((*bool)(x.FptrBool)) = r.DecodeBool() + *x.FptrBool = (bool)(r.DecodeBool()) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30127,50 +25694,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceIntf = nil } else { - yyv1217 := &x.FSliceIntf - yym1218 := z.DecBinary() - _ = yym1218 if false { } else { - z.F.DecSliceIntfX(yyv1217, d) + z.F.DecSliceIntfX(&x.FSliceIntf, d) } } - if x.FptrSliceIntf == nil { - x.FptrSliceIntf = new([]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceIntf != nil { + if true && x.FptrSliceIntf != nil { x.FptrSliceIntf = nil } } else { if x.FptrSliceIntf == nil { x.FptrSliceIntf = new([]interface{}) } - yym1220 := z.DecBinary() - _ = yym1220 + if false { } else { z.F.DecSliceIntfX(x.FptrSliceIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30178,50 +25738,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceString = nil } else { - yyv1221 := &x.FSliceString - yym1222 := z.DecBinary() - _ = yym1222 if false { } else { - z.F.DecSliceStringX(yyv1221, d) + z.F.DecSliceStringX(&x.FSliceString, d) } } - if x.FptrSliceString == nil { - x.FptrSliceString = new([]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceString != nil { + if true && x.FptrSliceString != nil { x.FptrSliceString = nil } } else { if x.FptrSliceString == nil { x.FptrSliceString = new([]string) } - yym1224 := z.DecBinary() - _ = yym1224 + if false { } else { z.F.DecSliceStringX(x.FptrSliceString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30229,50 +25782,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceFloat32 = nil } else { - yyv1225 := &x.FSliceFloat32 - yym1226 := z.DecBinary() - _ = yym1226 if false { } else { - z.F.DecSliceFloat32X(yyv1225, d) + z.F.DecSliceFloat32X(&x.FSliceFloat32, d) } } - if x.FptrSliceFloat32 == nil { - x.FptrSliceFloat32 = new([]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceFloat32 != nil { + if true && x.FptrSliceFloat32 != nil { x.FptrSliceFloat32 = nil } } else { if x.FptrSliceFloat32 == nil { x.FptrSliceFloat32 = new([]float32) } - yym1228 := z.DecBinary() - _ = yym1228 + if false { } else { z.F.DecSliceFloat32X(x.FptrSliceFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30280,50 +25826,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceFloat64 = nil } else { - yyv1229 := &x.FSliceFloat64 - yym1230 := z.DecBinary() - _ = yym1230 if false { } else { - z.F.DecSliceFloat64X(yyv1229, d) + z.F.DecSliceFloat64X(&x.FSliceFloat64, d) } } - if x.FptrSliceFloat64 == nil { - x.FptrSliceFloat64 = new([]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceFloat64 != nil { + if true && x.FptrSliceFloat64 != nil { x.FptrSliceFloat64 = nil } } else { if x.FptrSliceFloat64 == nil { x.FptrSliceFloat64 = new([]float64) } - yym1232 := z.DecBinary() - _ = yym1232 + if false { } else { z.F.DecSliceFloat64X(x.FptrSliceFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30331,50 +25870,87 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint = nil } else { - yyv1233 := &x.FSliceUint - yym1234 := z.DecBinary() - _ = yym1234 if false { } else { - z.F.DecSliceUintX(yyv1233, d) + z.F.DecSliceUintX(&x.FSliceUint, d) } } - if x.FptrSliceUint == nil { - x.FptrSliceUint = new([]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceUint != nil { + if true && x.FptrSliceUint != nil { x.FptrSliceUint = nil } } else { if x.FptrSliceUint == nil { x.FptrSliceUint = new([]uint) } - yym1236 := z.DecBinary() - _ = yym1236 + if false { } else { z.F.DecSliceUintX(x.FptrSliceUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + x.FSliceUint8 = nil + } else { + if false { + } else { + x.FSliceUint8 = r.DecodeBytes(([]byte)(x.FSliceUint8), false) + } + } + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l + } else { + yyb1141 = r.CheckBreak() + } + if yyb1141 { + r.ReadArrayEnd() + return + } + r.ReadArrayElem() + if r.TryDecodeAsNil() { + if true && x.FptrSliceUint8 != nil { + x.FptrSliceUint8 = nil + } + } else { + if x.FptrSliceUint8 == nil { + x.FptrSliceUint8 = new([]uint8) + } + + if false { + } else { + *x.FptrSliceUint8 = r.DecodeBytes(*(*[]byte)(x.FptrSliceUint8), false) + } + } + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l + } else { + yyb1141 = r.CheckBreak() + } + if yyb1141 { r.ReadArrayEnd() return } @@ -30382,50 +25958,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint16 = nil } else { - yyv1237 := &x.FSliceUint16 - yym1238 := z.DecBinary() - _ = yym1238 if false { } else { - z.F.DecSliceUint16X(yyv1237, d) + z.F.DecSliceUint16X(&x.FSliceUint16, d) } } - if x.FptrSliceUint16 == nil { - x.FptrSliceUint16 = new([]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceUint16 != nil { + if true && x.FptrSliceUint16 != nil { x.FptrSliceUint16 = nil } } else { if x.FptrSliceUint16 == nil { x.FptrSliceUint16 = new([]uint16) } - yym1240 := z.DecBinary() - _ = yym1240 + if false { } else { z.F.DecSliceUint16X(x.FptrSliceUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30433,50 +26002,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint32 = nil } else { - yyv1241 := &x.FSliceUint32 - yym1242 := z.DecBinary() - _ = yym1242 if false { } else { - z.F.DecSliceUint32X(yyv1241, d) + z.F.DecSliceUint32X(&x.FSliceUint32, d) } } - if x.FptrSliceUint32 == nil { - x.FptrSliceUint32 = new([]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceUint32 != nil { + if true && x.FptrSliceUint32 != nil { x.FptrSliceUint32 = nil } } else { if x.FptrSliceUint32 == nil { x.FptrSliceUint32 = new([]uint32) } - yym1244 := z.DecBinary() - _ = yym1244 + if false { } else { z.F.DecSliceUint32X(x.FptrSliceUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30484,50 +26046,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUint64 = nil } else { - yyv1245 := &x.FSliceUint64 - yym1246 := z.DecBinary() - _ = yym1246 if false { } else { - z.F.DecSliceUint64X(yyv1245, d) + z.F.DecSliceUint64X(&x.FSliceUint64, d) } } - if x.FptrSliceUint64 == nil { - x.FptrSliceUint64 = new([]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceUint64 != nil { + if true && x.FptrSliceUint64 != nil { x.FptrSliceUint64 = nil } } else { if x.FptrSliceUint64 == nil { x.FptrSliceUint64 = new([]uint64) } - yym1248 := z.DecBinary() - _ = yym1248 + if false { } else { z.F.DecSliceUint64X(x.FptrSliceUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30535,50 +26090,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceUintptr = nil } else { - yyv1249 := &x.FSliceUintptr - yym1250 := z.DecBinary() - _ = yym1250 if false { } else { - z.F.DecSliceUintptrX(yyv1249, d) + z.F.DecSliceUintptrX(&x.FSliceUintptr, d) } } - if x.FptrSliceUintptr == nil { - x.FptrSliceUintptr = new([]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceUintptr != nil { + if true && x.FptrSliceUintptr != nil { x.FptrSliceUintptr = nil } } else { if x.FptrSliceUintptr == nil { x.FptrSliceUintptr = new([]uintptr) } - yym1252 := z.DecBinary() - _ = yym1252 + if false { } else { z.F.DecSliceUintptrX(x.FptrSliceUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30586,50 +26134,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt = nil } else { - yyv1253 := &x.FSliceInt - yym1254 := z.DecBinary() - _ = yym1254 if false { } else { - z.F.DecSliceIntX(yyv1253, d) + z.F.DecSliceIntX(&x.FSliceInt, d) } } - if x.FptrSliceInt == nil { - x.FptrSliceInt = new([]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceInt != nil { + if true && x.FptrSliceInt != nil { x.FptrSliceInt = nil } } else { if x.FptrSliceInt == nil { x.FptrSliceInt = new([]int) } - yym1256 := z.DecBinary() - _ = yym1256 + if false { } else { z.F.DecSliceIntX(x.FptrSliceInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30637,50 +26178,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt8 = nil } else { - yyv1257 := &x.FSliceInt8 - yym1258 := z.DecBinary() - _ = yym1258 if false { } else { - z.F.DecSliceInt8X(yyv1257, d) + z.F.DecSliceInt8X(&x.FSliceInt8, d) } } - if x.FptrSliceInt8 == nil { - x.FptrSliceInt8 = new([]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceInt8 != nil { + if true && x.FptrSliceInt8 != nil { x.FptrSliceInt8 = nil } } else { if x.FptrSliceInt8 == nil { x.FptrSliceInt8 = new([]int8) } - yym1260 := z.DecBinary() - _ = yym1260 + if false { } else { z.F.DecSliceInt8X(x.FptrSliceInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30688,50 +26222,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt16 = nil } else { - yyv1261 := &x.FSliceInt16 - yym1262 := z.DecBinary() - _ = yym1262 if false { } else { - z.F.DecSliceInt16X(yyv1261, d) + z.F.DecSliceInt16X(&x.FSliceInt16, d) } } - if x.FptrSliceInt16 == nil { - x.FptrSliceInt16 = new([]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceInt16 != nil { + if true && x.FptrSliceInt16 != nil { x.FptrSliceInt16 = nil } } else { if x.FptrSliceInt16 == nil { x.FptrSliceInt16 = new([]int16) } - yym1264 := z.DecBinary() - _ = yym1264 + if false { } else { z.F.DecSliceInt16X(x.FptrSliceInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30739,50 +26266,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt32 = nil } else { - yyv1265 := &x.FSliceInt32 - yym1266 := z.DecBinary() - _ = yym1266 if false { } else { - z.F.DecSliceInt32X(yyv1265, d) + z.F.DecSliceInt32X(&x.FSliceInt32, d) } } - if x.FptrSliceInt32 == nil { - x.FptrSliceInt32 = new([]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceInt32 != nil { + if true && x.FptrSliceInt32 != nil { x.FptrSliceInt32 = nil } } else { if x.FptrSliceInt32 == nil { x.FptrSliceInt32 = new([]int32) } - yym1268 := z.DecBinary() - _ = yym1268 + if false { } else { z.F.DecSliceInt32X(x.FptrSliceInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30790,50 +26310,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceInt64 = nil } else { - yyv1269 := &x.FSliceInt64 - yym1270 := z.DecBinary() - _ = yym1270 if false { } else { - z.F.DecSliceInt64X(yyv1269, d) + z.F.DecSliceInt64X(&x.FSliceInt64, d) } } - if x.FptrSliceInt64 == nil { - x.FptrSliceInt64 = new([]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceInt64 != nil { + if true && x.FptrSliceInt64 != nil { x.FptrSliceInt64 = nil } } else { if x.FptrSliceInt64 == nil { x.FptrSliceInt64 = new([]int64) } - yym1272 := z.DecBinary() - _ = yym1272 + if false { } else { z.F.DecSliceInt64X(x.FptrSliceInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30841,50 +26354,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FSliceBool = nil } else { - yyv1273 := &x.FSliceBool - yym1274 := z.DecBinary() - _ = yym1274 if false { } else { - z.F.DecSliceBoolX(yyv1273, d) + z.F.DecSliceBoolX(&x.FSliceBool, d) } } - if x.FptrSliceBool == nil { - x.FptrSliceBool = new([]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrSliceBool != nil { + if true && x.FptrSliceBool != nil { x.FptrSliceBool = nil } } else { if x.FptrSliceBool == nil { x.FptrSliceBool = new([]bool) } - yym1276 := z.DecBinary() - _ = yym1276 + if false { } else { z.F.DecSliceBoolX(x.FptrSliceBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30892,50 +26398,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfIntf = nil } else { - yyv1277 := &x.FMapIntfIntf - yym1278 := z.DecBinary() - _ = yym1278 if false { } else { - z.F.DecMapIntfIntfX(yyv1277, d) + z.F.DecMapIntfIntfX(&x.FMapIntfIntf, d) } } - if x.FptrMapIntfIntf == nil { - x.FptrMapIntfIntf = new(map[interface{}]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfIntf != nil { + if true && x.FptrMapIntfIntf != nil { x.FptrMapIntfIntf = nil } } else { if x.FptrMapIntfIntf == nil { x.FptrMapIntfIntf = new(map[interface{}]interface{}) } - yym1280 := z.DecBinary() - _ = yym1280 + if false { } else { z.F.DecMapIntfIntfX(x.FptrMapIntfIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30943,50 +26442,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfString = nil } else { - yyv1281 := &x.FMapIntfString - yym1282 := z.DecBinary() - _ = yym1282 if false { } else { - z.F.DecMapIntfStringX(yyv1281, d) + z.F.DecMapIntfStringX(&x.FMapIntfString, d) } } - if x.FptrMapIntfString == nil { - x.FptrMapIntfString = new(map[interface{}]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfString != nil { + if true && x.FptrMapIntfString != nil { x.FptrMapIntfString = nil } } else { if x.FptrMapIntfString == nil { x.FptrMapIntfString = new(map[interface{}]string) } - yym1284 := z.DecBinary() - _ = yym1284 + if false { } else { z.F.DecMapIntfStringX(x.FptrMapIntfString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -30994,50 +26486,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint = nil } else { - yyv1285 := &x.FMapIntfUint - yym1286 := z.DecBinary() - _ = yym1286 if false { } else { - z.F.DecMapIntfUintX(yyv1285, d) + z.F.DecMapIntfUintX(&x.FMapIntfUint, d) } } - if x.FptrMapIntfUint == nil { - x.FptrMapIntfUint = new(map[interface{}]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUint != nil { + if true && x.FptrMapIntfUint != nil { x.FptrMapIntfUint = nil } } else { if x.FptrMapIntfUint == nil { x.FptrMapIntfUint = new(map[interface{}]uint) } - yym1288 := z.DecBinary() - _ = yym1288 + if false { } else { z.F.DecMapIntfUintX(x.FptrMapIntfUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31045,50 +26530,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint8 = nil } else { - yyv1289 := &x.FMapIntfUint8 - yym1290 := z.DecBinary() - _ = yym1290 if false { } else { - z.F.DecMapIntfUint8X(yyv1289, d) + z.F.DecMapIntfUint8X(&x.FMapIntfUint8, d) } } - if x.FptrMapIntfUint8 == nil { - x.FptrMapIntfUint8 = new(map[interface{}]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUint8 != nil { + if true && x.FptrMapIntfUint8 != nil { x.FptrMapIntfUint8 = nil } } else { if x.FptrMapIntfUint8 == nil { x.FptrMapIntfUint8 = new(map[interface{}]uint8) } - yym1292 := z.DecBinary() - _ = yym1292 + if false { } else { z.F.DecMapIntfUint8X(x.FptrMapIntfUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31096,50 +26574,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint16 = nil } else { - yyv1293 := &x.FMapIntfUint16 - yym1294 := z.DecBinary() - _ = yym1294 if false { } else { - z.F.DecMapIntfUint16X(yyv1293, d) + z.F.DecMapIntfUint16X(&x.FMapIntfUint16, d) } } - if x.FptrMapIntfUint16 == nil { - x.FptrMapIntfUint16 = new(map[interface{}]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUint16 != nil { + if true && x.FptrMapIntfUint16 != nil { x.FptrMapIntfUint16 = nil } } else { if x.FptrMapIntfUint16 == nil { x.FptrMapIntfUint16 = new(map[interface{}]uint16) } - yym1296 := z.DecBinary() - _ = yym1296 + if false { } else { z.F.DecMapIntfUint16X(x.FptrMapIntfUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31147,50 +26618,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint32 = nil } else { - yyv1297 := &x.FMapIntfUint32 - yym1298 := z.DecBinary() - _ = yym1298 if false { } else { - z.F.DecMapIntfUint32X(yyv1297, d) + z.F.DecMapIntfUint32X(&x.FMapIntfUint32, d) } } - if x.FptrMapIntfUint32 == nil { - x.FptrMapIntfUint32 = new(map[interface{}]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUint32 != nil { + if true && x.FptrMapIntfUint32 != nil { x.FptrMapIntfUint32 = nil } } else { if x.FptrMapIntfUint32 == nil { x.FptrMapIntfUint32 = new(map[interface{}]uint32) } - yym1300 := z.DecBinary() - _ = yym1300 + if false { } else { z.F.DecMapIntfUint32X(x.FptrMapIntfUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31198,50 +26662,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUint64 = nil } else { - yyv1301 := &x.FMapIntfUint64 - yym1302 := z.DecBinary() - _ = yym1302 if false { } else { - z.F.DecMapIntfUint64X(yyv1301, d) + z.F.DecMapIntfUint64X(&x.FMapIntfUint64, d) } } - if x.FptrMapIntfUint64 == nil { - x.FptrMapIntfUint64 = new(map[interface{}]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUint64 != nil { + if true && x.FptrMapIntfUint64 != nil { x.FptrMapIntfUint64 = nil } } else { if x.FptrMapIntfUint64 == nil { x.FptrMapIntfUint64 = new(map[interface{}]uint64) } - yym1304 := z.DecBinary() - _ = yym1304 + if false { } else { z.F.DecMapIntfUint64X(x.FptrMapIntfUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31249,50 +26706,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfUintptr = nil } else { - yyv1305 := &x.FMapIntfUintptr - yym1306 := z.DecBinary() - _ = yym1306 if false { } else { - z.F.DecMapIntfUintptrX(yyv1305, d) + z.F.DecMapIntfUintptrX(&x.FMapIntfUintptr, d) } } - if x.FptrMapIntfUintptr == nil { - x.FptrMapIntfUintptr = new(map[interface{}]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfUintptr != nil { + if true && x.FptrMapIntfUintptr != nil { x.FptrMapIntfUintptr = nil } } else { if x.FptrMapIntfUintptr == nil { x.FptrMapIntfUintptr = new(map[interface{}]uintptr) } - yym1308 := z.DecBinary() - _ = yym1308 + if false { } else { z.F.DecMapIntfUintptrX(x.FptrMapIntfUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31300,50 +26750,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt = nil } else { - yyv1309 := &x.FMapIntfInt - yym1310 := z.DecBinary() - _ = yym1310 if false { } else { - z.F.DecMapIntfIntX(yyv1309, d) + z.F.DecMapIntfIntX(&x.FMapIntfInt, d) } } - if x.FptrMapIntfInt == nil { - x.FptrMapIntfInt = new(map[interface{}]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfInt != nil { + if true && x.FptrMapIntfInt != nil { x.FptrMapIntfInt = nil } } else { if x.FptrMapIntfInt == nil { x.FptrMapIntfInt = new(map[interface{}]int) } - yym1312 := z.DecBinary() - _ = yym1312 + if false { } else { z.F.DecMapIntfIntX(x.FptrMapIntfInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31351,50 +26794,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt8 = nil } else { - yyv1313 := &x.FMapIntfInt8 - yym1314 := z.DecBinary() - _ = yym1314 if false { } else { - z.F.DecMapIntfInt8X(yyv1313, d) + z.F.DecMapIntfInt8X(&x.FMapIntfInt8, d) } } - if x.FptrMapIntfInt8 == nil { - x.FptrMapIntfInt8 = new(map[interface{}]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfInt8 != nil { + if true && x.FptrMapIntfInt8 != nil { x.FptrMapIntfInt8 = nil } } else { if x.FptrMapIntfInt8 == nil { x.FptrMapIntfInt8 = new(map[interface{}]int8) } - yym1316 := z.DecBinary() - _ = yym1316 + if false { } else { z.F.DecMapIntfInt8X(x.FptrMapIntfInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31402,50 +26838,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt16 = nil } else { - yyv1317 := &x.FMapIntfInt16 - yym1318 := z.DecBinary() - _ = yym1318 if false { } else { - z.F.DecMapIntfInt16X(yyv1317, d) + z.F.DecMapIntfInt16X(&x.FMapIntfInt16, d) } } - if x.FptrMapIntfInt16 == nil { - x.FptrMapIntfInt16 = new(map[interface{}]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfInt16 != nil { + if true && x.FptrMapIntfInt16 != nil { x.FptrMapIntfInt16 = nil } } else { if x.FptrMapIntfInt16 == nil { x.FptrMapIntfInt16 = new(map[interface{}]int16) } - yym1320 := z.DecBinary() - _ = yym1320 + if false { } else { z.F.DecMapIntfInt16X(x.FptrMapIntfInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31453,50 +26882,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt32 = nil } else { - yyv1321 := &x.FMapIntfInt32 - yym1322 := z.DecBinary() - _ = yym1322 if false { } else { - z.F.DecMapIntfInt32X(yyv1321, d) + z.F.DecMapIntfInt32X(&x.FMapIntfInt32, d) } } - if x.FptrMapIntfInt32 == nil { - x.FptrMapIntfInt32 = new(map[interface{}]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfInt32 != nil { + if true && x.FptrMapIntfInt32 != nil { x.FptrMapIntfInt32 = nil } } else { if x.FptrMapIntfInt32 == nil { x.FptrMapIntfInt32 = new(map[interface{}]int32) } - yym1324 := z.DecBinary() - _ = yym1324 + if false { } else { z.F.DecMapIntfInt32X(x.FptrMapIntfInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31504,50 +26926,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfInt64 = nil } else { - yyv1325 := &x.FMapIntfInt64 - yym1326 := z.DecBinary() - _ = yym1326 if false { } else { - z.F.DecMapIntfInt64X(yyv1325, d) + z.F.DecMapIntfInt64X(&x.FMapIntfInt64, d) } } - if x.FptrMapIntfInt64 == nil { - x.FptrMapIntfInt64 = new(map[interface{}]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfInt64 != nil { + if true && x.FptrMapIntfInt64 != nil { x.FptrMapIntfInt64 = nil } } else { if x.FptrMapIntfInt64 == nil { x.FptrMapIntfInt64 = new(map[interface{}]int64) } - yym1328 := z.DecBinary() - _ = yym1328 + if false { } else { z.F.DecMapIntfInt64X(x.FptrMapIntfInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31555,50 +26970,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfFloat32 = nil } else { - yyv1329 := &x.FMapIntfFloat32 - yym1330 := z.DecBinary() - _ = yym1330 if false { } else { - z.F.DecMapIntfFloat32X(yyv1329, d) + z.F.DecMapIntfFloat32X(&x.FMapIntfFloat32, d) } } - if x.FptrMapIntfFloat32 == nil { - x.FptrMapIntfFloat32 = new(map[interface{}]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfFloat32 != nil { + if true && x.FptrMapIntfFloat32 != nil { x.FptrMapIntfFloat32 = nil } } else { if x.FptrMapIntfFloat32 == nil { x.FptrMapIntfFloat32 = new(map[interface{}]float32) } - yym1332 := z.DecBinary() - _ = yym1332 + if false { } else { z.F.DecMapIntfFloat32X(x.FptrMapIntfFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31606,50 +27014,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfFloat64 = nil } else { - yyv1333 := &x.FMapIntfFloat64 - yym1334 := z.DecBinary() - _ = yym1334 if false { } else { - z.F.DecMapIntfFloat64X(yyv1333, d) + z.F.DecMapIntfFloat64X(&x.FMapIntfFloat64, d) } } - if x.FptrMapIntfFloat64 == nil { - x.FptrMapIntfFloat64 = new(map[interface{}]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfFloat64 != nil { + if true && x.FptrMapIntfFloat64 != nil { x.FptrMapIntfFloat64 = nil } } else { if x.FptrMapIntfFloat64 == nil { x.FptrMapIntfFloat64 = new(map[interface{}]float64) } - yym1336 := z.DecBinary() - _ = yym1336 + if false { } else { z.F.DecMapIntfFloat64X(x.FptrMapIntfFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31657,50 +27058,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntfBool = nil } else { - yyv1337 := &x.FMapIntfBool - yym1338 := z.DecBinary() - _ = yym1338 if false { } else { - z.F.DecMapIntfBoolX(yyv1337, d) + z.F.DecMapIntfBoolX(&x.FMapIntfBool, d) } } - if x.FptrMapIntfBool == nil { - x.FptrMapIntfBool = new(map[interface{}]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntfBool != nil { + if true && x.FptrMapIntfBool != nil { x.FptrMapIntfBool = nil } } else { if x.FptrMapIntfBool == nil { x.FptrMapIntfBool = new(map[interface{}]bool) } - yym1340 := z.DecBinary() - _ = yym1340 + if false { } else { z.F.DecMapIntfBoolX(x.FptrMapIntfBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31708,50 +27102,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringIntf = nil } else { - yyv1341 := &x.FMapStringIntf - yym1342 := z.DecBinary() - _ = yym1342 if false { } else { - z.F.DecMapStringIntfX(yyv1341, d) + z.F.DecMapStringIntfX(&x.FMapStringIntf, d) } } - if x.FptrMapStringIntf == nil { - x.FptrMapStringIntf = new(map[string]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringIntf != nil { + if true && x.FptrMapStringIntf != nil { x.FptrMapStringIntf = nil } } else { if x.FptrMapStringIntf == nil { x.FptrMapStringIntf = new(map[string]interface{}) } - yym1344 := z.DecBinary() - _ = yym1344 + if false { } else { z.F.DecMapStringIntfX(x.FptrMapStringIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31759,50 +27146,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringString = nil } else { - yyv1345 := &x.FMapStringString - yym1346 := z.DecBinary() - _ = yym1346 if false { } else { - z.F.DecMapStringStringX(yyv1345, d) + z.F.DecMapStringStringX(&x.FMapStringString, d) } } - if x.FptrMapStringString == nil { - x.FptrMapStringString = new(map[string]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringString != nil { + if true && x.FptrMapStringString != nil { x.FptrMapStringString = nil } } else { if x.FptrMapStringString == nil { x.FptrMapStringString = new(map[string]string) } - yym1348 := z.DecBinary() - _ = yym1348 + if false { } else { z.F.DecMapStringStringX(x.FptrMapStringString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31810,50 +27190,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint = nil } else { - yyv1349 := &x.FMapStringUint - yym1350 := z.DecBinary() - _ = yym1350 if false { } else { - z.F.DecMapStringUintX(yyv1349, d) + z.F.DecMapStringUintX(&x.FMapStringUint, d) } } - if x.FptrMapStringUint == nil { - x.FptrMapStringUint = new(map[string]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUint != nil { + if true && x.FptrMapStringUint != nil { x.FptrMapStringUint = nil } } else { if x.FptrMapStringUint == nil { x.FptrMapStringUint = new(map[string]uint) } - yym1352 := z.DecBinary() - _ = yym1352 + if false { } else { z.F.DecMapStringUintX(x.FptrMapStringUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31861,50 +27234,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint8 = nil } else { - yyv1353 := &x.FMapStringUint8 - yym1354 := z.DecBinary() - _ = yym1354 if false { } else { - z.F.DecMapStringUint8X(yyv1353, d) + z.F.DecMapStringUint8X(&x.FMapStringUint8, d) } } - if x.FptrMapStringUint8 == nil { - x.FptrMapStringUint8 = new(map[string]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUint8 != nil { + if true && x.FptrMapStringUint8 != nil { x.FptrMapStringUint8 = nil } } else { if x.FptrMapStringUint8 == nil { x.FptrMapStringUint8 = new(map[string]uint8) } - yym1356 := z.DecBinary() - _ = yym1356 + if false { } else { z.F.DecMapStringUint8X(x.FptrMapStringUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31912,50 +27278,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint16 = nil } else { - yyv1357 := &x.FMapStringUint16 - yym1358 := z.DecBinary() - _ = yym1358 if false { } else { - z.F.DecMapStringUint16X(yyv1357, d) + z.F.DecMapStringUint16X(&x.FMapStringUint16, d) } } - if x.FptrMapStringUint16 == nil { - x.FptrMapStringUint16 = new(map[string]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUint16 != nil { + if true && x.FptrMapStringUint16 != nil { x.FptrMapStringUint16 = nil } } else { if x.FptrMapStringUint16 == nil { x.FptrMapStringUint16 = new(map[string]uint16) } - yym1360 := z.DecBinary() - _ = yym1360 + if false { } else { z.F.DecMapStringUint16X(x.FptrMapStringUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -31963,50 +27322,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint32 = nil } else { - yyv1361 := &x.FMapStringUint32 - yym1362 := z.DecBinary() - _ = yym1362 if false { } else { - z.F.DecMapStringUint32X(yyv1361, d) + z.F.DecMapStringUint32X(&x.FMapStringUint32, d) } } - if x.FptrMapStringUint32 == nil { - x.FptrMapStringUint32 = new(map[string]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUint32 != nil { + if true && x.FptrMapStringUint32 != nil { x.FptrMapStringUint32 = nil } } else { if x.FptrMapStringUint32 == nil { x.FptrMapStringUint32 = new(map[string]uint32) } - yym1364 := z.DecBinary() - _ = yym1364 + if false { } else { z.F.DecMapStringUint32X(x.FptrMapStringUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32014,50 +27366,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUint64 = nil } else { - yyv1365 := &x.FMapStringUint64 - yym1366 := z.DecBinary() - _ = yym1366 if false { } else { - z.F.DecMapStringUint64X(yyv1365, d) + z.F.DecMapStringUint64X(&x.FMapStringUint64, d) } } - if x.FptrMapStringUint64 == nil { - x.FptrMapStringUint64 = new(map[string]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUint64 != nil { + if true && x.FptrMapStringUint64 != nil { x.FptrMapStringUint64 = nil } } else { if x.FptrMapStringUint64 == nil { x.FptrMapStringUint64 = new(map[string]uint64) } - yym1368 := z.DecBinary() - _ = yym1368 + if false { } else { z.F.DecMapStringUint64X(x.FptrMapStringUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32065,50 +27410,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringUintptr = nil } else { - yyv1369 := &x.FMapStringUintptr - yym1370 := z.DecBinary() - _ = yym1370 if false { } else { - z.F.DecMapStringUintptrX(yyv1369, d) + z.F.DecMapStringUintptrX(&x.FMapStringUintptr, d) } } - if x.FptrMapStringUintptr == nil { - x.FptrMapStringUintptr = new(map[string]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringUintptr != nil { + if true && x.FptrMapStringUintptr != nil { x.FptrMapStringUintptr = nil } } else { if x.FptrMapStringUintptr == nil { x.FptrMapStringUintptr = new(map[string]uintptr) } - yym1372 := z.DecBinary() - _ = yym1372 + if false { } else { z.F.DecMapStringUintptrX(x.FptrMapStringUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32116,50 +27454,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt = nil } else { - yyv1373 := &x.FMapStringInt - yym1374 := z.DecBinary() - _ = yym1374 if false { } else { - z.F.DecMapStringIntX(yyv1373, d) + z.F.DecMapStringIntX(&x.FMapStringInt, d) } } - if x.FptrMapStringInt == nil { - x.FptrMapStringInt = new(map[string]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringInt != nil { + if true && x.FptrMapStringInt != nil { x.FptrMapStringInt = nil } } else { if x.FptrMapStringInt == nil { x.FptrMapStringInt = new(map[string]int) } - yym1376 := z.DecBinary() - _ = yym1376 + if false { } else { z.F.DecMapStringIntX(x.FptrMapStringInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32167,50 +27498,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt8 = nil } else { - yyv1377 := &x.FMapStringInt8 - yym1378 := z.DecBinary() - _ = yym1378 if false { } else { - z.F.DecMapStringInt8X(yyv1377, d) + z.F.DecMapStringInt8X(&x.FMapStringInt8, d) } } - if x.FptrMapStringInt8 == nil { - x.FptrMapStringInt8 = new(map[string]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringInt8 != nil { + if true && x.FptrMapStringInt8 != nil { x.FptrMapStringInt8 = nil } } else { if x.FptrMapStringInt8 == nil { x.FptrMapStringInt8 = new(map[string]int8) } - yym1380 := z.DecBinary() - _ = yym1380 + if false { } else { z.F.DecMapStringInt8X(x.FptrMapStringInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32218,50 +27542,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt16 = nil } else { - yyv1381 := &x.FMapStringInt16 - yym1382 := z.DecBinary() - _ = yym1382 if false { } else { - z.F.DecMapStringInt16X(yyv1381, d) + z.F.DecMapStringInt16X(&x.FMapStringInt16, d) } } - if x.FptrMapStringInt16 == nil { - x.FptrMapStringInt16 = new(map[string]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringInt16 != nil { + if true && x.FptrMapStringInt16 != nil { x.FptrMapStringInt16 = nil } } else { if x.FptrMapStringInt16 == nil { x.FptrMapStringInt16 = new(map[string]int16) } - yym1384 := z.DecBinary() - _ = yym1384 + if false { } else { z.F.DecMapStringInt16X(x.FptrMapStringInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32269,50 +27586,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt32 = nil } else { - yyv1385 := &x.FMapStringInt32 - yym1386 := z.DecBinary() - _ = yym1386 if false { } else { - z.F.DecMapStringInt32X(yyv1385, d) + z.F.DecMapStringInt32X(&x.FMapStringInt32, d) } } - if x.FptrMapStringInt32 == nil { - x.FptrMapStringInt32 = new(map[string]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringInt32 != nil { + if true && x.FptrMapStringInt32 != nil { x.FptrMapStringInt32 = nil } } else { if x.FptrMapStringInt32 == nil { x.FptrMapStringInt32 = new(map[string]int32) } - yym1388 := z.DecBinary() - _ = yym1388 + if false { } else { z.F.DecMapStringInt32X(x.FptrMapStringInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32320,50 +27630,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringInt64 = nil } else { - yyv1389 := &x.FMapStringInt64 - yym1390 := z.DecBinary() - _ = yym1390 if false { } else { - z.F.DecMapStringInt64X(yyv1389, d) + z.F.DecMapStringInt64X(&x.FMapStringInt64, d) } } - if x.FptrMapStringInt64 == nil { - x.FptrMapStringInt64 = new(map[string]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringInt64 != nil { + if true && x.FptrMapStringInt64 != nil { x.FptrMapStringInt64 = nil } } else { if x.FptrMapStringInt64 == nil { x.FptrMapStringInt64 = new(map[string]int64) } - yym1392 := z.DecBinary() - _ = yym1392 + if false { } else { z.F.DecMapStringInt64X(x.FptrMapStringInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32371,50 +27674,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringFloat32 = nil } else { - yyv1393 := &x.FMapStringFloat32 - yym1394 := z.DecBinary() - _ = yym1394 if false { } else { - z.F.DecMapStringFloat32X(yyv1393, d) + z.F.DecMapStringFloat32X(&x.FMapStringFloat32, d) } } - if x.FptrMapStringFloat32 == nil { - x.FptrMapStringFloat32 = new(map[string]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringFloat32 != nil { + if true && x.FptrMapStringFloat32 != nil { x.FptrMapStringFloat32 = nil } } else { if x.FptrMapStringFloat32 == nil { x.FptrMapStringFloat32 = new(map[string]float32) } - yym1396 := z.DecBinary() - _ = yym1396 + if false { } else { z.F.DecMapStringFloat32X(x.FptrMapStringFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32422,50 +27718,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringFloat64 = nil } else { - yyv1397 := &x.FMapStringFloat64 - yym1398 := z.DecBinary() - _ = yym1398 if false { } else { - z.F.DecMapStringFloat64X(yyv1397, d) + z.F.DecMapStringFloat64X(&x.FMapStringFloat64, d) } } - if x.FptrMapStringFloat64 == nil { - x.FptrMapStringFloat64 = new(map[string]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringFloat64 != nil { + if true && x.FptrMapStringFloat64 != nil { x.FptrMapStringFloat64 = nil } } else { if x.FptrMapStringFloat64 == nil { x.FptrMapStringFloat64 = new(map[string]float64) } - yym1400 := z.DecBinary() - _ = yym1400 + if false { } else { z.F.DecMapStringFloat64X(x.FptrMapStringFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32473,50 +27762,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapStringBool = nil } else { - yyv1401 := &x.FMapStringBool - yym1402 := z.DecBinary() - _ = yym1402 if false { } else { - z.F.DecMapStringBoolX(yyv1401, d) + z.F.DecMapStringBoolX(&x.FMapStringBool, d) } } - if x.FptrMapStringBool == nil { - x.FptrMapStringBool = new(map[string]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapStringBool != nil { + if true && x.FptrMapStringBool != nil { x.FptrMapStringBool = nil } } else { if x.FptrMapStringBool == nil { x.FptrMapStringBool = new(map[string]bool) } - yym1404 := z.DecBinary() - _ = yym1404 + if false { } else { z.F.DecMapStringBoolX(x.FptrMapStringBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32524,50 +27806,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Intf = nil } else { - yyv1405 := &x.FMapFloat32Intf - yym1406 := z.DecBinary() - _ = yym1406 if false { } else { - z.F.DecMapFloat32IntfX(yyv1405, d) + z.F.DecMapFloat32IntfX(&x.FMapFloat32Intf, d) } } - if x.FptrMapFloat32Intf == nil { - x.FptrMapFloat32Intf = new(map[float32]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Intf != nil { + if true && x.FptrMapFloat32Intf != nil { x.FptrMapFloat32Intf = nil } } else { if x.FptrMapFloat32Intf == nil { x.FptrMapFloat32Intf = new(map[float32]interface{}) } - yym1408 := z.DecBinary() - _ = yym1408 + if false { } else { z.F.DecMapFloat32IntfX(x.FptrMapFloat32Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32575,50 +27850,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32String = nil } else { - yyv1409 := &x.FMapFloat32String - yym1410 := z.DecBinary() - _ = yym1410 if false { } else { - z.F.DecMapFloat32StringX(yyv1409, d) + z.F.DecMapFloat32StringX(&x.FMapFloat32String, d) } } - if x.FptrMapFloat32String == nil { - x.FptrMapFloat32String = new(map[float32]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32String != nil { + if true && x.FptrMapFloat32String != nil { x.FptrMapFloat32String = nil } } else { if x.FptrMapFloat32String == nil { x.FptrMapFloat32String = new(map[float32]string) } - yym1412 := z.DecBinary() - _ = yym1412 + if false { } else { z.F.DecMapFloat32StringX(x.FptrMapFloat32String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32626,50 +27894,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint = nil } else { - yyv1413 := &x.FMapFloat32Uint - yym1414 := z.DecBinary() - _ = yym1414 if false { } else { - z.F.DecMapFloat32UintX(yyv1413, d) + z.F.DecMapFloat32UintX(&x.FMapFloat32Uint, d) } } - if x.FptrMapFloat32Uint == nil { - x.FptrMapFloat32Uint = new(map[float32]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint != nil { + if true && x.FptrMapFloat32Uint != nil { x.FptrMapFloat32Uint = nil } } else { if x.FptrMapFloat32Uint == nil { x.FptrMapFloat32Uint = new(map[float32]uint) } - yym1416 := z.DecBinary() - _ = yym1416 + if false { } else { z.F.DecMapFloat32UintX(x.FptrMapFloat32Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32677,50 +27938,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint8 = nil } else { - yyv1417 := &x.FMapFloat32Uint8 - yym1418 := z.DecBinary() - _ = yym1418 if false { } else { - z.F.DecMapFloat32Uint8X(yyv1417, d) + z.F.DecMapFloat32Uint8X(&x.FMapFloat32Uint8, d) } } - if x.FptrMapFloat32Uint8 == nil { - x.FptrMapFloat32Uint8 = new(map[float32]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint8 != nil { + if true && x.FptrMapFloat32Uint8 != nil { x.FptrMapFloat32Uint8 = nil } } else { if x.FptrMapFloat32Uint8 == nil { x.FptrMapFloat32Uint8 = new(map[float32]uint8) } - yym1420 := z.DecBinary() - _ = yym1420 + if false { } else { z.F.DecMapFloat32Uint8X(x.FptrMapFloat32Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32728,50 +27982,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint16 = nil } else { - yyv1421 := &x.FMapFloat32Uint16 - yym1422 := z.DecBinary() - _ = yym1422 if false { } else { - z.F.DecMapFloat32Uint16X(yyv1421, d) + z.F.DecMapFloat32Uint16X(&x.FMapFloat32Uint16, d) } } - if x.FptrMapFloat32Uint16 == nil { - x.FptrMapFloat32Uint16 = new(map[float32]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint16 != nil { + if true && x.FptrMapFloat32Uint16 != nil { x.FptrMapFloat32Uint16 = nil } } else { if x.FptrMapFloat32Uint16 == nil { x.FptrMapFloat32Uint16 = new(map[float32]uint16) } - yym1424 := z.DecBinary() - _ = yym1424 + if false { } else { z.F.DecMapFloat32Uint16X(x.FptrMapFloat32Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32779,50 +28026,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint32 = nil } else { - yyv1425 := &x.FMapFloat32Uint32 - yym1426 := z.DecBinary() - _ = yym1426 if false { } else { - z.F.DecMapFloat32Uint32X(yyv1425, d) + z.F.DecMapFloat32Uint32X(&x.FMapFloat32Uint32, d) } } - if x.FptrMapFloat32Uint32 == nil { - x.FptrMapFloat32Uint32 = new(map[float32]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint32 != nil { + if true && x.FptrMapFloat32Uint32 != nil { x.FptrMapFloat32Uint32 = nil } } else { if x.FptrMapFloat32Uint32 == nil { x.FptrMapFloat32Uint32 = new(map[float32]uint32) } - yym1428 := z.DecBinary() - _ = yym1428 + if false { } else { z.F.DecMapFloat32Uint32X(x.FptrMapFloat32Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32830,50 +28070,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uint64 = nil } else { - yyv1429 := &x.FMapFloat32Uint64 - yym1430 := z.DecBinary() - _ = yym1430 if false { } else { - z.F.DecMapFloat32Uint64X(yyv1429, d) + z.F.DecMapFloat32Uint64X(&x.FMapFloat32Uint64, d) } } - if x.FptrMapFloat32Uint64 == nil { - x.FptrMapFloat32Uint64 = new(map[float32]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uint64 != nil { + if true && x.FptrMapFloat32Uint64 != nil { x.FptrMapFloat32Uint64 = nil } } else { if x.FptrMapFloat32Uint64 == nil { x.FptrMapFloat32Uint64 = new(map[float32]uint64) } - yym1432 := z.DecBinary() - _ = yym1432 + if false { } else { z.F.DecMapFloat32Uint64X(x.FptrMapFloat32Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32881,50 +28114,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Uintptr = nil } else { - yyv1433 := &x.FMapFloat32Uintptr - yym1434 := z.DecBinary() - _ = yym1434 if false { } else { - z.F.DecMapFloat32UintptrX(yyv1433, d) + z.F.DecMapFloat32UintptrX(&x.FMapFloat32Uintptr, d) } } - if x.FptrMapFloat32Uintptr == nil { - x.FptrMapFloat32Uintptr = new(map[float32]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Uintptr != nil { + if true && x.FptrMapFloat32Uintptr != nil { x.FptrMapFloat32Uintptr = nil } } else { if x.FptrMapFloat32Uintptr == nil { x.FptrMapFloat32Uintptr = new(map[float32]uintptr) } - yym1436 := z.DecBinary() - _ = yym1436 + if false { } else { z.F.DecMapFloat32UintptrX(x.FptrMapFloat32Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32932,50 +28158,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int = nil } else { - yyv1437 := &x.FMapFloat32Int - yym1438 := z.DecBinary() - _ = yym1438 if false { } else { - z.F.DecMapFloat32IntX(yyv1437, d) + z.F.DecMapFloat32IntX(&x.FMapFloat32Int, d) } } - if x.FptrMapFloat32Int == nil { - x.FptrMapFloat32Int = new(map[float32]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int != nil { + if true && x.FptrMapFloat32Int != nil { x.FptrMapFloat32Int = nil } } else { if x.FptrMapFloat32Int == nil { x.FptrMapFloat32Int = new(map[float32]int) } - yym1440 := z.DecBinary() - _ = yym1440 + if false { } else { z.F.DecMapFloat32IntX(x.FptrMapFloat32Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -32983,50 +28202,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int8 = nil } else { - yyv1441 := &x.FMapFloat32Int8 - yym1442 := z.DecBinary() - _ = yym1442 if false { } else { - z.F.DecMapFloat32Int8X(yyv1441, d) + z.F.DecMapFloat32Int8X(&x.FMapFloat32Int8, d) } } - if x.FptrMapFloat32Int8 == nil { - x.FptrMapFloat32Int8 = new(map[float32]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int8 != nil { + if true && x.FptrMapFloat32Int8 != nil { x.FptrMapFloat32Int8 = nil } } else { if x.FptrMapFloat32Int8 == nil { x.FptrMapFloat32Int8 = new(map[float32]int8) } - yym1444 := z.DecBinary() - _ = yym1444 + if false { } else { z.F.DecMapFloat32Int8X(x.FptrMapFloat32Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33034,50 +28246,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int16 = nil } else { - yyv1445 := &x.FMapFloat32Int16 - yym1446 := z.DecBinary() - _ = yym1446 if false { } else { - z.F.DecMapFloat32Int16X(yyv1445, d) + z.F.DecMapFloat32Int16X(&x.FMapFloat32Int16, d) } } - if x.FptrMapFloat32Int16 == nil { - x.FptrMapFloat32Int16 = new(map[float32]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int16 != nil { + if true && x.FptrMapFloat32Int16 != nil { x.FptrMapFloat32Int16 = nil } } else { if x.FptrMapFloat32Int16 == nil { x.FptrMapFloat32Int16 = new(map[float32]int16) } - yym1448 := z.DecBinary() - _ = yym1448 + if false { } else { z.F.DecMapFloat32Int16X(x.FptrMapFloat32Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33085,50 +28290,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int32 = nil } else { - yyv1449 := &x.FMapFloat32Int32 - yym1450 := z.DecBinary() - _ = yym1450 if false { } else { - z.F.DecMapFloat32Int32X(yyv1449, d) + z.F.DecMapFloat32Int32X(&x.FMapFloat32Int32, d) } } - if x.FptrMapFloat32Int32 == nil { - x.FptrMapFloat32Int32 = new(map[float32]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int32 != nil { + if true && x.FptrMapFloat32Int32 != nil { x.FptrMapFloat32Int32 = nil } } else { if x.FptrMapFloat32Int32 == nil { x.FptrMapFloat32Int32 = new(map[float32]int32) } - yym1452 := z.DecBinary() - _ = yym1452 + if false { } else { z.F.DecMapFloat32Int32X(x.FptrMapFloat32Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33136,50 +28334,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Int64 = nil } else { - yyv1453 := &x.FMapFloat32Int64 - yym1454 := z.DecBinary() - _ = yym1454 if false { } else { - z.F.DecMapFloat32Int64X(yyv1453, d) + z.F.DecMapFloat32Int64X(&x.FMapFloat32Int64, d) } } - if x.FptrMapFloat32Int64 == nil { - x.FptrMapFloat32Int64 = new(map[float32]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Int64 != nil { + if true && x.FptrMapFloat32Int64 != nil { x.FptrMapFloat32Int64 = nil } } else { if x.FptrMapFloat32Int64 == nil { x.FptrMapFloat32Int64 = new(map[float32]int64) } - yym1456 := z.DecBinary() - _ = yym1456 + if false { } else { z.F.DecMapFloat32Int64X(x.FptrMapFloat32Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33187,50 +28378,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Float32 = nil } else { - yyv1457 := &x.FMapFloat32Float32 - yym1458 := z.DecBinary() - _ = yym1458 if false { } else { - z.F.DecMapFloat32Float32X(yyv1457, d) + z.F.DecMapFloat32Float32X(&x.FMapFloat32Float32, d) } } - if x.FptrMapFloat32Float32 == nil { - x.FptrMapFloat32Float32 = new(map[float32]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Float32 != nil { + if true && x.FptrMapFloat32Float32 != nil { x.FptrMapFloat32Float32 = nil } } else { if x.FptrMapFloat32Float32 == nil { x.FptrMapFloat32Float32 = new(map[float32]float32) } - yym1460 := z.DecBinary() - _ = yym1460 + if false { } else { z.F.DecMapFloat32Float32X(x.FptrMapFloat32Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33238,50 +28422,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Float64 = nil } else { - yyv1461 := &x.FMapFloat32Float64 - yym1462 := z.DecBinary() - _ = yym1462 if false { } else { - z.F.DecMapFloat32Float64X(yyv1461, d) + z.F.DecMapFloat32Float64X(&x.FMapFloat32Float64, d) } } - if x.FptrMapFloat32Float64 == nil { - x.FptrMapFloat32Float64 = new(map[float32]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Float64 != nil { + if true && x.FptrMapFloat32Float64 != nil { x.FptrMapFloat32Float64 = nil } } else { if x.FptrMapFloat32Float64 == nil { x.FptrMapFloat32Float64 = new(map[float32]float64) } - yym1464 := z.DecBinary() - _ = yym1464 + if false { } else { z.F.DecMapFloat32Float64X(x.FptrMapFloat32Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33289,50 +28466,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat32Bool = nil } else { - yyv1465 := &x.FMapFloat32Bool - yym1466 := z.DecBinary() - _ = yym1466 if false { } else { - z.F.DecMapFloat32BoolX(yyv1465, d) + z.F.DecMapFloat32BoolX(&x.FMapFloat32Bool, d) } } - if x.FptrMapFloat32Bool == nil { - x.FptrMapFloat32Bool = new(map[float32]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat32Bool != nil { + if true && x.FptrMapFloat32Bool != nil { x.FptrMapFloat32Bool = nil } } else { if x.FptrMapFloat32Bool == nil { x.FptrMapFloat32Bool = new(map[float32]bool) } - yym1468 := z.DecBinary() - _ = yym1468 + if false { } else { z.F.DecMapFloat32BoolX(x.FptrMapFloat32Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33340,50 +28510,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Intf = nil } else { - yyv1469 := &x.FMapFloat64Intf - yym1470 := z.DecBinary() - _ = yym1470 if false { } else { - z.F.DecMapFloat64IntfX(yyv1469, d) + z.F.DecMapFloat64IntfX(&x.FMapFloat64Intf, d) } } - if x.FptrMapFloat64Intf == nil { - x.FptrMapFloat64Intf = new(map[float64]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Intf != nil { + if true && x.FptrMapFloat64Intf != nil { x.FptrMapFloat64Intf = nil } } else { if x.FptrMapFloat64Intf == nil { x.FptrMapFloat64Intf = new(map[float64]interface{}) } - yym1472 := z.DecBinary() - _ = yym1472 + if false { } else { z.F.DecMapFloat64IntfX(x.FptrMapFloat64Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33391,50 +28554,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64String = nil } else { - yyv1473 := &x.FMapFloat64String - yym1474 := z.DecBinary() - _ = yym1474 if false { } else { - z.F.DecMapFloat64StringX(yyv1473, d) + z.F.DecMapFloat64StringX(&x.FMapFloat64String, d) } } - if x.FptrMapFloat64String == nil { - x.FptrMapFloat64String = new(map[float64]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64String != nil { + if true && x.FptrMapFloat64String != nil { x.FptrMapFloat64String = nil } } else { if x.FptrMapFloat64String == nil { x.FptrMapFloat64String = new(map[float64]string) } - yym1476 := z.DecBinary() - _ = yym1476 + if false { } else { z.F.DecMapFloat64StringX(x.FptrMapFloat64String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33442,50 +28598,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint = nil } else { - yyv1477 := &x.FMapFloat64Uint - yym1478 := z.DecBinary() - _ = yym1478 if false { } else { - z.F.DecMapFloat64UintX(yyv1477, d) + z.F.DecMapFloat64UintX(&x.FMapFloat64Uint, d) } } - if x.FptrMapFloat64Uint == nil { - x.FptrMapFloat64Uint = new(map[float64]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint != nil { + if true && x.FptrMapFloat64Uint != nil { x.FptrMapFloat64Uint = nil } } else { if x.FptrMapFloat64Uint == nil { x.FptrMapFloat64Uint = new(map[float64]uint) } - yym1480 := z.DecBinary() - _ = yym1480 + if false { } else { z.F.DecMapFloat64UintX(x.FptrMapFloat64Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33493,50 +28642,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint8 = nil } else { - yyv1481 := &x.FMapFloat64Uint8 - yym1482 := z.DecBinary() - _ = yym1482 if false { } else { - z.F.DecMapFloat64Uint8X(yyv1481, d) + z.F.DecMapFloat64Uint8X(&x.FMapFloat64Uint8, d) } } - if x.FptrMapFloat64Uint8 == nil { - x.FptrMapFloat64Uint8 = new(map[float64]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint8 != nil { + if true && x.FptrMapFloat64Uint8 != nil { x.FptrMapFloat64Uint8 = nil } } else { if x.FptrMapFloat64Uint8 == nil { x.FptrMapFloat64Uint8 = new(map[float64]uint8) } - yym1484 := z.DecBinary() - _ = yym1484 + if false { } else { z.F.DecMapFloat64Uint8X(x.FptrMapFloat64Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33544,50 +28686,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint16 = nil } else { - yyv1485 := &x.FMapFloat64Uint16 - yym1486 := z.DecBinary() - _ = yym1486 if false { } else { - z.F.DecMapFloat64Uint16X(yyv1485, d) + z.F.DecMapFloat64Uint16X(&x.FMapFloat64Uint16, d) } } - if x.FptrMapFloat64Uint16 == nil { - x.FptrMapFloat64Uint16 = new(map[float64]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint16 != nil { + if true && x.FptrMapFloat64Uint16 != nil { x.FptrMapFloat64Uint16 = nil } } else { if x.FptrMapFloat64Uint16 == nil { x.FptrMapFloat64Uint16 = new(map[float64]uint16) } - yym1488 := z.DecBinary() - _ = yym1488 + if false { } else { z.F.DecMapFloat64Uint16X(x.FptrMapFloat64Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33595,50 +28730,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint32 = nil } else { - yyv1489 := &x.FMapFloat64Uint32 - yym1490 := z.DecBinary() - _ = yym1490 if false { } else { - z.F.DecMapFloat64Uint32X(yyv1489, d) + z.F.DecMapFloat64Uint32X(&x.FMapFloat64Uint32, d) } } - if x.FptrMapFloat64Uint32 == nil { - x.FptrMapFloat64Uint32 = new(map[float64]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint32 != nil { + if true && x.FptrMapFloat64Uint32 != nil { x.FptrMapFloat64Uint32 = nil } } else { if x.FptrMapFloat64Uint32 == nil { x.FptrMapFloat64Uint32 = new(map[float64]uint32) } - yym1492 := z.DecBinary() - _ = yym1492 + if false { } else { z.F.DecMapFloat64Uint32X(x.FptrMapFloat64Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33646,50 +28774,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uint64 = nil } else { - yyv1493 := &x.FMapFloat64Uint64 - yym1494 := z.DecBinary() - _ = yym1494 if false { } else { - z.F.DecMapFloat64Uint64X(yyv1493, d) + z.F.DecMapFloat64Uint64X(&x.FMapFloat64Uint64, d) } } - if x.FptrMapFloat64Uint64 == nil { - x.FptrMapFloat64Uint64 = new(map[float64]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uint64 != nil { + if true && x.FptrMapFloat64Uint64 != nil { x.FptrMapFloat64Uint64 = nil } } else { if x.FptrMapFloat64Uint64 == nil { x.FptrMapFloat64Uint64 = new(map[float64]uint64) } - yym1496 := z.DecBinary() - _ = yym1496 + if false { } else { z.F.DecMapFloat64Uint64X(x.FptrMapFloat64Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33697,50 +28818,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Uintptr = nil } else { - yyv1497 := &x.FMapFloat64Uintptr - yym1498 := z.DecBinary() - _ = yym1498 if false { } else { - z.F.DecMapFloat64UintptrX(yyv1497, d) + z.F.DecMapFloat64UintptrX(&x.FMapFloat64Uintptr, d) } } - if x.FptrMapFloat64Uintptr == nil { - x.FptrMapFloat64Uintptr = new(map[float64]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Uintptr != nil { + if true && x.FptrMapFloat64Uintptr != nil { x.FptrMapFloat64Uintptr = nil } } else { if x.FptrMapFloat64Uintptr == nil { x.FptrMapFloat64Uintptr = new(map[float64]uintptr) } - yym1500 := z.DecBinary() - _ = yym1500 + if false { } else { z.F.DecMapFloat64UintptrX(x.FptrMapFloat64Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33748,50 +28862,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int = nil } else { - yyv1501 := &x.FMapFloat64Int - yym1502 := z.DecBinary() - _ = yym1502 if false { } else { - z.F.DecMapFloat64IntX(yyv1501, d) + z.F.DecMapFloat64IntX(&x.FMapFloat64Int, d) } } - if x.FptrMapFloat64Int == nil { - x.FptrMapFloat64Int = new(map[float64]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int != nil { + if true && x.FptrMapFloat64Int != nil { x.FptrMapFloat64Int = nil } } else { if x.FptrMapFloat64Int == nil { x.FptrMapFloat64Int = new(map[float64]int) } - yym1504 := z.DecBinary() - _ = yym1504 + if false { } else { z.F.DecMapFloat64IntX(x.FptrMapFloat64Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33799,50 +28906,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int8 = nil } else { - yyv1505 := &x.FMapFloat64Int8 - yym1506 := z.DecBinary() - _ = yym1506 if false { } else { - z.F.DecMapFloat64Int8X(yyv1505, d) + z.F.DecMapFloat64Int8X(&x.FMapFloat64Int8, d) } } - if x.FptrMapFloat64Int8 == nil { - x.FptrMapFloat64Int8 = new(map[float64]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int8 != nil { + if true && x.FptrMapFloat64Int8 != nil { x.FptrMapFloat64Int8 = nil } } else { if x.FptrMapFloat64Int8 == nil { x.FptrMapFloat64Int8 = new(map[float64]int8) } - yym1508 := z.DecBinary() - _ = yym1508 + if false { } else { z.F.DecMapFloat64Int8X(x.FptrMapFloat64Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33850,50 +28950,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int16 = nil } else { - yyv1509 := &x.FMapFloat64Int16 - yym1510 := z.DecBinary() - _ = yym1510 if false { } else { - z.F.DecMapFloat64Int16X(yyv1509, d) + z.F.DecMapFloat64Int16X(&x.FMapFloat64Int16, d) } } - if x.FptrMapFloat64Int16 == nil { - x.FptrMapFloat64Int16 = new(map[float64]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int16 != nil { + if true && x.FptrMapFloat64Int16 != nil { x.FptrMapFloat64Int16 = nil } } else { if x.FptrMapFloat64Int16 == nil { x.FptrMapFloat64Int16 = new(map[float64]int16) } - yym1512 := z.DecBinary() - _ = yym1512 + if false { } else { z.F.DecMapFloat64Int16X(x.FptrMapFloat64Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33901,50 +28994,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int32 = nil } else { - yyv1513 := &x.FMapFloat64Int32 - yym1514 := z.DecBinary() - _ = yym1514 if false { } else { - z.F.DecMapFloat64Int32X(yyv1513, d) + z.F.DecMapFloat64Int32X(&x.FMapFloat64Int32, d) } } - if x.FptrMapFloat64Int32 == nil { - x.FptrMapFloat64Int32 = new(map[float64]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int32 != nil { + if true && x.FptrMapFloat64Int32 != nil { x.FptrMapFloat64Int32 = nil } } else { if x.FptrMapFloat64Int32 == nil { x.FptrMapFloat64Int32 = new(map[float64]int32) } - yym1516 := z.DecBinary() - _ = yym1516 + if false { } else { z.F.DecMapFloat64Int32X(x.FptrMapFloat64Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -33952,50 +29038,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Int64 = nil } else { - yyv1517 := &x.FMapFloat64Int64 - yym1518 := z.DecBinary() - _ = yym1518 if false { } else { - z.F.DecMapFloat64Int64X(yyv1517, d) + z.F.DecMapFloat64Int64X(&x.FMapFloat64Int64, d) } } - if x.FptrMapFloat64Int64 == nil { - x.FptrMapFloat64Int64 = new(map[float64]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Int64 != nil { + if true && x.FptrMapFloat64Int64 != nil { x.FptrMapFloat64Int64 = nil } } else { if x.FptrMapFloat64Int64 == nil { x.FptrMapFloat64Int64 = new(map[float64]int64) } - yym1520 := z.DecBinary() - _ = yym1520 + if false { } else { z.F.DecMapFloat64Int64X(x.FptrMapFloat64Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34003,50 +29082,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Float32 = nil } else { - yyv1521 := &x.FMapFloat64Float32 - yym1522 := z.DecBinary() - _ = yym1522 if false { } else { - z.F.DecMapFloat64Float32X(yyv1521, d) + z.F.DecMapFloat64Float32X(&x.FMapFloat64Float32, d) } } - if x.FptrMapFloat64Float32 == nil { - x.FptrMapFloat64Float32 = new(map[float64]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Float32 != nil { + if true && x.FptrMapFloat64Float32 != nil { x.FptrMapFloat64Float32 = nil } } else { if x.FptrMapFloat64Float32 == nil { x.FptrMapFloat64Float32 = new(map[float64]float32) } - yym1524 := z.DecBinary() - _ = yym1524 + if false { } else { z.F.DecMapFloat64Float32X(x.FptrMapFloat64Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34054,50 +29126,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Float64 = nil } else { - yyv1525 := &x.FMapFloat64Float64 - yym1526 := z.DecBinary() - _ = yym1526 if false { } else { - z.F.DecMapFloat64Float64X(yyv1525, d) + z.F.DecMapFloat64Float64X(&x.FMapFloat64Float64, d) } } - if x.FptrMapFloat64Float64 == nil { - x.FptrMapFloat64Float64 = new(map[float64]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Float64 != nil { + if true && x.FptrMapFloat64Float64 != nil { x.FptrMapFloat64Float64 = nil } } else { if x.FptrMapFloat64Float64 == nil { x.FptrMapFloat64Float64 = new(map[float64]float64) } - yym1528 := z.DecBinary() - _ = yym1528 + if false { } else { z.F.DecMapFloat64Float64X(x.FptrMapFloat64Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34105,50 +29170,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapFloat64Bool = nil } else { - yyv1529 := &x.FMapFloat64Bool - yym1530 := z.DecBinary() - _ = yym1530 if false { } else { - z.F.DecMapFloat64BoolX(yyv1529, d) + z.F.DecMapFloat64BoolX(&x.FMapFloat64Bool, d) } } - if x.FptrMapFloat64Bool == nil { - x.FptrMapFloat64Bool = new(map[float64]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapFloat64Bool != nil { + if true && x.FptrMapFloat64Bool != nil { x.FptrMapFloat64Bool = nil } } else { if x.FptrMapFloat64Bool == nil { x.FptrMapFloat64Bool = new(map[float64]bool) } - yym1532 := z.DecBinary() - _ = yym1532 + if false { } else { z.F.DecMapFloat64BoolX(x.FptrMapFloat64Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34156,50 +29214,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintIntf = nil } else { - yyv1533 := &x.FMapUintIntf - yym1534 := z.DecBinary() - _ = yym1534 if false { } else { - z.F.DecMapUintIntfX(yyv1533, d) + z.F.DecMapUintIntfX(&x.FMapUintIntf, d) } } - if x.FptrMapUintIntf == nil { - x.FptrMapUintIntf = new(map[uint]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintIntf != nil { + if true && x.FptrMapUintIntf != nil { x.FptrMapUintIntf = nil } } else { if x.FptrMapUintIntf == nil { x.FptrMapUintIntf = new(map[uint]interface{}) } - yym1536 := z.DecBinary() - _ = yym1536 + if false { } else { z.F.DecMapUintIntfX(x.FptrMapUintIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34207,50 +29258,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintString = nil } else { - yyv1537 := &x.FMapUintString - yym1538 := z.DecBinary() - _ = yym1538 if false { } else { - z.F.DecMapUintStringX(yyv1537, d) + z.F.DecMapUintStringX(&x.FMapUintString, d) } } - if x.FptrMapUintString == nil { - x.FptrMapUintString = new(map[uint]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintString != nil { + if true && x.FptrMapUintString != nil { x.FptrMapUintString = nil } } else { if x.FptrMapUintString == nil { x.FptrMapUintString = new(map[uint]string) } - yym1540 := z.DecBinary() - _ = yym1540 + if false { } else { z.F.DecMapUintStringX(x.FptrMapUintString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34258,50 +29302,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint = nil } else { - yyv1541 := &x.FMapUintUint - yym1542 := z.DecBinary() - _ = yym1542 if false { } else { - z.F.DecMapUintUintX(yyv1541, d) + z.F.DecMapUintUintX(&x.FMapUintUint, d) } } - if x.FptrMapUintUint == nil { - x.FptrMapUintUint = new(map[uint]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUint != nil { + if true && x.FptrMapUintUint != nil { x.FptrMapUintUint = nil } } else { if x.FptrMapUintUint == nil { x.FptrMapUintUint = new(map[uint]uint) } - yym1544 := z.DecBinary() - _ = yym1544 + if false { } else { z.F.DecMapUintUintX(x.FptrMapUintUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34309,50 +29346,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint8 = nil } else { - yyv1545 := &x.FMapUintUint8 - yym1546 := z.DecBinary() - _ = yym1546 if false { } else { - z.F.DecMapUintUint8X(yyv1545, d) + z.F.DecMapUintUint8X(&x.FMapUintUint8, d) } } - if x.FptrMapUintUint8 == nil { - x.FptrMapUintUint8 = new(map[uint]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUint8 != nil { + if true && x.FptrMapUintUint8 != nil { x.FptrMapUintUint8 = nil } } else { if x.FptrMapUintUint8 == nil { x.FptrMapUintUint8 = new(map[uint]uint8) } - yym1548 := z.DecBinary() - _ = yym1548 + if false { } else { z.F.DecMapUintUint8X(x.FptrMapUintUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34360,50 +29390,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint16 = nil } else { - yyv1549 := &x.FMapUintUint16 - yym1550 := z.DecBinary() - _ = yym1550 if false { } else { - z.F.DecMapUintUint16X(yyv1549, d) + z.F.DecMapUintUint16X(&x.FMapUintUint16, d) } } - if x.FptrMapUintUint16 == nil { - x.FptrMapUintUint16 = new(map[uint]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUint16 != nil { + if true && x.FptrMapUintUint16 != nil { x.FptrMapUintUint16 = nil } } else { if x.FptrMapUintUint16 == nil { x.FptrMapUintUint16 = new(map[uint]uint16) } - yym1552 := z.DecBinary() - _ = yym1552 + if false { } else { z.F.DecMapUintUint16X(x.FptrMapUintUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34411,50 +29434,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint32 = nil } else { - yyv1553 := &x.FMapUintUint32 - yym1554 := z.DecBinary() - _ = yym1554 if false { } else { - z.F.DecMapUintUint32X(yyv1553, d) + z.F.DecMapUintUint32X(&x.FMapUintUint32, d) } } - if x.FptrMapUintUint32 == nil { - x.FptrMapUintUint32 = new(map[uint]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUint32 != nil { + if true && x.FptrMapUintUint32 != nil { x.FptrMapUintUint32 = nil } } else { if x.FptrMapUintUint32 == nil { x.FptrMapUintUint32 = new(map[uint]uint32) } - yym1556 := z.DecBinary() - _ = yym1556 + if false { } else { z.F.DecMapUintUint32X(x.FptrMapUintUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34462,50 +29478,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUint64 = nil } else { - yyv1557 := &x.FMapUintUint64 - yym1558 := z.DecBinary() - _ = yym1558 if false { } else { - z.F.DecMapUintUint64X(yyv1557, d) + z.F.DecMapUintUint64X(&x.FMapUintUint64, d) } } - if x.FptrMapUintUint64 == nil { - x.FptrMapUintUint64 = new(map[uint]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUint64 != nil { + if true && x.FptrMapUintUint64 != nil { x.FptrMapUintUint64 = nil } } else { if x.FptrMapUintUint64 == nil { x.FptrMapUintUint64 = new(map[uint]uint64) } - yym1560 := z.DecBinary() - _ = yym1560 + if false { } else { z.F.DecMapUintUint64X(x.FptrMapUintUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34513,50 +29522,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintUintptr = nil } else { - yyv1561 := &x.FMapUintUintptr - yym1562 := z.DecBinary() - _ = yym1562 if false { } else { - z.F.DecMapUintUintptrX(yyv1561, d) + z.F.DecMapUintUintptrX(&x.FMapUintUintptr, d) } } - if x.FptrMapUintUintptr == nil { - x.FptrMapUintUintptr = new(map[uint]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintUintptr != nil { + if true && x.FptrMapUintUintptr != nil { x.FptrMapUintUintptr = nil } } else { if x.FptrMapUintUintptr == nil { x.FptrMapUintUintptr = new(map[uint]uintptr) } - yym1564 := z.DecBinary() - _ = yym1564 + if false { } else { z.F.DecMapUintUintptrX(x.FptrMapUintUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34564,50 +29566,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt = nil } else { - yyv1565 := &x.FMapUintInt - yym1566 := z.DecBinary() - _ = yym1566 if false { } else { - z.F.DecMapUintIntX(yyv1565, d) + z.F.DecMapUintIntX(&x.FMapUintInt, d) } } - if x.FptrMapUintInt == nil { - x.FptrMapUintInt = new(map[uint]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintInt != nil { + if true && x.FptrMapUintInt != nil { x.FptrMapUintInt = nil } } else { if x.FptrMapUintInt == nil { x.FptrMapUintInt = new(map[uint]int) } - yym1568 := z.DecBinary() - _ = yym1568 + if false { } else { z.F.DecMapUintIntX(x.FptrMapUintInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34615,50 +29610,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt8 = nil } else { - yyv1569 := &x.FMapUintInt8 - yym1570 := z.DecBinary() - _ = yym1570 if false { } else { - z.F.DecMapUintInt8X(yyv1569, d) + z.F.DecMapUintInt8X(&x.FMapUintInt8, d) } } - if x.FptrMapUintInt8 == nil { - x.FptrMapUintInt8 = new(map[uint]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintInt8 != nil { + if true && x.FptrMapUintInt8 != nil { x.FptrMapUintInt8 = nil } } else { if x.FptrMapUintInt8 == nil { x.FptrMapUintInt8 = new(map[uint]int8) } - yym1572 := z.DecBinary() - _ = yym1572 + if false { } else { z.F.DecMapUintInt8X(x.FptrMapUintInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34666,50 +29654,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt16 = nil } else { - yyv1573 := &x.FMapUintInt16 - yym1574 := z.DecBinary() - _ = yym1574 if false { } else { - z.F.DecMapUintInt16X(yyv1573, d) + z.F.DecMapUintInt16X(&x.FMapUintInt16, d) } } - if x.FptrMapUintInt16 == nil { - x.FptrMapUintInt16 = new(map[uint]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintInt16 != nil { + if true && x.FptrMapUintInt16 != nil { x.FptrMapUintInt16 = nil } } else { if x.FptrMapUintInt16 == nil { x.FptrMapUintInt16 = new(map[uint]int16) } - yym1576 := z.DecBinary() - _ = yym1576 + if false { } else { z.F.DecMapUintInt16X(x.FptrMapUintInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34717,50 +29698,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt32 = nil } else { - yyv1577 := &x.FMapUintInt32 - yym1578 := z.DecBinary() - _ = yym1578 if false { } else { - z.F.DecMapUintInt32X(yyv1577, d) + z.F.DecMapUintInt32X(&x.FMapUintInt32, d) } } - if x.FptrMapUintInt32 == nil { - x.FptrMapUintInt32 = new(map[uint]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintInt32 != nil { + if true && x.FptrMapUintInt32 != nil { x.FptrMapUintInt32 = nil } } else { if x.FptrMapUintInt32 == nil { x.FptrMapUintInt32 = new(map[uint]int32) } - yym1580 := z.DecBinary() - _ = yym1580 + if false { } else { z.F.DecMapUintInt32X(x.FptrMapUintInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34768,50 +29742,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintInt64 = nil } else { - yyv1581 := &x.FMapUintInt64 - yym1582 := z.DecBinary() - _ = yym1582 if false { } else { - z.F.DecMapUintInt64X(yyv1581, d) + z.F.DecMapUintInt64X(&x.FMapUintInt64, d) } } - if x.FptrMapUintInt64 == nil { - x.FptrMapUintInt64 = new(map[uint]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintInt64 != nil { + if true && x.FptrMapUintInt64 != nil { x.FptrMapUintInt64 = nil } } else { if x.FptrMapUintInt64 == nil { x.FptrMapUintInt64 = new(map[uint]int64) } - yym1584 := z.DecBinary() - _ = yym1584 + if false { } else { z.F.DecMapUintInt64X(x.FptrMapUintInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34819,50 +29786,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintFloat32 = nil } else { - yyv1585 := &x.FMapUintFloat32 - yym1586 := z.DecBinary() - _ = yym1586 if false { } else { - z.F.DecMapUintFloat32X(yyv1585, d) + z.F.DecMapUintFloat32X(&x.FMapUintFloat32, d) } } - if x.FptrMapUintFloat32 == nil { - x.FptrMapUintFloat32 = new(map[uint]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintFloat32 != nil { + if true && x.FptrMapUintFloat32 != nil { x.FptrMapUintFloat32 = nil } } else { if x.FptrMapUintFloat32 == nil { x.FptrMapUintFloat32 = new(map[uint]float32) } - yym1588 := z.DecBinary() - _ = yym1588 + if false { } else { z.F.DecMapUintFloat32X(x.FptrMapUintFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34870,50 +29830,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintFloat64 = nil } else { - yyv1589 := &x.FMapUintFloat64 - yym1590 := z.DecBinary() - _ = yym1590 if false { } else { - z.F.DecMapUintFloat64X(yyv1589, d) + z.F.DecMapUintFloat64X(&x.FMapUintFloat64, d) } } - if x.FptrMapUintFloat64 == nil { - x.FptrMapUintFloat64 = new(map[uint]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintFloat64 != nil { + if true && x.FptrMapUintFloat64 != nil { x.FptrMapUintFloat64 = nil } } else { if x.FptrMapUintFloat64 == nil { x.FptrMapUintFloat64 = new(map[uint]float64) } - yym1592 := z.DecBinary() - _ = yym1592 + if false { } else { z.F.DecMapUintFloat64X(x.FptrMapUintFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34921,50 +29874,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintBool = nil } else { - yyv1593 := &x.FMapUintBool - yym1594 := z.DecBinary() - _ = yym1594 if false { } else { - z.F.DecMapUintBoolX(yyv1593, d) + z.F.DecMapUintBoolX(&x.FMapUintBool, d) } } - if x.FptrMapUintBool == nil { - x.FptrMapUintBool = new(map[uint]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintBool != nil { + if true && x.FptrMapUintBool != nil { x.FptrMapUintBool = nil } } else { if x.FptrMapUintBool == nil { x.FptrMapUintBool = new(map[uint]bool) } - yym1596 := z.DecBinary() - _ = yym1596 + if false { } else { z.F.DecMapUintBoolX(x.FptrMapUintBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -34972,50 +29918,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Intf = nil } else { - yyv1597 := &x.FMapUint8Intf - yym1598 := z.DecBinary() - _ = yym1598 if false { } else { - z.F.DecMapUint8IntfX(yyv1597, d) + z.F.DecMapUint8IntfX(&x.FMapUint8Intf, d) } } - if x.FptrMapUint8Intf == nil { - x.FptrMapUint8Intf = new(map[uint8]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Intf != nil { + if true && x.FptrMapUint8Intf != nil { x.FptrMapUint8Intf = nil } } else { if x.FptrMapUint8Intf == nil { x.FptrMapUint8Intf = new(map[uint8]interface{}) } - yym1600 := z.DecBinary() - _ = yym1600 + if false { } else { z.F.DecMapUint8IntfX(x.FptrMapUint8Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35023,50 +29962,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8String = nil } else { - yyv1601 := &x.FMapUint8String - yym1602 := z.DecBinary() - _ = yym1602 if false { } else { - z.F.DecMapUint8StringX(yyv1601, d) + z.F.DecMapUint8StringX(&x.FMapUint8String, d) } } - if x.FptrMapUint8String == nil { - x.FptrMapUint8String = new(map[uint8]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8String != nil { + if true && x.FptrMapUint8String != nil { x.FptrMapUint8String = nil } } else { if x.FptrMapUint8String == nil { x.FptrMapUint8String = new(map[uint8]string) } - yym1604 := z.DecBinary() - _ = yym1604 + if false { } else { z.F.DecMapUint8StringX(x.FptrMapUint8String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35074,50 +30006,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint = nil } else { - yyv1605 := &x.FMapUint8Uint - yym1606 := z.DecBinary() - _ = yym1606 if false { } else { - z.F.DecMapUint8UintX(yyv1605, d) + z.F.DecMapUint8UintX(&x.FMapUint8Uint, d) } } - if x.FptrMapUint8Uint == nil { - x.FptrMapUint8Uint = new(map[uint8]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint != nil { + if true && x.FptrMapUint8Uint != nil { x.FptrMapUint8Uint = nil } } else { if x.FptrMapUint8Uint == nil { x.FptrMapUint8Uint = new(map[uint8]uint) } - yym1608 := z.DecBinary() - _ = yym1608 + if false { } else { z.F.DecMapUint8UintX(x.FptrMapUint8Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35125,50 +30050,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint8 = nil } else { - yyv1609 := &x.FMapUint8Uint8 - yym1610 := z.DecBinary() - _ = yym1610 if false { } else { - z.F.DecMapUint8Uint8X(yyv1609, d) + z.F.DecMapUint8Uint8X(&x.FMapUint8Uint8, d) } } - if x.FptrMapUint8Uint8 == nil { - x.FptrMapUint8Uint8 = new(map[uint8]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint8 != nil { + if true && x.FptrMapUint8Uint8 != nil { x.FptrMapUint8Uint8 = nil } } else { if x.FptrMapUint8Uint8 == nil { x.FptrMapUint8Uint8 = new(map[uint8]uint8) } - yym1612 := z.DecBinary() - _ = yym1612 + if false { } else { z.F.DecMapUint8Uint8X(x.FptrMapUint8Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35176,50 +30094,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint16 = nil } else { - yyv1613 := &x.FMapUint8Uint16 - yym1614 := z.DecBinary() - _ = yym1614 if false { } else { - z.F.DecMapUint8Uint16X(yyv1613, d) + z.F.DecMapUint8Uint16X(&x.FMapUint8Uint16, d) } } - if x.FptrMapUint8Uint16 == nil { - x.FptrMapUint8Uint16 = new(map[uint8]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint16 != nil { + if true && x.FptrMapUint8Uint16 != nil { x.FptrMapUint8Uint16 = nil } } else { if x.FptrMapUint8Uint16 == nil { x.FptrMapUint8Uint16 = new(map[uint8]uint16) } - yym1616 := z.DecBinary() - _ = yym1616 + if false { } else { z.F.DecMapUint8Uint16X(x.FptrMapUint8Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35227,50 +30138,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint32 = nil } else { - yyv1617 := &x.FMapUint8Uint32 - yym1618 := z.DecBinary() - _ = yym1618 if false { } else { - z.F.DecMapUint8Uint32X(yyv1617, d) + z.F.DecMapUint8Uint32X(&x.FMapUint8Uint32, d) } } - if x.FptrMapUint8Uint32 == nil { - x.FptrMapUint8Uint32 = new(map[uint8]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint32 != nil { + if true && x.FptrMapUint8Uint32 != nil { x.FptrMapUint8Uint32 = nil } } else { if x.FptrMapUint8Uint32 == nil { x.FptrMapUint8Uint32 = new(map[uint8]uint32) } - yym1620 := z.DecBinary() - _ = yym1620 + if false { } else { z.F.DecMapUint8Uint32X(x.FptrMapUint8Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35278,50 +30182,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uint64 = nil } else { - yyv1621 := &x.FMapUint8Uint64 - yym1622 := z.DecBinary() - _ = yym1622 if false { } else { - z.F.DecMapUint8Uint64X(yyv1621, d) + z.F.DecMapUint8Uint64X(&x.FMapUint8Uint64, d) } } - if x.FptrMapUint8Uint64 == nil { - x.FptrMapUint8Uint64 = new(map[uint8]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uint64 != nil { + if true && x.FptrMapUint8Uint64 != nil { x.FptrMapUint8Uint64 = nil } } else { if x.FptrMapUint8Uint64 == nil { x.FptrMapUint8Uint64 = new(map[uint8]uint64) } - yym1624 := z.DecBinary() - _ = yym1624 + if false { } else { z.F.DecMapUint8Uint64X(x.FptrMapUint8Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35329,50 +30226,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Uintptr = nil } else { - yyv1625 := &x.FMapUint8Uintptr - yym1626 := z.DecBinary() - _ = yym1626 if false { } else { - z.F.DecMapUint8UintptrX(yyv1625, d) + z.F.DecMapUint8UintptrX(&x.FMapUint8Uintptr, d) } } - if x.FptrMapUint8Uintptr == nil { - x.FptrMapUint8Uintptr = new(map[uint8]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Uintptr != nil { + if true && x.FptrMapUint8Uintptr != nil { x.FptrMapUint8Uintptr = nil } } else { if x.FptrMapUint8Uintptr == nil { x.FptrMapUint8Uintptr = new(map[uint8]uintptr) } - yym1628 := z.DecBinary() - _ = yym1628 + if false { } else { z.F.DecMapUint8UintptrX(x.FptrMapUint8Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35380,50 +30270,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int = nil } else { - yyv1629 := &x.FMapUint8Int - yym1630 := z.DecBinary() - _ = yym1630 if false { } else { - z.F.DecMapUint8IntX(yyv1629, d) + z.F.DecMapUint8IntX(&x.FMapUint8Int, d) } } - if x.FptrMapUint8Int == nil { - x.FptrMapUint8Int = new(map[uint8]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Int != nil { + if true && x.FptrMapUint8Int != nil { x.FptrMapUint8Int = nil } } else { if x.FptrMapUint8Int == nil { x.FptrMapUint8Int = new(map[uint8]int) } - yym1632 := z.DecBinary() - _ = yym1632 + if false { } else { z.F.DecMapUint8IntX(x.FptrMapUint8Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35431,50 +30314,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int8 = nil } else { - yyv1633 := &x.FMapUint8Int8 - yym1634 := z.DecBinary() - _ = yym1634 if false { } else { - z.F.DecMapUint8Int8X(yyv1633, d) + z.F.DecMapUint8Int8X(&x.FMapUint8Int8, d) } } - if x.FptrMapUint8Int8 == nil { - x.FptrMapUint8Int8 = new(map[uint8]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Int8 != nil { + if true && x.FptrMapUint8Int8 != nil { x.FptrMapUint8Int8 = nil } } else { if x.FptrMapUint8Int8 == nil { x.FptrMapUint8Int8 = new(map[uint8]int8) } - yym1636 := z.DecBinary() - _ = yym1636 + if false { } else { z.F.DecMapUint8Int8X(x.FptrMapUint8Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35482,50 +30358,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int16 = nil } else { - yyv1637 := &x.FMapUint8Int16 - yym1638 := z.DecBinary() - _ = yym1638 if false { } else { - z.F.DecMapUint8Int16X(yyv1637, d) + z.F.DecMapUint8Int16X(&x.FMapUint8Int16, d) } } - if x.FptrMapUint8Int16 == nil { - x.FptrMapUint8Int16 = new(map[uint8]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Int16 != nil { + if true && x.FptrMapUint8Int16 != nil { x.FptrMapUint8Int16 = nil } } else { if x.FptrMapUint8Int16 == nil { x.FptrMapUint8Int16 = new(map[uint8]int16) } - yym1640 := z.DecBinary() - _ = yym1640 + if false { } else { z.F.DecMapUint8Int16X(x.FptrMapUint8Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35533,50 +30402,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int32 = nil } else { - yyv1641 := &x.FMapUint8Int32 - yym1642 := z.DecBinary() - _ = yym1642 if false { } else { - z.F.DecMapUint8Int32X(yyv1641, d) + z.F.DecMapUint8Int32X(&x.FMapUint8Int32, d) } } - if x.FptrMapUint8Int32 == nil { - x.FptrMapUint8Int32 = new(map[uint8]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Int32 != nil { + if true && x.FptrMapUint8Int32 != nil { x.FptrMapUint8Int32 = nil } } else { if x.FptrMapUint8Int32 == nil { x.FptrMapUint8Int32 = new(map[uint8]int32) } - yym1644 := z.DecBinary() - _ = yym1644 + if false { } else { z.F.DecMapUint8Int32X(x.FptrMapUint8Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35584,50 +30446,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Int64 = nil } else { - yyv1645 := &x.FMapUint8Int64 - yym1646 := z.DecBinary() - _ = yym1646 if false { } else { - z.F.DecMapUint8Int64X(yyv1645, d) + z.F.DecMapUint8Int64X(&x.FMapUint8Int64, d) } } - if x.FptrMapUint8Int64 == nil { - x.FptrMapUint8Int64 = new(map[uint8]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Int64 != nil { + if true && x.FptrMapUint8Int64 != nil { x.FptrMapUint8Int64 = nil } } else { if x.FptrMapUint8Int64 == nil { x.FptrMapUint8Int64 = new(map[uint8]int64) } - yym1648 := z.DecBinary() - _ = yym1648 + if false { } else { z.F.DecMapUint8Int64X(x.FptrMapUint8Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35635,50 +30490,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Float32 = nil } else { - yyv1649 := &x.FMapUint8Float32 - yym1650 := z.DecBinary() - _ = yym1650 if false { } else { - z.F.DecMapUint8Float32X(yyv1649, d) + z.F.DecMapUint8Float32X(&x.FMapUint8Float32, d) } } - if x.FptrMapUint8Float32 == nil { - x.FptrMapUint8Float32 = new(map[uint8]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Float32 != nil { + if true && x.FptrMapUint8Float32 != nil { x.FptrMapUint8Float32 = nil } } else { if x.FptrMapUint8Float32 == nil { x.FptrMapUint8Float32 = new(map[uint8]float32) } - yym1652 := z.DecBinary() - _ = yym1652 + if false { } else { z.F.DecMapUint8Float32X(x.FptrMapUint8Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35686,50 +30534,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Float64 = nil } else { - yyv1653 := &x.FMapUint8Float64 - yym1654 := z.DecBinary() - _ = yym1654 if false { } else { - z.F.DecMapUint8Float64X(yyv1653, d) + z.F.DecMapUint8Float64X(&x.FMapUint8Float64, d) } } - if x.FptrMapUint8Float64 == nil { - x.FptrMapUint8Float64 = new(map[uint8]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Float64 != nil { + if true && x.FptrMapUint8Float64 != nil { x.FptrMapUint8Float64 = nil } } else { if x.FptrMapUint8Float64 == nil { x.FptrMapUint8Float64 = new(map[uint8]float64) } - yym1656 := z.DecBinary() - _ = yym1656 + if false { } else { z.F.DecMapUint8Float64X(x.FptrMapUint8Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35737,50 +30578,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint8Bool = nil } else { - yyv1657 := &x.FMapUint8Bool - yym1658 := z.DecBinary() - _ = yym1658 if false { } else { - z.F.DecMapUint8BoolX(yyv1657, d) + z.F.DecMapUint8BoolX(&x.FMapUint8Bool, d) } } - if x.FptrMapUint8Bool == nil { - x.FptrMapUint8Bool = new(map[uint8]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint8Bool != nil { + if true && x.FptrMapUint8Bool != nil { x.FptrMapUint8Bool = nil } } else { if x.FptrMapUint8Bool == nil { x.FptrMapUint8Bool = new(map[uint8]bool) } - yym1660 := z.DecBinary() - _ = yym1660 + if false { } else { z.F.DecMapUint8BoolX(x.FptrMapUint8Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35788,50 +30622,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Intf = nil } else { - yyv1661 := &x.FMapUint16Intf - yym1662 := z.DecBinary() - _ = yym1662 if false { } else { - z.F.DecMapUint16IntfX(yyv1661, d) + z.F.DecMapUint16IntfX(&x.FMapUint16Intf, d) } } - if x.FptrMapUint16Intf == nil { - x.FptrMapUint16Intf = new(map[uint16]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Intf != nil { + if true && x.FptrMapUint16Intf != nil { x.FptrMapUint16Intf = nil } } else { if x.FptrMapUint16Intf == nil { x.FptrMapUint16Intf = new(map[uint16]interface{}) } - yym1664 := z.DecBinary() - _ = yym1664 + if false { } else { z.F.DecMapUint16IntfX(x.FptrMapUint16Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35839,50 +30666,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16String = nil } else { - yyv1665 := &x.FMapUint16String - yym1666 := z.DecBinary() - _ = yym1666 if false { } else { - z.F.DecMapUint16StringX(yyv1665, d) + z.F.DecMapUint16StringX(&x.FMapUint16String, d) } } - if x.FptrMapUint16String == nil { - x.FptrMapUint16String = new(map[uint16]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16String != nil { + if true && x.FptrMapUint16String != nil { x.FptrMapUint16String = nil } } else { if x.FptrMapUint16String == nil { x.FptrMapUint16String = new(map[uint16]string) } - yym1668 := z.DecBinary() - _ = yym1668 + if false { } else { z.F.DecMapUint16StringX(x.FptrMapUint16String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35890,50 +30710,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint = nil } else { - yyv1669 := &x.FMapUint16Uint - yym1670 := z.DecBinary() - _ = yym1670 if false { } else { - z.F.DecMapUint16UintX(yyv1669, d) + z.F.DecMapUint16UintX(&x.FMapUint16Uint, d) } } - if x.FptrMapUint16Uint == nil { - x.FptrMapUint16Uint = new(map[uint16]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint != nil { + if true && x.FptrMapUint16Uint != nil { x.FptrMapUint16Uint = nil } } else { if x.FptrMapUint16Uint == nil { x.FptrMapUint16Uint = new(map[uint16]uint) } - yym1672 := z.DecBinary() - _ = yym1672 + if false { } else { z.F.DecMapUint16UintX(x.FptrMapUint16Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35941,50 +30754,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint8 = nil } else { - yyv1673 := &x.FMapUint16Uint8 - yym1674 := z.DecBinary() - _ = yym1674 if false { } else { - z.F.DecMapUint16Uint8X(yyv1673, d) + z.F.DecMapUint16Uint8X(&x.FMapUint16Uint8, d) } } - if x.FptrMapUint16Uint8 == nil { - x.FptrMapUint16Uint8 = new(map[uint16]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint8 != nil { + if true && x.FptrMapUint16Uint8 != nil { x.FptrMapUint16Uint8 = nil } } else { if x.FptrMapUint16Uint8 == nil { x.FptrMapUint16Uint8 = new(map[uint16]uint8) } - yym1676 := z.DecBinary() - _ = yym1676 + if false { } else { z.F.DecMapUint16Uint8X(x.FptrMapUint16Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -35992,50 +30798,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint16 = nil } else { - yyv1677 := &x.FMapUint16Uint16 - yym1678 := z.DecBinary() - _ = yym1678 if false { } else { - z.F.DecMapUint16Uint16X(yyv1677, d) + z.F.DecMapUint16Uint16X(&x.FMapUint16Uint16, d) } } - if x.FptrMapUint16Uint16 == nil { - x.FptrMapUint16Uint16 = new(map[uint16]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint16 != nil { + if true && x.FptrMapUint16Uint16 != nil { x.FptrMapUint16Uint16 = nil } } else { if x.FptrMapUint16Uint16 == nil { x.FptrMapUint16Uint16 = new(map[uint16]uint16) } - yym1680 := z.DecBinary() - _ = yym1680 + if false { } else { z.F.DecMapUint16Uint16X(x.FptrMapUint16Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36043,50 +30842,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint32 = nil } else { - yyv1681 := &x.FMapUint16Uint32 - yym1682 := z.DecBinary() - _ = yym1682 if false { } else { - z.F.DecMapUint16Uint32X(yyv1681, d) + z.F.DecMapUint16Uint32X(&x.FMapUint16Uint32, d) } } - if x.FptrMapUint16Uint32 == nil { - x.FptrMapUint16Uint32 = new(map[uint16]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint32 != nil { + if true && x.FptrMapUint16Uint32 != nil { x.FptrMapUint16Uint32 = nil } } else { if x.FptrMapUint16Uint32 == nil { x.FptrMapUint16Uint32 = new(map[uint16]uint32) } - yym1684 := z.DecBinary() - _ = yym1684 + if false { } else { z.F.DecMapUint16Uint32X(x.FptrMapUint16Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36094,50 +30886,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uint64 = nil } else { - yyv1685 := &x.FMapUint16Uint64 - yym1686 := z.DecBinary() - _ = yym1686 if false { } else { - z.F.DecMapUint16Uint64X(yyv1685, d) + z.F.DecMapUint16Uint64X(&x.FMapUint16Uint64, d) } } - if x.FptrMapUint16Uint64 == nil { - x.FptrMapUint16Uint64 = new(map[uint16]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uint64 != nil { + if true && x.FptrMapUint16Uint64 != nil { x.FptrMapUint16Uint64 = nil } } else { if x.FptrMapUint16Uint64 == nil { x.FptrMapUint16Uint64 = new(map[uint16]uint64) } - yym1688 := z.DecBinary() - _ = yym1688 + if false { } else { z.F.DecMapUint16Uint64X(x.FptrMapUint16Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36145,50 +30930,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Uintptr = nil } else { - yyv1689 := &x.FMapUint16Uintptr - yym1690 := z.DecBinary() - _ = yym1690 if false { } else { - z.F.DecMapUint16UintptrX(yyv1689, d) + z.F.DecMapUint16UintptrX(&x.FMapUint16Uintptr, d) } } - if x.FptrMapUint16Uintptr == nil { - x.FptrMapUint16Uintptr = new(map[uint16]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Uintptr != nil { + if true && x.FptrMapUint16Uintptr != nil { x.FptrMapUint16Uintptr = nil } } else { if x.FptrMapUint16Uintptr == nil { x.FptrMapUint16Uintptr = new(map[uint16]uintptr) } - yym1692 := z.DecBinary() - _ = yym1692 + if false { } else { z.F.DecMapUint16UintptrX(x.FptrMapUint16Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36196,50 +30974,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int = nil } else { - yyv1693 := &x.FMapUint16Int - yym1694 := z.DecBinary() - _ = yym1694 if false { } else { - z.F.DecMapUint16IntX(yyv1693, d) + z.F.DecMapUint16IntX(&x.FMapUint16Int, d) } } - if x.FptrMapUint16Int == nil { - x.FptrMapUint16Int = new(map[uint16]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Int != nil { + if true && x.FptrMapUint16Int != nil { x.FptrMapUint16Int = nil } } else { if x.FptrMapUint16Int == nil { x.FptrMapUint16Int = new(map[uint16]int) } - yym1696 := z.DecBinary() - _ = yym1696 + if false { } else { z.F.DecMapUint16IntX(x.FptrMapUint16Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36247,50 +31018,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int8 = nil } else { - yyv1697 := &x.FMapUint16Int8 - yym1698 := z.DecBinary() - _ = yym1698 if false { } else { - z.F.DecMapUint16Int8X(yyv1697, d) + z.F.DecMapUint16Int8X(&x.FMapUint16Int8, d) } } - if x.FptrMapUint16Int8 == nil { - x.FptrMapUint16Int8 = new(map[uint16]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Int8 != nil { + if true && x.FptrMapUint16Int8 != nil { x.FptrMapUint16Int8 = nil } } else { if x.FptrMapUint16Int8 == nil { x.FptrMapUint16Int8 = new(map[uint16]int8) } - yym1700 := z.DecBinary() - _ = yym1700 + if false { } else { z.F.DecMapUint16Int8X(x.FptrMapUint16Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36298,50 +31062,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int16 = nil } else { - yyv1701 := &x.FMapUint16Int16 - yym1702 := z.DecBinary() - _ = yym1702 if false { } else { - z.F.DecMapUint16Int16X(yyv1701, d) + z.F.DecMapUint16Int16X(&x.FMapUint16Int16, d) } } - if x.FptrMapUint16Int16 == nil { - x.FptrMapUint16Int16 = new(map[uint16]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Int16 != nil { + if true && x.FptrMapUint16Int16 != nil { x.FptrMapUint16Int16 = nil } } else { if x.FptrMapUint16Int16 == nil { x.FptrMapUint16Int16 = new(map[uint16]int16) } - yym1704 := z.DecBinary() - _ = yym1704 + if false { } else { z.F.DecMapUint16Int16X(x.FptrMapUint16Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36349,50 +31106,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int32 = nil } else { - yyv1705 := &x.FMapUint16Int32 - yym1706 := z.DecBinary() - _ = yym1706 if false { } else { - z.F.DecMapUint16Int32X(yyv1705, d) + z.F.DecMapUint16Int32X(&x.FMapUint16Int32, d) } } - if x.FptrMapUint16Int32 == nil { - x.FptrMapUint16Int32 = new(map[uint16]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Int32 != nil { + if true && x.FptrMapUint16Int32 != nil { x.FptrMapUint16Int32 = nil } } else { if x.FptrMapUint16Int32 == nil { x.FptrMapUint16Int32 = new(map[uint16]int32) } - yym1708 := z.DecBinary() - _ = yym1708 + if false { } else { z.F.DecMapUint16Int32X(x.FptrMapUint16Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36400,50 +31150,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Int64 = nil } else { - yyv1709 := &x.FMapUint16Int64 - yym1710 := z.DecBinary() - _ = yym1710 if false { } else { - z.F.DecMapUint16Int64X(yyv1709, d) + z.F.DecMapUint16Int64X(&x.FMapUint16Int64, d) } } - if x.FptrMapUint16Int64 == nil { - x.FptrMapUint16Int64 = new(map[uint16]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Int64 != nil { + if true && x.FptrMapUint16Int64 != nil { x.FptrMapUint16Int64 = nil } } else { if x.FptrMapUint16Int64 == nil { x.FptrMapUint16Int64 = new(map[uint16]int64) } - yym1712 := z.DecBinary() - _ = yym1712 + if false { } else { z.F.DecMapUint16Int64X(x.FptrMapUint16Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36451,50 +31194,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Float32 = nil } else { - yyv1713 := &x.FMapUint16Float32 - yym1714 := z.DecBinary() - _ = yym1714 if false { } else { - z.F.DecMapUint16Float32X(yyv1713, d) + z.F.DecMapUint16Float32X(&x.FMapUint16Float32, d) } } - if x.FptrMapUint16Float32 == nil { - x.FptrMapUint16Float32 = new(map[uint16]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Float32 != nil { + if true && x.FptrMapUint16Float32 != nil { x.FptrMapUint16Float32 = nil } } else { if x.FptrMapUint16Float32 == nil { x.FptrMapUint16Float32 = new(map[uint16]float32) } - yym1716 := z.DecBinary() - _ = yym1716 + if false { } else { z.F.DecMapUint16Float32X(x.FptrMapUint16Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36502,50 +31238,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Float64 = nil } else { - yyv1717 := &x.FMapUint16Float64 - yym1718 := z.DecBinary() - _ = yym1718 if false { } else { - z.F.DecMapUint16Float64X(yyv1717, d) + z.F.DecMapUint16Float64X(&x.FMapUint16Float64, d) } } - if x.FptrMapUint16Float64 == nil { - x.FptrMapUint16Float64 = new(map[uint16]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Float64 != nil { + if true && x.FptrMapUint16Float64 != nil { x.FptrMapUint16Float64 = nil } } else { if x.FptrMapUint16Float64 == nil { x.FptrMapUint16Float64 = new(map[uint16]float64) } - yym1720 := z.DecBinary() - _ = yym1720 + if false { } else { z.F.DecMapUint16Float64X(x.FptrMapUint16Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36553,50 +31282,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint16Bool = nil } else { - yyv1721 := &x.FMapUint16Bool - yym1722 := z.DecBinary() - _ = yym1722 if false { } else { - z.F.DecMapUint16BoolX(yyv1721, d) + z.F.DecMapUint16BoolX(&x.FMapUint16Bool, d) } } - if x.FptrMapUint16Bool == nil { - x.FptrMapUint16Bool = new(map[uint16]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint16Bool != nil { + if true && x.FptrMapUint16Bool != nil { x.FptrMapUint16Bool = nil } } else { if x.FptrMapUint16Bool == nil { x.FptrMapUint16Bool = new(map[uint16]bool) } - yym1724 := z.DecBinary() - _ = yym1724 + if false { } else { z.F.DecMapUint16BoolX(x.FptrMapUint16Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36604,50 +31326,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Intf = nil } else { - yyv1725 := &x.FMapUint32Intf - yym1726 := z.DecBinary() - _ = yym1726 if false { } else { - z.F.DecMapUint32IntfX(yyv1725, d) + z.F.DecMapUint32IntfX(&x.FMapUint32Intf, d) } } - if x.FptrMapUint32Intf == nil { - x.FptrMapUint32Intf = new(map[uint32]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Intf != nil { + if true && x.FptrMapUint32Intf != nil { x.FptrMapUint32Intf = nil } } else { if x.FptrMapUint32Intf == nil { x.FptrMapUint32Intf = new(map[uint32]interface{}) } - yym1728 := z.DecBinary() - _ = yym1728 + if false { } else { z.F.DecMapUint32IntfX(x.FptrMapUint32Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36655,50 +31370,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32String = nil } else { - yyv1729 := &x.FMapUint32String - yym1730 := z.DecBinary() - _ = yym1730 if false { } else { - z.F.DecMapUint32StringX(yyv1729, d) + z.F.DecMapUint32StringX(&x.FMapUint32String, d) } } - if x.FptrMapUint32String == nil { - x.FptrMapUint32String = new(map[uint32]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32String != nil { + if true && x.FptrMapUint32String != nil { x.FptrMapUint32String = nil } } else { if x.FptrMapUint32String == nil { x.FptrMapUint32String = new(map[uint32]string) } - yym1732 := z.DecBinary() - _ = yym1732 + if false { } else { z.F.DecMapUint32StringX(x.FptrMapUint32String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36706,50 +31414,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint = nil } else { - yyv1733 := &x.FMapUint32Uint - yym1734 := z.DecBinary() - _ = yym1734 if false { } else { - z.F.DecMapUint32UintX(yyv1733, d) + z.F.DecMapUint32UintX(&x.FMapUint32Uint, d) } } - if x.FptrMapUint32Uint == nil { - x.FptrMapUint32Uint = new(map[uint32]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint != nil { + if true && x.FptrMapUint32Uint != nil { x.FptrMapUint32Uint = nil } } else { if x.FptrMapUint32Uint == nil { x.FptrMapUint32Uint = new(map[uint32]uint) } - yym1736 := z.DecBinary() - _ = yym1736 + if false { } else { z.F.DecMapUint32UintX(x.FptrMapUint32Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36757,50 +31458,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint8 = nil } else { - yyv1737 := &x.FMapUint32Uint8 - yym1738 := z.DecBinary() - _ = yym1738 if false { } else { - z.F.DecMapUint32Uint8X(yyv1737, d) + z.F.DecMapUint32Uint8X(&x.FMapUint32Uint8, d) } } - if x.FptrMapUint32Uint8 == nil { - x.FptrMapUint32Uint8 = new(map[uint32]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint8 != nil { + if true && x.FptrMapUint32Uint8 != nil { x.FptrMapUint32Uint8 = nil } } else { if x.FptrMapUint32Uint8 == nil { x.FptrMapUint32Uint8 = new(map[uint32]uint8) } - yym1740 := z.DecBinary() - _ = yym1740 + if false { } else { z.F.DecMapUint32Uint8X(x.FptrMapUint32Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36808,50 +31502,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint16 = nil } else { - yyv1741 := &x.FMapUint32Uint16 - yym1742 := z.DecBinary() - _ = yym1742 if false { } else { - z.F.DecMapUint32Uint16X(yyv1741, d) + z.F.DecMapUint32Uint16X(&x.FMapUint32Uint16, d) } } - if x.FptrMapUint32Uint16 == nil { - x.FptrMapUint32Uint16 = new(map[uint32]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint16 != nil { + if true && x.FptrMapUint32Uint16 != nil { x.FptrMapUint32Uint16 = nil } } else { if x.FptrMapUint32Uint16 == nil { x.FptrMapUint32Uint16 = new(map[uint32]uint16) } - yym1744 := z.DecBinary() - _ = yym1744 + if false { } else { z.F.DecMapUint32Uint16X(x.FptrMapUint32Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36859,50 +31546,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint32 = nil } else { - yyv1745 := &x.FMapUint32Uint32 - yym1746 := z.DecBinary() - _ = yym1746 if false { } else { - z.F.DecMapUint32Uint32X(yyv1745, d) + z.F.DecMapUint32Uint32X(&x.FMapUint32Uint32, d) } } - if x.FptrMapUint32Uint32 == nil { - x.FptrMapUint32Uint32 = new(map[uint32]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint32 != nil { + if true && x.FptrMapUint32Uint32 != nil { x.FptrMapUint32Uint32 = nil } } else { if x.FptrMapUint32Uint32 == nil { x.FptrMapUint32Uint32 = new(map[uint32]uint32) } - yym1748 := z.DecBinary() - _ = yym1748 + if false { } else { z.F.DecMapUint32Uint32X(x.FptrMapUint32Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36910,50 +31590,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uint64 = nil } else { - yyv1749 := &x.FMapUint32Uint64 - yym1750 := z.DecBinary() - _ = yym1750 if false { } else { - z.F.DecMapUint32Uint64X(yyv1749, d) + z.F.DecMapUint32Uint64X(&x.FMapUint32Uint64, d) } } - if x.FptrMapUint32Uint64 == nil { - x.FptrMapUint32Uint64 = new(map[uint32]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uint64 != nil { + if true && x.FptrMapUint32Uint64 != nil { x.FptrMapUint32Uint64 = nil } } else { if x.FptrMapUint32Uint64 == nil { x.FptrMapUint32Uint64 = new(map[uint32]uint64) } - yym1752 := z.DecBinary() - _ = yym1752 + if false { } else { z.F.DecMapUint32Uint64X(x.FptrMapUint32Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -36961,50 +31634,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Uintptr = nil } else { - yyv1753 := &x.FMapUint32Uintptr - yym1754 := z.DecBinary() - _ = yym1754 if false { } else { - z.F.DecMapUint32UintptrX(yyv1753, d) + z.F.DecMapUint32UintptrX(&x.FMapUint32Uintptr, d) } } - if x.FptrMapUint32Uintptr == nil { - x.FptrMapUint32Uintptr = new(map[uint32]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Uintptr != nil { + if true && x.FptrMapUint32Uintptr != nil { x.FptrMapUint32Uintptr = nil } } else { if x.FptrMapUint32Uintptr == nil { x.FptrMapUint32Uintptr = new(map[uint32]uintptr) } - yym1756 := z.DecBinary() - _ = yym1756 + if false { } else { z.F.DecMapUint32UintptrX(x.FptrMapUint32Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37012,50 +31678,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int = nil } else { - yyv1757 := &x.FMapUint32Int - yym1758 := z.DecBinary() - _ = yym1758 if false { } else { - z.F.DecMapUint32IntX(yyv1757, d) + z.F.DecMapUint32IntX(&x.FMapUint32Int, d) } } - if x.FptrMapUint32Int == nil { - x.FptrMapUint32Int = new(map[uint32]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Int != nil { + if true && x.FptrMapUint32Int != nil { x.FptrMapUint32Int = nil } } else { if x.FptrMapUint32Int == nil { x.FptrMapUint32Int = new(map[uint32]int) } - yym1760 := z.DecBinary() - _ = yym1760 + if false { } else { z.F.DecMapUint32IntX(x.FptrMapUint32Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37063,50 +31722,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int8 = nil } else { - yyv1761 := &x.FMapUint32Int8 - yym1762 := z.DecBinary() - _ = yym1762 if false { } else { - z.F.DecMapUint32Int8X(yyv1761, d) + z.F.DecMapUint32Int8X(&x.FMapUint32Int8, d) } } - if x.FptrMapUint32Int8 == nil { - x.FptrMapUint32Int8 = new(map[uint32]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Int8 != nil { + if true && x.FptrMapUint32Int8 != nil { x.FptrMapUint32Int8 = nil } } else { if x.FptrMapUint32Int8 == nil { x.FptrMapUint32Int8 = new(map[uint32]int8) } - yym1764 := z.DecBinary() - _ = yym1764 + if false { } else { z.F.DecMapUint32Int8X(x.FptrMapUint32Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37114,50 +31766,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int16 = nil } else { - yyv1765 := &x.FMapUint32Int16 - yym1766 := z.DecBinary() - _ = yym1766 if false { } else { - z.F.DecMapUint32Int16X(yyv1765, d) + z.F.DecMapUint32Int16X(&x.FMapUint32Int16, d) } } - if x.FptrMapUint32Int16 == nil { - x.FptrMapUint32Int16 = new(map[uint32]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Int16 != nil { + if true && x.FptrMapUint32Int16 != nil { x.FptrMapUint32Int16 = nil } } else { if x.FptrMapUint32Int16 == nil { x.FptrMapUint32Int16 = new(map[uint32]int16) } - yym1768 := z.DecBinary() - _ = yym1768 + if false { } else { z.F.DecMapUint32Int16X(x.FptrMapUint32Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37165,50 +31810,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int32 = nil } else { - yyv1769 := &x.FMapUint32Int32 - yym1770 := z.DecBinary() - _ = yym1770 if false { } else { - z.F.DecMapUint32Int32X(yyv1769, d) + z.F.DecMapUint32Int32X(&x.FMapUint32Int32, d) } } - if x.FptrMapUint32Int32 == nil { - x.FptrMapUint32Int32 = new(map[uint32]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Int32 != nil { + if true && x.FptrMapUint32Int32 != nil { x.FptrMapUint32Int32 = nil } } else { if x.FptrMapUint32Int32 == nil { x.FptrMapUint32Int32 = new(map[uint32]int32) } - yym1772 := z.DecBinary() - _ = yym1772 + if false { } else { z.F.DecMapUint32Int32X(x.FptrMapUint32Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37216,50 +31854,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Int64 = nil } else { - yyv1773 := &x.FMapUint32Int64 - yym1774 := z.DecBinary() - _ = yym1774 if false { } else { - z.F.DecMapUint32Int64X(yyv1773, d) + z.F.DecMapUint32Int64X(&x.FMapUint32Int64, d) } } - if x.FptrMapUint32Int64 == nil { - x.FptrMapUint32Int64 = new(map[uint32]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Int64 != nil { + if true && x.FptrMapUint32Int64 != nil { x.FptrMapUint32Int64 = nil } } else { if x.FptrMapUint32Int64 == nil { x.FptrMapUint32Int64 = new(map[uint32]int64) } - yym1776 := z.DecBinary() - _ = yym1776 + if false { } else { z.F.DecMapUint32Int64X(x.FptrMapUint32Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37267,50 +31898,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Float32 = nil } else { - yyv1777 := &x.FMapUint32Float32 - yym1778 := z.DecBinary() - _ = yym1778 if false { } else { - z.F.DecMapUint32Float32X(yyv1777, d) + z.F.DecMapUint32Float32X(&x.FMapUint32Float32, d) } } - if x.FptrMapUint32Float32 == nil { - x.FptrMapUint32Float32 = new(map[uint32]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Float32 != nil { + if true && x.FptrMapUint32Float32 != nil { x.FptrMapUint32Float32 = nil } } else { if x.FptrMapUint32Float32 == nil { x.FptrMapUint32Float32 = new(map[uint32]float32) } - yym1780 := z.DecBinary() - _ = yym1780 + if false { } else { z.F.DecMapUint32Float32X(x.FptrMapUint32Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37318,50 +31942,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Float64 = nil } else { - yyv1781 := &x.FMapUint32Float64 - yym1782 := z.DecBinary() - _ = yym1782 if false { } else { - z.F.DecMapUint32Float64X(yyv1781, d) + z.F.DecMapUint32Float64X(&x.FMapUint32Float64, d) } } - if x.FptrMapUint32Float64 == nil { - x.FptrMapUint32Float64 = new(map[uint32]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Float64 != nil { + if true && x.FptrMapUint32Float64 != nil { x.FptrMapUint32Float64 = nil } } else { if x.FptrMapUint32Float64 == nil { x.FptrMapUint32Float64 = new(map[uint32]float64) } - yym1784 := z.DecBinary() - _ = yym1784 + if false { } else { z.F.DecMapUint32Float64X(x.FptrMapUint32Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37369,50 +31986,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint32Bool = nil } else { - yyv1785 := &x.FMapUint32Bool - yym1786 := z.DecBinary() - _ = yym1786 if false { } else { - z.F.DecMapUint32BoolX(yyv1785, d) + z.F.DecMapUint32BoolX(&x.FMapUint32Bool, d) } } - if x.FptrMapUint32Bool == nil { - x.FptrMapUint32Bool = new(map[uint32]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint32Bool != nil { + if true && x.FptrMapUint32Bool != nil { x.FptrMapUint32Bool = nil } } else { if x.FptrMapUint32Bool == nil { x.FptrMapUint32Bool = new(map[uint32]bool) } - yym1788 := z.DecBinary() - _ = yym1788 + if false { } else { z.F.DecMapUint32BoolX(x.FptrMapUint32Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37420,50 +32030,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Intf = nil } else { - yyv1789 := &x.FMapUint64Intf - yym1790 := z.DecBinary() - _ = yym1790 if false { } else { - z.F.DecMapUint64IntfX(yyv1789, d) + z.F.DecMapUint64IntfX(&x.FMapUint64Intf, d) } } - if x.FptrMapUint64Intf == nil { - x.FptrMapUint64Intf = new(map[uint64]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Intf != nil { + if true && x.FptrMapUint64Intf != nil { x.FptrMapUint64Intf = nil } } else { if x.FptrMapUint64Intf == nil { x.FptrMapUint64Intf = new(map[uint64]interface{}) } - yym1792 := z.DecBinary() - _ = yym1792 + if false { } else { z.F.DecMapUint64IntfX(x.FptrMapUint64Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37471,50 +32074,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64String = nil } else { - yyv1793 := &x.FMapUint64String - yym1794 := z.DecBinary() - _ = yym1794 if false { } else { - z.F.DecMapUint64StringX(yyv1793, d) + z.F.DecMapUint64StringX(&x.FMapUint64String, d) } } - if x.FptrMapUint64String == nil { - x.FptrMapUint64String = new(map[uint64]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64String != nil { + if true && x.FptrMapUint64String != nil { x.FptrMapUint64String = nil } } else { if x.FptrMapUint64String == nil { x.FptrMapUint64String = new(map[uint64]string) } - yym1796 := z.DecBinary() - _ = yym1796 + if false { } else { z.F.DecMapUint64StringX(x.FptrMapUint64String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37522,50 +32118,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint = nil } else { - yyv1797 := &x.FMapUint64Uint - yym1798 := z.DecBinary() - _ = yym1798 if false { } else { - z.F.DecMapUint64UintX(yyv1797, d) + z.F.DecMapUint64UintX(&x.FMapUint64Uint, d) } } - if x.FptrMapUint64Uint == nil { - x.FptrMapUint64Uint = new(map[uint64]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint != nil { + if true && x.FptrMapUint64Uint != nil { x.FptrMapUint64Uint = nil } } else { if x.FptrMapUint64Uint == nil { x.FptrMapUint64Uint = new(map[uint64]uint) } - yym1800 := z.DecBinary() - _ = yym1800 + if false { } else { z.F.DecMapUint64UintX(x.FptrMapUint64Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37573,50 +32162,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint8 = nil } else { - yyv1801 := &x.FMapUint64Uint8 - yym1802 := z.DecBinary() - _ = yym1802 if false { } else { - z.F.DecMapUint64Uint8X(yyv1801, d) + z.F.DecMapUint64Uint8X(&x.FMapUint64Uint8, d) } } - if x.FptrMapUint64Uint8 == nil { - x.FptrMapUint64Uint8 = new(map[uint64]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint8 != nil { + if true && x.FptrMapUint64Uint8 != nil { x.FptrMapUint64Uint8 = nil } } else { if x.FptrMapUint64Uint8 == nil { x.FptrMapUint64Uint8 = new(map[uint64]uint8) } - yym1804 := z.DecBinary() - _ = yym1804 + if false { } else { z.F.DecMapUint64Uint8X(x.FptrMapUint64Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37624,50 +32206,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint16 = nil } else { - yyv1805 := &x.FMapUint64Uint16 - yym1806 := z.DecBinary() - _ = yym1806 if false { } else { - z.F.DecMapUint64Uint16X(yyv1805, d) + z.F.DecMapUint64Uint16X(&x.FMapUint64Uint16, d) } } - if x.FptrMapUint64Uint16 == nil { - x.FptrMapUint64Uint16 = new(map[uint64]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint16 != nil { + if true && x.FptrMapUint64Uint16 != nil { x.FptrMapUint64Uint16 = nil } } else { if x.FptrMapUint64Uint16 == nil { x.FptrMapUint64Uint16 = new(map[uint64]uint16) } - yym1808 := z.DecBinary() - _ = yym1808 + if false { } else { z.F.DecMapUint64Uint16X(x.FptrMapUint64Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37675,50 +32250,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint32 = nil } else { - yyv1809 := &x.FMapUint64Uint32 - yym1810 := z.DecBinary() - _ = yym1810 if false { } else { - z.F.DecMapUint64Uint32X(yyv1809, d) + z.F.DecMapUint64Uint32X(&x.FMapUint64Uint32, d) } } - if x.FptrMapUint64Uint32 == nil { - x.FptrMapUint64Uint32 = new(map[uint64]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint32 != nil { + if true && x.FptrMapUint64Uint32 != nil { x.FptrMapUint64Uint32 = nil } } else { if x.FptrMapUint64Uint32 == nil { x.FptrMapUint64Uint32 = new(map[uint64]uint32) } - yym1812 := z.DecBinary() - _ = yym1812 + if false { } else { z.F.DecMapUint64Uint32X(x.FptrMapUint64Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37726,50 +32294,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uint64 = nil } else { - yyv1813 := &x.FMapUint64Uint64 - yym1814 := z.DecBinary() - _ = yym1814 if false { } else { - z.F.DecMapUint64Uint64X(yyv1813, d) + z.F.DecMapUint64Uint64X(&x.FMapUint64Uint64, d) } } - if x.FptrMapUint64Uint64 == nil { - x.FptrMapUint64Uint64 = new(map[uint64]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uint64 != nil { + if true && x.FptrMapUint64Uint64 != nil { x.FptrMapUint64Uint64 = nil } } else { if x.FptrMapUint64Uint64 == nil { x.FptrMapUint64Uint64 = new(map[uint64]uint64) } - yym1816 := z.DecBinary() - _ = yym1816 + if false { } else { z.F.DecMapUint64Uint64X(x.FptrMapUint64Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37777,50 +32338,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Uintptr = nil } else { - yyv1817 := &x.FMapUint64Uintptr - yym1818 := z.DecBinary() - _ = yym1818 if false { } else { - z.F.DecMapUint64UintptrX(yyv1817, d) + z.F.DecMapUint64UintptrX(&x.FMapUint64Uintptr, d) } } - if x.FptrMapUint64Uintptr == nil { - x.FptrMapUint64Uintptr = new(map[uint64]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Uintptr != nil { + if true && x.FptrMapUint64Uintptr != nil { x.FptrMapUint64Uintptr = nil } } else { if x.FptrMapUint64Uintptr == nil { x.FptrMapUint64Uintptr = new(map[uint64]uintptr) } - yym1820 := z.DecBinary() - _ = yym1820 + if false { } else { z.F.DecMapUint64UintptrX(x.FptrMapUint64Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37828,50 +32382,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int = nil } else { - yyv1821 := &x.FMapUint64Int - yym1822 := z.DecBinary() - _ = yym1822 if false { } else { - z.F.DecMapUint64IntX(yyv1821, d) + z.F.DecMapUint64IntX(&x.FMapUint64Int, d) } } - if x.FptrMapUint64Int == nil { - x.FptrMapUint64Int = new(map[uint64]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Int != nil { + if true && x.FptrMapUint64Int != nil { x.FptrMapUint64Int = nil } } else { if x.FptrMapUint64Int == nil { x.FptrMapUint64Int = new(map[uint64]int) } - yym1824 := z.DecBinary() - _ = yym1824 + if false { } else { z.F.DecMapUint64IntX(x.FptrMapUint64Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37879,50 +32426,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int8 = nil } else { - yyv1825 := &x.FMapUint64Int8 - yym1826 := z.DecBinary() - _ = yym1826 if false { } else { - z.F.DecMapUint64Int8X(yyv1825, d) + z.F.DecMapUint64Int8X(&x.FMapUint64Int8, d) } } - if x.FptrMapUint64Int8 == nil { - x.FptrMapUint64Int8 = new(map[uint64]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Int8 != nil { + if true && x.FptrMapUint64Int8 != nil { x.FptrMapUint64Int8 = nil } } else { if x.FptrMapUint64Int8 == nil { x.FptrMapUint64Int8 = new(map[uint64]int8) } - yym1828 := z.DecBinary() - _ = yym1828 + if false { } else { z.F.DecMapUint64Int8X(x.FptrMapUint64Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37930,50 +32470,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int16 = nil } else { - yyv1829 := &x.FMapUint64Int16 - yym1830 := z.DecBinary() - _ = yym1830 if false { } else { - z.F.DecMapUint64Int16X(yyv1829, d) + z.F.DecMapUint64Int16X(&x.FMapUint64Int16, d) } } - if x.FptrMapUint64Int16 == nil { - x.FptrMapUint64Int16 = new(map[uint64]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Int16 != nil { + if true && x.FptrMapUint64Int16 != nil { x.FptrMapUint64Int16 = nil } } else { if x.FptrMapUint64Int16 == nil { x.FptrMapUint64Int16 = new(map[uint64]int16) } - yym1832 := z.DecBinary() - _ = yym1832 + if false { } else { z.F.DecMapUint64Int16X(x.FptrMapUint64Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -37981,50 +32514,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int32 = nil } else { - yyv1833 := &x.FMapUint64Int32 - yym1834 := z.DecBinary() - _ = yym1834 if false { } else { - z.F.DecMapUint64Int32X(yyv1833, d) + z.F.DecMapUint64Int32X(&x.FMapUint64Int32, d) } } - if x.FptrMapUint64Int32 == nil { - x.FptrMapUint64Int32 = new(map[uint64]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Int32 != nil { + if true && x.FptrMapUint64Int32 != nil { x.FptrMapUint64Int32 = nil } } else { if x.FptrMapUint64Int32 == nil { x.FptrMapUint64Int32 = new(map[uint64]int32) } - yym1836 := z.DecBinary() - _ = yym1836 + if false { } else { z.F.DecMapUint64Int32X(x.FptrMapUint64Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38032,50 +32558,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Int64 = nil } else { - yyv1837 := &x.FMapUint64Int64 - yym1838 := z.DecBinary() - _ = yym1838 if false { } else { - z.F.DecMapUint64Int64X(yyv1837, d) + z.F.DecMapUint64Int64X(&x.FMapUint64Int64, d) } } - if x.FptrMapUint64Int64 == nil { - x.FptrMapUint64Int64 = new(map[uint64]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Int64 != nil { + if true && x.FptrMapUint64Int64 != nil { x.FptrMapUint64Int64 = nil } } else { if x.FptrMapUint64Int64 == nil { x.FptrMapUint64Int64 = new(map[uint64]int64) } - yym1840 := z.DecBinary() - _ = yym1840 + if false { } else { z.F.DecMapUint64Int64X(x.FptrMapUint64Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38083,50 +32602,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Float32 = nil } else { - yyv1841 := &x.FMapUint64Float32 - yym1842 := z.DecBinary() - _ = yym1842 if false { } else { - z.F.DecMapUint64Float32X(yyv1841, d) + z.F.DecMapUint64Float32X(&x.FMapUint64Float32, d) } } - if x.FptrMapUint64Float32 == nil { - x.FptrMapUint64Float32 = new(map[uint64]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Float32 != nil { + if true && x.FptrMapUint64Float32 != nil { x.FptrMapUint64Float32 = nil } } else { if x.FptrMapUint64Float32 == nil { x.FptrMapUint64Float32 = new(map[uint64]float32) } - yym1844 := z.DecBinary() - _ = yym1844 + if false { } else { z.F.DecMapUint64Float32X(x.FptrMapUint64Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38134,50 +32646,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Float64 = nil } else { - yyv1845 := &x.FMapUint64Float64 - yym1846 := z.DecBinary() - _ = yym1846 if false { } else { - z.F.DecMapUint64Float64X(yyv1845, d) + z.F.DecMapUint64Float64X(&x.FMapUint64Float64, d) } } - if x.FptrMapUint64Float64 == nil { - x.FptrMapUint64Float64 = new(map[uint64]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Float64 != nil { + if true && x.FptrMapUint64Float64 != nil { x.FptrMapUint64Float64 = nil } } else { if x.FptrMapUint64Float64 == nil { x.FptrMapUint64Float64 = new(map[uint64]float64) } - yym1848 := z.DecBinary() - _ = yym1848 + if false { } else { z.F.DecMapUint64Float64X(x.FptrMapUint64Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38185,50 +32690,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUint64Bool = nil } else { - yyv1849 := &x.FMapUint64Bool - yym1850 := z.DecBinary() - _ = yym1850 if false { } else { - z.F.DecMapUint64BoolX(yyv1849, d) + z.F.DecMapUint64BoolX(&x.FMapUint64Bool, d) } } - if x.FptrMapUint64Bool == nil { - x.FptrMapUint64Bool = new(map[uint64]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUint64Bool != nil { + if true && x.FptrMapUint64Bool != nil { x.FptrMapUint64Bool = nil } } else { if x.FptrMapUint64Bool == nil { x.FptrMapUint64Bool = new(map[uint64]bool) } - yym1852 := z.DecBinary() - _ = yym1852 + if false { } else { z.F.DecMapUint64BoolX(x.FptrMapUint64Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38236,50 +32734,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrIntf = nil } else { - yyv1853 := &x.FMapUintptrIntf - yym1854 := z.DecBinary() - _ = yym1854 if false { } else { - z.F.DecMapUintptrIntfX(yyv1853, d) + z.F.DecMapUintptrIntfX(&x.FMapUintptrIntf, d) } } - if x.FptrMapUintptrIntf == nil { - x.FptrMapUintptrIntf = new(map[uintptr]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrIntf != nil { + if true && x.FptrMapUintptrIntf != nil { x.FptrMapUintptrIntf = nil } } else { if x.FptrMapUintptrIntf == nil { x.FptrMapUintptrIntf = new(map[uintptr]interface{}) } - yym1856 := z.DecBinary() - _ = yym1856 + if false { } else { z.F.DecMapUintptrIntfX(x.FptrMapUintptrIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38287,50 +32778,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrString = nil } else { - yyv1857 := &x.FMapUintptrString - yym1858 := z.DecBinary() - _ = yym1858 if false { } else { - z.F.DecMapUintptrStringX(yyv1857, d) + z.F.DecMapUintptrStringX(&x.FMapUintptrString, d) } } - if x.FptrMapUintptrString == nil { - x.FptrMapUintptrString = new(map[uintptr]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrString != nil { + if true && x.FptrMapUintptrString != nil { x.FptrMapUintptrString = nil } } else { if x.FptrMapUintptrString == nil { x.FptrMapUintptrString = new(map[uintptr]string) } - yym1860 := z.DecBinary() - _ = yym1860 + if false { } else { z.F.DecMapUintptrStringX(x.FptrMapUintptrString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38338,50 +32822,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint = nil } else { - yyv1861 := &x.FMapUintptrUint - yym1862 := z.DecBinary() - _ = yym1862 if false { } else { - z.F.DecMapUintptrUintX(yyv1861, d) + z.F.DecMapUintptrUintX(&x.FMapUintptrUint, d) } } - if x.FptrMapUintptrUint == nil { - x.FptrMapUintptrUint = new(map[uintptr]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint != nil { + if true && x.FptrMapUintptrUint != nil { x.FptrMapUintptrUint = nil } } else { if x.FptrMapUintptrUint == nil { x.FptrMapUintptrUint = new(map[uintptr]uint) } - yym1864 := z.DecBinary() - _ = yym1864 + if false { } else { z.F.DecMapUintptrUintX(x.FptrMapUintptrUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38389,50 +32866,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint8 = nil } else { - yyv1865 := &x.FMapUintptrUint8 - yym1866 := z.DecBinary() - _ = yym1866 if false { } else { - z.F.DecMapUintptrUint8X(yyv1865, d) + z.F.DecMapUintptrUint8X(&x.FMapUintptrUint8, d) } } - if x.FptrMapUintptrUint8 == nil { - x.FptrMapUintptrUint8 = new(map[uintptr]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint8 != nil { + if true && x.FptrMapUintptrUint8 != nil { x.FptrMapUintptrUint8 = nil } } else { if x.FptrMapUintptrUint8 == nil { x.FptrMapUintptrUint8 = new(map[uintptr]uint8) } - yym1868 := z.DecBinary() - _ = yym1868 + if false { } else { z.F.DecMapUintptrUint8X(x.FptrMapUintptrUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38440,50 +32910,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint16 = nil } else { - yyv1869 := &x.FMapUintptrUint16 - yym1870 := z.DecBinary() - _ = yym1870 if false { } else { - z.F.DecMapUintptrUint16X(yyv1869, d) + z.F.DecMapUintptrUint16X(&x.FMapUintptrUint16, d) } } - if x.FptrMapUintptrUint16 == nil { - x.FptrMapUintptrUint16 = new(map[uintptr]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint16 != nil { + if true && x.FptrMapUintptrUint16 != nil { x.FptrMapUintptrUint16 = nil } } else { if x.FptrMapUintptrUint16 == nil { x.FptrMapUintptrUint16 = new(map[uintptr]uint16) } - yym1872 := z.DecBinary() - _ = yym1872 + if false { } else { z.F.DecMapUintptrUint16X(x.FptrMapUintptrUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38491,50 +32954,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint32 = nil } else { - yyv1873 := &x.FMapUintptrUint32 - yym1874 := z.DecBinary() - _ = yym1874 if false { } else { - z.F.DecMapUintptrUint32X(yyv1873, d) + z.F.DecMapUintptrUint32X(&x.FMapUintptrUint32, d) } } - if x.FptrMapUintptrUint32 == nil { - x.FptrMapUintptrUint32 = new(map[uintptr]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint32 != nil { + if true && x.FptrMapUintptrUint32 != nil { x.FptrMapUintptrUint32 = nil } } else { if x.FptrMapUintptrUint32 == nil { x.FptrMapUintptrUint32 = new(map[uintptr]uint32) } - yym1876 := z.DecBinary() - _ = yym1876 + if false { } else { z.F.DecMapUintptrUint32X(x.FptrMapUintptrUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38542,50 +32998,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUint64 = nil } else { - yyv1877 := &x.FMapUintptrUint64 - yym1878 := z.DecBinary() - _ = yym1878 if false { } else { - z.F.DecMapUintptrUint64X(yyv1877, d) + z.F.DecMapUintptrUint64X(&x.FMapUintptrUint64, d) } } - if x.FptrMapUintptrUint64 == nil { - x.FptrMapUintptrUint64 = new(map[uintptr]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUint64 != nil { + if true && x.FptrMapUintptrUint64 != nil { x.FptrMapUintptrUint64 = nil } } else { if x.FptrMapUintptrUint64 == nil { x.FptrMapUintptrUint64 = new(map[uintptr]uint64) } - yym1880 := z.DecBinary() - _ = yym1880 + if false { } else { z.F.DecMapUintptrUint64X(x.FptrMapUintptrUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38593,50 +33042,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrUintptr = nil } else { - yyv1881 := &x.FMapUintptrUintptr - yym1882 := z.DecBinary() - _ = yym1882 if false { } else { - z.F.DecMapUintptrUintptrX(yyv1881, d) + z.F.DecMapUintptrUintptrX(&x.FMapUintptrUintptr, d) } } - if x.FptrMapUintptrUintptr == nil { - x.FptrMapUintptrUintptr = new(map[uintptr]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrUintptr != nil { + if true && x.FptrMapUintptrUintptr != nil { x.FptrMapUintptrUintptr = nil } } else { if x.FptrMapUintptrUintptr == nil { x.FptrMapUintptrUintptr = new(map[uintptr]uintptr) } - yym1884 := z.DecBinary() - _ = yym1884 + if false { } else { z.F.DecMapUintptrUintptrX(x.FptrMapUintptrUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38644,50 +33086,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt = nil } else { - yyv1885 := &x.FMapUintptrInt - yym1886 := z.DecBinary() - _ = yym1886 if false { } else { - z.F.DecMapUintptrIntX(yyv1885, d) + z.F.DecMapUintptrIntX(&x.FMapUintptrInt, d) } } - if x.FptrMapUintptrInt == nil { - x.FptrMapUintptrInt = new(map[uintptr]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt != nil { + if true && x.FptrMapUintptrInt != nil { x.FptrMapUintptrInt = nil } } else { if x.FptrMapUintptrInt == nil { x.FptrMapUintptrInt = new(map[uintptr]int) } - yym1888 := z.DecBinary() - _ = yym1888 + if false { } else { z.F.DecMapUintptrIntX(x.FptrMapUintptrInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38695,50 +33130,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt8 = nil } else { - yyv1889 := &x.FMapUintptrInt8 - yym1890 := z.DecBinary() - _ = yym1890 if false { } else { - z.F.DecMapUintptrInt8X(yyv1889, d) + z.F.DecMapUintptrInt8X(&x.FMapUintptrInt8, d) } } - if x.FptrMapUintptrInt8 == nil { - x.FptrMapUintptrInt8 = new(map[uintptr]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt8 != nil { + if true && x.FptrMapUintptrInt8 != nil { x.FptrMapUintptrInt8 = nil } } else { if x.FptrMapUintptrInt8 == nil { x.FptrMapUintptrInt8 = new(map[uintptr]int8) } - yym1892 := z.DecBinary() - _ = yym1892 + if false { } else { z.F.DecMapUintptrInt8X(x.FptrMapUintptrInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38746,50 +33174,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt16 = nil } else { - yyv1893 := &x.FMapUintptrInt16 - yym1894 := z.DecBinary() - _ = yym1894 if false { } else { - z.F.DecMapUintptrInt16X(yyv1893, d) + z.F.DecMapUintptrInt16X(&x.FMapUintptrInt16, d) } } - if x.FptrMapUintptrInt16 == nil { - x.FptrMapUintptrInt16 = new(map[uintptr]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt16 != nil { + if true && x.FptrMapUintptrInt16 != nil { x.FptrMapUintptrInt16 = nil } } else { if x.FptrMapUintptrInt16 == nil { x.FptrMapUintptrInt16 = new(map[uintptr]int16) } - yym1896 := z.DecBinary() - _ = yym1896 + if false { } else { z.F.DecMapUintptrInt16X(x.FptrMapUintptrInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38797,50 +33218,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt32 = nil } else { - yyv1897 := &x.FMapUintptrInt32 - yym1898 := z.DecBinary() - _ = yym1898 if false { } else { - z.F.DecMapUintptrInt32X(yyv1897, d) + z.F.DecMapUintptrInt32X(&x.FMapUintptrInt32, d) } } - if x.FptrMapUintptrInt32 == nil { - x.FptrMapUintptrInt32 = new(map[uintptr]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt32 != nil { + if true && x.FptrMapUintptrInt32 != nil { x.FptrMapUintptrInt32 = nil } } else { if x.FptrMapUintptrInt32 == nil { x.FptrMapUintptrInt32 = new(map[uintptr]int32) } - yym1900 := z.DecBinary() - _ = yym1900 + if false { } else { z.F.DecMapUintptrInt32X(x.FptrMapUintptrInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38848,50 +33262,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrInt64 = nil } else { - yyv1901 := &x.FMapUintptrInt64 - yym1902 := z.DecBinary() - _ = yym1902 if false { } else { - z.F.DecMapUintptrInt64X(yyv1901, d) + z.F.DecMapUintptrInt64X(&x.FMapUintptrInt64, d) } } - if x.FptrMapUintptrInt64 == nil { - x.FptrMapUintptrInt64 = new(map[uintptr]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrInt64 != nil { + if true && x.FptrMapUintptrInt64 != nil { x.FptrMapUintptrInt64 = nil } } else { if x.FptrMapUintptrInt64 == nil { x.FptrMapUintptrInt64 = new(map[uintptr]int64) } - yym1904 := z.DecBinary() - _ = yym1904 + if false { } else { z.F.DecMapUintptrInt64X(x.FptrMapUintptrInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38899,50 +33306,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrFloat32 = nil } else { - yyv1905 := &x.FMapUintptrFloat32 - yym1906 := z.DecBinary() - _ = yym1906 if false { } else { - z.F.DecMapUintptrFloat32X(yyv1905, d) + z.F.DecMapUintptrFloat32X(&x.FMapUintptrFloat32, d) } } - if x.FptrMapUintptrFloat32 == nil { - x.FptrMapUintptrFloat32 = new(map[uintptr]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrFloat32 != nil { + if true && x.FptrMapUintptrFloat32 != nil { x.FptrMapUintptrFloat32 = nil } } else { if x.FptrMapUintptrFloat32 == nil { x.FptrMapUintptrFloat32 = new(map[uintptr]float32) } - yym1908 := z.DecBinary() - _ = yym1908 + if false { } else { z.F.DecMapUintptrFloat32X(x.FptrMapUintptrFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -38950,50 +33350,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrFloat64 = nil } else { - yyv1909 := &x.FMapUintptrFloat64 - yym1910 := z.DecBinary() - _ = yym1910 if false { } else { - z.F.DecMapUintptrFloat64X(yyv1909, d) + z.F.DecMapUintptrFloat64X(&x.FMapUintptrFloat64, d) } } - if x.FptrMapUintptrFloat64 == nil { - x.FptrMapUintptrFloat64 = new(map[uintptr]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrFloat64 != nil { + if true && x.FptrMapUintptrFloat64 != nil { x.FptrMapUintptrFloat64 = nil } } else { if x.FptrMapUintptrFloat64 == nil { x.FptrMapUintptrFloat64 = new(map[uintptr]float64) } - yym1912 := z.DecBinary() - _ = yym1912 + if false { } else { z.F.DecMapUintptrFloat64X(x.FptrMapUintptrFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39001,50 +33394,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapUintptrBool = nil } else { - yyv1913 := &x.FMapUintptrBool - yym1914 := z.DecBinary() - _ = yym1914 if false { } else { - z.F.DecMapUintptrBoolX(yyv1913, d) + z.F.DecMapUintptrBoolX(&x.FMapUintptrBool, d) } } - if x.FptrMapUintptrBool == nil { - x.FptrMapUintptrBool = new(map[uintptr]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapUintptrBool != nil { + if true && x.FptrMapUintptrBool != nil { x.FptrMapUintptrBool = nil } } else { if x.FptrMapUintptrBool == nil { x.FptrMapUintptrBool = new(map[uintptr]bool) } - yym1916 := z.DecBinary() - _ = yym1916 + if false { } else { z.F.DecMapUintptrBoolX(x.FptrMapUintptrBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39052,50 +33438,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntIntf = nil } else { - yyv1917 := &x.FMapIntIntf - yym1918 := z.DecBinary() - _ = yym1918 if false { } else { - z.F.DecMapIntIntfX(yyv1917, d) + z.F.DecMapIntIntfX(&x.FMapIntIntf, d) } } - if x.FptrMapIntIntf == nil { - x.FptrMapIntIntf = new(map[int]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntIntf != nil { + if true && x.FptrMapIntIntf != nil { x.FptrMapIntIntf = nil } } else { if x.FptrMapIntIntf == nil { x.FptrMapIntIntf = new(map[int]interface{}) } - yym1920 := z.DecBinary() - _ = yym1920 + if false { } else { z.F.DecMapIntIntfX(x.FptrMapIntIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39103,50 +33482,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntString = nil } else { - yyv1921 := &x.FMapIntString - yym1922 := z.DecBinary() - _ = yym1922 if false { } else { - z.F.DecMapIntStringX(yyv1921, d) + z.F.DecMapIntStringX(&x.FMapIntString, d) } } - if x.FptrMapIntString == nil { - x.FptrMapIntString = new(map[int]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntString != nil { + if true && x.FptrMapIntString != nil { x.FptrMapIntString = nil } } else { if x.FptrMapIntString == nil { x.FptrMapIntString = new(map[int]string) } - yym1924 := z.DecBinary() - _ = yym1924 + if false { } else { z.F.DecMapIntStringX(x.FptrMapIntString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39154,50 +33526,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint = nil } else { - yyv1925 := &x.FMapIntUint - yym1926 := z.DecBinary() - _ = yym1926 if false { } else { - z.F.DecMapIntUintX(yyv1925, d) + z.F.DecMapIntUintX(&x.FMapIntUint, d) } } - if x.FptrMapIntUint == nil { - x.FptrMapIntUint = new(map[int]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUint != nil { + if true && x.FptrMapIntUint != nil { x.FptrMapIntUint = nil } } else { if x.FptrMapIntUint == nil { x.FptrMapIntUint = new(map[int]uint) } - yym1928 := z.DecBinary() - _ = yym1928 + if false { } else { z.F.DecMapIntUintX(x.FptrMapIntUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39205,50 +33570,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint8 = nil } else { - yyv1929 := &x.FMapIntUint8 - yym1930 := z.DecBinary() - _ = yym1930 if false { } else { - z.F.DecMapIntUint8X(yyv1929, d) + z.F.DecMapIntUint8X(&x.FMapIntUint8, d) } } - if x.FptrMapIntUint8 == nil { - x.FptrMapIntUint8 = new(map[int]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUint8 != nil { + if true && x.FptrMapIntUint8 != nil { x.FptrMapIntUint8 = nil } } else { if x.FptrMapIntUint8 == nil { x.FptrMapIntUint8 = new(map[int]uint8) } - yym1932 := z.DecBinary() - _ = yym1932 + if false { } else { z.F.DecMapIntUint8X(x.FptrMapIntUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39256,50 +33614,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint16 = nil } else { - yyv1933 := &x.FMapIntUint16 - yym1934 := z.DecBinary() - _ = yym1934 if false { } else { - z.F.DecMapIntUint16X(yyv1933, d) + z.F.DecMapIntUint16X(&x.FMapIntUint16, d) } } - if x.FptrMapIntUint16 == nil { - x.FptrMapIntUint16 = new(map[int]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUint16 != nil { + if true && x.FptrMapIntUint16 != nil { x.FptrMapIntUint16 = nil } } else { if x.FptrMapIntUint16 == nil { x.FptrMapIntUint16 = new(map[int]uint16) } - yym1936 := z.DecBinary() - _ = yym1936 + if false { } else { z.F.DecMapIntUint16X(x.FptrMapIntUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39307,50 +33658,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint32 = nil } else { - yyv1937 := &x.FMapIntUint32 - yym1938 := z.DecBinary() - _ = yym1938 if false { } else { - z.F.DecMapIntUint32X(yyv1937, d) + z.F.DecMapIntUint32X(&x.FMapIntUint32, d) } } - if x.FptrMapIntUint32 == nil { - x.FptrMapIntUint32 = new(map[int]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUint32 != nil { + if true && x.FptrMapIntUint32 != nil { x.FptrMapIntUint32 = nil } } else { if x.FptrMapIntUint32 == nil { x.FptrMapIntUint32 = new(map[int]uint32) } - yym1940 := z.DecBinary() - _ = yym1940 + if false { } else { z.F.DecMapIntUint32X(x.FptrMapIntUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39358,50 +33702,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUint64 = nil } else { - yyv1941 := &x.FMapIntUint64 - yym1942 := z.DecBinary() - _ = yym1942 if false { } else { - z.F.DecMapIntUint64X(yyv1941, d) + z.F.DecMapIntUint64X(&x.FMapIntUint64, d) } } - if x.FptrMapIntUint64 == nil { - x.FptrMapIntUint64 = new(map[int]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUint64 != nil { + if true && x.FptrMapIntUint64 != nil { x.FptrMapIntUint64 = nil } } else { if x.FptrMapIntUint64 == nil { x.FptrMapIntUint64 = new(map[int]uint64) } - yym1944 := z.DecBinary() - _ = yym1944 + if false { } else { z.F.DecMapIntUint64X(x.FptrMapIntUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39409,50 +33746,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntUintptr = nil } else { - yyv1945 := &x.FMapIntUintptr - yym1946 := z.DecBinary() - _ = yym1946 if false { } else { - z.F.DecMapIntUintptrX(yyv1945, d) + z.F.DecMapIntUintptrX(&x.FMapIntUintptr, d) } } - if x.FptrMapIntUintptr == nil { - x.FptrMapIntUintptr = new(map[int]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntUintptr != nil { + if true && x.FptrMapIntUintptr != nil { x.FptrMapIntUintptr = nil } } else { if x.FptrMapIntUintptr == nil { x.FptrMapIntUintptr = new(map[int]uintptr) } - yym1948 := z.DecBinary() - _ = yym1948 + if false { } else { z.F.DecMapIntUintptrX(x.FptrMapIntUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39460,50 +33790,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt = nil } else { - yyv1949 := &x.FMapIntInt - yym1950 := z.DecBinary() - _ = yym1950 if false { } else { - z.F.DecMapIntIntX(yyv1949, d) + z.F.DecMapIntIntX(&x.FMapIntInt, d) } } - if x.FptrMapIntInt == nil { - x.FptrMapIntInt = new(map[int]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntInt != nil { + if true && x.FptrMapIntInt != nil { x.FptrMapIntInt = nil } } else { if x.FptrMapIntInt == nil { x.FptrMapIntInt = new(map[int]int) } - yym1952 := z.DecBinary() - _ = yym1952 + if false { } else { z.F.DecMapIntIntX(x.FptrMapIntInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39511,50 +33834,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt8 = nil } else { - yyv1953 := &x.FMapIntInt8 - yym1954 := z.DecBinary() - _ = yym1954 if false { } else { - z.F.DecMapIntInt8X(yyv1953, d) + z.F.DecMapIntInt8X(&x.FMapIntInt8, d) } } - if x.FptrMapIntInt8 == nil { - x.FptrMapIntInt8 = new(map[int]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntInt8 != nil { + if true && x.FptrMapIntInt8 != nil { x.FptrMapIntInt8 = nil } } else { if x.FptrMapIntInt8 == nil { x.FptrMapIntInt8 = new(map[int]int8) } - yym1956 := z.DecBinary() - _ = yym1956 + if false { } else { z.F.DecMapIntInt8X(x.FptrMapIntInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39562,50 +33878,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt16 = nil } else { - yyv1957 := &x.FMapIntInt16 - yym1958 := z.DecBinary() - _ = yym1958 if false { } else { - z.F.DecMapIntInt16X(yyv1957, d) + z.F.DecMapIntInt16X(&x.FMapIntInt16, d) } } - if x.FptrMapIntInt16 == nil { - x.FptrMapIntInt16 = new(map[int]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntInt16 != nil { + if true && x.FptrMapIntInt16 != nil { x.FptrMapIntInt16 = nil } } else { if x.FptrMapIntInt16 == nil { x.FptrMapIntInt16 = new(map[int]int16) } - yym1960 := z.DecBinary() - _ = yym1960 + if false { } else { z.F.DecMapIntInt16X(x.FptrMapIntInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39613,50 +33922,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt32 = nil } else { - yyv1961 := &x.FMapIntInt32 - yym1962 := z.DecBinary() - _ = yym1962 if false { } else { - z.F.DecMapIntInt32X(yyv1961, d) + z.F.DecMapIntInt32X(&x.FMapIntInt32, d) } } - if x.FptrMapIntInt32 == nil { - x.FptrMapIntInt32 = new(map[int]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntInt32 != nil { + if true && x.FptrMapIntInt32 != nil { x.FptrMapIntInt32 = nil } } else { if x.FptrMapIntInt32 == nil { x.FptrMapIntInt32 = new(map[int]int32) } - yym1964 := z.DecBinary() - _ = yym1964 + if false { } else { z.F.DecMapIntInt32X(x.FptrMapIntInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39664,50 +33966,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntInt64 = nil } else { - yyv1965 := &x.FMapIntInt64 - yym1966 := z.DecBinary() - _ = yym1966 if false { } else { - z.F.DecMapIntInt64X(yyv1965, d) + z.F.DecMapIntInt64X(&x.FMapIntInt64, d) } } - if x.FptrMapIntInt64 == nil { - x.FptrMapIntInt64 = new(map[int]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntInt64 != nil { + if true && x.FptrMapIntInt64 != nil { x.FptrMapIntInt64 = nil } } else { if x.FptrMapIntInt64 == nil { x.FptrMapIntInt64 = new(map[int]int64) } - yym1968 := z.DecBinary() - _ = yym1968 + if false { } else { z.F.DecMapIntInt64X(x.FptrMapIntInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39715,50 +34010,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntFloat32 = nil } else { - yyv1969 := &x.FMapIntFloat32 - yym1970 := z.DecBinary() - _ = yym1970 if false { } else { - z.F.DecMapIntFloat32X(yyv1969, d) + z.F.DecMapIntFloat32X(&x.FMapIntFloat32, d) } } - if x.FptrMapIntFloat32 == nil { - x.FptrMapIntFloat32 = new(map[int]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntFloat32 != nil { + if true && x.FptrMapIntFloat32 != nil { x.FptrMapIntFloat32 = nil } } else { if x.FptrMapIntFloat32 == nil { x.FptrMapIntFloat32 = new(map[int]float32) } - yym1972 := z.DecBinary() - _ = yym1972 + if false { } else { z.F.DecMapIntFloat32X(x.FptrMapIntFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39766,50 +34054,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntFloat64 = nil } else { - yyv1973 := &x.FMapIntFloat64 - yym1974 := z.DecBinary() - _ = yym1974 if false { } else { - z.F.DecMapIntFloat64X(yyv1973, d) + z.F.DecMapIntFloat64X(&x.FMapIntFloat64, d) } } - if x.FptrMapIntFloat64 == nil { - x.FptrMapIntFloat64 = new(map[int]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntFloat64 != nil { + if true && x.FptrMapIntFloat64 != nil { x.FptrMapIntFloat64 = nil } } else { if x.FptrMapIntFloat64 == nil { x.FptrMapIntFloat64 = new(map[int]float64) } - yym1976 := z.DecBinary() - _ = yym1976 + if false { } else { z.F.DecMapIntFloat64X(x.FptrMapIntFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39817,50 +34098,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapIntBool = nil } else { - yyv1977 := &x.FMapIntBool - yym1978 := z.DecBinary() - _ = yym1978 if false { } else { - z.F.DecMapIntBoolX(yyv1977, d) + z.F.DecMapIntBoolX(&x.FMapIntBool, d) } } - if x.FptrMapIntBool == nil { - x.FptrMapIntBool = new(map[int]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapIntBool != nil { + if true && x.FptrMapIntBool != nil { x.FptrMapIntBool = nil } } else { if x.FptrMapIntBool == nil { x.FptrMapIntBool = new(map[int]bool) } - yym1980 := z.DecBinary() - _ = yym1980 + if false { } else { z.F.DecMapIntBoolX(x.FptrMapIntBool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39868,50 +34142,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Intf = nil } else { - yyv1981 := &x.FMapInt8Intf - yym1982 := z.DecBinary() - _ = yym1982 if false { } else { - z.F.DecMapInt8IntfX(yyv1981, d) + z.F.DecMapInt8IntfX(&x.FMapInt8Intf, d) } } - if x.FptrMapInt8Intf == nil { - x.FptrMapInt8Intf = new(map[int8]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Intf != nil { + if true && x.FptrMapInt8Intf != nil { x.FptrMapInt8Intf = nil } } else { if x.FptrMapInt8Intf == nil { x.FptrMapInt8Intf = new(map[int8]interface{}) } - yym1984 := z.DecBinary() - _ = yym1984 + if false { } else { z.F.DecMapInt8IntfX(x.FptrMapInt8Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39919,50 +34186,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8String = nil } else { - yyv1985 := &x.FMapInt8String - yym1986 := z.DecBinary() - _ = yym1986 if false { } else { - z.F.DecMapInt8StringX(yyv1985, d) + z.F.DecMapInt8StringX(&x.FMapInt8String, d) } } - if x.FptrMapInt8String == nil { - x.FptrMapInt8String = new(map[int8]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8String != nil { + if true && x.FptrMapInt8String != nil { x.FptrMapInt8String = nil } } else { if x.FptrMapInt8String == nil { x.FptrMapInt8String = new(map[int8]string) } - yym1988 := z.DecBinary() - _ = yym1988 + if false { } else { z.F.DecMapInt8StringX(x.FptrMapInt8String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -39970,50 +34230,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint = nil } else { - yyv1989 := &x.FMapInt8Uint - yym1990 := z.DecBinary() - _ = yym1990 if false { } else { - z.F.DecMapInt8UintX(yyv1989, d) + z.F.DecMapInt8UintX(&x.FMapInt8Uint, d) } } - if x.FptrMapInt8Uint == nil { - x.FptrMapInt8Uint = new(map[int8]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint != nil { + if true && x.FptrMapInt8Uint != nil { x.FptrMapInt8Uint = nil } } else { if x.FptrMapInt8Uint == nil { x.FptrMapInt8Uint = new(map[int8]uint) } - yym1992 := z.DecBinary() - _ = yym1992 + if false { } else { z.F.DecMapInt8UintX(x.FptrMapInt8Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40021,50 +34274,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint8 = nil } else { - yyv1993 := &x.FMapInt8Uint8 - yym1994 := z.DecBinary() - _ = yym1994 if false { } else { - z.F.DecMapInt8Uint8X(yyv1993, d) + z.F.DecMapInt8Uint8X(&x.FMapInt8Uint8, d) } } - if x.FptrMapInt8Uint8 == nil { - x.FptrMapInt8Uint8 = new(map[int8]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint8 != nil { + if true && x.FptrMapInt8Uint8 != nil { x.FptrMapInt8Uint8 = nil } } else { if x.FptrMapInt8Uint8 == nil { x.FptrMapInt8Uint8 = new(map[int8]uint8) } - yym1996 := z.DecBinary() - _ = yym1996 + if false { } else { z.F.DecMapInt8Uint8X(x.FptrMapInt8Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40072,50 +34318,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint16 = nil } else { - yyv1997 := &x.FMapInt8Uint16 - yym1998 := z.DecBinary() - _ = yym1998 if false { } else { - z.F.DecMapInt8Uint16X(yyv1997, d) + z.F.DecMapInt8Uint16X(&x.FMapInt8Uint16, d) } } - if x.FptrMapInt8Uint16 == nil { - x.FptrMapInt8Uint16 = new(map[int8]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint16 != nil { + if true && x.FptrMapInt8Uint16 != nil { x.FptrMapInt8Uint16 = nil } } else { if x.FptrMapInt8Uint16 == nil { x.FptrMapInt8Uint16 = new(map[int8]uint16) } - yym2000 := z.DecBinary() - _ = yym2000 + if false { } else { z.F.DecMapInt8Uint16X(x.FptrMapInt8Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40123,50 +34362,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint32 = nil } else { - yyv2001 := &x.FMapInt8Uint32 - yym2002 := z.DecBinary() - _ = yym2002 if false { } else { - z.F.DecMapInt8Uint32X(yyv2001, d) + z.F.DecMapInt8Uint32X(&x.FMapInt8Uint32, d) } } - if x.FptrMapInt8Uint32 == nil { - x.FptrMapInt8Uint32 = new(map[int8]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint32 != nil { + if true && x.FptrMapInt8Uint32 != nil { x.FptrMapInt8Uint32 = nil } } else { if x.FptrMapInt8Uint32 == nil { x.FptrMapInt8Uint32 = new(map[int8]uint32) } - yym2004 := z.DecBinary() - _ = yym2004 + if false { } else { z.F.DecMapInt8Uint32X(x.FptrMapInt8Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40174,50 +34406,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uint64 = nil } else { - yyv2005 := &x.FMapInt8Uint64 - yym2006 := z.DecBinary() - _ = yym2006 if false { } else { - z.F.DecMapInt8Uint64X(yyv2005, d) + z.F.DecMapInt8Uint64X(&x.FMapInt8Uint64, d) } } - if x.FptrMapInt8Uint64 == nil { - x.FptrMapInt8Uint64 = new(map[int8]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uint64 != nil { + if true && x.FptrMapInt8Uint64 != nil { x.FptrMapInt8Uint64 = nil } } else { if x.FptrMapInt8Uint64 == nil { x.FptrMapInt8Uint64 = new(map[int8]uint64) } - yym2008 := z.DecBinary() - _ = yym2008 + if false { } else { z.F.DecMapInt8Uint64X(x.FptrMapInt8Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40225,50 +34450,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Uintptr = nil } else { - yyv2009 := &x.FMapInt8Uintptr - yym2010 := z.DecBinary() - _ = yym2010 if false { } else { - z.F.DecMapInt8UintptrX(yyv2009, d) + z.F.DecMapInt8UintptrX(&x.FMapInt8Uintptr, d) } } - if x.FptrMapInt8Uintptr == nil { - x.FptrMapInt8Uintptr = new(map[int8]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Uintptr != nil { + if true && x.FptrMapInt8Uintptr != nil { x.FptrMapInt8Uintptr = nil } } else { if x.FptrMapInt8Uintptr == nil { x.FptrMapInt8Uintptr = new(map[int8]uintptr) } - yym2012 := z.DecBinary() - _ = yym2012 + if false { } else { z.F.DecMapInt8UintptrX(x.FptrMapInt8Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40276,50 +34494,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int = nil } else { - yyv2013 := &x.FMapInt8Int - yym2014 := z.DecBinary() - _ = yym2014 if false { } else { - z.F.DecMapInt8IntX(yyv2013, d) + z.F.DecMapInt8IntX(&x.FMapInt8Int, d) } } - if x.FptrMapInt8Int == nil { - x.FptrMapInt8Int = new(map[int8]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Int != nil { + if true && x.FptrMapInt8Int != nil { x.FptrMapInt8Int = nil } } else { if x.FptrMapInt8Int == nil { x.FptrMapInt8Int = new(map[int8]int) } - yym2016 := z.DecBinary() - _ = yym2016 + if false { } else { z.F.DecMapInt8IntX(x.FptrMapInt8Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40327,50 +34538,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int8 = nil } else { - yyv2017 := &x.FMapInt8Int8 - yym2018 := z.DecBinary() - _ = yym2018 if false { } else { - z.F.DecMapInt8Int8X(yyv2017, d) + z.F.DecMapInt8Int8X(&x.FMapInt8Int8, d) } } - if x.FptrMapInt8Int8 == nil { - x.FptrMapInt8Int8 = new(map[int8]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Int8 != nil { + if true && x.FptrMapInt8Int8 != nil { x.FptrMapInt8Int8 = nil } } else { if x.FptrMapInt8Int8 == nil { x.FptrMapInt8Int8 = new(map[int8]int8) } - yym2020 := z.DecBinary() - _ = yym2020 + if false { } else { z.F.DecMapInt8Int8X(x.FptrMapInt8Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40378,50 +34582,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int16 = nil } else { - yyv2021 := &x.FMapInt8Int16 - yym2022 := z.DecBinary() - _ = yym2022 if false { } else { - z.F.DecMapInt8Int16X(yyv2021, d) + z.F.DecMapInt8Int16X(&x.FMapInt8Int16, d) } } - if x.FptrMapInt8Int16 == nil { - x.FptrMapInt8Int16 = new(map[int8]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Int16 != nil { + if true && x.FptrMapInt8Int16 != nil { x.FptrMapInt8Int16 = nil } } else { if x.FptrMapInt8Int16 == nil { x.FptrMapInt8Int16 = new(map[int8]int16) } - yym2024 := z.DecBinary() - _ = yym2024 + if false { } else { z.F.DecMapInt8Int16X(x.FptrMapInt8Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40429,50 +34626,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int32 = nil } else { - yyv2025 := &x.FMapInt8Int32 - yym2026 := z.DecBinary() - _ = yym2026 if false { } else { - z.F.DecMapInt8Int32X(yyv2025, d) + z.F.DecMapInt8Int32X(&x.FMapInt8Int32, d) } } - if x.FptrMapInt8Int32 == nil { - x.FptrMapInt8Int32 = new(map[int8]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Int32 != nil { + if true && x.FptrMapInt8Int32 != nil { x.FptrMapInt8Int32 = nil } } else { if x.FptrMapInt8Int32 == nil { x.FptrMapInt8Int32 = new(map[int8]int32) } - yym2028 := z.DecBinary() - _ = yym2028 + if false { } else { z.F.DecMapInt8Int32X(x.FptrMapInt8Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40480,50 +34670,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Int64 = nil } else { - yyv2029 := &x.FMapInt8Int64 - yym2030 := z.DecBinary() - _ = yym2030 if false { } else { - z.F.DecMapInt8Int64X(yyv2029, d) + z.F.DecMapInt8Int64X(&x.FMapInt8Int64, d) } } - if x.FptrMapInt8Int64 == nil { - x.FptrMapInt8Int64 = new(map[int8]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Int64 != nil { + if true && x.FptrMapInt8Int64 != nil { x.FptrMapInt8Int64 = nil } } else { if x.FptrMapInt8Int64 == nil { x.FptrMapInt8Int64 = new(map[int8]int64) } - yym2032 := z.DecBinary() - _ = yym2032 + if false { } else { z.F.DecMapInt8Int64X(x.FptrMapInt8Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40531,50 +34714,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Float32 = nil } else { - yyv2033 := &x.FMapInt8Float32 - yym2034 := z.DecBinary() - _ = yym2034 if false { } else { - z.F.DecMapInt8Float32X(yyv2033, d) + z.F.DecMapInt8Float32X(&x.FMapInt8Float32, d) } } - if x.FptrMapInt8Float32 == nil { - x.FptrMapInt8Float32 = new(map[int8]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Float32 != nil { + if true && x.FptrMapInt8Float32 != nil { x.FptrMapInt8Float32 = nil } } else { if x.FptrMapInt8Float32 == nil { x.FptrMapInt8Float32 = new(map[int8]float32) } - yym2036 := z.DecBinary() - _ = yym2036 + if false { } else { z.F.DecMapInt8Float32X(x.FptrMapInt8Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40582,50 +34758,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Float64 = nil } else { - yyv2037 := &x.FMapInt8Float64 - yym2038 := z.DecBinary() - _ = yym2038 if false { } else { - z.F.DecMapInt8Float64X(yyv2037, d) + z.F.DecMapInt8Float64X(&x.FMapInt8Float64, d) } } - if x.FptrMapInt8Float64 == nil { - x.FptrMapInt8Float64 = new(map[int8]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Float64 != nil { + if true && x.FptrMapInt8Float64 != nil { x.FptrMapInt8Float64 = nil } } else { if x.FptrMapInt8Float64 == nil { x.FptrMapInt8Float64 = new(map[int8]float64) } - yym2040 := z.DecBinary() - _ = yym2040 + if false { } else { z.F.DecMapInt8Float64X(x.FptrMapInt8Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40633,50 +34802,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt8Bool = nil } else { - yyv2041 := &x.FMapInt8Bool - yym2042 := z.DecBinary() - _ = yym2042 if false { } else { - z.F.DecMapInt8BoolX(yyv2041, d) + z.F.DecMapInt8BoolX(&x.FMapInt8Bool, d) } } - if x.FptrMapInt8Bool == nil { - x.FptrMapInt8Bool = new(map[int8]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt8Bool != nil { + if true && x.FptrMapInt8Bool != nil { x.FptrMapInt8Bool = nil } } else { if x.FptrMapInt8Bool == nil { x.FptrMapInt8Bool = new(map[int8]bool) } - yym2044 := z.DecBinary() - _ = yym2044 + if false { } else { z.F.DecMapInt8BoolX(x.FptrMapInt8Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40684,50 +34846,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Intf = nil } else { - yyv2045 := &x.FMapInt16Intf - yym2046 := z.DecBinary() - _ = yym2046 if false { } else { - z.F.DecMapInt16IntfX(yyv2045, d) + z.F.DecMapInt16IntfX(&x.FMapInt16Intf, d) } } - if x.FptrMapInt16Intf == nil { - x.FptrMapInt16Intf = new(map[int16]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Intf != nil { + if true && x.FptrMapInt16Intf != nil { x.FptrMapInt16Intf = nil } } else { if x.FptrMapInt16Intf == nil { x.FptrMapInt16Intf = new(map[int16]interface{}) } - yym2048 := z.DecBinary() - _ = yym2048 + if false { } else { z.F.DecMapInt16IntfX(x.FptrMapInt16Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40735,50 +34890,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16String = nil } else { - yyv2049 := &x.FMapInt16String - yym2050 := z.DecBinary() - _ = yym2050 if false { } else { - z.F.DecMapInt16StringX(yyv2049, d) + z.F.DecMapInt16StringX(&x.FMapInt16String, d) } } - if x.FptrMapInt16String == nil { - x.FptrMapInt16String = new(map[int16]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16String != nil { + if true && x.FptrMapInt16String != nil { x.FptrMapInt16String = nil } } else { if x.FptrMapInt16String == nil { x.FptrMapInt16String = new(map[int16]string) } - yym2052 := z.DecBinary() - _ = yym2052 + if false { } else { z.F.DecMapInt16StringX(x.FptrMapInt16String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40786,50 +34934,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint = nil } else { - yyv2053 := &x.FMapInt16Uint - yym2054 := z.DecBinary() - _ = yym2054 if false { } else { - z.F.DecMapInt16UintX(yyv2053, d) + z.F.DecMapInt16UintX(&x.FMapInt16Uint, d) } } - if x.FptrMapInt16Uint == nil { - x.FptrMapInt16Uint = new(map[int16]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint != nil { + if true && x.FptrMapInt16Uint != nil { x.FptrMapInt16Uint = nil } } else { if x.FptrMapInt16Uint == nil { x.FptrMapInt16Uint = new(map[int16]uint) } - yym2056 := z.DecBinary() - _ = yym2056 + if false { } else { z.F.DecMapInt16UintX(x.FptrMapInt16Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40837,50 +34978,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint8 = nil } else { - yyv2057 := &x.FMapInt16Uint8 - yym2058 := z.DecBinary() - _ = yym2058 if false { } else { - z.F.DecMapInt16Uint8X(yyv2057, d) + z.F.DecMapInt16Uint8X(&x.FMapInt16Uint8, d) } } - if x.FptrMapInt16Uint8 == nil { - x.FptrMapInt16Uint8 = new(map[int16]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint8 != nil { + if true && x.FptrMapInt16Uint8 != nil { x.FptrMapInt16Uint8 = nil } } else { if x.FptrMapInt16Uint8 == nil { x.FptrMapInt16Uint8 = new(map[int16]uint8) } - yym2060 := z.DecBinary() - _ = yym2060 + if false { } else { z.F.DecMapInt16Uint8X(x.FptrMapInt16Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40888,50 +35022,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint16 = nil } else { - yyv2061 := &x.FMapInt16Uint16 - yym2062 := z.DecBinary() - _ = yym2062 if false { } else { - z.F.DecMapInt16Uint16X(yyv2061, d) + z.F.DecMapInt16Uint16X(&x.FMapInt16Uint16, d) } } - if x.FptrMapInt16Uint16 == nil { - x.FptrMapInt16Uint16 = new(map[int16]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint16 != nil { + if true && x.FptrMapInt16Uint16 != nil { x.FptrMapInt16Uint16 = nil } } else { if x.FptrMapInt16Uint16 == nil { x.FptrMapInt16Uint16 = new(map[int16]uint16) } - yym2064 := z.DecBinary() - _ = yym2064 + if false { } else { z.F.DecMapInt16Uint16X(x.FptrMapInt16Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40939,50 +35066,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint32 = nil } else { - yyv2065 := &x.FMapInt16Uint32 - yym2066 := z.DecBinary() - _ = yym2066 if false { } else { - z.F.DecMapInt16Uint32X(yyv2065, d) + z.F.DecMapInt16Uint32X(&x.FMapInt16Uint32, d) } } - if x.FptrMapInt16Uint32 == nil { - x.FptrMapInt16Uint32 = new(map[int16]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint32 != nil { + if true && x.FptrMapInt16Uint32 != nil { x.FptrMapInt16Uint32 = nil } } else { if x.FptrMapInt16Uint32 == nil { x.FptrMapInt16Uint32 = new(map[int16]uint32) } - yym2068 := z.DecBinary() - _ = yym2068 + if false { } else { z.F.DecMapInt16Uint32X(x.FptrMapInt16Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -40990,50 +35110,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uint64 = nil } else { - yyv2069 := &x.FMapInt16Uint64 - yym2070 := z.DecBinary() - _ = yym2070 if false { } else { - z.F.DecMapInt16Uint64X(yyv2069, d) + z.F.DecMapInt16Uint64X(&x.FMapInt16Uint64, d) } } - if x.FptrMapInt16Uint64 == nil { - x.FptrMapInt16Uint64 = new(map[int16]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uint64 != nil { + if true && x.FptrMapInt16Uint64 != nil { x.FptrMapInt16Uint64 = nil } } else { if x.FptrMapInt16Uint64 == nil { x.FptrMapInt16Uint64 = new(map[int16]uint64) } - yym2072 := z.DecBinary() - _ = yym2072 + if false { } else { z.F.DecMapInt16Uint64X(x.FptrMapInt16Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41041,50 +35154,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Uintptr = nil } else { - yyv2073 := &x.FMapInt16Uintptr - yym2074 := z.DecBinary() - _ = yym2074 if false { } else { - z.F.DecMapInt16UintptrX(yyv2073, d) + z.F.DecMapInt16UintptrX(&x.FMapInt16Uintptr, d) } } - if x.FptrMapInt16Uintptr == nil { - x.FptrMapInt16Uintptr = new(map[int16]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Uintptr != nil { + if true && x.FptrMapInt16Uintptr != nil { x.FptrMapInt16Uintptr = nil } } else { if x.FptrMapInt16Uintptr == nil { x.FptrMapInt16Uintptr = new(map[int16]uintptr) } - yym2076 := z.DecBinary() - _ = yym2076 + if false { } else { z.F.DecMapInt16UintptrX(x.FptrMapInt16Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41092,50 +35198,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int = nil } else { - yyv2077 := &x.FMapInt16Int - yym2078 := z.DecBinary() - _ = yym2078 if false { } else { - z.F.DecMapInt16IntX(yyv2077, d) + z.F.DecMapInt16IntX(&x.FMapInt16Int, d) } } - if x.FptrMapInt16Int == nil { - x.FptrMapInt16Int = new(map[int16]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Int != nil { + if true && x.FptrMapInt16Int != nil { x.FptrMapInt16Int = nil } } else { if x.FptrMapInt16Int == nil { x.FptrMapInt16Int = new(map[int16]int) } - yym2080 := z.DecBinary() - _ = yym2080 + if false { } else { z.F.DecMapInt16IntX(x.FptrMapInt16Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41143,50 +35242,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int8 = nil } else { - yyv2081 := &x.FMapInt16Int8 - yym2082 := z.DecBinary() - _ = yym2082 if false { } else { - z.F.DecMapInt16Int8X(yyv2081, d) + z.F.DecMapInt16Int8X(&x.FMapInt16Int8, d) } } - if x.FptrMapInt16Int8 == nil { - x.FptrMapInt16Int8 = new(map[int16]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Int8 != nil { + if true && x.FptrMapInt16Int8 != nil { x.FptrMapInt16Int8 = nil } } else { if x.FptrMapInt16Int8 == nil { x.FptrMapInt16Int8 = new(map[int16]int8) } - yym2084 := z.DecBinary() - _ = yym2084 + if false { } else { z.F.DecMapInt16Int8X(x.FptrMapInt16Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41194,50 +35286,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int16 = nil } else { - yyv2085 := &x.FMapInt16Int16 - yym2086 := z.DecBinary() - _ = yym2086 if false { } else { - z.F.DecMapInt16Int16X(yyv2085, d) + z.F.DecMapInt16Int16X(&x.FMapInt16Int16, d) } } - if x.FptrMapInt16Int16 == nil { - x.FptrMapInt16Int16 = new(map[int16]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Int16 != nil { + if true && x.FptrMapInt16Int16 != nil { x.FptrMapInt16Int16 = nil } } else { if x.FptrMapInt16Int16 == nil { x.FptrMapInt16Int16 = new(map[int16]int16) } - yym2088 := z.DecBinary() - _ = yym2088 + if false { } else { z.F.DecMapInt16Int16X(x.FptrMapInt16Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41245,50 +35330,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int32 = nil } else { - yyv2089 := &x.FMapInt16Int32 - yym2090 := z.DecBinary() - _ = yym2090 if false { } else { - z.F.DecMapInt16Int32X(yyv2089, d) + z.F.DecMapInt16Int32X(&x.FMapInt16Int32, d) } } - if x.FptrMapInt16Int32 == nil { - x.FptrMapInt16Int32 = new(map[int16]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Int32 != nil { + if true && x.FptrMapInt16Int32 != nil { x.FptrMapInt16Int32 = nil } } else { if x.FptrMapInt16Int32 == nil { x.FptrMapInt16Int32 = new(map[int16]int32) } - yym2092 := z.DecBinary() - _ = yym2092 + if false { } else { z.F.DecMapInt16Int32X(x.FptrMapInt16Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41296,50 +35374,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Int64 = nil } else { - yyv2093 := &x.FMapInt16Int64 - yym2094 := z.DecBinary() - _ = yym2094 if false { } else { - z.F.DecMapInt16Int64X(yyv2093, d) + z.F.DecMapInt16Int64X(&x.FMapInt16Int64, d) } } - if x.FptrMapInt16Int64 == nil { - x.FptrMapInt16Int64 = new(map[int16]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Int64 != nil { + if true && x.FptrMapInt16Int64 != nil { x.FptrMapInt16Int64 = nil } } else { if x.FptrMapInt16Int64 == nil { x.FptrMapInt16Int64 = new(map[int16]int64) } - yym2096 := z.DecBinary() - _ = yym2096 + if false { } else { z.F.DecMapInt16Int64X(x.FptrMapInt16Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41347,50 +35418,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Float32 = nil } else { - yyv2097 := &x.FMapInt16Float32 - yym2098 := z.DecBinary() - _ = yym2098 if false { } else { - z.F.DecMapInt16Float32X(yyv2097, d) + z.F.DecMapInt16Float32X(&x.FMapInt16Float32, d) } } - if x.FptrMapInt16Float32 == nil { - x.FptrMapInt16Float32 = new(map[int16]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Float32 != nil { + if true && x.FptrMapInt16Float32 != nil { x.FptrMapInt16Float32 = nil } } else { if x.FptrMapInt16Float32 == nil { x.FptrMapInt16Float32 = new(map[int16]float32) } - yym2100 := z.DecBinary() - _ = yym2100 + if false { } else { z.F.DecMapInt16Float32X(x.FptrMapInt16Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41398,50 +35462,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Float64 = nil } else { - yyv2101 := &x.FMapInt16Float64 - yym2102 := z.DecBinary() - _ = yym2102 if false { } else { - z.F.DecMapInt16Float64X(yyv2101, d) + z.F.DecMapInt16Float64X(&x.FMapInt16Float64, d) } } - if x.FptrMapInt16Float64 == nil { - x.FptrMapInt16Float64 = new(map[int16]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Float64 != nil { + if true && x.FptrMapInt16Float64 != nil { x.FptrMapInt16Float64 = nil } } else { if x.FptrMapInt16Float64 == nil { x.FptrMapInt16Float64 = new(map[int16]float64) } - yym2104 := z.DecBinary() - _ = yym2104 + if false { } else { z.F.DecMapInt16Float64X(x.FptrMapInt16Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41449,50 +35506,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt16Bool = nil } else { - yyv2105 := &x.FMapInt16Bool - yym2106 := z.DecBinary() - _ = yym2106 if false { } else { - z.F.DecMapInt16BoolX(yyv2105, d) + z.F.DecMapInt16BoolX(&x.FMapInt16Bool, d) } } - if x.FptrMapInt16Bool == nil { - x.FptrMapInt16Bool = new(map[int16]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt16Bool != nil { + if true && x.FptrMapInt16Bool != nil { x.FptrMapInt16Bool = nil } } else { if x.FptrMapInt16Bool == nil { x.FptrMapInt16Bool = new(map[int16]bool) } - yym2108 := z.DecBinary() - _ = yym2108 + if false { } else { z.F.DecMapInt16BoolX(x.FptrMapInt16Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41500,50 +35550,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Intf = nil } else { - yyv2109 := &x.FMapInt32Intf - yym2110 := z.DecBinary() - _ = yym2110 if false { } else { - z.F.DecMapInt32IntfX(yyv2109, d) + z.F.DecMapInt32IntfX(&x.FMapInt32Intf, d) } } - if x.FptrMapInt32Intf == nil { - x.FptrMapInt32Intf = new(map[int32]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Intf != nil { + if true && x.FptrMapInt32Intf != nil { x.FptrMapInt32Intf = nil } } else { if x.FptrMapInt32Intf == nil { x.FptrMapInt32Intf = new(map[int32]interface{}) } - yym2112 := z.DecBinary() - _ = yym2112 + if false { } else { z.F.DecMapInt32IntfX(x.FptrMapInt32Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41551,50 +35594,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32String = nil } else { - yyv2113 := &x.FMapInt32String - yym2114 := z.DecBinary() - _ = yym2114 if false { } else { - z.F.DecMapInt32StringX(yyv2113, d) + z.F.DecMapInt32StringX(&x.FMapInt32String, d) } } - if x.FptrMapInt32String == nil { - x.FptrMapInt32String = new(map[int32]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32String != nil { + if true && x.FptrMapInt32String != nil { x.FptrMapInt32String = nil } } else { if x.FptrMapInt32String == nil { x.FptrMapInt32String = new(map[int32]string) } - yym2116 := z.DecBinary() - _ = yym2116 + if false { } else { z.F.DecMapInt32StringX(x.FptrMapInt32String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41602,50 +35638,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint = nil } else { - yyv2117 := &x.FMapInt32Uint - yym2118 := z.DecBinary() - _ = yym2118 if false { } else { - z.F.DecMapInt32UintX(yyv2117, d) + z.F.DecMapInt32UintX(&x.FMapInt32Uint, d) } } - if x.FptrMapInt32Uint == nil { - x.FptrMapInt32Uint = new(map[int32]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint != nil { + if true && x.FptrMapInt32Uint != nil { x.FptrMapInt32Uint = nil } } else { if x.FptrMapInt32Uint == nil { x.FptrMapInt32Uint = new(map[int32]uint) } - yym2120 := z.DecBinary() - _ = yym2120 + if false { } else { z.F.DecMapInt32UintX(x.FptrMapInt32Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41653,50 +35682,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint8 = nil } else { - yyv2121 := &x.FMapInt32Uint8 - yym2122 := z.DecBinary() - _ = yym2122 if false { } else { - z.F.DecMapInt32Uint8X(yyv2121, d) + z.F.DecMapInt32Uint8X(&x.FMapInt32Uint8, d) } } - if x.FptrMapInt32Uint8 == nil { - x.FptrMapInt32Uint8 = new(map[int32]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint8 != nil { + if true && x.FptrMapInt32Uint8 != nil { x.FptrMapInt32Uint8 = nil } } else { if x.FptrMapInt32Uint8 == nil { x.FptrMapInt32Uint8 = new(map[int32]uint8) } - yym2124 := z.DecBinary() - _ = yym2124 + if false { } else { z.F.DecMapInt32Uint8X(x.FptrMapInt32Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41704,50 +35726,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint16 = nil } else { - yyv2125 := &x.FMapInt32Uint16 - yym2126 := z.DecBinary() - _ = yym2126 if false { } else { - z.F.DecMapInt32Uint16X(yyv2125, d) + z.F.DecMapInt32Uint16X(&x.FMapInt32Uint16, d) } } - if x.FptrMapInt32Uint16 == nil { - x.FptrMapInt32Uint16 = new(map[int32]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint16 != nil { + if true && x.FptrMapInt32Uint16 != nil { x.FptrMapInt32Uint16 = nil } } else { if x.FptrMapInt32Uint16 == nil { x.FptrMapInt32Uint16 = new(map[int32]uint16) } - yym2128 := z.DecBinary() - _ = yym2128 + if false { } else { z.F.DecMapInt32Uint16X(x.FptrMapInt32Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41755,50 +35770,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint32 = nil } else { - yyv2129 := &x.FMapInt32Uint32 - yym2130 := z.DecBinary() - _ = yym2130 if false { } else { - z.F.DecMapInt32Uint32X(yyv2129, d) + z.F.DecMapInt32Uint32X(&x.FMapInt32Uint32, d) } } - if x.FptrMapInt32Uint32 == nil { - x.FptrMapInt32Uint32 = new(map[int32]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint32 != nil { + if true && x.FptrMapInt32Uint32 != nil { x.FptrMapInt32Uint32 = nil } } else { if x.FptrMapInt32Uint32 == nil { x.FptrMapInt32Uint32 = new(map[int32]uint32) } - yym2132 := z.DecBinary() - _ = yym2132 + if false { } else { z.F.DecMapInt32Uint32X(x.FptrMapInt32Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41806,50 +35814,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uint64 = nil } else { - yyv2133 := &x.FMapInt32Uint64 - yym2134 := z.DecBinary() - _ = yym2134 if false { } else { - z.F.DecMapInt32Uint64X(yyv2133, d) + z.F.DecMapInt32Uint64X(&x.FMapInt32Uint64, d) } } - if x.FptrMapInt32Uint64 == nil { - x.FptrMapInt32Uint64 = new(map[int32]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uint64 != nil { + if true && x.FptrMapInt32Uint64 != nil { x.FptrMapInt32Uint64 = nil } } else { if x.FptrMapInt32Uint64 == nil { x.FptrMapInt32Uint64 = new(map[int32]uint64) } - yym2136 := z.DecBinary() - _ = yym2136 + if false { } else { z.F.DecMapInt32Uint64X(x.FptrMapInt32Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41857,50 +35858,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Uintptr = nil } else { - yyv2137 := &x.FMapInt32Uintptr - yym2138 := z.DecBinary() - _ = yym2138 if false { } else { - z.F.DecMapInt32UintptrX(yyv2137, d) + z.F.DecMapInt32UintptrX(&x.FMapInt32Uintptr, d) } } - if x.FptrMapInt32Uintptr == nil { - x.FptrMapInt32Uintptr = new(map[int32]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Uintptr != nil { + if true && x.FptrMapInt32Uintptr != nil { x.FptrMapInt32Uintptr = nil } } else { if x.FptrMapInt32Uintptr == nil { x.FptrMapInt32Uintptr = new(map[int32]uintptr) } - yym2140 := z.DecBinary() - _ = yym2140 + if false { } else { z.F.DecMapInt32UintptrX(x.FptrMapInt32Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41908,50 +35902,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int = nil } else { - yyv2141 := &x.FMapInt32Int - yym2142 := z.DecBinary() - _ = yym2142 if false { } else { - z.F.DecMapInt32IntX(yyv2141, d) + z.F.DecMapInt32IntX(&x.FMapInt32Int, d) } } - if x.FptrMapInt32Int == nil { - x.FptrMapInt32Int = new(map[int32]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Int != nil { + if true && x.FptrMapInt32Int != nil { x.FptrMapInt32Int = nil } } else { if x.FptrMapInt32Int == nil { x.FptrMapInt32Int = new(map[int32]int) } - yym2144 := z.DecBinary() - _ = yym2144 + if false { } else { z.F.DecMapInt32IntX(x.FptrMapInt32Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -41959,50 +35946,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int8 = nil } else { - yyv2145 := &x.FMapInt32Int8 - yym2146 := z.DecBinary() - _ = yym2146 if false { } else { - z.F.DecMapInt32Int8X(yyv2145, d) + z.F.DecMapInt32Int8X(&x.FMapInt32Int8, d) } } - if x.FptrMapInt32Int8 == nil { - x.FptrMapInt32Int8 = new(map[int32]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Int8 != nil { + if true && x.FptrMapInt32Int8 != nil { x.FptrMapInt32Int8 = nil } } else { if x.FptrMapInt32Int8 == nil { x.FptrMapInt32Int8 = new(map[int32]int8) } - yym2148 := z.DecBinary() - _ = yym2148 + if false { } else { z.F.DecMapInt32Int8X(x.FptrMapInt32Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42010,50 +35990,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int16 = nil } else { - yyv2149 := &x.FMapInt32Int16 - yym2150 := z.DecBinary() - _ = yym2150 if false { } else { - z.F.DecMapInt32Int16X(yyv2149, d) + z.F.DecMapInt32Int16X(&x.FMapInt32Int16, d) } } - if x.FptrMapInt32Int16 == nil { - x.FptrMapInt32Int16 = new(map[int32]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Int16 != nil { + if true && x.FptrMapInt32Int16 != nil { x.FptrMapInt32Int16 = nil } } else { if x.FptrMapInt32Int16 == nil { x.FptrMapInt32Int16 = new(map[int32]int16) } - yym2152 := z.DecBinary() - _ = yym2152 + if false { } else { z.F.DecMapInt32Int16X(x.FptrMapInt32Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42061,50 +36034,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int32 = nil } else { - yyv2153 := &x.FMapInt32Int32 - yym2154 := z.DecBinary() - _ = yym2154 if false { } else { - z.F.DecMapInt32Int32X(yyv2153, d) + z.F.DecMapInt32Int32X(&x.FMapInt32Int32, d) } } - if x.FptrMapInt32Int32 == nil { - x.FptrMapInt32Int32 = new(map[int32]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Int32 != nil { + if true && x.FptrMapInt32Int32 != nil { x.FptrMapInt32Int32 = nil } } else { if x.FptrMapInt32Int32 == nil { x.FptrMapInt32Int32 = new(map[int32]int32) } - yym2156 := z.DecBinary() - _ = yym2156 + if false { } else { z.F.DecMapInt32Int32X(x.FptrMapInt32Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42112,50 +36078,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Int64 = nil } else { - yyv2157 := &x.FMapInt32Int64 - yym2158 := z.DecBinary() - _ = yym2158 if false { } else { - z.F.DecMapInt32Int64X(yyv2157, d) + z.F.DecMapInt32Int64X(&x.FMapInt32Int64, d) } } - if x.FptrMapInt32Int64 == nil { - x.FptrMapInt32Int64 = new(map[int32]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Int64 != nil { + if true && x.FptrMapInt32Int64 != nil { x.FptrMapInt32Int64 = nil } } else { if x.FptrMapInt32Int64 == nil { x.FptrMapInt32Int64 = new(map[int32]int64) } - yym2160 := z.DecBinary() - _ = yym2160 + if false { } else { z.F.DecMapInt32Int64X(x.FptrMapInt32Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42163,50 +36122,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Float32 = nil } else { - yyv2161 := &x.FMapInt32Float32 - yym2162 := z.DecBinary() - _ = yym2162 if false { } else { - z.F.DecMapInt32Float32X(yyv2161, d) + z.F.DecMapInt32Float32X(&x.FMapInt32Float32, d) } } - if x.FptrMapInt32Float32 == nil { - x.FptrMapInt32Float32 = new(map[int32]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Float32 != nil { + if true && x.FptrMapInt32Float32 != nil { x.FptrMapInt32Float32 = nil } } else { if x.FptrMapInt32Float32 == nil { x.FptrMapInt32Float32 = new(map[int32]float32) } - yym2164 := z.DecBinary() - _ = yym2164 + if false { } else { z.F.DecMapInt32Float32X(x.FptrMapInt32Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42214,50 +36166,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Float64 = nil } else { - yyv2165 := &x.FMapInt32Float64 - yym2166 := z.DecBinary() - _ = yym2166 if false { } else { - z.F.DecMapInt32Float64X(yyv2165, d) + z.F.DecMapInt32Float64X(&x.FMapInt32Float64, d) } } - if x.FptrMapInt32Float64 == nil { - x.FptrMapInt32Float64 = new(map[int32]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Float64 != nil { + if true && x.FptrMapInt32Float64 != nil { x.FptrMapInt32Float64 = nil } } else { if x.FptrMapInt32Float64 == nil { x.FptrMapInt32Float64 = new(map[int32]float64) } - yym2168 := z.DecBinary() - _ = yym2168 + if false { } else { z.F.DecMapInt32Float64X(x.FptrMapInt32Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42265,50 +36210,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt32Bool = nil } else { - yyv2169 := &x.FMapInt32Bool - yym2170 := z.DecBinary() - _ = yym2170 if false { } else { - z.F.DecMapInt32BoolX(yyv2169, d) + z.F.DecMapInt32BoolX(&x.FMapInt32Bool, d) } } - if x.FptrMapInt32Bool == nil { - x.FptrMapInt32Bool = new(map[int32]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt32Bool != nil { + if true && x.FptrMapInt32Bool != nil { x.FptrMapInt32Bool = nil } } else { if x.FptrMapInt32Bool == nil { x.FptrMapInt32Bool = new(map[int32]bool) } - yym2172 := z.DecBinary() - _ = yym2172 + if false { } else { z.F.DecMapInt32BoolX(x.FptrMapInt32Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42316,50 +36254,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Intf = nil } else { - yyv2173 := &x.FMapInt64Intf - yym2174 := z.DecBinary() - _ = yym2174 if false { } else { - z.F.DecMapInt64IntfX(yyv2173, d) + z.F.DecMapInt64IntfX(&x.FMapInt64Intf, d) } } - if x.FptrMapInt64Intf == nil { - x.FptrMapInt64Intf = new(map[int64]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Intf != nil { + if true && x.FptrMapInt64Intf != nil { x.FptrMapInt64Intf = nil } } else { if x.FptrMapInt64Intf == nil { x.FptrMapInt64Intf = new(map[int64]interface{}) } - yym2176 := z.DecBinary() - _ = yym2176 + if false { } else { z.F.DecMapInt64IntfX(x.FptrMapInt64Intf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42367,50 +36298,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64String = nil } else { - yyv2177 := &x.FMapInt64String - yym2178 := z.DecBinary() - _ = yym2178 if false { } else { - z.F.DecMapInt64StringX(yyv2177, d) + z.F.DecMapInt64StringX(&x.FMapInt64String, d) } } - if x.FptrMapInt64String == nil { - x.FptrMapInt64String = new(map[int64]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64String != nil { + if true && x.FptrMapInt64String != nil { x.FptrMapInt64String = nil } } else { if x.FptrMapInt64String == nil { x.FptrMapInt64String = new(map[int64]string) } - yym2180 := z.DecBinary() - _ = yym2180 + if false { } else { z.F.DecMapInt64StringX(x.FptrMapInt64String, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42418,50 +36342,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint = nil } else { - yyv2181 := &x.FMapInt64Uint - yym2182 := z.DecBinary() - _ = yym2182 if false { } else { - z.F.DecMapInt64UintX(yyv2181, d) + z.F.DecMapInt64UintX(&x.FMapInt64Uint, d) } } - if x.FptrMapInt64Uint == nil { - x.FptrMapInt64Uint = new(map[int64]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint != nil { + if true && x.FptrMapInt64Uint != nil { x.FptrMapInt64Uint = nil } } else { if x.FptrMapInt64Uint == nil { x.FptrMapInt64Uint = new(map[int64]uint) } - yym2184 := z.DecBinary() - _ = yym2184 + if false { } else { z.F.DecMapInt64UintX(x.FptrMapInt64Uint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42469,50 +36386,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint8 = nil } else { - yyv2185 := &x.FMapInt64Uint8 - yym2186 := z.DecBinary() - _ = yym2186 if false { } else { - z.F.DecMapInt64Uint8X(yyv2185, d) + z.F.DecMapInt64Uint8X(&x.FMapInt64Uint8, d) } } - if x.FptrMapInt64Uint8 == nil { - x.FptrMapInt64Uint8 = new(map[int64]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint8 != nil { + if true && x.FptrMapInt64Uint8 != nil { x.FptrMapInt64Uint8 = nil } } else { if x.FptrMapInt64Uint8 == nil { x.FptrMapInt64Uint8 = new(map[int64]uint8) } - yym2188 := z.DecBinary() - _ = yym2188 + if false { } else { z.F.DecMapInt64Uint8X(x.FptrMapInt64Uint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42520,50 +36430,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint16 = nil } else { - yyv2189 := &x.FMapInt64Uint16 - yym2190 := z.DecBinary() - _ = yym2190 if false { } else { - z.F.DecMapInt64Uint16X(yyv2189, d) + z.F.DecMapInt64Uint16X(&x.FMapInt64Uint16, d) } } - if x.FptrMapInt64Uint16 == nil { - x.FptrMapInt64Uint16 = new(map[int64]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint16 != nil { + if true && x.FptrMapInt64Uint16 != nil { x.FptrMapInt64Uint16 = nil } } else { if x.FptrMapInt64Uint16 == nil { x.FptrMapInt64Uint16 = new(map[int64]uint16) } - yym2192 := z.DecBinary() - _ = yym2192 + if false { } else { z.F.DecMapInt64Uint16X(x.FptrMapInt64Uint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42571,50 +36474,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint32 = nil } else { - yyv2193 := &x.FMapInt64Uint32 - yym2194 := z.DecBinary() - _ = yym2194 if false { } else { - z.F.DecMapInt64Uint32X(yyv2193, d) + z.F.DecMapInt64Uint32X(&x.FMapInt64Uint32, d) } } - if x.FptrMapInt64Uint32 == nil { - x.FptrMapInt64Uint32 = new(map[int64]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint32 != nil { + if true && x.FptrMapInt64Uint32 != nil { x.FptrMapInt64Uint32 = nil } } else { if x.FptrMapInt64Uint32 == nil { x.FptrMapInt64Uint32 = new(map[int64]uint32) } - yym2196 := z.DecBinary() - _ = yym2196 + if false { } else { z.F.DecMapInt64Uint32X(x.FptrMapInt64Uint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42622,50 +36518,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uint64 = nil } else { - yyv2197 := &x.FMapInt64Uint64 - yym2198 := z.DecBinary() - _ = yym2198 if false { } else { - z.F.DecMapInt64Uint64X(yyv2197, d) + z.F.DecMapInt64Uint64X(&x.FMapInt64Uint64, d) } } - if x.FptrMapInt64Uint64 == nil { - x.FptrMapInt64Uint64 = new(map[int64]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uint64 != nil { + if true && x.FptrMapInt64Uint64 != nil { x.FptrMapInt64Uint64 = nil } } else { if x.FptrMapInt64Uint64 == nil { x.FptrMapInt64Uint64 = new(map[int64]uint64) } - yym2200 := z.DecBinary() - _ = yym2200 + if false { } else { z.F.DecMapInt64Uint64X(x.FptrMapInt64Uint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42673,50 +36562,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Uintptr = nil } else { - yyv2201 := &x.FMapInt64Uintptr - yym2202 := z.DecBinary() - _ = yym2202 if false { } else { - z.F.DecMapInt64UintptrX(yyv2201, d) + z.F.DecMapInt64UintptrX(&x.FMapInt64Uintptr, d) } } - if x.FptrMapInt64Uintptr == nil { - x.FptrMapInt64Uintptr = new(map[int64]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Uintptr != nil { + if true && x.FptrMapInt64Uintptr != nil { x.FptrMapInt64Uintptr = nil } } else { if x.FptrMapInt64Uintptr == nil { x.FptrMapInt64Uintptr = new(map[int64]uintptr) } - yym2204 := z.DecBinary() - _ = yym2204 + if false { } else { z.F.DecMapInt64UintptrX(x.FptrMapInt64Uintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42724,50 +36606,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int = nil } else { - yyv2205 := &x.FMapInt64Int - yym2206 := z.DecBinary() - _ = yym2206 if false { } else { - z.F.DecMapInt64IntX(yyv2205, d) + z.F.DecMapInt64IntX(&x.FMapInt64Int, d) } } - if x.FptrMapInt64Int == nil { - x.FptrMapInt64Int = new(map[int64]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Int != nil { + if true && x.FptrMapInt64Int != nil { x.FptrMapInt64Int = nil } } else { if x.FptrMapInt64Int == nil { x.FptrMapInt64Int = new(map[int64]int) } - yym2208 := z.DecBinary() - _ = yym2208 + if false { } else { z.F.DecMapInt64IntX(x.FptrMapInt64Int, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42775,50 +36650,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int8 = nil } else { - yyv2209 := &x.FMapInt64Int8 - yym2210 := z.DecBinary() - _ = yym2210 if false { } else { - z.F.DecMapInt64Int8X(yyv2209, d) + z.F.DecMapInt64Int8X(&x.FMapInt64Int8, d) } } - if x.FptrMapInt64Int8 == nil { - x.FptrMapInt64Int8 = new(map[int64]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Int8 != nil { + if true && x.FptrMapInt64Int8 != nil { x.FptrMapInt64Int8 = nil } } else { if x.FptrMapInt64Int8 == nil { x.FptrMapInt64Int8 = new(map[int64]int8) } - yym2212 := z.DecBinary() - _ = yym2212 + if false { } else { z.F.DecMapInt64Int8X(x.FptrMapInt64Int8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42826,50 +36694,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int16 = nil } else { - yyv2213 := &x.FMapInt64Int16 - yym2214 := z.DecBinary() - _ = yym2214 if false { } else { - z.F.DecMapInt64Int16X(yyv2213, d) + z.F.DecMapInt64Int16X(&x.FMapInt64Int16, d) } } - if x.FptrMapInt64Int16 == nil { - x.FptrMapInt64Int16 = new(map[int64]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Int16 != nil { + if true && x.FptrMapInt64Int16 != nil { x.FptrMapInt64Int16 = nil } } else { if x.FptrMapInt64Int16 == nil { x.FptrMapInt64Int16 = new(map[int64]int16) } - yym2216 := z.DecBinary() - _ = yym2216 + if false { } else { z.F.DecMapInt64Int16X(x.FptrMapInt64Int16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42877,50 +36738,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int32 = nil } else { - yyv2217 := &x.FMapInt64Int32 - yym2218 := z.DecBinary() - _ = yym2218 if false { } else { - z.F.DecMapInt64Int32X(yyv2217, d) + z.F.DecMapInt64Int32X(&x.FMapInt64Int32, d) } } - if x.FptrMapInt64Int32 == nil { - x.FptrMapInt64Int32 = new(map[int64]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Int32 != nil { + if true && x.FptrMapInt64Int32 != nil { x.FptrMapInt64Int32 = nil } } else { if x.FptrMapInt64Int32 == nil { x.FptrMapInt64Int32 = new(map[int64]int32) } - yym2220 := z.DecBinary() - _ = yym2220 + if false { } else { z.F.DecMapInt64Int32X(x.FptrMapInt64Int32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42928,50 +36782,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Int64 = nil } else { - yyv2221 := &x.FMapInt64Int64 - yym2222 := z.DecBinary() - _ = yym2222 if false { } else { - z.F.DecMapInt64Int64X(yyv2221, d) + z.F.DecMapInt64Int64X(&x.FMapInt64Int64, d) } } - if x.FptrMapInt64Int64 == nil { - x.FptrMapInt64Int64 = new(map[int64]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Int64 != nil { + if true && x.FptrMapInt64Int64 != nil { x.FptrMapInt64Int64 = nil } } else { if x.FptrMapInt64Int64 == nil { x.FptrMapInt64Int64 = new(map[int64]int64) } - yym2224 := z.DecBinary() - _ = yym2224 + if false { } else { z.F.DecMapInt64Int64X(x.FptrMapInt64Int64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -42979,50 +36826,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Float32 = nil } else { - yyv2225 := &x.FMapInt64Float32 - yym2226 := z.DecBinary() - _ = yym2226 if false { } else { - z.F.DecMapInt64Float32X(yyv2225, d) + z.F.DecMapInt64Float32X(&x.FMapInt64Float32, d) } } - if x.FptrMapInt64Float32 == nil { - x.FptrMapInt64Float32 = new(map[int64]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Float32 != nil { + if true && x.FptrMapInt64Float32 != nil { x.FptrMapInt64Float32 = nil } } else { if x.FptrMapInt64Float32 == nil { x.FptrMapInt64Float32 = new(map[int64]float32) } - yym2228 := z.DecBinary() - _ = yym2228 + if false { } else { z.F.DecMapInt64Float32X(x.FptrMapInt64Float32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43030,50 +36870,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Float64 = nil } else { - yyv2229 := &x.FMapInt64Float64 - yym2230 := z.DecBinary() - _ = yym2230 if false { } else { - z.F.DecMapInt64Float64X(yyv2229, d) + z.F.DecMapInt64Float64X(&x.FMapInt64Float64, d) } } - if x.FptrMapInt64Float64 == nil { - x.FptrMapInt64Float64 = new(map[int64]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Float64 != nil { + if true && x.FptrMapInt64Float64 != nil { x.FptrMapInt64Float64 = nil } } else { if x.FptrMapInt64Float64 == nil { x.FptrMapInt64Float64 = new(map[int64]float64) } - yym2232 := z.DecBinary() - _ = yym2232 + if false { } else { z.F.DecMapInt64Float64X(x.FptrMapInt64Float64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43081,50 +36914,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapInt64Bool = nil } else { - yyv2233 := &x.FMapInt64Bool - yym2234 := z.DecBinary() - _ = yym2234 if false { } else { - z.F.DecMapInt64BoolX(yyv2233, d) + z.F.DecMapInt64BoolX(&x.FMapInt64Bool, d) } } - if x.FptrMapInt64Bool == nil { - x.FptrMapInt64Bool = new(map[int64]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapInt64Bool != nil { + if true && x.FptrMapInt64Bool != nil { x.FptrMapInt64Bool = nil } } else { if x.FptrMapInt64Bool == nil { x.FptrMapInt64Bool = new(map[int64]bool) } - yym2236 := z.DecBinary() - _ = yym2236 + if false { } else { z.F.DecMapInt64BoolX(x.FptrMapInt64Bool, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43132,50 +36958,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolIntf = nil } else { - yyv2237 := &x.FMapBoolIntf - yym2238 := z.DecBinary() - _ = yym2238 if false { } else { - z.F.DecMapBoolIntfX(yyv2237, d) + z.F.DecMapBoolIntfX(&x.FMapBoolIntf, d) } } - if x.FptrMapBoolIntf == nil { - x.FptrMapBoolIntf = new(map[bool]interface{}) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolIntf != nil { + if true && x.FptrMapBoolIntf != nil { x.FptrMapBoolIntf = nil } } else { if x.FptrMapBoolIntf == nil { x.FptrMapBoolIntf = new(map[bool]interface{}) } - yym2240 := z.DecBinary() - _ = yym2240 + if false { } else { z.F.DecMapBoolIntfX(x.FptrMapBoolIntf, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43183,50 +37002,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolString = nil } else { - yyv2241 := &x.FMapBoolString - yym2242 := z.DecBinary() - _ = yym2242 if false { } else { - z.F.DecMapBoolStringX(yyv2241, d) + z.F.DecMapBoolStringX(&x.FMapBoolString, d) } } - if x.FptrMapBoolString == nil { - x.FptrMapBoolString = new(map[bool]string) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolString != nil { + if true && x.FptrMapBoolString != nil { x.FptrMapBoolString = nil } } else { if x.FptrMapBoolString == nil { x.FptrMapBoolString = new(map[bool]string) } - yym2244 := z.DecBinary() - _ = yym2244 + if false { } else { z.F.DecMapBoolStringX(x.FptrMapBoolString, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43234,50 +37046,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint = nil } else { - yyv2245 := &x.FMapBoolUint - yym2246 := z.DecBinary() - _ = yym2246 if false { } else { - z.F.DecMapBoolUintX(yyv2245, d) + z.F.DecMapBoolUintX(&x.FMapBoolUint, d) } } - if x.FptrMapBoolUint == nil { - x.FptrMapBoolUint = new(map[bool]uint) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUint != nil { + if true && x.FptrMapBoolUint != nil { x.FptrMapBoolUint = nil } } else { if x.FptrMapBoolUint == nil { x.FptrMapBoolUint = new(map[bool]uint) } - yym2248 := z.DecBinary() - _ = yym2248 + if false { } else { z.F.DecMapBoolUintX(x.FptrMapBoolUint, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43285,50 +37090,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint8 = nil } else { - yyv2249 := &x.FMapBoolUint8 - yym2250 := z.DecBinary() - _ = yym2250 if false { } else { - z.F.DecMapBoolUint8X(yyv2249, d) + z.F.DecMapBoolUint8X(&x.FMapBoolUint8, d) } } - if x.FptrMapBoolUint8 == nil { - x.FptrMapBoolUint8 = new(map[bool]uint8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUint8 != nil { + if true && x.FptrMapBoolUint8 != nil { x.FptrMapBoolUint8 = nil } } else { if x.FptrMapBoolUint8 == nil { x.FptrMapBoolUint8 = new(map[bool]uint8) } - yym2252 := z.DecBinary() - _ = yym2252 + if false { } else { z.F.DecMapBoolUint8X(x.FptrMapBoolUint8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43336,50 +37134,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint16 = nil } else { - yyv2253 := &x.FMapBoolUint16 - yym2254 := z.DecBinary() - _ = yym2254 if false { } else { - z.F.DecMapBoolUint16X(yyv2253, d) + z.F.DecMapBoolUint16X(&x.FMapBoolUint16, d) } } - if x.FptrMapBoolUint16 == nil { - x.FptrMapBoolUint16 = new(map[bool]uint16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUint16 != nil { + if true && x.FptrMapBoolUint16 != nil { x.FptrMapBoolUint16 = nil } } else { if x.FptrMapBoolUint16 == nil { x.FptrMapBoolUint16 = new(map[bool]uint16) } - yym2256 := z.DecBinary() - _ = yym2256 + if false { } else { z.F.DecMapBoolUint16X(x.FptrMapBoolUint16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43387,50 +37178,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint32 = nil } else { - yyv2257 := &x.FMapBoolUint32 - yym2258 := z.DecBinary() - _ = yym2258 if false { } else { - z.F.DecMapBoolUint32X(yyv2257, d) + z.F.DecMapBoolUint32X(&x.FMapBoolUint32, d) } } - if x.FptrMapBoolUint32 == nil { - x.FptrMapBoolUint32 = new(map[bool]uint32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUint32 != nil { + if true && x.FptrMapBoolUint32 != nil { x.FptrMapBoolUint32 = nil } } else { if x.FptrMapBoolUint32 == nil { x.FptrMapBoolUint32 = new(map[bool]uint32) } - yym2260 := z.DecBinary() - _ = yym2260 + if false { } else { z.F.DecMapBoolUint32X(x.FptrMapBoolUint32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43438,50 +37222,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUint64 = nil } else { - yyv2261 := &x.FMapBoolUint64 - yym2262 := z.DecBinary() - _ = yym2262 if false { } else { - z.F.DecMapBoolUint64X(yyv2261, d) + z.F.DecMapBoolUint64X(&x.FMapBoolUint64, d) } } - if x.FptrMapBoolUint64 == nil { - x.FptrMapBoolUint64 = new(map[bool]uint64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUint64 != nil { + if true && x.FptrMapBoolUint64 != nil { x.FptrMapBoolUint64 = nil } } else { if x.FptrMapBoolUint64 == nil { x.FptrMapBoolUint64 = new(map[bool]uint64) } - yym2264 := z.DecBinary() - _ = yym2264 + if false { } else { z.F.DecMapBoolUint64X(x.FptrMapBoolUint64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43489,50 +37266,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolUintptr = nil } else { - yyv2265 := &x.FMapBoolUintptr - yym2266 := z.DecBinary() - _ = yym2266 if false { } else { - z.F.DecMapBoolUintptrX(yyv2265, d) + z.F.DecMapBoolUintptrX(&x.FMapBoolUintptr, d) } } - if x.FptrMapBoolUintptr == nil { - x.FptrMapBoolUintptr = new(map[bool]uintptr) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolUintptr != nil { + if true && x.FptrMapBoolUintptr != nil { x.FptrMapBoolUintptr = nil } } else { if x.FptrMapBoolUintptr == nil { x.FptrMapBoolUintptr = new(map[bool]uintptr) } - yym2268 := z.DecBinary() - _ = yym2268 + if false { } else { z.F.DecMapBoolUintptrX(x.FptrMapBoolUintptr, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43540,50 +37310,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt = nil } else { - yyv2269 := &x.FMapBoolInt - yym2270 := z.DecBinary() - _ = yym2270 if false { } else { - z.F.DecMapBoolIntX(yyv2269, d) + z.F.DecMapBoolIntX(&x.FMapBoolInt, d) } } - if x.FptrMapBoolInt == nil { - x.FptrMapBoolInt = new(map[bool]int) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolInt != nil { + if true && x.FptrMapBoolInt != nil { x.FptrMapBoolInt = nil } } else { if x.FptrMapBoolInt == nil { x.FptrMapBoolInt = new(map[bool]int) } - yym2272 := z.DecBinary() - _ = yym2272 + if false { } else { z.F.DecMapBoolIntX(x.FptrMapBoolInt, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43591,50 +37354,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt8 = nil } else { - yyv2273 := &x.FMapBoolInt8 - yym2274 := z.DecBinary() - _ = yym2274 if false { } else { - z.F.DecMapBoolInt8X(yyv2273, d) + z.F.DecMapBoolInt8X(&x.FMapBoolInt8, d) } } - if x.FptrMapBoolInt8 == nil { - x.FptrMapBoolInt8 = new(map[bool]int8) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolInt8 != nil { + if true && x.FptrMapBoolInt8 != nil { x.FptrMapBoolInt8 = nil } } else { if x.FptrMapBoolInt8 == nil { x.FptrMapBoolInt8 = new(map[bool]int8) } - yym2276 := z.DecBinary() - _ = yym2276 + if false { } else { z.F.DecMapBoolInt8X(x.FptrMapBoolInt8, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43642,50 +37398,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt16 = nil } else { - yyv2277 := &x.FMapBoolInt16 - yym2278 := z.DecBinary() - _ = yym2278 if false { } else { - z.F.DecMapBoolInt16X(yyv2277, d) + z.F.DecMapBoolInt16X(&x.FMapBoolInt16, d) } } - if x.FptrMapBoolInt16 == nil { - x.FptrMapBoolInt16 = new(map[bool]int16) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolInt16 != nil { + if true && x.FptrMapBoolInt16 != nil { x.FptrMapBoolInt16 = nil } } else { if x.FptrMapBoolInt16 == nil { x.FptrMapBoolInt16 = new(map[bool]int16) } - yym2280 := z.DecBinary() - _ = yym2280 + if false { } else { z.F.DecMapBoolInt16X(x.FptrMapBoolInt16, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43693,50 +37442,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt32 = nil } else { - yyv2281 := &x.FMapBoolInt32 - yym2282 := z.DecBinary() - _ = yym2282 if false { } else { - z.F.DecMapBoolInt32X(yyv2281, d) + z.F.DecMapBoolInt32X(&x.FMapBoolInt32, d) } } - if x.FptrMapBoolInt32 == nil { - x.FptrMapBoolInt32 = new(map[bool]int32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolInt32 != nil { + if true && x.FptrMapBoolInt32 != nil { x.FptrMapBoolInt32 = nil } } else { if x.FptrMapBoolInt32 == nil { x.FptrMapBoolInt32 = new(map[bool]int32) } - yym2284 := z.DecBinary() - _ = yym2284 + if false { } else { z.F.DecMapBoolInt32X(x.FptrMapBoolInt32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43744,50 +37486,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolInt64 = nil } else { - yyv2285 := &x.FMapBoolInt64 - yym2286 := z.DecBinary() - _ = yym2286 if false { } else { - z.F.DecMapBoolInt64X(yyv2285, d) + z.F.DecMapBoolInt64X(&x.FMapBoolInt64, d) } } - if x.FptrMapBoolInt64 == nil { - x.FptrMapBoolInt64 = new(map[bool]int64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolInt64 != nil { + if true && x.FptrMapBoolInt64 != nil { x.FptrMapBoolInt64 = nil } } else { if x.FptrMapBoolInt64 == nil { x.FptrMapBoolInt64 = new(map[bool]int64) } - yym2288 := z.DecBinary() - _ = yym2288 + if false { } else { z.F.DecMapBoolInt64X(x.FptrMapBoolInt64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43795,50 +37530,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolFloat32 = nil } else { - yyv2289 := &x.FMapBoolFloat32 - yym2290 := z.DecBinary() - _ = yym2290 if false { } else { - z.F.DecMapBoolFloat32X(yyv2289, d) + z.F.DecMapBoolFloat32X(&x.FMapBoolFloat32, d) } } - if x.FptrMapBoolFloat32 == nil { - x.FptrMapBoolFloat32 = new(map[bool]float32) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolFloat32 != nil { + if true && x.FptrMapBoolFloat32 != nil { x.FptrMapBoolFloat32 = nil } } else { if x.FptrMapBoolFloat32 == nil { x.FptrMapBoolFloat32 = new(map[bool]float32) } - yym2292 := z.DecBinary() - _ = yym2292 + if false { } else { z.F.DecMapBoolFloat32X(x.FptrMapBoolFloat32, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43846,50 +37574,43 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolFloat64 = nil } else { - yyv2293 := &x.FMapBoolFloat64 - yym2294 := z.DecBinary() - _ = yym2294 if false { } else { - z.F.DecMapBoolFloat64X(yyv2293, d) + z.F.DecMapBoolFloat64X(&x.FMapBoolFloat64, d) } } - if x.FptrMapBoolFloat64 == nil { - x.FptrMapBoolFloat64 = new(map[bool]float64) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolFloat64 != nil { + if true && x.FptrMapBoolFloat64 != nil { x.FptrMapBoolFloat64 = nil } } else { if x.FptrMapBoolFloat64 == nil { x.FptrMapBoolFloat64 = new(map[bool]float64) } - yym2296 := z.DecBinary() - _ = yym2296 + if false { } else { z.F.DecMapBoolFloat64X(x.FptrMapBoolFloat64, d) } } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } @@ -43897,55 +37618,48 @@ func (x *TestMammoth2) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.FMapBoolBool = nil } else { - yyv2297 := &x.FMapBoolBool - yym2298 := z.DecBinary() - _ = yym2298 if false { } else { - z.F.DecMapBoolBoolX(yyv2297, d) + z.F.DecMapBoolBoolX(&x.FMapBoolBool, d) } } - if x.FptrMapBoolBool == nil { - x.FptrMapBoolBool = new(map[bool]bool) - } - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { r.ReadArrayEnd() return } r.ReadArrayElem() if r.TryDecodeAsNil() { - if x.FptrMapBoolBool != nil { + if true && x.FptrMapBoolBool != nil { x.FptrMapBoolBool = nil } } else { if x.FptrMapBoolBool == nil { x.FptrMapBoolBool = new(map[bool]bool) } - yym2300 := z.DecBinary() - _ = yym2300 + if false { } else { z.F.DecMapBoolBoolX(x.FptrMapBoolBool, d) } } for { - yyj1152++ - if yyhl1152 { - yyb1152 = yyj1152 > l + yyj1141++ + if yyhl1141 { + yyb1141 = yyj1141 > l } else { - yyb1152 = r.CheckBreak() + yyb1141 = r.CheckBreak() } - if yyb1152 { + if yyb1141 { break } r.ReadArrayElem() - z.DecStructFieldNotFound(yyj1152-1, "") + z.DecStructFieldNotFound(yyj1141-1, "") } r.ReadArrayEnd() } @@ -43954,11 +37668,10 @@ func (x testMammoth2Binary) CodecEncodeSelf(e *Encoder) { var h codecSelfer19781 z, r := GenHelperEncoder(e) _, _, _ = h, z, r - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else if yym1 { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) + } else if z.EncBinary() { z.EncBinaryMarshal(x) } else { r.EncodeUint(uint64(x)) @@ -43969,14 +37682,13 @@ func (x *testMammoth2Binary) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else if yym1 { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) + } else if z.DecBinary() { z.DecBinaryUnmarshal(x) } else { - *((*uint64)(x)) = uint64(r.DecodeUint(64)) + *x = (testMammoth2Binary)(r.DecodeUint64()) } } @@ -43984,11 +37696,10 @@ func (x testMammoth2Text) CodecEncodeSelf(e *Encoder) { var h codecSelfer19781 z, r := GenHelperEncoder(e) _, _, _ = h, z, r - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else if !yym1 { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) + } else if !z.EncBinary() { z.EncTextMarshal(x) } else { r.EncodeUint(uint64(x)) @@ -43999,14 +37710,13 @@ func (x *testMammoth2Text) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else if !yym1 { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) + } else if !z.DecBinary() { z.DecTextUnmarshal(x) } else { - *((*uint64)(x)) = uint64(r.DecodeUint(64)) + *x = (testMammoth2Text)(r.DecodeUint64()) } } @@ -44014,11 +37724,10 @@ func (x testMammoth2Json) CodecEncodeSelf(e *Encoder) { var h codecSelfer19781 z, r := GenHelperEncoder(e) _, _, _ = h, z, r - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { - } else if !yym1 && z.IsJSONHandle() { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) + } else if !z.EncBinary() && z.IsJSONHandle() { z.EncJSONMarshal(x) } else { r.EncodeUint(uint64(x)) @@ -44029,14 +37738,13 @@ func (x *testMammoth2Json) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { - } else if !yym1 && z.IsJSONHandle() { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) + } else if !z.DecBinary() && z.IsJSONHandle() { z.DecJSONUnmarshal(x) } else { - *((*uint64)(x)) = uint64(r.DecodeUint(64)) + *x = (testMammoth2Json)(r.DecodeUint64()) } } @@ -44047,10 +37755,9 @@ func (x *testMammoth2Basic) CodecEncodeSelf(e *Encoder) { if x == nil { r.EncodeNil() } else { - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) } else { h.enctestMammoth2Basic((*testMammoth2Basic)(x), e) } @@ -44061,10 +37768,9 @@ func (x *testMammoth2Basic) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) } else { h.dectestMammoth2Basic((*testMammoth2Basic)(x), d) } @@ -44077,15 +37783,14 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { if x == nil { r.EncodeNil() } else { - yym1 := z.EncBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.EncExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.EncExtension(x, yyxt1) } else { yysep2 := !z.EncBinary() yy2arr2 := z.EncBasicHandle().StructToArray _, _ = yysep2, yy2arr2 - const yyr2 bool = false + const yyr2 bool = false // struct tag has 'toArray' if yyr2 || yy2arr2 { r.WriteArrayStart(8) } else { @@ -44097,7 +37802,7 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { yy4.CodecEncodeSelf(e) } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("V")) + r.EncodeString(codecSelferCcUTF819781, `V`) r.WriteMapElemValue() yy6 := &x.V yy6.CodecEncodeSelf(e) @@ -44107,7 +37812,7 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { x.T.CodecEncodeSelf(e) } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("T")) + r.EncodeString(codecSelferCcUTF819781, `T`) r.WriteMapElemValue() x.T.CodecEncodeSelf(e) } @@ -44116,7 +37821,7 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { x.B.CodecEncodeSelf(e) } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("B")) + r.EncodeString(codecSelferCcUTF819781, `B`) r.WriteMapElemValue() x.B.CodecEncodeSelf(e) } @@ -44125,7 +37830,7 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { x.J.CodecEncodeSelf(e) } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("J")) + r.EncodeString(codecSelferCcUTF819781, `J`) r.WriteMapElemValue() x.J.CodecEncodeSelf(e) } @@ -44135,7 +37840,7 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { yy18.CodecEncodeSelf(e) } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("C")) + r.EncodeString(codecSelferCcUTF819781, `C`) r.WriteMapElemValue() yy20 := &x.C yy20.CodecEncodeSelf(e) @@ -44145,8 +37850,6 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { if x.M == nil { r.EncodeNil() } else { - yym23 := z.EncBinary() - _ = yym23 if false { } else { h.encMaptestMammoth2BasicTestMammoth2((map[testMammoth2Basic]TestMammoth2)(x.M), e) @@ -44154,13 +37857,11 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("M")) + r.EncodeString(codecSelferCcUTF819781, `M`) r.WriteMapElemValue() if x.M == nil { r.EncodeNil() } else { - yym24 := z.EncBinary() - _ = yym24 if false { } else { h.encMaptestMammoth2BasicTestMammoth2((map[testMammoth2Basic]TestMammoth2)(x.M), e) @@ -44172,8 +37873,6 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { if x.L == nil { r.EncodeNil() } else { - yym26 := z.EncBinary() - _ = yym26 if false { } else { h.encSliceTestMammoth2(([]TestMammoth2)(x.L), e) @@ -44181,13 +37880,11 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("L")) + r.EncodeString(codecSelferCcUTF819781, `L`) r.WriteMapElemValue() if x.L == nil { r.EncodeNil() } else { - yym27 := z.EncBinary() - _ = yym27 if false { } else { h.encSliceTestMammoth2(([]TestMammoth2)(x.L), e) @@ -44197,19 +37894,15 @@ func (x *TestMammoth2Wrapper) CodecEncodeSelf(e *Encoder) { if yyr2 || yy2arr2 { r.WriteArrayElem() yy29 := &x.A - yym30 := z.EncBinary() - _ = yym30 if false { } else { h.encArray4int64((*[4]int64)(yy29), e) } } else { r.WriteMapElemKey() - r.EncodeString(codecSelferC_UTF819781, string("A")) + r.EncodeString(codecSelferCcUTF819781, `A`) r.WriteMapElemValue() yy31 := &x.A - yym32 := z.EncBinary() - _ = yym32 if false { } else { h.encArray4int64((*[4]int64)(yy31), e) @@ -44228,10 +37921,9 @@ func (x *TestMammoth2Wrapper) CodecDecodeSelf(d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - yym1 := z.DecBinary() - _ = yym1 if false { - } else if z.HasExtensions() && z.DecExt(x) { + } else if yyxt1 := z.Extension(z.I2Rtid(x)); yyxt1 != nil { + z.DecExtension(x, yyxt1) } else { yyct2 := r.ContainerType() if yyct2 == codecSelferValueTypeMap19781 { @@ -44249,7 +37941,7 @@ func (x *TestMammoth2Wrapper) CodecDecodeSelf(d *Decoder) { x.codecDecodeSelfFromArray(yyl2, d) } } else { - panic(codecSelferOnlyMapOrArrayEncodeToStructErr19781) + panic(errCodecSelferOnlyMapOrArrayEncodeToStruct19781) } } } @@ -44258,8 +37950,6 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromMap(l int, d *Decoder) { var h codecSelfer19781 z, r := GenHelperDecoder(d) _, _, _ = h, z, r - var yys3Slc = z.DecScratchBuffer() // default slice to decode into - _ = yys3Slc var yyhl3 bool = l >= 0 for yyj3 := 0; ; yyj3++ { if yyhl3 { @@ -44272,79 +37962,64 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromMap(l int, d *Decoder) { } } r.ReadMapElemKey() - yys3Slc = r.DecodeStringAsBytes() - yys3 := string(yys3Slc) + yys3 := z.StringView(r.DecodeStringAsBytes()) r.ReadMapElemValue() switch yys3 { case "V": if r.TryDecodeAsNil() { x.V = TestMammoth2{} } else { - yyv4 := &x.V - yyv4.CodecDecodeSelf(d) + x.V.CodecDecodeSelf(d) } case "T": if r.TryDecodeAsNil() { x.T = 0 } else { - yyv5 := &x.T - yyv5.CodecDecodeSelf(d) + x.T.CodecDecodeSelf(d) } case "B": if r.TryDecodeAsNil() { x.B = 0 } else { - yyv6 := &x.B - yyv6.CodecDecodeSelf(d) + x.B.CodecDecodeSelf(d) } case "J": if r.TryDecodeAsNil() { x.J = 0 } else { - yyv7 := &x.J - yyv7.CodecDecodeSelf(d) + x.J.CodecDecodeSelf(d) } case "C": if r.TryDecodeAsNil() { x.C = testMammoth2Basic{} } else { - yyv8 := &x.C - yyv8.CodecDecodeSelf(d) + x.C.CodecDecodeSelf(d) } case "M": if r.TryDecodeAsNil() { x.M = nil } else { - yyv9 := &x.M - yym10 := z.DecBinary() - _ = yym10 if false { } else { - h.decMaptestMammoth2BasicTestMammoth2((*map[testMammoth2Basic]TestMammoth2)(yyv9), d) + h.decMaptestMammoth2BasicTestMammoth2((*map[testMammoth2Basic]TestMammoth2)(&x.M), d) } } case "L": if r.TryDecodeAsNil() { x.L = nil } else { - yyv11 := &x.L - yym12 := z.DecBinary() - _ = yym12 if false { } else { - h.decSliceTestMammoth2((*[]TestMammoth2)(yyv11), d) + h.decSliceTestMammoth2((*[]TestMammoth2)(&x.L), d) } } case "A": if r.TryDecodeAsNil() { x.A = [4]int64{} } else { - yyv13 := &x.A - yym14 := z.DecBinary() - _ = yym14 if false { } else { - h.decArray4int64((*[4]int64)(yyv13), d) + h.decArray4int64((*[4]int64)(&x.A), d) } } default: @@ -44375,8 +38050,7 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.V = TestMammoth2{} } else { - yyv16 := &x.V - yyv16.CodecDecodeSelf(d) + x.V.CodecDecodeSelf(d) } yyj15++ if yyhl15 { @@ -44392,8 +38066,7 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.T = 0 } else { - yyv17 := &x.T - yyv17.CodecDecodeSelf(d) + x.T.CodecDecodeSelf(d) } yyj15++ if yyhl15 { @@ -44409,8 +38082,7 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.B = 0 } else { - yyv18 := &x.B - yyv18.CodecDecodeSelf(d) + x.B.CodecDecodeSelf(d) } yyj15++ if yyhl15 { @@ -44426,8 +38098,7 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.J = 0 } else { - yyv19 := &x.J - yyv19.CodecDecodeSelf(d) + x.J.CodecDecodeSelf(d) } yyj15++ if yyhl15 { @@ -44443,8 +38114,7 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.C = testMammoth2Basic{} } else { - yyv20 := &x.C - yyv20.CodecDecodeSelf(d) + x.C.CodecDecodeSelf(d) } yyj15++ if yyhl15 { @@ -44460,12 +38130,9 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.M = nil } else { - yyv21 := &x.M - yym22 := z.DecBinary() - _ = yym22 if false { } else { - h.decMaptestMammoth2BasicTestMammoth2((*map[testMammoth2Basic]TestMammoth2)(yyv21), d) + h.decMaptestMammoth2BasicTestMammoth2((*map[testMammoth2Basic]TestMammoth2)(&x.M), d) } } yyj15++ @@ -44482,12 +38149,9 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.L = nil } else { - yyv23 := &x.L - yym24 := z.DecBinary() - _ = yym24 if false { } else { - h.decSliceTestMammoth2((*[]TestMammoth2)(yyv23), d) + h.decSliceTestMammoth2((*[]TestMammoth2)(&x.L), d) } } yyj15++ @@ -44504,12 +38168,9 @@ func (x *TestMammoth2Wrapper) codecDecodeSelfFromArray(l int, d *Decoder) { if r.TryDecodeAsNil() { x.A = [4]int64{} } else { - yyv25 := &x.A - yym26 := z.DecBinary() - _ = yym26 if false { } else { - h.decArray4int64((*[4]int64)(yyv25), d) + h.decArray4int64((*[4]int64)(&x.A), d) } } for { @@ -44535,8 +38196,6 @@ func (x codecSelfer19781) enctestMammoth2Basic(v *testMammoth2Basic, e *Encoder) r.WriteArrayStart(len(v)) for _, yyv1 := range v { r.WriteArrayElem() - yym2 := z.EncBinary() - _ = yym2 if false { } else { r.EncodeUint(uint64(yyv1)) @@ -44564,7 +38223,6 @@ func (x codecSelfer19781) dectestMammoth2Basic(v *testMammoth2Basic, d *Decoder) for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { yyh1.ElemContainerState(yyj1) - // yydn1 = r.TryDecodeAsNil() // if indefinite, etc, then expand the slice if necessary var yydb1 bool @@ -44579,13 +38237,7 @@ func (x codecSelfer19781) dectestMammoth2Basic(v *testMammoth2Basic, d *Decoder) if r.TryDecodeAsNil() { yyv1[yyj1] = 0 } else { - yyv2 := &yyv1[yyj1] - yym3 := z.DecBinary() - _ = yym3 - if false { - } else { - *((*uint64)(yyv2)) = uint64(r.DecodeUint(64)) - } + yyv1[yyj1] = (uint64)(r.DecodeUint64()) } } @@ -44622,7 +38274,7 @@ func (x codecSelfer19781) decMaptestMammoth2BasicTestMammoth2(v *map[testMammoth yyl1 := r.ReadMapStart() yybh1 := z.DecBasicHandle() if yyv1 == nil { - yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 4880) + yyrl1 := z.DecInferLen(yyl1, yybh1.MaxInitLen, 4912) yyv1 = make(map[testMammoth2Basic]TestMammoth2, yyrl1) *v = yyv1 } @@ -44639,8 +38291,7 @@ func (x codecSelfer19781) decMaptestMammoth2BasicTestMammoth2(v *map[testMammoth if r.TryDecodeAsNil() { yymk1 = testMammoth2Basic{} } else { - yyv2 := &yymk1 - yyv2.CodecDecodeSelf(d) + yymk1.CodecDecodeSelf(d) } if yymg1 { @@ -44653,8 +38304,7 @@ func (x codecSelfer19781) decMaptestMammoth2BasicTestMammoth2(v *map[testMammoth if r.TryDecodeAsNil() { yymdn1 = true } else { - yyv3 := &yymv1 - yyv3.CodecDecodeSelf(d) + yymv1.CodecDecodeSelf(d) } if yymdn1 { @@ -44707,7 +38357,7 @@ func (x codecSelfer19781) decSliceTestMammoth2(v *[]TestMammoth2, d *Decoder) { _ = yyrl1 if yyhl1 { if yyl1 > cap(yyv1) { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 4848) + yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 4880) if yyrl1 <= cap(yyv1) { yyv1 = yyv1[:yyrl1] } else { @@ -44724,7 +38374,7 @@ func (x codecSelfer19781) decSliceTestMammoth2(v *[]TestMammoth2, d *Decoder) { for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { if yyj1 == 0 && len(yyv1) == 0 { if yyhl1 { - yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 4848) + yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 4880) } else { yyrl1 = 8 } @@ -44732,7 +38382,6 @@ func (x codecSelfer19781) decSliceTestMammoth2(v *[]TestMammoth2, d *Decoder) { yyc1 = true } yyh1.ElemContainerState(yyj1) - // yydn1 = r.TryDecodeAsNil() // if indefinite, etc, then expand the slice if necessary var yydb1 bool @@ -44747,8 +38396,7 @@ func (x codecSelfer19781) decSliceTestMammoth2(v *[]TestMammoth2, d *Decoder) { if r.TryDecodeAsNil() { yyv1[yyj1] = TestMammoth2{} } else { - yyv2 := &yyv1[yyj1] - yyv2.CodecDecodeSelf(d) + yyv1[yyj1].CodecDecodeSelf(d) } } @@ -44776,8 +38424,6 @@ func (x codecSelfer19781) encArray4int64(v *[4]int64, e *Encoder) { r.WriteArrayStart(len(v)) for _, yyv1 := range v { r.WriteArrayElem() - yym2 := z.EncBinary() - _ = yym2 if false { } else { r.EncodeInt(int64(yyv1)) @@ -44805,7 +38451,6 @@ func (x codecSelfer19781) decArray4int64(v *[4]int64, d *Decoder) { for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ { yyh1.ElemContainerState(yyj1) - // yydn1 = r.TryDecodeAsNil() // if indefinite, etc, then expand the slice if necessary var yydb1 bool @@ -44820,13 +38465,7 @@ func (x codecSelfer19781) decArray4int64(v *[4]int64, d *Decoder) { if r.TryDecodeAsNil() { yyv1[yyj1] = 0 } else { - yyv2 := &yyv1[yyj1] - yym3 := z.DecBinary() - _ = yym3 - if false { - } else { - *((*int64)(yyv2)) = int64(r.DecodeInt(64)) - } + yyv1[yyj1] = (int64)(r.DecodeInt64()) } } diff --git a/vendor/github.com/ugorji/go/codec/mammoth2_generated_test.go b/vendor/github.com/ugorji/go/codec/mammoth2_generated_test.go index 87db192..4c62dff 100644 --- a/vendor/github.com/ugorji/go/codec/mammoth2_generated_test.go +++ b/vendor/github.com/ugorji/go/codec/mammoth2_generated_test.go @@ -3,10 +3,7 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from mammoth2-test.go.tmpl -// ************************************************************ +// Code generated from mammoth2-test.go.tmpl - DO NOT EDIT. package codec @@ -74,6 +71,8 @@ type TestMammoth2 struct { FptrSliceFloat64 *[]float64 FSliceUint []uint FptrSliceUint *[]uint + FSliceUint8 []uint8 + FptrSliceUint8 *[]uint8 FSliceUint16 []uint16 FptrSliceUint16 *[]uint16 FSliceUint32 []uint32 diff --git a/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go b/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go index 362653e..3e15832 100644 --- a/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go +++ b/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go @@ -1,15 +1,13 @@ // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. -// ************************************************************ -// DO NOT EDIT. -// THIS FILE IS AUTO-GENERATED from mammoth-test.go.tmpl -// ************************************************************ +// Code generated from mammoth-test.go.tmpl - DO NOT EDIT. package codec import "testing" import "fmt" +import "reflect" // TestMammoth has all the different paths optimized in fast-path // It has all the primitives, slices and maps. @@ -62,6 +60,8 @@ type TestMammoth struct { FptrSliceFloat64 *[]float64 FSliceUint []uint FptrSliceUint *[]uint + FSliceUint8 []uint8 + FptrSliceUint8 *[]uint8 FSliceUint16 []uint16 FptrSliceUint16 *[]uint16 FSliceUint32 []uint32 @@ -597,4631 +597,12587 @@ type TestMammoth struct { FptrMapBoolBool *map[bool]bool } -type typeSliceIntf []interface{} +type typMbsSliceIntf []interface{} -func (_ typeSliceIntf) MapBySlice() {} +func (_ typMbsSliceIntf) MapBySlice() {} -type typeSliceString []string +type typMbsSliceString []string -func (_ typeSliceString) MapBySlice() {} +func (_ typMbsSliceString) MapBySlice() {} -type typeSliceFloat32 []float32 +type typMbsSliceFloat32 []float32 -func (_ typeSliceFloat32) MapBySlice() {} +func (_ typMbsSliceFloat32) MapBySlice() {} -type typeSliceFloat64 []float64 +type typMbsSliceFloat64 []float64 -func (_ typeSliceFloat64) MapBySlice() {} +func (_ typMbsSliceFloat64) MapBySlice() {} -type typeSliceUint []uint +type typMbsSliceUint []uint -func (_ typeSliceUint) MapBySlice() {} +func (_ typMbsSliceUint) MapBySlice() {} -type typeSliceUint16 []uint16 +type typMbsSliceUint8 []uint8 -func (_ typeSliceUint16) MapBySlice() {} +func (_ typMbsSliceUint8) MapBySlice() {} -type typeSliceUint32 []uint32 +type typMbsSliceUint16 []uint16 -func (_ typeSliceUint32) MapBySlice() {} +func (_ typMbsSliceUint16) MapBySlice() {} -type typeSliceUint64 []uint64 +type typMbsSliceUint32 []uint32 -func (_ typeSliceUint64) MapBySlice() {} +func (_ typMbsSliceUint32) MapBySlice() {} -type typeSliceUintptr []uintptr +type typMbsSliceUint64 []uint64 -func (_ typeSliceUintptr) MapBySlice() {} +func (_ typMbsSliceUint64) MapBySlice() {} -type typeSliceInt []int +type typMbsSliceUintptr []uintptr -func (_ typeSliceInt) MapBySlice() {} +func (_ typMbsSliceUintptr) MapBySlice() {} -type typeSliceInt8 []int8 +type typMbsSliceInt []int -func (_ typeSliceInt8) MapBySlice() {} +func (_ typMbsSliceInt) MapBySlice() {} -type typeSliceInt16 []int16 +type typMbsSliceInt8 []int8 -func (_ typeSliceInt16) MapBySlice() {} +func (_ typMbsSliceInt8) MapBySlice() {} -type typeSliceInt32 []int32 +type typMbsSliceInt16 []int16 -func (_ typeSliceInt32) MapBySlice() {} +func (_ typMbsSliceInt16) MapBySlice() {} -type typeSliceInt64 []int64 +type typMbsSliceInt32 []int32 -func (_ typeSliceInt64) MapBySlice() {} +func (_ typMbsSliceInt32) MapBySlice() {} -type typeSliceBool []bool +type typMbsSliceInt64 []int64 -func (_ typeSliceBool) MapBySlice() {} +func (_ typMbsSliceInt64) MapBySlice() {} + +type typMbsSliceBool []bool + +func (_ typMbsSliceBool) MapBySlice() {} + +type typMapMapIntfIntf map[interface{}]interface{} +type typMapMapIntfString map[interface{}]string +type typMapMapIntfUint map[interface{}]uint +type typMapMapIntfUint8 map[interface{}]uint8 +type typMapMapIntfUint16 map[interface{}]uint16 +type typMapMapIntfUint32 map[interface{}]uint32 +type typMapMapIntfUint64 map[interface{}]uint64 +type typMapMapIntfUintptr map[interface{}]uintptr +type typMapMapIntfInt map[interface{}]int +type typMapMapIntfInt8 map[interface{}]int8 +type typMapMapIntfInt16 map[interface{}]int16 +type typMapMapIntfInt32 map[interface{}]int32 +type typMapMapIntfInt64 map[interface{}]int64 +type typMapMapIntfFloat32 map[interface{}]float32 +type typMapMapIntfFloat64 map[interface{}]float64 +type typMapMapIntfBool map[interface{}]bool +type typMapMapStringIntf map[string]interface{} +type typMapMapStringString map[string]string +type typMapMapStringUint map[string]uint +type typMapMapStringUint8 map[string]uint8 +type typMapMapStringUint16 map[string]uint16 +type typMapMapStringUint32 map[string]uint32 +type typMapMapStringUint64 map[string]uint64 +type typMapMapStringUintptr map[string]uintptr +type typMapMapStringInt map[string]int +type typMapMapStringInt8 map[string]int8 +type typMapMapStringInt16 map[string]int16 +type typMapMapStringInt32 map[string]int32 +type typMapMapStringInt64 map[string]int64 +type typMapMapStringFloat32 map[string]float32 +type typMapMapStringFloat64 map[string]float64 +type typMapMapStringBool map[string]bool +type typMapMapFloat32Intf map[float32]interface{} +type typMapMapFloat32String map[float32]string +type typMapMapFloat32Uint map[float32]uint +type typMapMapFloat32Uint8 map[float32]uint8 +type typMapMapFloat32Uint16 map[float32]uint16 +type typMapMapFloat32Uint32 map[float32]uint32 +type typMapMapFloat32Uint64 map[float32]uint64 +type typMapMapFloat32Uintptr map[float32]uintptr +type typMapMapFloat32Int map[float32]int +type typMapMapFloat32Int8 map[float32]int8 +type typMapMapFloat32Int16 map[float32]int16 +type typMapMapFloat32Int32 map[float32]int32 +type typMapMapFloat32Int64 map[float32]int64 +type typMapMapFloat32Float32 map[float32]float32 +type typMapMapFloat32Float64 map[float32]float64 +type typMapMapFloat32Bool map[float32]bool +type typMapMapFloat64Intf map[float64]interface{} +type typMapMapFloat64String map[float64]string +type typMapMapFloat64Uint map[float64]uint +type typMapMapFloat64Uint8 map[float64]uint8 +type typMapMapFloat64Uint16 map[float64]uint16 +type typMapMapFloat64Uint32 map[float64]uint32 +type typMapMapFloat64Uint64 map[float64]uint64 +type typMapMapFloat64Uintptr map[float64]uintptr +type typMapMapFloat64Int map[float64]int +type typMapMapFloat64Int8 map[float64]int8 +type typMapMapFloat64Int16 map[float64]int16 +type typMapMapFloat64Int32 map[float64]int32 +type typMapMapFloat64Int64 map[float64]int64 +type typMapMapFloat64Float32 map[float64]float32 +type typMapMapFloat64Float64 map[float64]float64 +type typMapMapFloat64Bool map[float64]bool +type typMapMapUintIntf map[uint]interface{} +type typMapMapUintString map[uint]string +type typMapMapUintUint map[uint]uint +type typMapMapUintUint8 map[uint]uint8 +type typMapMapUintUint16 map[uint]uint16 +type typMapMapUintUint32 map[uint]uint32 +type typMapMapUintUint64 map[uint]uint64 +type typMapMapUintUintptr map[uint]uintptr +type typMapMapUintInt map[uint]int +type typMapMapUintInt8 map[uint]int8 +type typMapMapUintInt16 map[uint]int16 +type typMapMapUintInt32 map[uint]int32 +type typMapMapUintInt64 map[uint]int64 +type typMapMapUintFloat32 map[uint]float32 +type typMapMapUintFloat64 map[uint]float64 +type typMapMapUintBool map[uint]bool +type typMapMapUint8Intf map[uint8]interface{} +type typMapMapUint8String map[uint8]string +type typMapMapUint8Uint map[uint8]uint +type typMapMapUint8Uint8 map[uint8]uint8 +type typMapMapUint8Uint16 map[uint8]uint16 +type typMapMapUint8Uint32 map[uint8]uint32 +type typMapMapUint8Uint64 map[uint8]uint64 +type typMapMapUint8Uintptr map[uint8]uintptr +type typMapMapUint8Int map[uint8]int +type typMapMapUint8Int8 map[uint8]int8 +type typMapMapUint8Int16 map[uint8]int16 +type typMapMapUint8Int32 map[uint8]int32 +type typMapMapUint8Int64 map[uint8]int64 +type typMapMapUint8Float32 map[uint8]float32 +type typMapMapUint8Float64 map[uint8]float64 +type typMapMapUint8Bool map[uint8]bool +type typMapMapUint16Intf map[uint16]interface{} +type typMapMapUint16String map[uint16]string +type typMapMapUint16Uint map[uint16]uint +type typMapMapUint16Uint8 map[uint16]uint8 +type typMapMapUint16Uint16 map[uint16]uint16 +type typMapMapUint16Uint32 map[uint16]uint32 +type typMapMapUint16Uint64 map[uint16]uint64 +type typMapMapUint16Uintptr map[uint16]uintptr +type typMapMapUint16Int map[uint16]int +type typMapMapUint16Int8 map[uint16]int8 +type typMapMapUint16Int16 map[uint16]int16 +type typMapMapUint16Int32 map[uint16]int32 +type typMapMapUint16Int64 map[uint16]int64 +type typMapMapUint16Float32 map[uint16]float32 +type typMapMapUint16Float64 map[uint16]float64 +type typMapMapUint16Bool map[uint16]bool +type typMapMapUint32Intf map[uint32]interface{} +type typMapMapUint32String map[uint32]string +type typMapMapUint32Uint map[uint32]uint +type typMapMapUint32Uint8 map[uint32]uint8 +type typMapMapUint32Uint16 map[uint32]uint16 +type typMapMapUint32Uint32 map[uint32]uint32 +type typMapMapUint32Uint64 map[uint32]uint64 +type typMapMapUint32Uintptr map[uint32]uintptr +type typMapMapUint32Int map[uint32]int +type typMapMapUint32Int8 map[uint32]int8 +type typMapMapUint32Int16 map[uint32]int16 +type typMapMapUint32Int32 map[uint32]int32 +type typMapMapUint32Int64 map[uint32]int64 +type typMapMapUint32Float32 map[uint32]float32 +type typMapMapUint32Float64 map[uint32]float64 +type typMapMapUint32Bool map[uint32]bool +type typMapMapUint64Intf map[uint64]interface{} +type typMapMapUint64String map[uint64]string +type typMapMapUint64Uint map[uint64]uint +type typMapMapUint64Uint8 map[uint64]uint8 +type typMapMapUint64Uint16 map[uint64]uint16 +type typMapMapUint64Uint32 map[uint64]uint32 +type typMapMapUint64Uint64 map[uint64]uint64 +type typMapMapUint64Uintptr map[uint64]uintptr +type typMapMapUint64Int map[uint64]int +type typMapMapUint64Int8 map[uint64]int8 +type typMapMapUint64Int16 map[uint64]int16 +type typMapMapUint64Int32 map[uint64]int32 +type typMapMapUint64Int64 map[uint64]int64 +type typMapMapUint64Float32 map[uint64]float32 +type typMapMapUint64Float64 map[uint64]float64 +type typMapMapUint64Bool map[uint64]bool +type typMapMapUintptrIntf map[uintptr]interface{} +type typMapMapUintptrString map[uintptr]string +type typMapMapUintptrUint map[uintptr]uint +type typMapMapUintptrUint8 map[uintptr]uint8 +type typMapMapUintptrUint16 map[uintptr]uint16 +type typMapMapUintptrUint32 map[uintptr]uint32 +type typMapMapUintptrUint64 map[uintptr]uint64 +type typMapMapUintptrUintptr map[uintptr]uintptr +type typMapMapUintptrInt map[uintptr]int +type typMapMapUintptrInt8 map[uintptr]int8 +type typMapMapUintptrInt16 map[uintptr]int16 +type typMapMapUintptrInt32 map[uintptr]int32 +type typMapMapUintptrInt64 map[uintptr]int64 +type typMapMapUintptrFloat32 map[uintptr]float32 +type typMapMapUintptrFloat64 map[uintptr]float64 +type typMapMapUintptrBool map[uintptr]bool +type typMapMapIntIntf map[int]interface{} +type typMapMapIntString map[int]string +type typMapMapIntUint map[int]uint +type typMapMapIntUint8 map[int]uint8 +type typMapMapIntUint16 map[int]uint16 +type typMapMapIntUint32 map[int]uint32 +type typMapMapIntUint64 map[int]uint64 +type typMapMapIntUintptr map[int]uintptr +type typMapMapIntInt map[int]int +type typMapMapIntInt8 map[int]int8 +type typMapMapIntInt16 map[int]int16 +type typMapMapIntInt32 map[int]int32 +type typMapMapIntInt64 map[int]int64 +type typMapMapIntFloat32 map[int]float32 +type typMapMapIntFloat64 map[int]float64 +type typMapMapIntBool map[int]bool +type typMapMapInt8Intf map[int8]interface{} +type typMapMapInt8String map[int8]string +type typMapMapInt8Uint map[int8]uint +type typMapMapInt8Uint8 map[int8]uint8 +type typMapMapInt8Uint16 map[int8]uint16 +type typMapMapInt8Uint32 map[int8]uint32 +type typMapMapInt8Uint64 map[int8]uint64 +type typMapMapInt8Uintptr map[int8]uintptr +type typMapMapInt8Int map[int8]int +type typMapMapInt8Int8 map[int8]int8 +type typMapMapInt8Int16 map[int8]int16 +type typMapMapInt8Int32 map[int8]int32 +type typMapMapInt8Int64 map[int8]int64 +type typMapMapInt8Float32 map[int8]float32 +type typMapMapInt8Float64 map[int8]float64 +type typMapMapInt8Bool map[int8]bool +type typMapMapInt16Intf map[int16]interface{} +type typMapMapInt16String map[int16]string +type typMapMapInt16Uint map[int16]uint +type typMapMapInt16Uint8 map[int16]uint8 +type typMapMapInt16Uint16 map[int16]uint16 +type typMapMapInt16Uint32 map[int16]uint32 +type typMapMapInt16Uint64 map[int16]uint64 +type typMapMapInt16Uintptr map[int16]uintptr +type typMapMapInt16Int map[int16]int +type typMapMapInt16Int8 map[int16]int8 +type typMapMapInt16Int16 map[int16]int16 +type typMapMapInt16Int32 map[int16]int32 +type typMapMapInt16Int64 map[int16]int64 +type typMapMapInt16Float32 map[int16]float32 +type typMapMapInt16Float64 map[int16]float64 +type typMapMapInt16Bool map[int16]bool +type typMapMapInt32Intf map[int32]interface{} +type typMapMapInt32String map[int32]string +type typMapMapInt32Uint map[int32]uint +type typMapMapInt32Uint8 map[int32]uint8 +type typMapMapInt32Uint16 map[int32]uint16 +type typMapMapInt32Uint32 map[int32]uint32 +type typMapMapInt32Uint64 map[int32]uint64 +type typMapMapInt32Uintptr map[int32]uintptr +type typMapMapInt32Int map[int32]int +type typMapMapInt32Int8 map[int32]int8 +type typMapMapInt32Int16 map[int32]int16 +type typMapMapInt32Int32 map[int32]int32 +type typMapMapInt32Int64 map[int32]int64 +type typMapMapInt32Float32 map[int32]float32 +type typMapMapInt32Float64 map[int32]float64 +type typMapMapInt32Bool map[int32]bool +type typMapMapInt64Intf map[int64]interface{} +type typMapMapInt64String map[int64]string +type typMapMapInt64Uint map[int64]uint +type typMapMapInt64Uint8 map[int64]uint8 +type typMapMapInt64Uint16 map[int64]uint16 +type typMapMapInt64Uint32 map[int64]uint32 +type typMapMapInt64Uint64 map[int64]uint64 +type typMapMapInt64Uintptr map[int64]uintptr +type typMapMapInt64Int map[int64]int +type typMapMapInt64Int8 map[int64]int8 +type typMapMapInt64Int16 map[int64]int16 +type typMapMapInt64Int32 map[int64]int32 +type typMapMapInt64Int64 map[int64]int64 +type typMapMapInt64Float32 map[int64]float32 +type typMapMapInt64Float64 map[int64]float64 +type typMapMapInt64Bool map[int64]bool +type typMapMapBoolIntf map[bool]interface{} +type typMapMapBoolString map[bool]string +type typMapMapBoolUint map[bool]uint +type typMapMapBoolUint8 map[bool]uint8 +type typMapMapBoolUint16 map[bool]uint16 +type typMapMapBoolUint32 map[bool]uint32 +type typMapMapBoolUint64 map[bool]uint64 +type typMapMapBoolUintptr map[bool]uintptr +type typMapMapBoolInt map[bool]int +type typMapMapBoolInt8 map[bool]int8 +type typMapMapBoolInt16 map[bool]int16 +type typMapMapBoolInt32 map[bool]int32 +type typMapMapBoolInt64 map[bool]int64 +type typMapMapBoolFloat32 map[bool]float32 +type typMapMapBoolFloat64 map[bool]float64 +type typMapMapBoolBool map[bool]bool func doTestMammothSlices(t *testing.T, h Handle) { - for _, v := range [][]interface{}{nil, []interface{}{}, []interface{}{"string-is-an-interface", "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth slice v1: %v\n", v) - var v1v1, v1v2, v1v3, v1v4 []interface{} + var v1va [8]interface{} + for _, v := range [][]interface{}{nil, {}, {"string-is-an-interface-2", nil, nil, "string-is-an-interface"}} { + var v1v1, v1v2 []interface{} v1v1 = v bs1 := testMarshalErr(v1v1, h, t, "enc-slice-v1") - if v != nil { + if v == nil { + v1v2 = nil + } else { v1v2 = make([]interface{}, len(v)) } testUnmarshalErr(v1v2, bs1, h, t, "dec-slice-v1") testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1") + if v == nil { + v1v2 = nil + } else { + v1v2 = make([]interface{}, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v1v2), bs1, h, t, "dec-slice-v1-noaddr") // non-addressable value + testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-noaddr") + // ... bs1 = testMarshalErr(&v1v1, h, t, "enc-slice-v1-p") v1v2 = nil testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p") testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p") + v1va = [8]interface{}{} // clear the array + v1v2 = v1va[:1:1] + testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-1") + testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-1") + v1va = [8]interface{}{} // clear the array + v1v2 = v1va[:len(v1v1):len(v1v1)] + testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-len") + testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-len") + v1va = [8]interface{}{} // clear the array + v1v2 = v1va[:] + testUnmarshalErr(&v1v2, bs1, h, t, "dec-slice-v1-p-cap") + testDeepEqualErr(v1v1, v1v2, t, "equal-slice-v1-p-cap") + if len(v1v1) > 1 { + v1va = [8]interface{}{} // clear the array + testUnmarshalErr((&v1va)[:len(v1v1)], bs1, h, t, "dec-slice-v1-p-len-noaddr") + testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-len-noaddr") + v1va = [8]interface{}{} // clear the array + testUnmarshalErr((&v1va)[:], bs1, h, t, "dec-slice-v1-p-cap-noaddr") + testDeepEqualErr(v1v1, v1va[:len(v1v1)], t, "equal-slice-v1-p-cap-noaddr") + } // ... + var v1v3, v1v4 typMbsSliceIntf v1v2 = nil if v != nil { v1v2 = make([]interface{}, len(v)) } - v1v3 = typeSliceIntf(v1v1) + v1v3 = typMbsSliceIntf(v1v1) + v1v4 = typMbsSliceIntf(v1v2) bs1 = testMarshalErr(v1v3, h, t, "enc-slice-v1-custom") - v1v4 = typeSliceIntf(v1v2) testUnmarshalErr(v1v4, bs1, h, t, "dec-slice-v1-custom") testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom") - v1v2 = nil bs1 = testMarshalErr(&v1v3, h, t, "enc-slice-v1-custom-p") - v1v4 = typeSliceIntf(v1v2) + v1v2 = nil + v1v4 = typMbsSliceIntf(v1v2) testUnmarshalErr(&v1v4, bs1, h, t, "dec-slice-v1-custom-p") testDeepEqualErr(v1v3, v1v4, t, "equal-slice-v1-custom-p") } - for _, v := range [][]string{nil, []string{}, []string{"some-string", "some-string"}} { - // fmt.Printf(">>>> running mammoth slice v19: %v\n", v) - var v19v1, v19v2, v19v3, v19v4 []string + var v19va [8]string + for _, v := range [][]string{nil, {}, {"some-string-2", "", "", "some-string"}} { + var v19v1, v19v2 []string v19v1 = v bs19 := testMarshalErr(v19v1, h, t, "enc-slice-v19") - if v != nil { + if v == nil { + v19v2 = nil + } else { v19v2 = make([]string, len(v)) } testUnmarshalErr(v19v2, bs19, h, t, "dec-slice-v19") testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19") + if v == nil { + v19v2 = nil + } else { + v19v2 = make([]string, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v19v2), bs19, h, t, "dec-slice-v19-noaddr") // non-addressable value + testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-noaddr") + // ... bs19 = testMarshalErr(&v19v1, h, t, "enc-slice-v19-p") v19v2 = nil testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p") testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p") + v19va = [8]string{} // clear the array + v19v2 = v19va[:1:1] + testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-1") + testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-1") + v19va = [8]string{} // clear the array + v19v2 = v19va[:len(v19v1):len(v19v1)] + testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-len") + testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-len") + v19va = [8]string{} // clear the array + v19v2 = v19va[:] + testUnmarshalErr(&v19v2, bs19, h, t, "dec-slice-v19-p-cap") + testDeepEqualErr(v19v1, v19v2, t, "equal-slice-v19-p-cap") + if len(v19v1) > 1 { + v19va = [8]string{} // clear the array + testUnmarshalErr((&v19va)[:len(v19v1)], bs19, h, t, "dec-slice-v19-p-len-noaddr") + testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-len-noaddr") + v19va = [8]string{} // clear the array + testUnmarshalErr((&v19va)[:], bs19, h, t, "dec-slice-v19-p-cap-noaddr") + testDeepEqualErr(v19v1, v19va[:len(v19v1)], t, "equal-slice-v19-p-cap-noaddr") + } // ... + var v19v3, v19v4 typMbsSliceString v19v2 = nil if v != nil { v19v2 = make([]string, len(v)) } - v19v3 = typeSliceString(v19v1) + v19v3 = typMbsSliceString(v19v1) + v19v4 = typMbsSliceString(v19v2) bs19 = testMarshalErr(v19v3, h, t, "enc-slice-v19-custom") - v19v4 = typeSliceString(v19v2) testUnmarshalErr(v19v4, bs19, h, t, "dec-slice-v19-custom") testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom") - v19v2 = nil bs19 = testMarshalErr(&v19v3, h, t, "enc-slice-v19-custom-p") - v19v4 = typeSliceString(v19v2) + v19v2 = nil + v19v4 = typMbsSliceString(v19v2) testUnmarshalErr(&v19v4, bs19, h, t, "dec-slice-v19-custom-p") testDeepEqualErr(v19v3, v19v4, t, "equal-slice-v19-custom-p") } - for _, v := range [][]float32{nil, []float32{}, []float32{10.1, 10.1}} { - // fmt.Printf(">>>> running mammoth slice v37: %v\n", v) - var v37v1, v37v2, v37v3, v37v4 []float32 + var v37va [8]float32 + for _, v := range [][]float32{nil, {}, {22.2, 0, 0, 11.1}} { + var v37v1, v37v2 []float32 v37v1 = v bs37 := testMarshalErr(v37v1, h, t, "enc-slice-v37") - if v != nil { + if v == nil { + v37v2 = nil + } else { v37v2 = make([]float32, len(v)) } testUnmarshalErr(v37v2, bs37, h, t, "dec-slice-v37") testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37") + if v == nil { + v37v2 = nil + } else { + v37v2 = make([]float32, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v37v2), bs37, h, t, "dec-slice-v37-noaddr") // non-addressable value + testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-noaddr") + // ... bs37 = testMarshalErr(&v37v1, h, t, "enc-slice-v37-p") v37v2 = nil testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p") testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p") + v37va = [8]float32{} // clear the array + v37v2 = v37va[:1:1] + testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-1") + testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-1") + v37va = [8]float32{} // clear the array + v37v2 = v37va[:len(v37v1):len(v37v1)] + testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-len") + testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-len") + v37va = [8]float32{} // clear the array + v37v2 = v37va[:] + testUnmarshalErr(&v37v2, bs37, h, t, "dec-slice-v37-p-cap") + testDeepEqualErr(v37v1, v37v2, t, "equal-slice-v37-p-cap") + if len(v37v1) > 1 { + v37va = [8]float32{} // clear the array + testUnmarshalErr((&v37va)[:len(v37v1)], bs37, h, t, "dec-slice-v37-p-len-noaddr") + testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-len-noaddr") + v37va = [8]float32{} // clear the array + testUnmarshalErr((&v37va)[:], bs37, h, t, "dec-slice-v37-p-cap-noaddr") + testDeepEqualErr(v37v1, v37va[:len(v37v1)], t, "equal-slice-v37-p-cap-noaddr") + } // ... + var v37v3, v37v4 typMbsSliceFloat32 v37v2 = nil if v != nil { v37v2 = make([]float32, len(v)) } - v37v3 = typeSliceFloat32(v37v1) + v37v3 = typMbsSliceFloat32(v37v1) + v37v4 = typMbsSliceFloat32(v37v2) bs37 = testMarshalErr(v37v3, h, t, "enc-slice-v37-custom") - v37v4 = typeSliceFloat32(v37v2) testUnmarshalErr(v37v4, bs37, h, t, "dec-slice-v37-custom") testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom") - v37v2 = nil bs37 = testMarshalErr(&v37v3, h, t, "enc-slice-v37-custom-p") - v37v4 = typeSliceFloat32(v37v2) + v37v2 = nil + v37v4 = typMbsSliceFloat32(v37v2) testUnmarshalErr(&v37v4, bs37, h, t, "dec-slice-v37-custom-p") testDeepEqualErr(v37v3, v37v4, t, "equal-slice-v37-custom-p") } - for _, v := range [][]float64{nil, []float64{}, []float64{10.1, 10.1}} { - // fmt.Printf(">>>> running mammoth slice v55: %v\n", v) - var v55v1, v55v2, v55v3, v55v4 []float64 + var v55va [8]float64 + for _, v := range [][]float64{nil, {}, {22.2, 0, 0, 11.1}} { + var v55v1, v55v2 []float64 v55v1 = v bs55 := testMarshalErr(v55v1, h, t, "enc-slice-v55") - if v != nil { + if v == nil { + v55v2 = nil + } else { v55v2 = make([]float64, len(v)) } testUnmarshalErr(v55v2, bs55, h, t, "dec-slice-v55") testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55") + if v == nil { + v55v2 = nil + } else { + v55v2 = make([]float64, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v55v2), bs55, h, t, "dec-slice-v55-noaddr") // non-addressable value + testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-noaddr") + // ... bs55 = testMarshalErr(&v55v1, h, t, "enc-slice-v55-p") v55v2 = nil testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p") testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p") + v55va = [8]float64{} // clear the array + v55v2 = v55va[:1:1] + testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-1") + testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-1") + v55va = [8]float64{} // clear the array + v55v2 = v55va[:len(v55v1):len(v55v1)] + testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-len") + testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-len") + v55va = [8]float64{} // clear the array + v55v2 = v55va[:] + testUnmarshalErr(&v55v2, bs55, h, t, "dec-slice-v55-p-cap") + testDeepEqualErr(v55v1, v55v2, t, "equal-slice-v55-p-cap") + if len(v55v1) > 1 { + v55va = [8]float64{} // clear the array + testUnmarshalErr((&v55va)[:len(v55v1)], bs55, h, t, "dec-slice-v55-p-len-noaddr") + testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-len-noaddr") + v55va = [8]float64{} // clear the array + testUnmarshalErr((&v55va)[:], bs55, h, t, "dec-slice-v55-p-cap-noaddr") + testDeepEqualErr(v55v1, v55va[:len(v55v1)], t, "equal-slice-v55-p-cap-noaddr") + } // ... + var v55v3, v55v4 typMbsSliceFloat64 v55v2 = nil if v != nil { v55v2 = make([]float64, len(v)) } - v55v3 = typeSliceFloat64(v55v1) + v55v3 = typMbsSliceFloat64(v55v1) + v55v4 = typMbsSliceFloat64(v55v2) bs55 = testMarshalErr(v55v3, h, t, "enc-slice-v55-custom") - v55v4 = typeSliceFloat64(v55v2) testUnmarshalErr(v55v4, bs55, h, t, "dec-slice-v55-custom") testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom") - v55v2 = nil bs55 = testMarshalErr(&v55v3, h, t, "enc-slice-v55-custom-p") - v55v4 = typeSliceFloat64(v55v2) + v55v2 = nil + v55v4 = typMbsSliceFloat64(v55v2) testUnmarshalErr(&v55v4, bs55, h, t, "dec-slice-v55-custom-p") testDeepEqualErr(v55v3, v55v4, t, "equal-slice-v55-custom-p") } - for _, v := range [][]uint{nil, []uint{}, []uint{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v73: %v\n", v) - var v73v1, v73v2, v73v3, v73v4 []uint + var v73va [8]uint + for _, v := range [][]uint{nil, {}, {44, 0, 0, 33}} { + var v73v1, v73v2 []uint v73v1 = v bs73 := testMarshalErr(v73v1, h, t, "enc-slice-v73") - if v != nil { + if v == nil { + v73v2 = nil + } else { v73v2 = make([]uint, len(v)) } testUnmarshalErr(v73v2, bs73, h, t, "dec-slice-v73") testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73") + if v == nil { + v73v2 = nil + } else { + v73v2 = make([]uint, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v73v2), bs73, h, t, "dec-slice-v73-noaddr") // non-addressable value + testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-noaddr") + // ... bs73 = testMarshalErr(&v73v1, h, t, "enc-slice-v73-p") v73v2 = nil testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p") testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p") + v73va = [8]uint{} // clear the array + v73v2 = v73va[:1:1] + testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-1") + testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-1") + v73va = [8]uint{} // clear the array + v73v2 = v73va[:len(v73v1):len(v73v1)] + testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-len") + testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-len") + v73va = [8]uint{} // clear the array + v73v2 = v73va[:] + testUnmarshalErr(&v73v2, bs73, h, t, "dec-slice-v73-p-cap") + testDeepEqualErr(v73v1, v73v2, t, "equal-slice-v73-p-cap") + if len(v73v1) > 1 { + v73va = [8]uint{} // clear the array + testUnmarshalErr((&v73va)[:len(v73v1)], bs73, h, t, "dec-slice-v73-p-len-noaddr") + testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-len-noaddr") + v73va = [8]uint{} // clear the array + testUnmarshalErr((&v73va)[:], bs73, h, t, "dec-slice-v73-p-cap-noaddr") + testDeepEqualErr(v73v1, v73va[:len(v73v1)], t, "equal-slice-v73-p-cap-noaddr") + } // ... + var v73v3, v73v4 typMbsSliceUint v73v2 = nil if v != nil { v73v2 = make([]uint, len(v)) } - v73v3 = typeSliceUint(v73v1) + v73v3 = typMbsSliceUint(v73v1) + v73v4 = typMbsSliceUint(v73v2) bs73 = testMarshalErr(v73v3, h, t, "enc-slice-v73-custom") - v73v4 = typeSliceUint(v73v2) testUnmarshalErr(v73v4, bs73, h, t, "dec-slice-v73-custom") testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom") - v73v2 = nil bs73 = testMarshalErr(&v73v3, h, t, "enc-slice-v73-custom-p") - v73v4 = typeSliceUint(v73v2) + v73v2 = nil + v73v4 = typMbsSliceUint(v73v2) testUnmarshalErr(&v73v4, bs73, h, t, "dec-slice-v73-custom-p") testDeepEqualErr(v73v3, v73v4, t, "equal-slice-v73-custom-p") } - for _, v := range [][]uint16{nil, []uint16{}, []uint16{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v108: %v\n", v) - var v108v1, v108v2, v108v3, v108v4 []uint16 - v108v1 = v - bs108 := testMarshalErr(v108v1, h, t, "enc-slice-v108") - if v != nil { - v108v2 = make([]uint16, len(v)) + var v91va [8]uint8 + for _, v := range [][]uint8{nil, {}, {44, 0, 0, 33}} { + var v91v1, v91v2 []uint8 + v91v1 = v + bs91 := testMarshalErr(v91v1, h, t, "enc-slice-v91") + if v == nil { + v91v2 = nil + } else { + v91v2 = make([]uint8, len(v)) } - testUnmarshalErr(v108v2, bs108, h, t, "dec-slice-v108") - testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108") - bs108 = testMarshalErr(&v108v1, h, t, "enc-slice-v108-p") - v108v2 = nil - testUnmarshalErr(&v108v2, bs108, h, t, "dec-slice-v108-p") - testDeepEqualErr(v108v1, v108v2, t, "equal-slice-v108-p") + testUnmarshalErr(v91v2, bs91, h, t, "dec-slice-v91") + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91") + if v == nil { + v91v2 = nil + } else { + v91v2 = make([]uint8, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v91v2), bs91, h, t, "dec-slice-v91-noaddr") // non-addressable value + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-noaddr") // ... - v108v2 = nil - if v != nil { - v108v2 = make([]uint16, len(v)) + bs91 = testMarshalErr(&v91v1, h, t, "enc-slice-v91-p") + v91v2 = nil + testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p") + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p") + v91va = [8]uint8{} // clear the array + v91v2 = v91va[:1:1] + testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-1") + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-1") + v91va = [8]uint8{} // clear the array + v91v2 = v91va[:len(v91v1):len(v91v1)] + testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-len") + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-len") + v91va = [8]uint8{} // clear the array + v91v2 = v91va[:] + testUnmarshalErr(&v91v2, bs91, h, t, "dec-slice-v91-p-cap") + testDeepEqualErr(v91v1, v91v2, t, "equal-slice-v91-p-cap") + if len(v91v1) > 1 { + v91va = [8]uint8{} // clear the array + testUnmarshalErr((&v91va)[:len(v91v1)], bs91, h, t, "dec-slice-v91-p-len-noaddr") + testDeepEqualErr(v91v1, v91va[:len(v91v1)], t, "equal-slice-v91-p-len-noaddr") + v91va = [8]uint8{} // clear the array + testUnmarshalErr((&v91va)[:], bs91, h, t, "dec-slice-v91-p-cap-noaddr") + testDeepEqualErr(v91v1, v91va[:len(v91v1)], t, "equal-slice-v91-p-cap-noaddr") } - v108v3 = typeSliceUint16(v108v1) - bs108 = testMarshalErr(v108v3, h, t, "enc-slice-v108-custom") - v108v4 = typeSliceUint16(v108v2) - testUnmarshalErr(v108v4, bs108, h, t, "dec-slice-v108-custom") - testDeepEqualErr(v108v3, v108v4, t, "equal-slice-v108-custom") - v108v2 = nil - bs108 = testMarshalErr(&v108v3, h, t, "enc-slice-v108-custom-p") - v108v4 = typeSliceUint16(v108v2) - testUnmarshalErr(&v108v4, bs108, h, t, "dec-slice-v108-custom-p") - testDeepEqualErr(v108v3, v108v4, t, "equal-slice-v108-custom-p") + // ... + var v91v3, v91v4 typMbsSliceUint8 + v91v2 = nil + if v != nil { + v91v2 = make([]uint8, len(v)) + } + v91v3 = typMbsSliceUint8(v91v1) + v91v4 = typMbsSliceUint8(v91v2) + bs91 = testMarshalErr(v91v3, h, t, "enc-slice-v91-custom") + testUnmarshalErr(v91v4, bs91, h, t, "dec-slice-v91-custom") + testDeepEqualErr(v91v3, v91v4, t, "equal-slice-v91-custom") + bs91 = testMarshalErr(&v91v3, h, t, "enc-slice-v91-custom-p") + v91v2 = nil + v91v4 = typMbsSliceUint8(v91v2) + testUnmarshalErr(&v91v4, bs91, h, t, "dec-slice-v91-custom-p") + testDeepEqualErr(v91v3, v91v4, t, "equal-slice-v91-custom-p") } - for _, v := range [][]uint32{nil, []uint32{}, []uint32{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v126: %v\n", v) - var v126v1, v126v2, v126v3, v126v4 []uint32 - v126v1 = v - bs126 := testMarshalErr(v126v1, h, t, "enc-slice-v126") - if v != nil { - v126v2 = make([]uint32, len(v)) + var v109va [8]uint16 + for _, v := range [][]uint16{nil, {}, {44, 0, 0, 33}} { + var v109v1, v109v2 []uint16 + v109v1 = v + bs109 := testMarshalErr(v109v1, h, t, "enc-slice-v109") + if v == nil { + v109v2 = nil + } else { + v109v2 = make([]uint16, len(v)) } - testUnmarshalErr(v126v2, bs126, h, t, "dec-slice-v126") - testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126") - bs126 = testMarshalErr(&v126v1, h, t, "enc-slice-v126-p") - v126v2 = nil - testUnmarshalErr(&v126v2, bs126, h, t, "dec-slice-v126-p") - testDeepEqualErr(v126v1, v126v2, t, "equal-slice-v126-p") + testUnmarshalErr(v109v2, bs109, h, t, "dec-slice-v109") + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109") + if v == nil { + v109v2 = nil + } else { + v109v2 = make([]uint16, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v109v2), bs109, h, t, "dec-slice-v109-noaddr") // non-addressable value + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-noaddr") // ... - v126v2 = nil - if v != nil { - v126v2 = make([]uint32, len(v)) + bs109 = testMarshalErr(&v109v1, h, t, "enc-slice-v109-p") + v109v2 = nil + testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p") + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p") + v109va = [8]uint16{} // clear the array + v109v2 = v109va[:1:1] + testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-1") + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-1") + v109va = [8]uint16{} // clear the array + v109v2 = v109va[:len(v109v1):len(v109v1)] + testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-len") + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-len") + v109va = [8]uint16{} // clear the array + v109v2 = v109va[:] + testUnmarshalErr(&v109v2, bs109, h, t, "dec-slice-v109-p-cap") + testDeepEqualErr(v109v1, v109v2, t, "equal-slice-v109-p-cap") + if len(v109v1) > 1 { + v109va = [8]uint16{} // clear the array + testUnmarshalErr((&v109va)[:len(v109v1)], bs109, h, t, "dec-slice-v109-p-len-noaddr") + testDeepEqualErr(v109v1, v109va[:len(v109v1)], t, "equal-slice-v109-p-len-noaddr") + v109va = [8]uint16{} // clear the array + testUnmarshalErr((&v109va)[:], bs109, h, t, "dec-slice-v109-p-cap-noaddr") + testDeepEqualErr(v109v1, v109va[:len(v109v1)], t, "equal-slice-v109-p-cap-noaddr") } - v126v3 = typeSliceUint32(v126v1) - bs126 = testMarshalErr(v126v3, h, t, "enc-slice-v126-custom") - v126v4 = typeSliceUint32(v126v2) - testUnmarshalErr(v126v4, bs126, h, t, "dec-slice-v126-custom") - testDeepEqualErr(v126v3, v126v4, t, "equal-slice-v126-custom") - v126v2 = nil - bs126 = testMarshalErr(&v126v3, h, t, "enc-slice-v126-custom-p") - v126v4 = typeSliceUint32(v126v2) - testUnmarshalErr(&v126v4, bs126, h, t, "dec-slice-v126-custom-p") - testDeepEqualErr(v126v3, v126v4, t, "equal-slice-v126-custom-p") + // ... + var v109v3, v109v4 typMbsSliceUint16 + v109v2 = nil + if v != nil { + v109v2 = make([]uint16, len(v)) + } + v109v3 = typMbsSliceUint16(v109v1) + v109v4 = typMbsSliceUint16(v109v2) + bs109 = testMarshalErr(v109v3, h, t, "enc-slice-v109-custom") + testUnmarshalErr(v109v4, bs109, h, t, "dec-slice-v109-custom") + testDeepEqualErr(v109v3, v109v4, t, "equal-slice-v109-custom") + bs109 = testMarshalErr(&v109v3, h, t, "enc-slice-v109-custom-p") + v109v2 = nil + v109v4 = typMbsSliceUint16(v109v2) + testUnmarshalErr(&v109v4, bs109, h, t, "dec-slice-v109-custom-p") + testDeepEqualErr(v109v3, v109v4, t, "equal-slice-v109-custom-p") } - for _, v := range [][]uint64{nil, []uint64{}, []uint64{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v144: %v\n", v) - var v144v1, v144v2, v144v3, v144v4 []uint64 - v144v1 = v - bs144 := testMarshalErr(v144v1, h, t, "enc-slice-v144") - if v != nil { - v144v2 = make([]uint64, len(v)) + var v127va [8]uint32 + for _, v := range [][]uint32{nil, {}, {44, 0, 0, 33}} { + var v127v1, v127v2 []uint32 + v127v1 = v + bs127 := testMarshalErr(v127v1, h, t, "enc-slice-v127") + if v == nil { + v127v2 = nil + } else { + v127v2 = make([]uint32, len(v)) } - testUnmarshalErr(v144v2, bs144, h, t, "dec-slice-v144") - testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144") - bs144 = testMarshalErr(&v144v1, h, t, "enc-slice-v144-p") - v144v2 = nil - testUnmarshalErr(&v144v2, bs144, h, t, "dec-slice-v144-p") - testDeepEqualErr(v144v1, v144v2, t, "equal-slice-v144-p") + testUnmarshalErr(v127v2, bs127, h, t, "dec-slice-v127") + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127") + if v == nil { + v127v2 = nil + } else { + v127v2 = make([]uint32, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v127v2), bs127, h, t, "dec-slice-v127-noaddr") // non-addressable value + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-noaddr") // ... - v144v2 = nil - if v != nil { - v144v2 = make([]uint64, len(v)) + bs127 = testMarshalErr(&v127v1, h, t, "enc-slice-v127-p") + v127v2 = nil + testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p") + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p") + v127va = [8]uint32{} // clear the array + v127v2 = v127va[:1:1] + testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-1") + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-1") + v127va = [8]uint32{} // clear the array + v127v2 = v127va[:len(v127v1):len(v127v1)] + testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-len") + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-len") + v127va = [8]uint32{} // clear the array + v127v2 = v127va[:] + testUnmarshalErr(&v127v2, bs127, h, t, "dec-slice-v127-p-cap") + testDeepEqualErr(v127v1, v127v2, t, "equal-slice-v127-p-cap") + if len(v127v1) > 1 { + v127va = [8]uint32{} // clear the array + testUnmarshalErr((&v127va)[:len(v127v1)], bs127, h, t, "dec-slice-v127-p-len-noaddr") + testDeepEqualErr(v127v1, v127va[:len(v127v1)], t, "equal-slice-v127-p-len-noaddr") + v127va = [8]uint32{} // clear the array + testUnmarshalErr((&v127va)[:], bs127, h, t, "dec-slice-v127-p-cap-noaddr") + testDeepEqualErr(v127v1, v127va[:len(v127v1)], t, "equal-slice-v127-p-cap-noaddr") } - v144v3 = typeSliceUint64(v144v1) - bs144 = testMarshalErr(v144v3, h, t, "enc-slice-v144-custom") - v144v4 = typeSliceUint64(v144v2) - testUnmarshalErr(v144v4, bs144, h, t, "dec-slice-v144-custom") - testDeepEqualErr(v144v3, v144v4, t, "equal-slice-v144-custom") - v144v2 = nil - bs144 = testMarshalErr(&v144v3, h, t, "enc-slice-v144-custom-p") - v144v4 = typeSliceUint64(v144v2) - testUnmarshalErr(&v144v4, bs144, h, t, "dec-slice-v144-custom-p") - testDeepEqualErr(v144v3, v144v4, t, "equal-slice-v144-custom-p") + // ... + var v127v3, v127v4 typMbsSliceUint32 + v127v2 = nil + if v != nil { + v127v2 = make([]uint32, len(v)) + } + v127v3 = typMbsSliceUint32(v127v1) + v127v4 = typMbsSliceUint32(v127v2) + bs127 = testMarshalErr(v127v3, h, t, "enc-slice-v127-custom") + testUnmarshalErr(v127v4, bs127, h, t, "dec-slice-v127-custom") + testDeepEqualErr(v127v3, v127v4, t, "equal-slice-v127-custom") + bs127 = testMarshalErr(&v127v3, h, t, "enc-slice-v127-custom-p") + v127v2 = nil + v127v4 = typMbsSliceUint32(v127v2) + testUnmarshalErr(&v127v4, bs127, h, t, "dec-slice-v127-custom-p") + testDeepEqualErr(v127v3, v127v4, t, "equal-slice-v127-custom-p") } - for _, v := range [][]uintptr{nil, []uintptr{}, []uintptr{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v162: %v\n", v) - var v162v1, v162v2, v162v3, v162v4 []uintptr - v162v1 = v - bs162 := testMarshalErr(v162v1, h, t, "enc-slice-v162") - if v != nil { - v162v2 = make([]uintptr, len(v)) + var v145va [8]uint64 + for _, v := range [][]uint64{nil, {}, {44, 0, 0, 33}} { + var v145v1, v145v2 []uint64 + v145v1 = v + bs145 := testMarshalErr(v145v1, h, t, "enc-slice-v145") + if v == nil { + v145v2 = nil + } else { + v145v2 = make([]uint64, len(v)) } - testUnmarshalErr(v162v2, bs162, h, t, "dec-slice-v162") - testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162") - bs162 = testMarshalErr(&v162v1, h, t, "enc-slice-v162-p") - v162v2 = nil - testUnmarshalErr(&v162v2, bs162, h, t, "dec-slice-v162-p") - testDeepEqualErr(v162v1, v162v2, t, "equal-slice-v162-p") + testUnmarshalErr(v145v2, bs145, h, t, "dec-slice-v145") + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145") + if v == nil { + v145v2 = nil + } else { + v145v2 = make([]uint64, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v145v2), bs145, h, t, "dec-slice-v145-noaddr") // non-addressable value + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-noaddr") // ... - v162v2 = nil - if v != nil { - v162v2 = make([]uintptr, len(v)) + bs145 = testMarshalErr(&v145v1, h, t, "enc-slice-v145-p") + v145v2 = nil + testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p") + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p") + v145va = [8]uint64{} // clear the array + v145v2 = v145va[:1:1] + testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-1") + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-1") + v145va = [8]uint64{} // clear the array + v145v2 = v145va[:len(v145v1):len(v145v1)] + testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-len") + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-len") + v145va = [8]uint64{} // clear the array + v145v2 = v145va[:] + testUnmarshalErr(&v145v2, bs145, h, t, "dec-slice-v145-p-cap") + testDeepEqualErr(v145v1, v145v2, t, "equal-slice-v145-p-cap") + if len(v145v1) > 1 { + v145va = [8]uint64{} // clear the array + testUnmarshalErr((&v145va)[:len(v145v1)], bs145, h, t, "dec-slice-v145-p-len-noaddr") + testDeepEqualErr(v145v1, v145va[:len(v145v1)], t, "equal-slice-v145-p-len-noaddr") + v145va = [8]uint64{} // clear the array + testUnmarshalErr((&v145va)[:], bs145, h, t, "dec-slice-v145-p-cap-noaddr") + testDeepEqualErr(v145v1, v145va[:len(v145v1)], t, "equal-slice-v145-p-cap-noaddr") } - v162v3 = typeSliceUintptr(v162v1) - bs162 = testMarshalErr(v162v3, h, t, "enc-slice-v162-custom") - v162v4 = typeSliceUintptr(v162v2) - testUnmarshalErr(v162v4, bs162, h, t, "dec-slice-v162-custom") - testDeepEqualErr(v162v3, v162v4, t, "equal-slice-v162-custom") - v162v2 = nil - bs162 = testMarshalErr(&v162v3, h, t, "enc-slice-v162-custom-p") - v162v4 = typeSliceUintptr(v162v2) - testUnmarshalErr(&v162v4, bs162, h, t, "dec-slice-v162-custom-p") - testDeepEqualErr(v162v3, v162v4, t, "equal-slice-v162-custom-p") + // ... + var v145v3, v145v4 typMbsSliceUint64 + v145v2 = nil + if v != nil { + v145v2 = make([]uint64, len(v)) + } + v145v3 = typMbsSliceUint64(v145v1) + v145v4 = typMbsSliceUint64(v145v2) + bs145 = testMarshalErr(v145v3, h, t, "enc-slice-v145-custom") + testUnmarshalErr(v145v4, bs145, h, t, "dec-slice-v145-custom") + testDeepEqualErr(v145v3, v145v4, t, "equal-slice-v145-custom") + bs145 = testMarshalErr(&v145v3, h, t, "enc-slice-v145-custom-p") + v145v2 = nil + v145v4 = typMbsSliceUint64(v145v2) + testUnmarshalErr(&v145v4, bs145, h, t, "dec-slice-v145-custom-p") + testDeepEqualErr(v145v3, v145v4, t, "equal-slice-v145-custom-p") } - for _, v := range [][]int{nil, []int{}, []int{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v180: %v\n", v) - var v180v1, v180v2, v180v3, v180v4 []int - v180v1 = v - bs180 := testMarshalErr(v180v1, h, t, "enc-slice-v180") - if v != nil { - v180v2 = make([]int, len(v)) + var v163va [8]uintptr + for _, v := range [][]uintptr{nil, {}, {44, 0, 0, 33}} { + var v163v1, v163v2 []uintptr + v163v1 = v + bs163 := testMarshalErr(v163v1, h, t, "enc-slice-v163") + if v == nil { + v163v2 = nil + } else { + v163v2 = make([]uintptr, len(v)) } - testUnmarshalErr(v180v2, bs180, h, t, "dec-slice-v180") - testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180") - bs180 = testMarshalErr(&v180v1, h, t, "enc-slice-v180-p") - v180v2 = nil - testUnmarshalErr(&v180v2, bs180, h, t, "dec-slice-v180-p") - testDeepEqualErr(v180v1, v180v2, t, "equal-slice-v180-p") + testUnmarshalErr(v163v2, bs163, h, t, "dec-slice-v163") + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163") + if v == nil { + v163v2 = nil + } else { + v163v2 = make([]uintptr, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v163v2), bs163, h, t, "dec-slice-v163-noaddr") // non-addressable value + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-noaddr") // ... - v180v2 = nil - if v != nil { - v180v2 = make([]int, len(v)) + bs163 = testMarshalErr(&v163v1, h, t, "enc-slice-v163-p") + v163v2 = nil + testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p") + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p") + v163va = [8]uintptr{} // clear the array + v163v2 = v163va[:1:1] + testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-1") + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-1") + v163va = [8]uintptr{} // clear the array + v163v2 = v163va[:len(v163v1):len(v163v1)] + testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-len") + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-len") + v163va = [8]uintptr{} // clear the array + v163v2 = v163va[:] + testUnmarshalErr(&v163v2, bs163, h, t, "dec-slice-v163-p-cap") + testDeepEqualErr(v163v1, v163v2, t, "equal-slice-v163-p-cap") + if len(v163v1) > 1 { + v163va = [8]uintptr{} // clear the array + testUnmarshalErr((&v163va)[:len(v163v1)], bs163, h, t, "dec-slice-v163-p-len-noaddr") + testDeepEqualErr(v163v1, v163va[:len(v163v1)], t, "equal-slice-v163-p-len-noaddr") + v163va = [8]uintptr{} // clear the array + testUnmarshalErr((&v163va)[:], bs163, h, t, "dec-slice-v163-p-cap-noaddr") + testDeepEqualErr(v163v1, v163va[:len(v163v1)], t, "equal-slice-v163-p-cap-noaddr") } - v180v3 = typeSliceInt(v180v1) - bs180 = testMarshalErr(v180v3, h, t, "enc-slice-v180-custom") - v180v4 = typeSliceInt(v180v2) - testUnmarshalErr(v180v4, bs180, h, t, "dec-slice-v180-custom") - testDeepEqualErr(v180v3, v180v4, t, "equal-slice-v180-custom") - v180v2 = nil - bs180 = testMarshalErr(&v180v3, h, t, "enc-slice-v180-custom-p") - v180v4 = typeSliceInt(v180v2) - testUnmarshalErr(&v180v4, bs180, h, t, "dec-slice-v180-custom-p") - testDeepEqualErr(v180v3, v180v4, t, "equal-slice-v180-custom-p") + // ... + var v163v3, v163v4 typMbsSliceUintptr + v163v2 = nil + if v != nil { + v163v2 = make([]uintptr, len(v)) + } + v163v3 = typMbsSliceUintptr(v163v1) + v163v4 = typMbsSliceUintptr(v163v2) + bs163 = testMarshalErr(v163v3, h, t, "enc-slice-v163-custom") + testUnmarshalErr(v163v4, bs163, h, t, "dec-slice-v163-custom") + testDeepEqualErr(v163v3, v163v4, t, "equal-slice-v163-custom") + bs163 = testMarshalErr(&v163v3, h, t, "enc-slice-v163-custom-p") + v163v2 = nil + v163v4 = typMbsSliceUintptr(v163v2) + testUnmarshalErr(&v163v4, bs163, h, t, "dec-slice-v163-custom-p") + testDeepEqualErr(v163v3, v163v4, t, "equal-slice-v163-custom-p") } - for _, v := range [][]int8{nil, []int8{}, []int8{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v198: %v\n", v) - var v198v1, v198v2, v198v3, v198v4 []int8 - v198v1 = v - bs198 := testMarshalErr(v198v1, h, t, "enc-slice-v198") - if v != nil { - v198v2 = make([]int8, len(v)) + var v181va [8]int + for _, v := range [][]int{nil, {}, {44, 0, 0, 33}} { + var v181v1, v181v2 []int + v181v1 = v + bs181 := testMarshalErr(v181v1, h, t, "enc-slice-v181") + if v == nil { + v181v2 = nil + } else { + v181v2 = make([]int, len(v)) } - testUnmarshalErr(v198v2, bs198, h, t, "dec-slice-v198") - testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198") - bs198 = testMarshalErr(&v198v1, h, t, "enc-slice-v198-p") - v198v2 = nil - testUnmarshalErr(&v198v2, bs198, h, t, "dec-slice-v198-p") - testDeepEqualErr(v198v1, v198v2, t, "equal-slice-v198-p") + testUnmarshalErr(v181v2, bs181, h, t, "dec-slice-v181") + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181") + if v == nil { + v181v2 = nil + } else { + v181v2 = make([]int, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v181v2), bs181, h, t, "dec-slice-v181-noaddr") // non-addressable value + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-noaddr") // ... - v198v2 = nil - if v != nil { - v198v2 = make([]int8, len(v)) + bs181 = testMarshalErr(&v181v1, h, t, "enc-slice-v181-p") + v181v2 = nil + testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p") + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p") + v181va = [8]int{} // clear the array + v181v2 = v181va[:1:1] + testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-1") + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-1") + v181va = [8]int{} // clear the array + v181v2 = v181va[:len(v181v1):len(v181v1)] + testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-len") + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-len") + v181va = [8]int{} // clear the array + v181v2 = v181va[:] + testUnmarshalErr(&v181v2, bs181, h, t, "dec-slice-v181-p-cap") + testDeepEqualErr(v181v1, v181v2, t, "equal-slice-v181-p-cap") + if len(v181v1) > 1 { + v181va = [8]int{} // clear the array + testUnmarshalErr((&v181va)[:len(v181v1)], bs181, h, t, "dec-slice-v181-p-len-noaddr") + testDeepEqualErr(v181v1, v181va[:len(v181v1)], t, "equal-slice-v181-p-len-noaddr") + v181va = [8]int{} // clear the array + testUnmarshalErr((&v181va)[:], bs181, h, t, "dec-slice-v181-p-cap-noaddr") + testDeepEqualErr(v181v1, v181va[:len(v181v1)], t, "equal-slice-v181-p-cap-noaddr") } - v198v3 = typeSliceInt8(v198v1) - bs198 = testMarshalErr(v198v3, h, t, "enc-slice-v198-custom") - v198v4 = typeSliceInt8(v198v2) - testUnmarshalErr(v198v4, bs198, h, t, "dec-slice-v198-custom") - testDeepEqualErr(v198v3, v198v4, t, "equal-slice-v198-custom") - v198v2 = nil - bs198 = testMarshalErr(&v198v3, h, t, "enc-slice-v198-custom-p") - v198v4 = typeSliceInt8(v198v2) - testUnmarshalErr(&v198v4, bs198, h, t, "dec-slice-v198-custom-p") - testDeepEqualErr(v198v3, v198v4, t, "equal-slice-v198-custom-p") + // ... + var v181v3, v181v4 typMbsSliceInt + v181v2 = nil + if v != nil { + v181v2 = make([]int, len(v)) + } + v181v3 = typMbsSliceInt(v181v1) + v181v4 = typMbsSliceInt(v181v2) + bs181 = testMarshalErr(v181v3, h, t, "enc-slice-v181-custom") + testUnmarshalErr(v181v4, bs181, h, t, "dec-slice-v181-custom") + testDeepEqualErr(v181v3, v181v4, t, "equal-slice-v181-custom") + bs181 = testMarshalErr(&v181v3, h, t, "enc-slice-v181-custom-p") + v181v2 = nil + v181v4 = typMbsSliceInt(v181v2) + testUnmarshalErr(&v181v4, bs181, h, t, "dec-slice-v181-custom-p") + testDeepEqualErr(v181v3, v181v4, t, "equal-slice-v181-custom-p") } - for _, v := range [][]int16{nil, []int16{}, []int16{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v216: %v\n", v) - var v216v1, v216v2, v216v3, v216v4 []int16 - v216v1 = v - bs216 := testMarshalErr(v216v1, h, t, "enc-slice-v216") - if v != nil { - v216v2 = make([]int16, len(v)) + var v199va [8]int8 + for _, v := range [][]int8{nil, {}, {44, 0, 0, 33}} { + var v199v1, v199v2 []int8 + v199v1 = v + bs199 := testMarshalErr(v199v1, h, t, "enc-slice-v199") + if v == nil { + v199v2 = nil + } else { + v199v2 = make([]int8, len(v)) } - testUnmarshalErr(v216v2, bs216, h, t, "dec-slice-v216") - testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216") - bs216 = testMarshalErr(&v216v1, h, t, "enc-slice-v216-p") - v216v2 = nil - testUnmarshalErr(&v216v2, bs216, h, t, "dec-slice-v216-p") - testDeepEqualErr(v216v1, v216v2, t, "equal-slice-v216-p") + testUnmarshalErr(v199v2, bs199, h, t, "dec-slice-v199") + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199") + if v == nil { + v199v2 = nil + } else { + v199v2 = make([]int8, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v199v2), bs199, h, t, "dec-slice-v199-noaddr") // non-addressable value + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-noaddr") // ... - v216v2 = nil - if v != nil { - v216v2 = make([]int16, len(v)) + bs199 = testMarshalErr(&v199v1, h, t, "enc-slice-v199-p") + v199v2 = nil + testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p") + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p") + v199va = [8]int8{} // clear the array + v199v2 = v199va[:1:1] + testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-1") + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-1") + v199va = [8]int8{} // clear the array + v199v2 = v199va[:len(v199v1):len(v199v1)] + testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-len") + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-len") + v199va = [8]int8{} // clear the array + v199v2 = v199va[:] + testUnmarshalErr(&v199v2, bs199, h, t, "dec-slice-v199-p-cap") + testDeepEqualErr(v199v1, v199v2, t, "equal-slice-v199-p-cap") + if len(v199v1) > 1 { + v199va = [8]int8{} // clear the array + testUnmarshalErr((&v199va)[:len(v199v1)], bs199, h, t, "dec-slice-v199-p-len-noaddr") + testDeepEqualErr(v199v1, v199va[:len(v199v1)], t, "equal-slice-v199-p-len-noaddr") + v199va = [8]int8{} // clear the array + testUnmarshalErr((&v199va)[:], bs199, h, t, "dec-slice-v199-p-cap-noaddr") + testDeepEqualErr(v199v1, v199va[:len(v199v1)], t, "equal-slice-v199-p-cap-noaddr") } - v216v3 = typeSliceInt16(v216v1) - bs216 = testMarshalErr(v216v3, h, t, "enc-slice-v216-custom") - v216v4 = typeSliceInt16(v216v2) - testUnmarshalErr(v216v4, bs216, h, t, "dec-slice-v216-custom") - testDeepEqualErr(v216v3, v216v4, t, "equal-slice-v216-custom") - v216v2 = nil - bs216 = testMarshalErr(&v216v3, h, t, "enc-slice-v216-custom-p") - v216v4 = typeSliceInt16(v216v2) - testUnmarshalErr(&v216v4, bs216, h, t, "dec-slice-v216-custom-p") - testDeepEqualErr(v216v3, v216v4, t, "equal-slice-v216-custom-p") + // ... + var v199v3, v199v4 typMbsSliceInt8 + v199v2 = nil + if v != nil { + v199v2 = make([]int8, len(v)) + } + v199v3 = typMbsSliceInt8(v199v1) + v199v4 = typMbsSliceInt8(v199v2) + bs199 = testMarshalErr(v199v3, h, t, "enc-slice-v199-custom") + testUnmarshalErr(v199v4, bs199, h, t, "dec-slice-v199-custom") + testDeepEqualErr(v199v3, v199v4, t, "equal-slice-v199-custom") + bs199 = testMarshalErr(&v199v3, h, t, "enc-slice-v199-custom-p") + v199v2 = nil + v199v4 = typMbsSliceInt8(v199v2) + testUnmarshalErr(&v199v4, bs199, h, t, "dec-slice-v199-custom-p") + testDeepEqualErr(v199v3, v199v4, t, "equal-slice-v199-custom-p") } - for _, v := range [][]int32{nil, []int32{}, []int32{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v234: %v\n", v) - var v234v1, v234v2, v234v3, v234v4 []int32 - v234v1 = v - bs234 := testMarshalErr(v234v1, h, t, "enc-slice-v234") - if v != nil { - v234v2 = make([]int32, len(v)) + var v217va [8]int16 + for _, v := range [][]int16{nil, {}, {44, 0, 0, 33}} { + var v217v1, v217v2 []int16 + v217v1 = v + bs217 := testMarshalErr(v217v1, h, t, "enc-slice-v217") + if v == nil { + v217v2 = nil + } else { + v217v2 = make([]int16, len(v)) } - testUnmarshalErr(v234v2, bs234, h, t, "dec-slice-v234") - testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234") - bs234 = testMarshalErr(&v234v1, h, t, "enc-slice-v234-p") - v234v2 = nil - testUnmarshalErr(&v234v2, bs234, h, t, "dec-slice-v234-p") - testDeepEqualErr(v234v1, v234v2, t, "equal-slice-v234-p") + testUnmarshalErr(v217v2, bs217, h, t, "dec-slice-v217") + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217") + if v == nil { + v217v2 = nil + } else { + v217v2 = make([]int16, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v217v2), bs217, h, t, "dec-slice-v217-noaddr") // non-addressable value + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-noaddr") // ... - v234v2 = nil - if v != nil { - v234v2 = make([]int32, len(v)) + bs217 = testMarshalErr(&v217v1, h, t, "enc-slice-v217-p") + v217v2 = nil + testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p") + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p") + v217va = [8]int16{} // clear the array + v217v2 = v217va[:1:1] + testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-1") + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-1") + v217va = [8]int16{} // clear the array + v217v2 = v217va[:len(v217v1):len(v217v1)] + testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-len") + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-len") + v217va = [8]int16{} // clear the array + v217v2 = v217va[:] + testUnmarshalErr(&v217v2, bs217, h, t, "dec-slice-v217-p-cap") + testDeepEqualErr(v217v1, v217v2, t, "equal-slice-v217-p-cap") + if len(v217v1) > 1 { + v217va = [8]int16{} // clear the array + testUnmarshalErr((&v217va)[:len(v217v1)], bs217, h, t, "dec-slice-v217-p-len-noaddr") + testDeepEqualErr(v217v1, v217va[:len(v217v1)], t, "equal-slice-v217-p-len-noaddr") + v217va = [8]int16{} // clear the array + testUnmarshalErr((&v217va)[:], bs217, h, t, "dec-slice-v217-p-cap-noaddr") + testDeepEqualErr(v217v1, v217va[:len(v217v1)], t, "equal-slice-v217-p-cap-noaddr") } - v234v3 = typeSliceInt32(v234v1) - bs234 = testMarshalErr(v234v3, h, t, "enc-slice-v234-custom") - v234v4 = typeSliceInt32(v234v2) - testUnmarshalErr(v234v4, bs234, h, t, "dec-slice-v234-custom") - testDeepEqualErr(v234v3, v234v4, t, "equal-slice-v234-custom") - v234v2 = nil - bs234 = testMarshalErr(&v234v3, h, t, "enc-slice-v234-custom-p") - v234v4 = typeSliceInt32(v234v2) - testUnmarshalErr(&v234v4, bs234, h, t, "dec-slice-v234-custom-p") - testDeepEqualErr(v234v3, v234v4, t, "equal-slice-v234-custom-p") + // ... + var v217v3, v217v4 typMbsSliceInt16 + v217v2 = nil + if v != nil { + v217v2 = make([]int16, len(v)) + } + v217v3 = typMbsSliceInt16(v217v1) + v217v4 = typMbsSliceInt16(v217v2) + bs217 = testMarshalErr(v217v3, h, t, "enc-slice-v217-custom") + testUnmarshalErr(v217v4, bs217, h, t, "dec-slice-v217-custom") + testDeepEqualErr(v217v3, v217v4, t, "equal-slice-v217-custom") + bs217 = testMarshalErr(&v217v3, h, t, "enc-slice-v217-custom-p") + v217v2 = nil + v217v4 = typMbsSliceInt16(v217v2) + testUnmarshalErr(&v217v4, bs217, h, t, "dec-slice-v217-custom-p") + testDeepEqualErr(v217v3, v217v4, t, "equal-slice-v217-custom-p") } - for _, v := range [][]int64{nil, []int64{}, []int64{10, 10}} { - // fmt.Printf(">>>> running mammoth slice v252: %v\n", v) - var v252v1, v252v2, v252v3, v252v4 []int64 - v252v1 = v - bs252 := testMarshalErr(v252v1, h, t, "enc-slice-v252") - if v != nil { - v252v2 = make([]int64, len(v)) + var v235va [8]int32 + for _, v := range [][]int32{nil, {}, {44, 0, 0, 33}} { + var v235v1, v235v2 []int32 + v235v1 = v + bs235 := testMarshalErr(v235v1, h, t, "enc-slice-v235") + if v == nil { + v235v2 = nil + } else { + v235v2 = make([]int32, len(v)) } - testUnmarshalErr(v252v2, bs252, h, t, "dec-slice-v252") - testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252") - bs252 = testMarshalErr(&v252v1, h, t, "enc-slice-v252-p") - v252v2 = nil - testUnmarshalErr(&v252v2, bs252, h, t, "dec-slice-v252-p") - testDeepEqualErr(v252v1, v252v2, t, "equal-slice-v252-p") + testUnmarshalErr(v235v2, bs235, h, t, "dec-slice-v235") + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235") + if v == nil { + v235v2 = nil + } else { + v235v2 = make([]int32, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v235v2), bs235, h, t, "dec-slice-v235-noaddr") // non-addressable value + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-noaddr") // ... - v252v2 = nil - if v != nil { - v252v2 = make([]int64, len(v)) + bs235 = testMarshalErr(&v235v1, h, t, "enc-slice-v235-p") + v235v2 = nil + testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p") + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p") + v235va = [8]int32{} // clear the array + v235v2 = v235va[:1:1] + testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-1") + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-1") + v235va = [8]int32{} // clear the array + v235v2 = v235va[:len(v235v1):len(v235v1)] + testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-len") + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-len") + v235va = [8]int32{} // clear the array + v235v2 = v235va[:] + testUnmarshalErr(&v235v2, bs235, h, t, "dec-slice-v235-p-cap") + testDeepEqualErr(v235v1, v235v2, t, "equal-slice-v235-p-cap") + if len(v235v1) > 1 { + v235va = [8]int32{} // clear the array + testUnmarshalErr((&v235va)[:len(v235v1)], bs235, h, t, "dec-slice-v235-p-len-noaddr") + testDeepEqualErr(v235v1, v235va[:len(v235v1)], t, "equal-slice-v235-p-len-noaddr") + v235va = [8]int32{} // clear the array + testUnmarshalErr((&v235va)[:], bs235, h, t, "dec-slice-v235-p-cap-noaddr") + testDeepEqualErr(v235v1, v235va[:len(v235v1)], t, "equal-slice-v235-p-cap-noaddr") } - v252v3 = typeSliceInt64(v252v1) - bs252 = testMarshalErr(v252v3, h, t, "enc-slice-v252-custom") - v252v4 = typeSliceInt64(v252v2) - testUnmarshalErr(v252v4, bs252, h, t, "dec-slice-v252-custom") - testDeepEqualErr(v252v3, v252v4, t, "equal-slice-v252-custom") - v252v2 = nil - bs252 = testMarshalErr(&v252v3, h, t, "enc-slice-v252-custom-p") - v252v4 = typeSliceInt64(v252v2) - testUnmarshalErr(&v252v4, bs252, h, t, "dec-slice-v252-custom-p") - testDeepEqualErr(v252v3, v252v4, t, "equal-slice-v252-custom-p") + // ... + var v235v3, v235v4 typMbsSliceInt32 + v235v2 = nil + if v != nil { + v235v2 = make([]int32, len(v)) + } + v235v3 = typMbsSliceInt32(v235v1) + v235v4 = typMbsSliceInt32(v235v2) + bs235 = testMarshalErr(v235v3, h, t, "enc-slice-v235-custom") + testUnmarshalErr(v235v4, bs235, h, t, "dec-slice-v235-custom") + testDeepEqualErr(v235v3, v235v4, t, "equal-slice-v235-custom") + bs235 = testMarshalErr(&v235v3, h, t, "enc-slice-v235-custom-p") + v235v2 = nil + v235v4 = typMbsSliceInt32(v235v2) + testUnmarshalErr(&v235v4, bs235, h, t, "dec-slice-v235-custom-p") + testDeepEqualErr(v235v3, v235v4, t, "equal-slice-v235-custom-p") } - for _, v := range [][]bool{nil, []bool{}, []bool{true, true}} { - // fmt.Printf(">>>> running mammoth slice v270: %v\n", v) - var v270v1, v270v2, v270v3, v270v4 []bool - v270v1 = v - bs270 := testMarshalErr(v270v1, h, t, "enc-slice-v270") - if v != nil { - v270v2 = make([]bool, len(v)) + var v253va [8]int64 + for _, v := range [][]int64{nil, {}, {44, 0, 0, 33}} { + var v253v1, v253v2 []int64 + v253v1 = v + bs253 := testMarshalErr(v253v1, h, t, "enc-slice-v253") + if v == nil { + v253v2 = nil + } else { + v253v2 = make([]int64, len(v)) } - testUnmarshalErr(v270v2, bs270, h, t, "dec-slice-v270") - testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270") - bs270 = testMarshalErr(&v270v1, h, t, "enc-slice-v270-p") - v270v2 = nil - testUnmarshalErr(&v270v2, bs270, h, t, "dec-slice-v270-p") - testDeepEqualErr(v270v1, v270v2, t, "equal-slice-v270-p") + testUnmarshalErr(v253v2, bs253, h, t, "dec-slice-v253") + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253") + if v == nil { + v253v2 = nil + } else { + v253v2 = make([]int64, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v253v2), bs253, h, t, "dec-slice-v253-noaddr") // non-addressable value + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-noaddr") // ... - v270v2 = nil - if v != nil { - v270v2 = make([]bool, len(v)) + bs253 = testMarshalErr(&v253v1, h, t, "enc-slice-v253-p") + v253v2 = nil + testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p") + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p") + v253va = [8]int64{} // clear the array + v253v2 = v253va[:1:1] + testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-1") + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-1") + v253va = [8]int64{} // clear the array + v253v2 = v253va[:len(v253v1):len(v253v1)] + testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-len") + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-len") + v253va = [8]int64{} // clear the array + v253v2 = v253va[:] + testUnmarshalErr(&v253v2, bs253, h, t, "dec-slice-v253-p-cap") + testDeepEqualErr(v253v1, v253v2, t, "equal-slice-v253-p-cap") + if len(v253v1) > 1 { + v253va = [8]int64{} // clear the array + testUnmarshalErr((&v253va)[:len(v253v1)], bs253, h, t, "dec-slice-v253-p-len-noaddr") + testDeepEqualErr(v253v1, v253va[:len(v253v1)], t, "equal-slice-v253-p-len-noaddr") + v253va = [8]int64{} // clear the array + testUnmarshalErr((&v253va)[:], bs253, h, t, "dec-slice-v253-p-cap-noaddr") + testDeepEqualErr(v253v1, v253va[:len(v253v1)], t, "equal-slice-v253-p-cap-noaddr") } - v270v3 = typeSliceBool(v270v1) - bs270 = testMarshalErr(v270v3, h, t, "enc-slice-v270-custom") - v270v4 = typeSliceBool(v270v2) - testUnmarshalErr(v270v4, bs270, h, t, "dec-slice-v270-custom") - testDeepEqualErr(v270v3, v270v4, t, "equal-slice-v270-custom") - v270v2 = nil - bs270 = testMarshalErr(&v270v3, h, t, "enc-slice-v270-custom-p") - v270v4 = typeSliceBool(v270v2) - testUnmarshalErr(&v270v4, bs270, h, t, "dec-slice-v270-custom-p") - testDeepEqualErr(v270v3, v270v4, t, "equal-slice-v270-custom-p") + // ... + var v253v3, v253v4 typMbsSliceInt64 + v253v2 = nil + if v != nil { + v253v2 = make([]int64, len(v)) + } + v253v3 = typMbsSliceInt64(v253v1) + v253v4 = typMbsSliceInt64(v253v2) + bs253 = testMarshalErr(v253v3, h, t, "enc-slice-v253-custom") + testUnmarshalErr(v253v4, bs253, h, t, "dec-slice-v253-custom") + testDeepEqualErr(v253v3, v253v4, t, "equal-slice-v253-custom") + bs253 = testMarshalErr(&v253v3, h, t, "enc-slice-v253-custom-p") + v253v2 = nil + v253v4 = typMbsSliceInt64(v253v2) + testUnmarshalErr(&v253v4, bs253, h, t, "dec-slice-v253-custom-p") + testDeepEqualErr(v253v3, v253v4, t, "equal-slice-v253-custom-p") + } + + var v271va [8]bool + for _, v := range [][]bool{nil, {}, {true, false, false, true}} { + var v271v1, v271v2 []bool + v271v1 = v + bs271 := testMarshalErr(v271v1, h, t, "enc-slice-v271") + if v == nil { + v271v2 = nil + } else { + v271v2 = make([]bool, len(v)) + } + testUnmarshalErr(v271v2, bs271, h, t, "dec-slice-v271") + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271") + if v == nil { + v271v2 = nil + } else { + v271v2 = make([]bool, len(v)) + } + testUnmarshalErr(reflect.ValueOf(v271v2), bs271, h, t, "dec-slice-v271-noaddr") // non-addressable value + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-noaddr") + // ... + bs271 = testMarshalErr(&v271v1, h, t, "enc-slice-v271-p") + v271v2 = nil + testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p") + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p") + v271va = [8]bool{} // clear the array + v271v2 = v271va[:1:1] + testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-1") + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-1") + v271va = [8]bool{} // clear the array + v271v2 = v271va[:len(v271v1):len(v271v1)] + testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-len") + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-len") + v271va = [8]bool{} // clear the array + v271v2 = v271va[:] + testUnmarshalErr(&v271v2, bs271, h, t, "dec-slice-v271-p-cap") + testDeepEqualErr(v271v1, v271v2, t, "equal-slice-v271-p-cap") + if len(v271v1) > 1 { + v271va = [8]bool{} // clear the array + testUnmarshalErr((&v271va)[:len(v271v1)], bs271, h, t, "dec-slice-v271-p-len-noaddr") + testDeepEqualErr(v271v1, v271va[:len(v271v1)], t, "equal-slice-v271-p-len-noaddr") + v271va = [8]bool{} // clear the array + testUnmarshalErr((&v271va)[:], bs271, h, t, "dec-slice-v271-p-cap-noaddr") + testDeepEqualErr(v271v1, v271va[:len(v271v1)], t, "equal-slice-v271-p-cap-noaddr") + } + // ... + var v271v3, v271v4 typMbsSliceBool + v271v2 = nil + if v != nil { + v271v2 = make([]bool, len(v)) + } + v271v3 = typMbsSliceBool(v271v1) + v271v4 = typMbsSliceBool(v271v2) + bs271 = testMarshalErr(v271v3, h, t, "enc-slice-v271-custom") + testUnmarshalErr(v271v4, bs271, h, t, "dec-slice-v271-custom") + testDeepEqualErr(v271v3, v271v4, t, "equal-slice-v271-custom") + bs271 = testMarshalErr(&v271v3, h, t, "enc-slice-v271-custom-p") + v271v2 = nil + v271v4 = typMbsSliceBool(v271v2) + testUnmarshalErr(&v271v4, bs271, h, t, "dec-slice-v271-custom-p") + testDeepEqualErr(v271v3, v271v4, t, "equal-slice-v271-custom-p") } } func doTestMammothMaps(t *testing.T, h Handle) { - for _, v := range []map[interface{}]interface{}{nil, map[interface{}]interface{}{}, map[interface{}]interface{}{"string-is-an-interface": "string-is-an-interface"}} { + for _, v := range []map[interface{}]interface{}{nil, {}, {"string-is-an-interface-2": nil, "string-is-an-interface": "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v2: %v\n", v) var v2v1, v2v2 map[interface{}]interface{} v2v1 = v bs2 := testMarshalErr(v2v1, h, t, "enc-map-v2") - if v != nil { + if v == nil { + v2v2 = nil + } else { v2v2 = make(map[interface{}]interface{}, len(v)) - } + } // reset map testUnmarshalErr(v2v2, bs2, h, t, "dec-map-v2") testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2") + if v == nil { + v2v2 = nil + } else { + v2v2 = make(map[interface{}]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v2v2), bs2, h, t, "dec-map-v2-noaddr") // decode into non-addressable map value + testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-noaddr") + if v == nil { + v2v2 = nil + } else { + v2v2 = make(map[interface{}]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-len") + testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-len") bs2 = testMarshalErr(&v2v1, h, t, "enc-map-v2-p") v2v2 = nil - testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p") - testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p") + testUnmarshalErr(&v2v2, bs2, h, t, "dec-map-v2-p-nil") + testDeepEqualErr(v2v1, v2v2, t, "equal-map-v2-p-nil") + // ... + if v == nil { + v2v2 = nil + } else { + v2v2 = make(map[interface{}]interface{}, len(v)) + } // reset map + var v2v3, v2v4 typMapMapIntfIntf + v2v3 = typMapMapIntfIntf(v2v1) + v2v4 = typMapMapIntfIntf(v2v2) + bs2 = testMarshalErr(v2v3, h, t, "enc-map-v2-custom") + testUnmarshalErr(v2v4, bs2, h, t, "dec-map-v2-p-len") + testDeepEqualErr(v2v3, v2v4, t, "equal-map-v2-p-len") } - for _, v := range []map[interface{}]string{nil, map[interface{}]string{}, map[interface{}]string{"string-is-an-interface": "some-string"}} { + for _, v := range []map[interface{}]string{nil, {}, {"string-is-an-interface": "", "string-is-an-interface-2": "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v3: %v\n", v) var v3v1, v3v2 map[interface{}]string v3v1 = v bs3 := testMarshalErr(v3v1, h, t, "enc-map-v3") - if v != nil { + if v == nil { + v3v2 = nil + } else { v3v2 = make(map[interface{}]string, len(v)) - } + } // reset map testUnmarshalErr(v3v2, bs3, h, t, "dec-map-v3") testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3") + if v == nil { + v3v2 = nil + } else { + v3v2 = make(map[interface{}]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v3v2), bs3, h, t, "dec-map-v3-noaddr") // decode into non-addressable map value + testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-noaddr") + if v == nil { + v3v2 = nil + } else { + v3v2 = make(map[interface{}]string, len(v)) + } // reset map + testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-len") + testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-len") bs3 = testMarshalErr(&v3v1, h, t, "enc-map-v3-p") v3v2 = nil - testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p") - testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p") + testUnmarshalErr(&v3v2, bs3, h, t, "dec-map-v3-p-nil") + testDeepEqualErr(v3v1, v3v2, t, "equal-map-v3-p-nil") + // ... + if v == nil { + v3v2 = nil + } else { + v3v2 = make(map[interface{}]string, len(v)) + } // reset map + var v3v3, v3v4 typMapMapIntfString + v3v3 = typMapMapIntfString(v3v1) + v3v4 = typMapMapIntfString(v3v2) + bs3 = testMarshalErr(v3v3, h, t, "enc-map-v3-custom") + testUnmarshalErr(v3v4, bs3, h, t, "dec-map-v3-p-len") + testDeepEqualErr(v3v3, v3v4, t, "equal-map-v3-p-len") } - for _, v := range []map[interface{}]uint{nil, map[interface{}]uint{}, map[interface{}]uint{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uint{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v4: %v\n", v) var v4v1, v4v2 map[interface{}]uint v4v1 = v bs4 := testMarshalErr(v4v1, h, t, "enc-map-v4") - if v != nil { + if v == nil { + v4v2 = nil + } else { v4v2 = make(map[interface{}]uint, len(v)) - } + } // reset map testUnmarshalErr(v4v2, bs4, h, t, "dec-map-v4") testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4") + if v == nil { + v4v2 = nil + } else { + v4v2 = make(map[interface{}]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v4v2), bs4, h, t, "dec-map-v4-noaddr") // decode into non-addressable map value + testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-noaddr") + if v == nil { + v4v2 = nil + } else { + v4v2 = make(map[interface{}]uint, len(v)) + } // reset map + testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-len") + testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-len") bs4 = testMarshalErr(&v4v1, h, t, "enc-map-v4-p") v4v2 = nil - testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p") - testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p") + testUnmarshalErr(&v4v2, bs4, h, t, "dec-map-v4-p-nil") + testDeepEqualErr(v4v1, v4v2, t, "equal-map-v4-p-nil") + // ... + if v == nil { + v4v2 = nil + } else { + v4v2 = make(map[interface{}]uint, len(v)) + } // reset map + var v4v3, v4v4 typMapMapIntfUint + v4v3 = typMapMapIntfUint(v4v1) + v4v4 = typMapMapIntfUint(v4v2) + bs4 = testMarshalErr(v4v3, h, t, "enc-map-v4-custom") + testUnmarshalErr(v4v4, bs4, h, t, "dec-map-v4-p-len") + testDeepEqualErr(v4v3, v4v4, t, "equal-map-v4-p-len") } - for _, v := range []map[interface{}]uint8{nil, map[interface{}]uint8{}, map[interface{}]uint8{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uint8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} { // fmt.Printf(">>>> running mammoth map v5: %v\n", v) var v5v1, v5v2 map[interface{}]uint8 v5v1 = v bs5 := testMarshalErr(v5v1, h, t, "enc-map-v5") - if v != nil { + if v == nil { + v5v2 = nil + } else { v5v2 = make(map[interface{}]uint8, len(v)) - } + } // reset map testUnmarshalErr(v5v2, bs5, h, t, "dec-map-v5") testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5") + if v == nil { + v5v2 = nil + } else { + v5v2 = make(map[interface{}]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v5v2), bs5, h, t, "dec-map-v5-noaddr") // decode into non-addressable map value + testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-noaddr") + if v == nil { + v5v2 = nil + } else { + v5v2 = make(map[interface{}]uint8, len(v)) + } // reset map + testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-len") + testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-len") bs5 = testMarshalErr(&v5v1, h, t, "enc-map-v5-p") v5v2 = nil - testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p") - testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p") + testUnmarshalErr(&v5v2, bs5, h, t, "dec-map-v5-p-nil") + testDeepEqualErr(v5v1, v5v2, t, "equal-map-v5-p-nil") + // ... + if v == nil { + v5v2 = nil + } else { + v5v2 = make(map[interface{}]uint8, len(v)) + } // reset map + var v5v3, v5v4 typMapMapIntfUint8 + v5v3 = typMapMapIntfUint8(v5v1) + v5v4 = typMapMapIntfUint8(v5v2) + bs5 = testMarshalErr(v5v3, h, t, "enc-map-v5-custom") + testUnmarshalErr(v5v4, bs5, h, t, "dec-map-v5-p-len") + testDeepEqualErr(v5v3, v5v4, t, "equal-map-v5-p-len") } - for _, v := range []map[interface{}]uint16{nil, map[interface{}]uint16{}, map[interface{}]uint16{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uint16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v6: %v\n", v) var v6v1, v6v2 map[interface{}]uint16 v6v1 = v bs6 := testMarshalErr(v6v1, h, t, "enc-map-v6") - if v != nil { + if v == nil { + v6v2 = nil + } else { v6v2 = make(map[interface{}]uint16, len(v)) - } + } // reset map testUnmarshalErr(v6v2, bs6, h, t, "dec-map-v6") testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6") + if v == nil { + v6v2 = nil + } else { + v6v2 = make(map[interface{}]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v6v2), bs6, h, t, "dec-map-v6-noaddr") // decode into non-addressable map value + testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-noaddr") + if v == nil { + v6v2 = nil + } else { + v6v2 = make(map[interface{}]uint16, len(v)) + } // reset map + testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-len") + testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-len") bs6 = testMarshalErr(&v6v1, h, t, "enc-map-v6-p") v6v2 = nil - testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p") - testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p") + testUnmarshalErr(&v6v2, bs6, h, t, "dec-map-v6-p-nil") + testDeepEqualErr(v6v1, v6v2, t, "equal-map-v6-p-nil") + // ... + if v == nil { + v6v2 = nil + } else { + v6v2 = make(map[interface{}]uint16, len(v)) + } // reset map + var v6v3, v6v4 typMapMapIntfUint16 + v6v3 = typMapMapIntfUint16(v6v1) + v6v4 = typMapMapIntfUint16(v6v2) + bs6 = testMarshalErr(v6v3, h, t, "enc-map-v6-custom") + testUnmarshalErr(v6v4, bs6, h, t, "dec-map-v6-p-len") + testDeepEqualErr(v6v3, v6v4, t, "equal-map-v6-p-len") } - for _, v := range []map[interface{}]uint32{nil, map[interface{}]uint32{}, map[interface{}]uint32{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uint32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} { // fmt.Printf(">>>> running mammoth map v7: %v\n", v) var v7v1, v7v2 map[interface{}]uint32 v7v1 = v bs7 := testMarshalErr(v7v1, h, t, "enc-map-v7") - if v != nil { + if v == nil { + v7v2 = nil + } else { v7v2 = make(map[interface{}]uint32, len(v)) - } + } // reset map testUnmarshalErr(v7v2, bs7, h, t, "dec-map-v7") testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7") + if v == nil { + v7v2 = nil + } else { + v7v2 = make(map[interface{}]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v7v2), bs7, h, t, "dec-map-v7-noaddr") // decode into non-addressable map value + testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-noaddr") + if v == nil { + v7v2 = nil + } else { + v7v2 = make(map[interface{}]uint32, len(v)) + } // reset map + testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-len") + testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-len") bs7 = testMarshalErr(&v7v1, h, t, "enc-map-v7-p") v7v2 = nil - testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p") - testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p") + testUnmarshalErr(&v7v2, bs7, h, t, "dec-map-v7-p-nil") + testDeepEqualErr(v7v1, v7v2, t, "equal-map-v7-p-nil") + // ... + if v == nil { + v7v2 = nil + } else { + v7v2 = make(map[interface{}]uint32, len(v)) + } // reset map + var v7v3, v7v4 typMapMapIntfUint32 + v7v3 = typMapMapIntfUint32(v7v1) + v7v4 = typMapMapIntfUint32(v7v2) + bs7 = testMarshalErr(v7v3, h, t, "enc-map-v7-custom") + testUnmarshalErr(v7v4, bs7, h, t, "dec-map-v7-p-len") + testDeepEqualErr(v7v3, v7v4, t, "equal-map-v7-p-len") } - for _, v := range []map[interface{}]uint64{nil, map[interface{}]uint64{}, map[interface{}]uint64{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uint64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v8: %v\n", v) var v8v1, v8v2 map[interface{}]uint64 v8v1 = v bs8 := testMarshalErr(v8v1, h, t, "enc-map-v8") - if v != nil { + if v == nil { + v8v2 = nil + } else { v8v2 = make(map[interface{}]uint64, len(v)) - } + } // reset map testUnmarshalErr(v8v2, bs8, h, t, "dec-map-v8") testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8") + if v == nil { + v8v2 = nil + } else { + v8v2 = make(map[interface{}]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v8v2), bs8, h, t, "dec-map-v8-noaddr") // decode into non-addressable map value + testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-noaddr") + if v == nil { + v8v2 = nil + } else { + v8v2 = make(map[interface{}]uint64, len(v)) + } // reset map + testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-len") + testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-len") bs8 = testMarshalErr(&v8v1, h, t, "enc-map-v8-p") v8v2 = nil - testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p") - testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p") + testUnmarshalErr(&v8v2, bs8, h, t, "dec-map-v8-p-nil") + testDeepEqualErr(v8v1, v8v2, t, "equal-map-v8-p-nil") + // ... + if v == nil { + v8v2 = nil + } else { + v8v2 = make(map[interface{}]uint64, len(v)) + } // reset map + var v8v3, v8v4 typMapMapIntfUint64 + v8v3 = typMapMapIntfUint64(v8v1) + v8v4 = typMapMapIntfUint64(v8v2) + bs8 = testMarshalErr(v8v3, h, t, "enc-map-v8-custom") + testUnmarshalErr(v8v4, bs8, h, t, "dec-map-v8-p-len") + testDeepEqualErr(v8v3, v8v4, t, "equal-map-v8-p-len") } - for _, v := range []map[interface{}]uintptr{nil, map[interface{}]uintptr{}, map[interface{}]uintptr{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]uintptr{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} { // fmt.Printf(">>>> running mammoth map v9: %v\n", v) var v9v1, v9v2 map[interface{}]uintptr v9v1 = v bs9 := testMarshalErr(v9v1, h, t, "enc-map-v9") - if v != nil { + if v == nil { + v9v2 = nil + } else { v9v2 = make(map[interface{}]uintptr, len(v)) - } + } // reset map testUnmarshalErr(v9v2, bs9, h, t, "dec-map-v9") testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9") + if v == nil { + v9v2 = nil + } else { + v9v2 = make(map[interface{}]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v9v2), bs9, h, t, "dec-map-v9-noaddr") // decode into non-addressable map value + testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-noaddr") + if v == nil { + v9v2 = nil + } else { + v9v2 = make(map[interface{}]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-len") + testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-len") bs9 = testMarshalErr(&v9v1, h, t, "enc-map-v9-p") v9v2 = nil - testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p") - testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p") + testUnmarshalErr(&v9v2, bs9, h, t, "dec-map-v9-p-nil") + testDeepEqualErr(v9v1, v9v2, t, "equal-map-v9-p-nil") + // ... + if v == nil { + v9v2 = nil + } else { + v9v2 = make(map[interface{}]uintptr, len(v)) + } // reset map + var v9v3, v9v4 typMapMapIntfUintptr + v9v3 = typMapMapIntfUintptr(v9v1) + v9v4 = typMapMapIntfUintptr(v9v2) + bs9 = testMarshalErr(v9v3, h, t, "enc-map-v9-custom") + testUnmarshalErr(v9v4, bs9, h, t, "dec-map-v9-p-len") + testDeepEqualErr(v9v3, v9v4, t, "equal-map-v9-p-len") } - for _, v := range []map[interface{}]int{nil, map[interface{}]int{}, map[interface{}]int{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]int{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v10: %v\n", v) var v10v1, v10v2 map[interface{}]int v10v1 = v bs10 := testMarshalErr(v10v1, h, t, "enc-map-v10") - if v != nil { + if v == nil { + v10v2 = nil + } else { v10v2 = make(map[interface{}]int, len(v)) - } + } // reset map testUnmarshalErr(v10v2, bs10, h, t, "dec-map-v10") testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10") + if v == nil { + v10v2 = nil + } else { + v10v2 = make(map[interface{}]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v10v2), bs10, h, t, "dec-map-v10-noaddr") // decode into non-addressable map value + testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-noaddr") + if v == nil { + v10v2 = nil + } else { + v10v2 = make(map[interface{}]int, len(v)) + } // reset map + testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-len") + testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-len") bs10 = testMarshalErr(&v10v1, h, t, "enc-map-v10-p") v10v2 = nil - testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p") - testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p") + testUnmarshalErr(&v10v2, bs10, h, t, "dec-map-v10-p-nil") + testDeepEqualErr(v10v1, v10v2, t, "equal-map-v10-p-nil") + // ... + if v == nil { + v10v2 = nil + } else { + v10v2 = make(map[interface{}]int, len(v)) + } // reset map + var v10v3, v10v4 typMapMapIntfInt + v10v3 = typMapMapIntfInt(v10v1) + v10v4 = typMapMapIntfInt(v10v2) + bs10 = testMarshalErr(v10v3, h, t, "enc-map-v10-custom") + testUnmarshalErr(v10v4, bs10, h, t, "dec-map-v10-p-len") + testDeepEqualErr(v10v3, v10v4, t, "equal-map-v10-p-len") } - for _, v := range []map[interface{}]int8{nil, map[interface{}]int8{}, map[interface{}]int8{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]int8{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} { // fmt.Printf(">>>> running mammoth map v11: %v\n", v) var v11v1, v11v2 map[interface{}]int8 v11v1 = v bs11 := testMarshalErr(v11v1, h, t, "enc-map-v11") - if v != nil { + if v == nil { + v11v2 = nil + } else { v11v2 = make(map[interface{}]int8, len(v)) - } + } // reset map testUnmarshalErr(v11v2, bs11, h, t, "dec-map-v11") testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11") + if v == nil { + v11v2 = nil + } else { + v11v2 = make(map[interface{}]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v11v2), bs11, h, t, "dec-map-v11-noaddr") // decode into non-addressable map value + testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-noaddr") + if v == nil { + v11v2 = nil + } else { + v11v2 = make(map[interface{}]int8, len(v)) + } // reset map + testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-len") + testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-len") bs11 = testMarshalErr(&v11v1, h, t, "enc-map-v11-p") v11v2 = nil - testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p") - testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p") + testUnmarshalErr(&v11v2, bs11, h, t, "dec-map-v11-p-nil") + testDeepEqualErr(v11v1, v11v2, t, "equal-map-v11-p-nil") + // ... + if v == nil { + v11v2 = nil + } else { + v11v2 = make(map[interface{}]int8, len(v)) + } // reset map + var v11v3, v11v4 typMapMapIntfInt8 + v11v3 = typMapMapIntfInt8(v11v1) + v11v4 = typMapMapIntfInt8(v11v2) + bs11 = testMarshalErr(v11v3, h, t, "enc-map-v11-custom") + testUnmarshalErr(v11v4, bs11, h, t, "dec-map-v11-p-len") + testDeepEqualErr(v11v3, v11v4, t, "equal-map-v11-p-len") } - for _, v := range []map[interface{}]int16{nil, map[interface{}]int16{}, map[interface{}]int16{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]int16{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v12: %v\n", v) var v12v1, v12v2 map[interface{}]int16 v12v1 = v bs12 := testMarshalErr(v12v1, h, t, "enc-map-v12") - if v != nil { + if v == nil { + v12v2 = nil + } else { v12v2 = make(map[interface{}]int16, len(v)) - } + } // reset map testUnmarshalErr(v12v2, bs12, h, t, "dec-map-v12") testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12") + if v == nil { + v12v2 = nil + } else { + v12v2 = make(map[interface{}]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v12v2), bs12, h, t, "dec-map-v12-noaddr") // decode into non-addressable map value + testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-noaddr") + if v == nil { + v12v2 = nil + } else { + v12v2 = make(map[interface{}]int16, len(v)) + } // reset map + testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-len") + testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-len") bs12 = testMarshalErr(&v12v1, h, t, "enc-map-v12-p") v12v2 = nil - testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p") - testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p") + testUnmarshalErr(&v12v2, bs12, h, t, "dec-map-v12-p-nil") + testDeepEqualErr(v12v1, v12v2, t, "equal-map-v12-p-nil") + // ... + if v == nil { + v12v2 = nil + } else { + v12v2 = make(map[interface{}]int16, len(v)) + } // reset map + var v12v3, v12v4 typMapMapIntfInt16 + v12v3 = typMapMapIntfInt16(v12v1) + v12v4 = typMapMapIntfInt16(v12v2) + bs12 = testMarshalErr(v12v3, h, t, "enc-map-v12-custom") + testUnmarshalErr(v12v4, bs12, h, t, "dec-map-v12-p-len") + testDeepEqualErr(v12v3, v12v4, t, "equal-map-v12-p-len") } - for _, v := range []map[interface{}]int32{nil, map[interface{}]int32{}, map[interface{}]int32{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]int32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 33}} { // fmt.Printf(">>>> running mammoth map v13: %v\n", v) var v13v1, v13v2 map[interface{}]int32 v13v1 = v bs13 := testMarshalErr(v13v1, h, t, "enc-map-v13") - if v != nil { + if v == nil { + v13v2 = nil + } else { v13v2 = make(map[interface{}]int32, len(v)) - } + } // reset map testUnmarshalErr(v13v2, bs13, h, t, "dec-map-v13") testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13") + if v == nil { + v13v2 = nil + } else { + v13v2 = make(map[interface{}]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v13v2), bs13, h, t, "dec-map-v13-noaddr") // decode into non-addressable map value + testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-noaddr") + if v == nil { + v13v2 = nil + } else { + v13v2 = make(map[interface{}]int32, len(v)) + } // reset map + testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-len") + testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-len") bs13 = testMarshalErr(&v13v1, h, t, "enc-map-v13-p") v13v2 = nil - testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p") - testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p") + testUnmarshalErr(&v13v2, bs13, h, t, "dec-map-v13-p-nil") + testDeepEqualErr(v13v1, v13v2, t, "equal-map-v13-p-nil") + // ... + if v == nil { + v13v2 = nil + } else { + v13v2 = make(map[interface{}]int32, len(v)) + } // reset map + var v13v3, v13v4 typMapMapIntfInt32 + v13v3 = typMapMapIntfInt32(v13v1) + v13v4 = typMapMapIntfInt32(v13v2) + bs13 = testMarshalErr(v13v3, h, t, "enc-map-v13-custom") + testUnmarshalErr(v13v4, bs13, h, t, "dec-map-v13-p-len") + testDeepEqualErr(v13v3, v13v4, t, "equal-map-v13-p-len") } - for _, v := range []map[interface{}]int64{nil, map[interface{}]int64{}, map[interface{}]int64{"string-is-an-interface": 10}} { + for _, v := range []map[interface{}]int64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 44}} { // fmt.Printf(">>>> running mammoth map v14: %v\n", v) var v14v1, v14v2 map[interface{}]int64 v14v1 = v bs14 := testMarshalErr(v14v1, h, t, "enc-map-v14") - if v != nil { + if v == nil { + v14v2 = nil + } else { v14v2 = make(map[interface{}]int64, len(v)) - } + } // reset map testUnmarshalErr(v14v2, bs14, h, t, "dec-map-v14") testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14") + if v == nil { + v14v2 = nil + } else { + v14v2 = make(map[interface{}]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v14v2), bs14, h, t, "dec-map-v14-noaddr") // decode into non-addressable map value + testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-noaddr") + if v == nil { + v14v2 = nil + } else { + v14v2 = make(map[interface{}]int64, len(v)) + } // reset map + testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-len") + testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-len") bs14 = testMarshalErr(&v14v1, h, t, "enc-map-v14-p") v14v2 = nil - testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p") - testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p") + testUnmarshalErr(&v14v2, bs14, h, t, "dec-map-v14-p-nil") + testDeepEqualErr(v14v1, v14v2, t, "equal-map-v14-p-nil") + // ... + if v == nil { + v14v2 = nil + } else { + v14v2 = make(map[interface{}]int64, len(v)) + } // reset map + var v14v3, v14v4 typMapMapIntfInt64 + v14v3 = typMapMapIntfInt64(v14v1) + v14v4 = typMapMapIntfInt64(v14v2) + bs14 = testMarshalErr(v14v3, h, t, "enc-map-v14-custom") + testUnmarshalErr(v14v4, bs14, h, t, "dec-map-v14-p-len") + testDeepEqualErr(v14v3, v14v4, t, "equal-map-v14-p-len") } - for _, v := range []map[interface{}]float32{nil, map[interface{}]float32{}, map[interface{}]float32{"string-is-an-interface": 10.1}} { + for _, v := range []map[interface{}]float32{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 22.2}} { // fmt.Printf(">>>> running mammoth map v15: %v\n", v) var v15v1, v15v2 map[interface{}]float32 v15v1 = v bs15 := testMarshalErr(v15v1, h, t, "enc-map-v15") - if v != nil { + if v == nil { + v15v2 = nil + } else { v15v2 = make(map[interface{}]float32, len(v)) - } + } // reset map testUnmarshalErr(v15v2, bs15, h, t, "dec-map-v15") testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15") + if v == nil { + v15v2 = nil + } else { + v15v2 = make(map[interface{}]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v15v2), bs15, h, t, "dec-map-v15-noaddr") // decode into non-addressable map value + testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-noaddr") + if v == nil { + v15v2 = nil + } else { + v15v2 = make(map[interface{}]float32, len(v)) + } // reset map + testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-len") + testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-len") bs15 = testMarshalErr(&v15v1, h, t, "enc-map-v15-p") v15v2 = nil - testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p") - testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p") + testUnmarshalErr(&v15v2, bs15, h, t, "dec-map-v15-p-nil") + testDeepEqualErr(v15v1, v15v2, t, "equal-map-v15-p-nil") + // ... + if v == nil { + v15v2 = nil + } else { + v15v2 = make(map[interface{}]float32, len(v)) + } // reset map + var v15v3, v15v4 typMapMapIntfFloat32 + v15v3 = typMapMapIntfFloat32(v15v1) + v15v4 = typMapMapIntfFloat32(v15v2) + bs15 = testMarshalErr(v15v3, h, t, "enc-map-v15-custom") + testUnmarshalErr(v15v4, bs15, h, t, "dec-map-v15-p-len") + testDeepEqualErr(v15v3, v15v4, t, "equal-map-v15-p-len") } - for _, v := range []map[interface{}]float64{nil, map[interface{}]float64{}, map[interface{}]float64{"string-is-an-interface": 10.1}} { + for _, v := range []map[interface{}]float64{nil, {}, {"string-is-an-interface": 0, "string-is-an-interface-2": 11.1}} { // fmt.Printf(">>>> running mammoth map v16: %v\n", v) var v16v1, v16v2 map[interface{}]float64 v16v1 = v bs16 := testMarshalErr(v16v1, h, t, "enc-map-v16") - if v != nil { + if v == nil { + v16v2 = nil + } else { v16v2 = make(map[interface{}]float64, len(v)) - } + } // reset map testUnmarshalErr(v16v2, bs16, h, t, "dec-map-v16") testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16") + if v == nil { + v16v2 = nil + } else { + v16v2 = make(map[interface{}]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v16v2), bs16, h, t, "dec-map-v16-noaddr") // decode into non-addressable map value + testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-noaddr") + if v == nil { + v16v2 = nil + } else { + v16v2 = make(map[interface{}]float64, len(v)) + } // reset map + testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-len") + testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-len") bs16 = testMarshalErr(&v16v1, h, t, "enc-map-v16-p") v16v2 = nil - testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p") - testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p") + testUnmarshalErr(&v16v2, bs16, h, t, "dec-map-v16-p-nil") + testDeepEqualErr(v16v1, v16v2, t, "equal-map-v16-p-nil") + // ... + if v == nil { + v16v2 = nil + } else { + v16v2 = make(map[interface{}]float64, len(v)) + } // reset map + var v16v3, v16v4 typMapMapIntfFloat64 + v16v3 = typMapMapIntfFloat64(v16v1) + v16v4 = typMapMapIntfFloat64(v16v2) + bs16 = testMarshalErr(v16v3, h, t, "enc-map-v16-custom") + testUnmarshalErr(v16v4, bs16, h, t, "dec-map-v16-p-len") + testDeepEqualErr(v16v3, v16v4, t, "equal-map-v16-p-len") } - for _, v := range []map[interface{}]bool{nil, map[interface{}]bool{}, map[interface{}]bool{"string-is-an-interface": true}} { + for _, v := range []map[interface{}]bool{nil, {}, {"string-is-an-interface": false, "string-is-an-interface-2": true}} { // fmt.Printf(">>>> running mammoth map v17: %v\n", v) var v17v1, v17v2 map[interface{}]bool v17v1 = v bs17 := testMarshalErr(v17v1, h, t, "enc-map-v17") - if v != nil { + if v == nil { + v17v2 = nil + } else { v17v2 = make(map[interface{}]bool, len(v)) - } + } // reset map testUnmarshalErr(v17v2, bs17, h, t, "dec-map-v17") testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17") + if v == nil { + v17v2 = nil + } else { + v17v2 = make(map[interface{}]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v17v2), bs17, h, t, "dec-map-v17-noaddr") // decode into non-addressable map value + testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-noaddr") + if v == nil { + v17v2 = nil + } else { + v17v2 = make(map[interface{}]bool, len(v)) + } // reset map + testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-len") + testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-len") bs17 = testMarshalErr(&v17v1, h, t, "enc-map-v17-p") v17v2 = nil - testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p") - testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p") + testUnmarshalErr(&v17v2, bs17, h, t, "dec-map-v17-p-nil") + testDeepEqualErr(v17v1, v17v2, t, "equal-map-v17-p-nil") + // ... + if v == nil { + v17v2 = nil + } else { + v17v2 = make(map[interface{}]bool, len(v)) + } // reset map + var v17v3, v17v4 typMapMapIntfBool + v17v3 = typMapMapIntfBool(v17v1) + v17v4 = typMapMapIntfBool(v17v2) + bs17 = testMarshalErr(v17v3, h, t, "enc-map-v17-custom") + testUnmarshalErr(v17v4, bs17, h, t, "dec-map-v17-p-len") + testDeepEqualErr(v17v3, v17v4, t, "equal-map-v17-p-len") } - for _, v := range []map[string]interface{}{nil, map[string]interface{}{}, map[string]interface{}{"some-string": "string-is-an-interface"}} { + for _, v := range []map[string]interface{}{nil, {}, {"some-string": nil, "some-string-2": "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v20: %v\n", v) var v20v1, v20v2 map[string]interface{} v20v1 = v bs20 := testMarshalErr(v20v1, h, t, "enc-map-v20") - if v != nil { + if v == nil { + v20v2 = nil + } else { v20v2 = make(map[string]interface{}, len(v)) - } + } // reset map testUnmarshalErr(v20v2, bs20, h, t, "dec-map-v20") testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20") + if v == nil { + v20v2 = nil + } else { + v20v2 = make(map[string]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v20v2), bs20, h, t, "dec-map-v20-noaddr") // decode into non-addressable map value + testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-noaddr") + if v == nil { + v20v2 = nil + } else { + v20v2 = make(map[string]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-len") + testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-len") bs20 = testMarshalErr(&v20v1, h, t, "enc-map-v20-p") v20v2 = nil - testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p") - testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p") + testUnmarshalErr(&v20v2, bs20, h, t, "dec-map-v20-p-nil") + testDeepEqualErr(v20v1, v20v2, t, "equal-map-v20-p-nil") + // ... + if v == nil { + v20v2 = nil + } else { + v20v2 = make(map[string]interface{}, len(v)) + } // reset map + var v20v3, v20v4 typMapMapStringIntf + v20v3 = typMapMapStringIntf(v20v1) + v20v4 = typMapMapStringIntf(v20v2) + bs20 = testMarshalErr(v20v3, h, t, "enc-map-v20-custom") + testUnmarshalErr(v20v4, bs20, h, t, "dec-map-v20-p-len") + testDeepEqualErr(v20v3, v20v4, t, "equal-map-v20-p-len") } - for _, v := range []map[string]string{nil, map[string]string{}, map[string]string{"some-string": "some-string"}} { + for _, v := range []map[string]string{nil, {}, {"some-string": "", "some-string-2": "some-string"}} { // fmt.Printf(">>>> running mammoth map v21: %v\n", v) var v21v1, v21v2 map[string]string v21v1 = v bs21 := testMarshalErr(v21v1, h, t, "enc-map-v21") - if v != nil { + if v == nil { + v21v2 = nil + } else { v21v2 = make(map[string]string, len(v)) - } + } // reset map testUnmarshalErr(v21v2, bs21, h, t, "dec-map-v21") testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21") + if v == nil { + v21v2 = nil + } else { + v21v2 = make(map[string]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v21v2), bs21, h, t, "dec-map-v21-noaddr") // decode into non-addressable map value + testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-noaddr") + if v == nil { + v21v2 = nil + } else { + v21v2 = make(map[string]string, len(v)) + } // reset map + testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-len") + testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-len") bs21 = testMarshalErr(&v21v1, h, t, "enc-map-v21-p") v21v2 = nil - testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p") - testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p") + testUnmarshalErr(&v21v2, bs21, h, t, "dec-map-v21-p-nil") + testDeepEqualErr(v21v1, v21v2, t, "equal-map-v21-p-nil") + // ... + if v == nil { + v21v2 = nil + } else { + v21v2 = make(map[string]string, len(v)) + } // reset map + var v21v3, v21v4 typMapMapStringString + v21v3 = typMapMapStringString(v21v1) + v21v4 = typMapMapStringString(v21v2) + bs21 = testMarshalErr(v21v3, h, t, "enc-map-v21-custom") + testUnmarshalErr(v21v4, bs21, h, t, "dec-map-v21-p-len") + testDeepEqualErr(v21v3, v21v4, t, "equal-map-v21-p-len") } - for _, v := range []map[string]uint{nil, map[string]uint{}, map[string]uint{"some-string": 10}} { + for _, v := range []map[string]uint{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v22: %v\n", v) var v22v1, v22v2 map[string]uint v22v1 = v bs22 := testMarshalErr(v22v1, h, t, "enc-map-v22") - if v != nil { + if v == nil { + v22v2 = nil + } else { v22v2 = make(map[string]uint, len(v)) - } + } // reset map testUnmarshalErr(v22v2, bs22, h, t, "dec-map-v22") testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22") + if v == nil { + v22v2 = nil + } else { + v22v2 = make(map[string]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v22v2), bs22, h, t, "dec-map-v22-noaddr") // decode into non-addressable map value + testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-noaddr") + if v == nil { + v22v2 = nil + } else { + v22v2 = make(map[string]uint, len(v)) + } // reset map + testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-len") + testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-len") bs22 = testMarshalErr(&v22v1, h, t, "enc-map-v22-p") v22v2 = nil - testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p") - testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p") + testUnmarshalErr(&v22v2, bs22, h, t, "dec-map-v22-p-nil") + testDeepEqualErr(v22v1, v22v2, t, "equal-map-v22-p-nil") + // ... + if v == nil { + v22v2 = nil + } else { + v22v2 = make(map[string]uint, len(v)) + } // reset map + var v22v3, v22v4 typMapMapStringUint + v22v3 = typMapMapStringUint(v22v1) + v22v4 = typMapMapStringUint(v22v2) + bs22 = testMarshalErr(v22v3, h, t, "enc-map-v22-custom") + testUnmarshalErr(v22v4, bs22, h, t, "dec-map-v22-p-len") + testDeepEqualErr(v22v3, v22v4, t, "equal-map-v22-p-len") } - for _, v := range []map[string]uint8{nil, map[string]uint8{}, map[string]uint8{"some-string": 10}} { + for _, v := range []map[string]uint8{nil, {}, {"some-string-2": 0, "some-string": 44}} { // fmt.Printf(">>>> running mammoth map v23: %v\n", v) var v23v1, v23v2 map[string]uint8 v23v1 = v bs23 := testMarshalErr(v23v1, h, t, "enc-map-v23") - if v != nil { + if v == nil { + v23v2 = nil + } else { v23v2 = make(map[string]uint8, len(v)) - } + } // reset map testUnmarshalErr(v23v2, bs23, h, t, "dec-map-v23") testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23") + if v == nil { + v23v2 = nil + } else { + v23v2 = make(map[string]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v23v2), bs23, h, t, "dec-map-v23-noaddr") // decode into non-addressable map value + testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-noaddr") + if v == nil { + v23v2 = nil + } else { + v23v2 = make(map[string]uint8, len(v)) + } // reset map + testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-len") + testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-len") bs23 = testMarshalErr(&v23v1, h, t, "enc-map-v23-p") v23v2 = nil - testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p") - testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p") + testUnmarshalErr(&v23v2, bs23, h, t, "dec-map-v23-p-nil") + testDeepEqualErr(v23v1, v23v2, t, "equal-map-v23-p-nil") + // ... + if v == nil { + v23v2 = nil + } else { + v23v2 = make(map[string]uint8, len(v)) + } // reset map + var v23v3, v23v4 typMapMapStringUint8 + v23v3 = typMapMapStringUint8(v23v1) + v23v4 = typMapMapStringUint8(v23v2) + bs23 = testMarshalErr(v23v3, h, t, "enc-map-v23-custom") + testUnmarshalErr(v23v4, bs23, h, t, "dec-map-v23-p-len") + testDeepEqualErr(v23v3, v23v4, t, "equal-map-v23-p-len") } - for _, v := range []map[string]uint16{nil, map[string]uint16{}, map[string]uint16{"some-string": 10}} { + for _, v := range []map[string]uint16{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v24: %v\n", v) var v24v1, v24v2 map[string]uint16 v24v1 = v bs24 := testMarshalErr(v24v1, h, t, "enc-map-v24") - if v != nil { + if v == nil { + v24v2 = nil + } else { v24v2 = make(map[string]uint16, len(v)) - } + } // reset map testUnmarshalErr(v24v2, bs24, h, t, "dec-map-v24") testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24") + if v == nil { + v24v2 = nil + } else { + v24v2 = make(map[string]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v24v2), bs24, h, t, "dec-map-v24-noaddr") // decode into non-addressable map value + testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-noaddr") + if v == nil { + v24v2 = nil + } else { + v24v2 = make(map[string]uint16, len(v)) + } // reset map + testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-len") + testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-len") bs24 = testMarshalErr(&v24v1, h, t, "enc-map-v24-p") v24v2 = nil - testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p") - testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p") + testUnmarshalErr(&v24v2, bs24, h, t, "dec-map-v24-p-nil") + testDeepEqualErr(v24v1, v24v2, t, "equal-map-v24-p-nil") + // ... + if v == nil { + v24v2 = nil + } else { + v24v2 = make(map[string]uint16, len(v)) + } // reset map + var v24v3, v24v4 typMapMapStringUint16 + v24v3 = typMapMapStringUint16(v24v1) + v24v4 = typMapMapStringUint16(v24v2) + bs24 = testMarshalErr(v24v3, h, t, "enc-map-v24-custom") + testUnmarshalErr(v24v4, bs24, h, t, "dec-map-v24-p-len") + testDeepEqualErr(v24v3, v24v4, t, "equal-map-v24-p-len") } - for _, v := range []map[string]uint32{nil, map[string]uint32{}, map[string]uint32{"some-string": 10}} { + for _, v := range []map[string]uint32{nil, {}, {"some-string-2": 0, "some-string": 44}} { // fmt.Printf(">>>> running mammoth map v25: %v\n", v) var v25v1, v25v2 map[string]uint32 v25v1 = v bs25 := testMarshalErr(v25v1, h, t, "enc-map-v25") - if v != nil { + if v == nil { + v25v2 = nil + } else { v25v2 = make(map[string]uint32, len(v)) - } + } // reset map testUnmarshalErr(v25v2, bs25, h, t, "dec-map-v25") testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25") + if v == nil { + v25v2 = nil + } else { + v25v2 = make(map[string]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v25v2), bs25, h, t, "dec-map-v25-noaddr") // decode into non-addressable map value + testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-noaddr") + if v == nil { + v25v2 = nil + } else { + v25v2 = make(map[string]uint32, len(v)) + } // reset map + testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-len") + testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-len") bs25 = testMarshalErr(&v25v1, h, t, "enc-map-v25-p") v25v2 = nil - testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p") - testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p") + testUnmarshalErr(&v25v2, bs25, h, t, "dec-map-v25-p-nil") + testDeepEqualErr(v25v1, v25v2, t, "equal-map-v25-p-nil") + // ... + if v == nil { + v25v2 = nil + } else { + v25v2 = make(map[string]uint32, len(v)) + } // reset map + var v25v3, v25v4 typMapMapStringUint32 + v25v3 = typMapMapStringUint32(v25v1) + v25v4 = typMapMapStringUint32(v25v2) + bs25 = testMarshalErr(v25v3, h, t, "enc-map-v25-custom") + testUnmarshalErr(v25v4, bs25, h, t, "dec-map-v25-p-len") + testDeepEqualErr(v25v3, v25v4, t, "equal-map-v25-p-len") } - for _, v := range []map[string]uint64{nil, map[string]uint64{}, map[string]uint64{"some-string": 10}} { + for _, v := range []map[string]uint64{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v26: %v\n", v) var v26v1, v26v2 map[string]uint64 v26v1 = v bs26 := testMarshalErr(v26v1, h, t, "enc-map-v26") - if v != nil { + if v == nil { + v26v2 = nil + } else { v26v2 = make(map[string]uint64, len(v)) - } + } // reset map testUnmarshalErr(v26v2, bs26, h, t, "dec-map-v26") testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26") + if v == nil { + v26v2 = nil + } else { + v26v2 = make(map[string]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v26v2), bs26, h, t, "dec-map-v26-noaddr") // decode into non-addressable map value + testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-noaddr") + if v == nil { + v26v2 = nil + } else { + v26v2 = make(map[string]uint64, len(v)) + } // reset map + testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-len") + testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-len") bs26 = testMarshalErr(&v26v1, h, t, "enc-map-v26-p") v26v2 = nil - testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p") - testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p") + testUnmarshalErr(&v26v2, bs26, h, t, "dec-map-v26-p-nil") + testDeepEqualErr(v26v1, v26v2, t, "equal-map-v26-p-nil") + // ... + if v == nil { + v26v2 = nil + } else { + v26v2 = make(map[string]uint64, len(v)) + } // reset map + var v26v3, v26v4 typMapMapStringUint64 + v26v3 = typMapMapStringUint64(v26v1) + v26v4 = typMapMapStringUint64(v26v2) + bs26 = testMarshalErr(v26v3, h, t, "enc-map-v26-custom") + testUnmarshalErr(v26v4, bs26, h, t, "dec-map-v26-p-len") + testDeepEqualErr(v26v3, v26v4, t, "equal-map-v26-p-len") } - for _, v := range []map[string]uintptr{nil, map[string]uintptr{}, map[string]uintptr{"some-string": 10}} { + for _, v := range []map[string]uintptr{nil, {}, {"some-string-2": 0, "some-string": 44}} { // fmt.Printf(">>>> running mammoth map v27: %v\n", v) var v27v1, v27v2 map[string]uintptr v27v1 = v bs27 := testMarshalErr(v27v1, h, t, "enc-map-v27") - if v != nil { + if v == nil { + v27v2 = nil + } else { v27v2 = make(map[string]uintptr, len(v)) - } + } // reset map testUnmarshalErr(v27v2, bs27, h, t, "dec-map-v27") testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27") + if v == nil { + v27v2 = nil + } else { + v27v2 = make(map[string]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v27v2), bs27, h, t, "dec-map-v27-noaddr") // decode into non-addressable map value + testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-noaddr") + if v == nil { + v27v2 = nil + } else { + v27v2 = make(map[string]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-len") + testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-len") bs27 = testMarshalErr(&v27v1, h, t, "enc-map-v27-p") v27v2 = nil - testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p") - testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p") + testUnmarshalErr(&v27v2, bs27, h, t, "dec-map-v27-p-nil") + testDeepEqualErr(v27v1, v27v2, t, "equal-map-v27-p-nil") + // ... + if v == nil { + v27v2 = nil + } else { + v27v2 = make(map[string]uintptr, len(v)) + } // reset map + var v27v3, v27v4 typMapMapStringUintptr + v27v3 = typMapMapStringUintptr(v27v1) + v27v4 = typMapMapStringUintptr(v27v2) + bs27 = testMarshalErr(v27v3, h, t, "enc-map-v27-custom") + testUnmarshalErr(v27v4, bs27, h, t, "dec-map-v27-p-len") + testDeepEqualErr(v27v3, v27v4, t, "equal-map-v27-p-len") } - for _, v := range []map[string]int{nil, map[string]int{}, map[string]int{"some-string": 10}} { + for _, v := range []map[string]int{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v28: %v\n", v) var v28v1, v28v2 map[string]int v28v1 = v bs28 := testMarshalErr(v28v1, h, t, "enc-map-v28") - if v != nil { + if v == nil { + v28v2 = nil + } else { v28v2 = make(map[string]int, len(v)) - } + } // reset map testUnmarshalErr(v28v2, bs28, h, t, "dec-map-v28") testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28") + if v == nil { + v28v2 = nil + } else { + v28v2 = make(map[string]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v28v2), bs28, h, t, "dec-map-v28-noaddr") // decode into non-addressable map value + testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-noaddr") + if v == nil { + v28v2 = nil + } else { + v28v2 = make(map[string]int, len(v)) + } // reset map + testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-len") + testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-len") bs28 = testMarshalErr(&v28v1, h, t, "enc-map-v28-p") v28v2 = nil - testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p") - testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p") + testUnmarshalErr(&v28v2, bs28, h, t, "dec-map-v28-p-nil") + testDeepEqualErr(v28v1, v28v2, t, "equal-map-v28-p-nil") + // ... + if v == nil { + v28v2 = nil + } else { + v28v2 = make(map[string]int, len(v)) + } // reset map + var v28v3, v28v4 typMapMapStringInt + v28v3 = typMapMapStringInt(v28v1) + v28v4 = typMapMapStringInt(v28v2) + bs28 = testMarshalErr(v28v3, h, t, "enc-map-v28-custom") + testUnmarshalErr(v28v4, bs28, h, t, "dec-map-v28-p-len") + testDeepEqualErr(v28v3, v28v4, t, "equal-map-v28-p-len") } - for _, v := range []map[string]int8{nil, map[string]int8{}, map[string]int8{"some-string": 10}} { + for _, v := range []map[string]int8{nil, {}, {"some-string-2": 0, "some-string": 44}} { // fmt.Printf(">>>> running mammoth map v29: %v\n", v) var v29v1, v29v2 map[string]int8 v29v1 = v bs29 := testMarshalErr(v29v1, h, t, "enc-map-v29") - if v != nil { + if v == nil { + v29v2 = nil + } else { v29v2 = make(map[string]int8, len(v)) - } + } // reset map testUnmarshalErr(v29v2, bs29, h, t, "dec-map-v29") testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29") + if v == nil { + v29v2 = nil + } else { + v29v2 = make(map[string]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v29v2), bs29, h, t, "dec-map-v29-noaddr") // decode into non-addressable map value + testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-noaddr") + if v == nil { + v29v2 = nil + } else { + v29v2 = make(map[string]int8, len(v)) + } // reset map + testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-len") + testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-len") bs29 = testMarshalErr(&v29v1, h, t, "enc-map-v29-p") v29v2 = nil - testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p") - testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p") + testUnmarshalErr(&v29v2, bs29, h, t, "dec-map-v29-p-nil") + testDeepEqualErr(v29v1, v29v2, t, "equal-map-v29-p-nil") + // ... + if v == nil { + v29v2 = nil + } else { + v29v2 = make(map[string]int8, len(v)) + } // reset map + var v29v3, v29v4 typMapMapStringInt8 + v29v3 = typMapMapStringInt8(v29v1) + v29v4 = typMapMapStringInt8(v29v2) + bs29 = testMarshalErr(v29v3, h, t, "enc-map-v29-custom") + testUnmarshalErr(v29v4, bs29, h, t, "dec-map-v29-p-len") + testDeepEqualErr(v29v3, v29v4, t, "equal-map-v29-p-len") } - for _, v := range []map[string]int16{nil, map[string]int16{}, map[string]int16{"some-string": 10}} { + for _, v := range []map[string]int16{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v30: %v\n", v) var v30v1, v30v2 map[string]int16 v30v1 = v bs30 := testMarshalErr(v30v1, h, t, "enc-map-v30") - if v != nil { + if v == nil { + v30v2 = nil + } else { v30v2 = make(map[string]int16, len(v)) - } + } // reset map testUnmarshalErr(v30v2, bs30, h, t, "dec-map-v30") testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30") + if v == nil { + v30v2 = nil + } else { + v30v2 = make(map[string]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v30v2), bs30, h, t, "dec-map-v30-noaddr") // decode into non-addressable map value + testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-noaddr") + if v == nil { + v30v2 = nil + } else { + v30v2 = make(map[string]int16, len(v)) + } // reset map + testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-len") + testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-len") bs30 = testMarshalErr(&v30v1, h, t, "enc-map-v30-p") v30v2 = nil - testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p") - testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p") + testUnmarshalErr(&v30v2, bs30, h, t, "dec-map-v30-p-nil") + testDeepEqualErr(v30v1, v30v2, t, "equal-map-v30-p-nil") + // ... + if v == nil { + v30v2 = nil + } else { + v30v2 = make(map[string]int16, len(v)) + } // reset map + var v30v3, v30v4 typMapMapStringInt16 + v30v3 = typMapMapStringInt16(v30v1) + v30v4 = typMapMapStringInt16(v30v2) + bs30 = testMarshalErr(v30v3, h, t, "enc-map-v30-custom") + testUnmarshalErr(v30v4, bs30, h, t, "dec-map-v30-p-len") + testDeepEqualErr(v30v3, v30v4, t, "equal-map-v30-p-len") } - for _, v := range []map[string]int32{nil, map[string]int32{}, map[string]int32{"some-string": 10}} { + for _, v := range []map[string]int32{nil, {}, {"some-string-2": 0, "some-string": 44}} { // fmt.Printf(">>>> running mammoth map v31: %v\n", v) var v31v1, v31v2 map[string]int32 v31v1 = v bs31 := testMarshalErr(v31v1, h, t, "enc-map-v31") - if v != nil { + if v == nil { + v31v2 = nil + } else { v31v2 = make(map[string]int32, len(v)) - } + } // reset map testUnmarshalErr(v31v2, bs31, h, t, "dec-map-v31") testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31") + if v == nil { + v31v2 = nil + } else { + v31v2 = make(map[string]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v31v2), bs31, h, t, "dec-map-v31-noaddr") // decode into non-addressable map value + testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-noaddr") + if v == nil { + v31v2 = nil + } else { + v31v2 = make(map[string]int32, len(v)) + } // reset map + testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-len") + testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-len") bs31 = testMarshalErr(&v31v1, h, t, "enc-map-v31-p") v31v2 = nil - testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p") - testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p") + testUnmarshalErr(&v31v2, bs31, h, t, "dec-map-v31-p-nil") + testDeepEqualErr(v31v1, v31v2, t, "equal-map-v31-p-nil") + // ... + if v == nil { + v31v2 = nil + } else { + v31v2 = make(map[string]int32, len(v)) + } // reset map + var v31v3, v31v4 typMapMapStringInt32 + v31v3 = typMapMapStringInt32(v31v1) + v31v4 = typMapMapStringInt32(v31v2) + bs31 = testMarshalErr(v31v3, h, t, "enc-map-v31-custom") + testUnmarshalErr(v31v4, bs31, h, t, "dec-map-v31-p-len") + testDeepEqualErr(v31v3, v31v4, t, "equal-map-v31-p-len") } - for _, v := range []map[string]int64{nil, map[string]int64{}, map[string]int64{"some-string": 10}} { + for _, v := range []map[string]int64{nil, {}, {"some-string-2": 0, "some-string": 33}} { // fmt.Printf(">>>> running mammoth map v32: %v\n", v) var v32v1, v32v2 map[string]int64 v32v1 = v bs32 := testMarshalErr(v32v1, h, t, "enc-map-v32") - if v != nil { + if v == nil { + v32v2 = nil + } else { v32v2 = make(map[string]int64, len(v)) - } + } // reset map testUnmarshalErr(v32v2, bs32, h, t, "dec-map-v32") testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32") + if v == nil { + v32v2 = nil + } else { + v32v2 = make(map[string]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v32v2), bs32, h, t, "dec-map-v32-noaddr") // decode into non-addressable map value + testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-noaddr") + if v == nil { + v32v2 = nil + } else { + v32v2 = make(map[string]int64, len(v)) + } // reset map + testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-len") + testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-len") bs32 = testMarshalErr(&v32v1, h, t, "enc-map-v32-p") v32v2 = nil - testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p") - testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p") + testUnmarshalErr(&v32v2, bs32, h, t, "dec-map-v32-p-nil") + testDeepEqualErr(v32v1, v32v2, t, "equal-map-v32-p-nil") + // ... + if v == nil { + v32v2 = nil + } else { + v32v2 = make(map[string]int64, len(v)) + } // reset map + var v32v3, v32v4 typMapMapStringInt64 + v32v3 = typMapMapStringInt64(v32v1) + v32v4 = typMapMapStringInt64(v32v2) + bs32 = testMarshalErr(v32v3, h, t, "enc-map-v32-custom") + testUnmarshalErr(v32v4, bs32, h, t, "dec-map-v32-p-len") + testDeepEqualErr(v32v3, v32v4, t, "equal-map-v32-p-len") } - for _, v := range []map[string]float32{nil, map[string]float32{}, map[string]float32{"some-string": 10.1}} { + for _, v := range []map[string]float32{nil, {}, {"some-string-2": 0, "some-string": 22.2}} { // fmt.Printf(">>>> running mammoth map v33: %v\n", v) var v33v1, v33v2 map[string]float32 v33v1 = v bs33 := testMarshalErr(v33v1, h, t, "enc-map-v33") - if v != nil { + if v == nil { + v33v2 = nil + } else { v33v2 = make(map[string]float32, len(v)) - } + } // reset map testUnmarshalErr(v33v2, bs33, h, t, "dec-map-v33") testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33") + if v == nil { + v33v2 = nil + } else { + v33v2 = make(map[string]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v33v2), bs33, h, t, "dec-map-v33-noaddr") // decode into non-addressable map value + testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-noaddr") + if v == nil { + v33v2 = nil + } else { + v33v2 = make(map[string]float32, len(v)) + } // reset map + testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-len") + testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-len") bs33 = testMarshalErr(&v33v1, h, t, "enc-map-v33-p") v33v2 = nil - testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p") - testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p") + testUnmarshalErr(&v33v2, bs33, h, t, "dec-map-v33-p-nil") + testDeepEqualErr(v33v1, v33v2, t, "equal-map-v33-p-nil") + // ... + if v == nil { + v33v2 = nil + } else { + v33v2 = make(map[string]float32, len(v)) + } // reset map + var v33v3, v33v4 typMapMapStringFloat32 + v33v3 = typMapMapStringFloat32(v33v1) + v33v4 = typMapMapStringFloat32(v33v2) + bs33 = testMarshalErr(v33v3, h, t, "enc-map-v33-custom") + testUnmarshalErr(v33v4, bs33, h, t, "dec-map-v33-p-len") + testDeepEqualErr(v33v3, v33v4, t, "equal-map-v33-p-len") } - for _, v := range []map[string]float64{nil, map[string]float64{}, map[string]float64{"some-string": 10.1}} { + for _, v := range []map[string]float64{nil, {}, {"some-string-2": 0, "some-string": 11.1}} { // fmt.Printf(">>>> running mammoth map v34: %v\n", v) var v34v1, v34v2 map[string]float64 v34v1 = v bs34 := testMarshalErr(v34v1, h, t, "enc-map-v34") - if v != nil { + if v == nil { + v34v2 = nil + } else { v34v2 = make(map[string]float64, len(v)) - } + } // reset map testUnmarshalErr(v34v2, bs34, h, t, "dec-map-v34") testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34") + if v == nil { + v34v2 = nil + } else { + v34v2 = make(map[string]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v34v2), bs34, h, t, "dec-map-v34-noaddr") // decode into non-addressable map value + testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-noaddr") + if v == nil { + v34v2 = nil + } else { + v34v2 = make(map[string]float64, len(v)) + } // reset map + testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-len") + testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-len") bs34 = testMarshalErr(&v34v1, h, t, "enc-map-v34-p") v34v2 = nil - testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p") - testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p") + testUnmarshalErr(&v34v2, bs34, h, t, "dec-map-v34-p-nil") + testDeepEqualErr(v34v1, v34v2, t, "equal-map-v34-p-nil") + // ... + if v == nil { + v34v2 = nil + } else { + v34v2 = make(map[string]float64, len(v)) + } // reset map + var v34v3, v34v4 typMapMapStringFloat64 + v34v3 = typMapMapStringFloat64(v34v1) + v34v4 = typMapMapStringFloat64(v34v2) + bs34 = testMarshalErr(v34v3, h, t, "enc-map-v34-custom") + testUnmarshalErr(v34v4, bs34, h, t, "dec-map-v34-p-len") + testDeepEqualErr(v34v3, v34v4, t, "equal-map-v34-p-len") } - for _, v := range []map[string]bool{nil, map[string]bool{}, map[string]bool{"some-string": true}} { + for _, v := range []map[string]bool{nil, {}, {"some-string-2": false, "some-string": true}} { // fmt.Printf(">>>> running mammoth map v35: %v\n", v) var v35v1, v35v2 map[string]bool v35v1 = v bs35 := testMarshalErr(v35v1, h, t, "enc-map-v35") - if v != nil { + if v == nil { + v35v2 = nil + } else { v35v2 = make(map[string]bool, len(v)) - } + } // reset map testUnmarshalErr(v35v2, bs35, h, t, "dec-map-v35") testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35") + if v == nil { + v35v2 = nil + } else { + v35v2 = make(map[string]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v35v2), bs35, h, t, "dec-map-v35-noaddr") // decode into non-addressable map value + testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-noaddr") + if v == nil { + v35v2 = nil + } else { + v35v2 = make(map[string]bool, len(v)) + } // reset map + testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-len") + testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-len") bs35 = testMarshalErr(&v35v1, h, t, "enc-map-v35-p") v35v2 = nil - testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p") - testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p") + testUnmarshalErr(&v35v2, bs35, h, t, "dec-map-v35-p-nil") + testDeepEqualErr(v35v1, v35v2, t, "equal-map-v35-p-nil") + // ... + if v == nil { + v35v2 = nil + } else { + v35v2 = make(map[string]bool, len(v)) + } // reset map + var v35v3, v35v4 typMapMapStringBool + v35v3 = typMapMapStringBool(v35v1) + v35v4 = typMapMapStringBool(v35v2) + bs35 = testMarshalErr(v35v3, h, t, "enc-map-v35-custom") + testUnmarshalErr(v35v4, bs35, h, t, "dec-map-v35-p-len") + testDeepEqualErr(v35v3, v35v4, t, "equal-map-v35-p-len") } - for _, v := range []map[float32]interface{}{nil, map[float32]interface{}{}, map[float32]interface{}{10.1: "string-is-an-interface"}} { + for _, v := range []map[float32]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v38: %v\n", v) var v38v1, v38v2 map[float32]interface{} v38v1 = v bs38 := testMarshalErr(v38v1, h, t, "enc-map-v38") - if v != nil { + if v == nil { + v38v2 = nil + } else { v38v2 = make(map[float32]interface{}, len(v)) - } + } // reset map testUnmarshalErr(v38v2, bs38, h, t, "dec-map-v38") testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38") + if v == nil { + v38v2 = nil + } else { + v38v2 = make(map[float32]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v38v2), bs38, h, t, "dec-map-v38-noaddr") // decode into non-addressable map value + testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-noaddr") + if v == nil { + v38v2 = nil + } else { + v38v2 = make(map[float32]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-len") + testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-len") bs38 = testMarshalErr(&v38v1, h, t, "enc-map-v38-p") v38v2 = nil - testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p") - testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p") + testUnmarshalErr(&v38v2, bs38, h, t, "dec-map-v38-p-nil") + testDeepEqualErr(v38v1, v38v2, t, "equal-map-v38-p-nil") + // ... + if v == nil { + v38v2 = nil + } else { + v38v2 = make(map[float32]interface{}, len(v)) + } // reset map + var v38v3, v38v4 typMapMapFloat32Intf + v38v3 = typMapMapFloat32Intf(v38v1) + v38v4 = typMapMapFloat32Intf(v38v2) + bs38 = testMarshalErr(v38v3, h, t, "enc-map-v38-custom") + testUnmarshalErr(v38v4, bs38, h, t, "dec-map-v38-p-len") + testDeepEqualErr(v38v3, v38v4, t, "equal-map-v38-p-len") } - for _, v := range []map[float32]string{nil, map[float32]string{}, map[float32]string{10.1: "some-string"}} { + for _, v := range []map[float32]string{nil, {}, {22.2: "", 11.1: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v39: %v\n", v) var v39v1, v39v2 map[float32]string v39v1 = v bs39 := testMarshalErr(v39v1, h, t, "enc-map-v39") - if v != nil { + if v == nil { + v39v2 = nil + } else { v39v2 = make(map[float32]string, len(v)) - } + } // reset map testUnmarshalErr(v39v2, bs39, h, t, "dec-map-v39") testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39") + if v == nil { + v39v2 = nil + } else { + v39v2 = make(map[float32]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v39v2), bs39, h, t, "dec-map-v39-noaddr") // decode into non-addressable map value + testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-noaddr") + if v == nil { + v39v2 = nil + } else { + v39v2 = make(map[float32]string, len(v)) + } // reset map + testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-len") + testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-len") bs39 = testMarshalErr(&v39v1, h, t, "enc-map-v39-p") v39v2 = nil - testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p") - testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p") + testUnmarshalErr(&v39v2, bs39, h, t, "dec-map-v39-p-nil") + testDeepEqualErr(v39v1, v39v2, t, "equal-map-v39-p-nil") + // ... + if v == nil { + v39v2 = nil + } else { + v39v2 = make(map[float32]string, len(v)) + } // reset map + var v39v3, v39v4 typMapMapFloat32String + v39v3 = typMapMapFloat32String(v39v1) + v39v4 = typMapMapFloat32String(v39v2) + bs39 = testMarshalErr(v39v3, h, t, "enc-map-v39-custom") + testUnmarshalErr(v39v4, bs39, h, t, "dec-map-v39-p-len") + testDeepEqualErr(v39v3, v39v4, t, "equal-map-v39-p-len") } - for _, v := range []map[float32]uint{nil, map[float32]uint{}, map[float32]uint{10.1: 10}} { + for _, v := range []map[float32]uint{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v40: %v\n", v) var v40v1, v40v2 map[float32]uint v40v1 = v bs40 := testMarshalErr(v40v1, h, t, "enc-map-v40") - if v != nil { + if v == nil { + v40v2 = nil + } else { v40v2 = make(map[float32]uint, len(v)) - } + } // reset map testUnmarshalErr(v40v2, bs40, h, t, "dec-map-v40") testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40") + if v == nil { + v40v2 = nil + } else { + v40v2 = make(map[float32]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v40v2), bs40, h, t, "dec-map-v40-noaddr") // decode into non-addressable map value + testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-noaddr") + if v == nil { + v40v2 = nil + } else { + v40v2 = make(map[float32]uint, len(v)) + } // reset map + testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-len") + testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-len") bs40 = testMarshalErr(&v40v1, h, t, "enc-map-v40-p") v40v2 = nil - testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p") - testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p") + testUnmarshalErr(&v40v2, bs40, h, t, "dec-map-v40-p-nil") + testDeepEqualErr(v40v1, v40v2, t, "equal-map-v40-p-nil") + // ... + if v == nil { + v40v2 = nil + } else { + v40v2 = make(map[float32]uint, len(v)) + } // reset map + var v40v3, v40v4 typMapMapFloat32Uint + v40v3 = typMapMapFloat32Uint(v40v1) + v40v4 = typMapMapFloat32Uint(v40v2) + bs40 = testMarshalErr(v40v3, h, t, "enc-map-v40-custom") + testUnmarshalErr(v40v4, bs40, h, t, "dec-map-v40-p-len") + testDeepEqualErr(v40v3, v40v4, t, "equal-map-v40-p-len") } - for _, v := range []map[float32]uint8{nil, map[float32]uint8{}, map[float32]uint8{10.1: 10}} { + for _, v := range []map[float32]uint8{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v41: %v\n", v) var v41v1, v41v2 map[float32]uint8 v41v1 = v bs41 := testMarshalErr(v41v1, h, t, "enc-map-v41") - if v != nil { + if v == nil { + v41v2 = nil + } else { v41v2 = make(map[float32]uint8, len(v)) - } + } // reset map testUnmarshalErr(v41v2, bs41, h, t, "dec-map-v41") testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41") + if v == nil { + v41v2 = nil + } else { + v41v2 = make(map[float32]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v41v2), bs41, h, t, "dec-map-v41-noaddr") // decode into non-addressable map value + testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-noaddr") + if v == nil { + v41v2 = nil + } else { + v41v2 = make(map[float32]uint8, len(v)) + } // reset map + testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-len") + testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-len") bs41 = testMarshalErr(&v41v1, h, t, "enc-map-v41-p") v41v2 = nil - testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p") - testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p") + testUnmarshalErr(&v41v2, bs41, h, t, "dec-map-v41-p-nil") + testDeepEqualErr(v41v1, v41v2, t, "equal-map-v41-p-nil") + // ... + if v == nil { + v41v2 = nil + } else { + v41v2 = make(map[float32]uint8, len(v)) + } // reset map + var v41v3, v41v4 typMapMapFloat32Uint8 + v41v3 = typMapMapFloat32Uint8(v41v1) + v41v4 = typMapMapFloat32Uint8(v41v2) + bs41 = testMarshalErr(v41v3, h, t, "enc-map-v41-custom") + testUnmarshalErr(v41v4, bs41, h, t, "dec-map-v41-p-len") + testDeepEqualErr(v41v3, v41v4, t, "equal-map-v41-p-len") } - for _, v := range []map[float32]uint16{nil, map[float32]uint16{}, map[float32]uint16{10.1: 10}} { + for _, v := range []map[float32]uint16{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v42: %v\n", v) var v42v1, v42v2 map[float32]uint16 v42v1 = v bs42 := testMarshalErr(v42v1, h, t, "enc-map-v42") - if v != nil { + if v == nil { + v42v2 = nil + } else { v42v2 = make(map[float32]uint16, len(v)) - } + } // reset map testUnmarshalErr(v42v2, bs42, h, t, "dec-map-v42") testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42") + if v == nil { + v42v2 = nil + } else { + v42v2 = make(map[float32]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v42v2), bs42, h, t, "dec-map-v42-noaddr") // decode into non-addressable map value + testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-noaddr") + if v == nil { + v42v2 = nil + } else { + v42v2 = make(map[float32]uint16, len(v)) + } // reset map + testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-len") + testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-len") bs42 = testMarshalErr(&v42v1, h, t, "enc-map-v42-p") v42v2 = nil - testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p") - testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p") + testUnmarshalErr(&v42v2, bs42, h, t, "dec-map-v42-p-nil") + testDeepEqualErr(v42v1, v42v2, t, "equal-map-v42-p-nil") + // ... + if v == nil { + v42v2 = nil + } else { + v42v2 = make(map[float32]uint16, len(v)) + } // reset map + var v42v3, v42v4 typMapMapFloat32Uint16 + v42v3 = typMapMapFloat32Uint16(v42v1) + v42v4 = typMapMapFloat32Uint16(v42v2) + bs42 = testMarshalErr(v42v3, h, t, "enc-map-v42-custom") + testUnmarshalErr(v42v4, bs42, h, t, "dec-map-v42-p-len") + testDeepEqualErr(v42v3, v42v4, t, "equal-map-v42-p-len") } - for _, v := range []map[float32]uint32{nil, map[float32]uint32{}, map[float32]uint32{10.1: 10}} { + for _, v := range []map[float32]uint32{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v43: %v\n", v) var v43v1, v43v2 map[float32]uint32 v43v1 = v bs43 := testMarshalErr(v43v1, h, t, "enc-map-v43") - if v != nil { + if v == nil { + v43v2 = nil + } else { v43v2 = make(map[float32]uint32, len(v)) - } + } // reset map testUnmarshalErr(v43v2, bs43, h, t, "dec-map-v43") testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43") + if v == nil { + v43v2 = nil + } else { + v43v2 = make(map[float32]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v43v2), bs43, h, t, "dec-map-v43-noaddr") // decode into non-addressable map value + testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-noaddr") + if v == nil { + v43v2 = nil + } else { + v43v2 = make(map[float32]uint32, len(v)) + } // reset map + testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-len") + testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-len") bs43 = testMarshalErr(&v43v1, h, t, "enc-map-v43-p") v43v2 = nil - testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p") - testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p") + testUnmarshalErr(&v43v2, bs43, h, t, "dec-map-v43-p-nil") + testDeepEqualErr(v43v1, v43v2, t, "equal-map-v43-p-nil") + // ... + if v == nil { + v43v2 = nil + } else { + v43v2 = make(map[float32]uint32, len(v)) + } // reset map + var v43v3, v43v4 typMapMapFloat32Uint32 + v43v3 = typMapMapFloat32Uint32(v43v1) + v43v4 = typMapMapFloat32Uint32(v43v2) + bs43 = testMarshalErr(v43v3, h, t, "enc-map-v43-custom") + testUnmarshalErr(v43v4, bs43, h, t, "dec-map-v43-p-len") + testDeepEqualErr(v43v3, v43v4, t, "equal-map-v43-p-len") } - for _, v := range []map[float32]uint64{nil, map[float32]uint64{}, map[float32]uint64{10.1: 10}} { + for _, v := range []map[float32]uint64{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v44: %v\n", v) var v44v1, v44v2 map[float32]uint64 v44v1 = v bs44 := testMarshalErr(v44v1, h, t, "enc-map-v44") - if v != nil { + if v == nil { + v44v2 = nil + } else { v44v2 = make(map[float32]uint64, len(v)) - } + } // reset map testUnmarshalErr(v44v2, bs44, h, t, "dec-map-v44") testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44") + if v == nil { + v44v2 = nil + } else { + v44v2 = make(map[float32]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v44v2), bs44, h, t, "dec-map-v44-noaddr") // decode into non-addressable map value + testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-noaddr") + if v == nil { + v44v2 = nil + } else { + v44v2 = make(map[float32]uint64, len(v)) + } // reset map + testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-len") + testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-len") bs44 = testMarshalErr(&v44v1, h, t, "enc-map-v44-p") v44v2 = nil - testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p") - testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p") + testUnmarshalErr(&v44v2, bs44, h, t, "dec-map-v44-p-nil") + testDeepEqualErr(v44v1, v44v2, t, "equal-map-v44-p-nil") + // ... + if v == nil { + v44v2 = nil + } else { + v44v2 = make(map[float32]uint64, len(v)) + } // reset map + var v44v3, v44v4 typMapMapFloat32Uint64 + v44v3 = typMapMapFloat32Uint64(v44v1) + v44v4 = typMapMapFloat32Uint64(v44v2) + bs44 = testMarshalErr(v44v3, h, t, "enc-map-v44-custom") + testUnmarshalErr(v44v4, bs44, h, t, "dec-map-v44-p-len") + testDeepEqualErr(v44v3, v44v4, t, "equal-map-v44-p-len") } - for _, v := range []map[float32]uintptr{nil, map[float32]uintptr{}, map[float32]uintptr{10.1: 10}} { + for _, v := range []map[float32]uintptr{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v45: %v\n", v) var v45v1, v45v2 map[float32]uintptr v45v1 = v bs45 := testMarshalErr(v45v1, h, t, "enc-map-v45") - if v != nil { + if v == nil { + v45v2 = nil + } else { v45v2 = make(map[float32]uintptr, len(v)) - } + } // reset map testUnmarshalErr(v45v2, bs45, h, t, "dec-map-v45") testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45") + if v == nil { + v45v2 = nil + } else { + v45v2 = make(map[float32]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v45v2), bs45, h, t, "dec-map-v45-noaddr") // decode into non-addressable map value + testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-noaddr") + if v == nil { + v45v2 = nil + } else { + v45v2 = make(map[float32]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-len") + testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-len") bs45 = testMarshalErr(&v45v1, h, t, "enc-map-v45-p") v45v2 = nil - testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p") - testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p") + testUnmarshalErr(&v45v2, bs45, h, t, "dec-map-v45-p-nil") + testDeepEqualErr(v45v1, v45v2, t, "equal-map-v45-p-nil") + // ... + if v == nil { + v45v2 = nil + } else { + v45v2 = make(map[float32]uintptr, len(v)) + } // reset map + var v45v3, v45v4 typMapMapFloat32Uintptr + v45v3 = typMapMapFloat32Uintptr(v45v1) + v45v4 = typMapMapFloat32Uintptr(v45v2) + bs45 = testMarshalErr(v45v3, h, t, "enc-map-v45-custom") + testUnmarshalErr(v45v4, bs45, h, t, "dec-map-v45-p-len") + testDeepEqualErr(v45v3, v45v4, t, "equal-map-v45-p-len") } - for _, v := range []map[float32]int{nil, map[float32]int{}, map[float32]int{10.1: 10}} { + for _, v := range []map[float32]int{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v46: %v\n", v) var v46v1, v46v2 map[float32]int v46v1 = v bs46 := testMarshalErr(v46v1, h, t, "enc-map-v46") - if v != nil { + if v == nil { + v46v2 = nil + } else { v46v2 = make(map[float32]int, len(v)) - } + } // reset map testUnmarshalErr(v46v2, bs46, h, t, "dec-map-v46") testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46") + if v == nil { + v46v2 = nil + } else { + v46v2 = make(map[float32]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v46v2), bs46, h, t, "dec-map-v46-noaddr") // decode into non-addressable map value + testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-noaddr") + if v == nil { + v46v2 = nil + } else { + v46v2 = make(map[float32]int, len(v)) + } // reset map + testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-len") + testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-len") bs46 = testMarshalErr(&v46v1, h, t, "enc-map-v46-p") v46v2 = nil - testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p") - testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p") + testUnmarshalErr(&v46v2, bs46, h, t, "dec-map-v46-p-nil") + testDeepEqualErr(v46v1, v46v2, t, "equal-map-v46-p-nil") + // ... + if v == nil { + v46v2 = nil + } else { + v46v2 = make(map[float32]int, len(v)) + } // reset map + var v46v3, v46v4 typMapMapFloat32Int + v46v3 = typMapMapFloat32Int(v46v1) + v46v4 = typMapMapFloat32Int(v46v2) + bs46 = testMarshalErr(v46v3, h, t, "enc-map-v46-custom") + testUnmarshalErr(v46v4, bs46, h, t, "dec-map-v46-p-len") + testDeepEqualErr(v46v3, v46v4, t, "equal-map-v46-p-len") } - for _, v := range []map[float32]int8{nil, map[float32]int8{}, map[float32]int8{10.1: 10}} { + for _, v := range []map[float32]int8{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v47: %v\n", v) var v47v1, v47v2 map[float32]int8 v47v1 = v bs47 := testMarshalErr(v47v1, h, t, "enc-map-v47") - if v != nil { + if v == nil { + v47v2 = nil + } else { v47v2 = make(map[float32]int8, len(v)) - } + } // reset map testUnmarshalErr(v47v2, bs47, h, t, "dec-map-v47") testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47") + if v == nil { + v47v2 = nil + } else { + v47v2 = make(map[float32]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v47v2), bs47, h, t, "dec-map-v47-noaddr") // decode into non-addressable map value + testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-noaddr") + if v == nil { + v47v2 = nil + } else { + v47v2 = make(map[float32]int8, len(v)) + } // reset map + testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-len") + testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-len") bs47 = testMarshalErr(&v47v1, h, t, "enc-map-v47-p") v47v2 = nil - testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p") - testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p") + testUnmarshalErr(&v47v2, bs47, h, t, "dec-map-v47-p-nil") + testDeepEqualErr(v47v1, v47v2, t, "equal-map-v47-p-nil") + // ... + if v == nil { + v47v2 = nil + } else { + v47v2 = make(map[float32]int8, len(v)) + } // reset map + var v47v3, v47v4 typMapMapFloat32Int8 + v47v3 = typMapMapFloat32Int8(v47v1) + v47v4 = typMapMapFloat32Int8(v47v2) + bs47 = testMarshalErr(v47v3, h, t, "enc-map-v47-custom") + testUnmarshalErr(v47v4, bs47, h, t, "dec-map-v47-p-len") + testDeepEqualErr(v47v3, v47v4, t, "equal-map-v47-p-len") } - for _, v := range []map[float32]int16{nil, map[float32]int16{}, map[float32]int16{10.1: 10}} { + for _, v := range []map[float32]int16{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v48: %v\n", v) var v48v1, v48v2 map[float32]int16 v48v1 = v bs48 := testMarshalErr(v48v1, h, t, "enc-map-v48") - if v != nil { + if v == nil { + v48v2 = nil + } else { v48v2 = make(map[float32]int16, len(v)) - } + } // reset map testUnmarshalErr(v48v2, bs48, h, t, "dec-map-v48") testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48") + if v == nil { + v48v2 = nil + } else { + v48v2 = make(map[float32]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v48v2), bs48, h, t, "dec-map-v48-noaddr") // decode into non-addressable map value + testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-noaddr") + if v == nil { + v48v2 = nil + } else { + v48v2 = make(map[float32]int16, len(v)) + } // reset map + testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-len") + testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-len") bs48 = testMarshalErr(&v48v1, h, t, "enc-map-v48-p") v48v2 = nil - testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p") - testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p") + testUnmarshalErr(&v48v2, bs48, h, t, "dec-map-v48-p-nil") + testDeepEqualErr(v48v1, v48v2, t, "equal-map-v48-p-nil") + // ... + if v == nil { + v48v2 = nil + } else { + v48v2 = make(map[float32]int16, len(v)) + } // reset map + var v48v3, v48v4 typMapMapFloat32Int16 + v48v3 = typMapMapFloat32Int16(v48v1) + v48v4 = typMapMapFloat32Int16(v48v2) + bs48 = testMarshalErr(v48v3, h, t, "enc-map-v48-custom") + testUnmarshalErr(v48v4, bs48, h, t, "dec-map-v48-p-len") + testDeepEqualErr(v48v3, v48v4, t, "equal-map-v48-p-len") } - for _, v := range []map[float32]int32{nil, map[float32]int32{}, map[float32]int32{10.1: 10}} { + for _, v := range []map[float32]int32{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v49: %v\n", v) var v49v1, v49v2 map[float32]int32 v49v1 = v bs49 := testMarshalErr(v49v1, h, t, "enc-map-v49") - if v != nil { + if v == nil { + v49v2 = nil + } else { v49v2 = make(map[float32]int32, len(v)) - } + } // reset map testUnmarshalErr(v49v2, bs49, h, t, "dec-map-v49") testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49") + if v == nil { + v49v2 = nil + } else { + v49v2 = make(map[float32]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v49v2), bs49, h, t, "dec-map-v49-noaddr") // decode into non-addressable map value + testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-noaddr") + if v == nil { + v49v2 = nil + } else { + v49v2 = make(map[float32]int32, len(v)) + } // reset map + testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-len") + testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-len") bs49 = testMarshalErr(&v49v1, h, t, "enc-map-v49-p") v49v2 = nil - testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p") - testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p") + testUnmarshalErr(&v49v2, bs49, h, t, "dec-map-v49-p-nil") + testDeepEqualErr(v49v1, v49v2, t, "equal-map-v49-p-nil") + // ... + if v == nil { + v49v2 = nil + } else { + v49v2 = make(map[float32]int32, len(v)) + } // reset map + var v49v3, v49v4 typMapMapFloat32Int32 + v49v3 = typMapMapFloat32Int32(v49v1) + v49v4 = typMapMapFloat32Int32(v49v2) + bs49 = testMarshalErr(v49v3, h, t, "enc-map-v49-custom") + testUnmarshalErr(v49v4, bs49, h, t, "dec-map-v49-p-len") + testDeepEqualErr(v49v3, v49v4, t, "equal-map-v49-p-len") } - for _, v := range []map[float32]int64{nil, map[float32]int64{}, map[float32]int64{10.1: 10}} { + for _, v := range []map[float32]int64{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v50: %v\n", v) var v50v1, v50v2 map[float32]int64 v50v1 = v bs50 := testMarshalErr(v50v1, h, t, "enc-map-v50") - if v != nil { + if v == nil { + v50v2 = nil + } else { v50v2 = make(map[float32]int64, len(v)) - } + } // reset map testUnmarshalErr(v50v2, bs50, h, t, "dec-map-v50") testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50") + if v == nil { + v50v2 = nil + } else { + v50v2 = make(map[float32]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v50v2), bs50, h, t, "dec-map-v50-noaddr") // decode into non-addressable map value + testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-noaddr") + if v == nil { + v50v2 = nil + } else { + v50v2 = make(map[float32]int64, len(v)) + } // reset map + testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-len") + testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-len") bs50 = testMarshalErr(&v50v1, h, t, "enc-map-v50-p") v50v2 = nil - testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p") - testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p") + testUnmarshalErr(&v50v2, bs50, h, t, "dec-map-v50-p-nil") + testDeepEqualErr(v50v1, v50v2, t, "equal-map-v50-p-nil") + // ... + if v == nil { + v50v2 = nil + } else { + v50v2 = make(map[float32]int64, len(v)) + } // reset map + var v50v3, v50v4 typMapMapFloat32Int64 + v50v3 = typMapMapFloat32Int64(v50v1) + v50v4 = typMapMapFloat32Int64(v50v2) + bs50 = testMarshalErr(v50v3, h, t, "enc-map-v50-custom") + testUnmarshalErr(v50v4, bs50, h, t, "dec-map-v50-p-len") + testDeepEqualErr(v50v3, v50v4, t, "equal-map-v50-p-len") } - for _, v := range []map[float32]float32{nil, map[float32]float32{}, map[float32]float32{10.1: 10.1}} { + for _, v := range []map[float32]float32{nil, {}, {22.2: 0, 11.1: 22.2}} { // fmt.Printf(">>>> running mammoth map v51: %v\n", v) var v51v1, v51v2 map[float32]float32 v51v1 = v bs51 := testMarshalErr(v51v1, h, t, "enc-map-v51") - if v != nil { + if v == nil { + v51v2 = nil + } else { v51v2 = make(map[float32]float32, len(v)) - } + } // reset map testUnmarshalErr(v51v2, bs51, h, t, "dec-map-v51") testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51") + if v == nil { + v51v2 = nil + } else { + v51v2 = make(map[float32]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v51v2), bs51, h, t, "dec-map-v51-noaddr") // decode into non-addressable map value + testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-noaddr") + if v == nil { + v51v2 = nil + } else { + v51v2 = make(map[float32]float32, len(v)) + } // reset map + testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-len") + testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-len") bs51 = testMarshalErr(&v51v1, h, t, "enc-map-v51-p") v51v2 = nil - testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p") - testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p") + testUnmarshalErr(&v51v2, bs51, h, t, "dec-map-v51-p-nil") + testDeepEqualErr(v51v1, v51v2, t, "equal-map-v51-p-nil") + // ... + if v == nil { + v51v2 = nil + } else { + v51v2 = make(map[float32]float32, len(v)) + } // reset map + var v51v3, v51v4 typMapMapFloat32Float32 + v51v3 = typMapMapFloat32Float32(v51v1) + v51v4 = typMapMapFloat32Float32(v51v2) + bs51 = testMarshalErr(v51v3, h, t, "enc-map-v51-custom") + testUnmarshalErr(v51v4, bs51, h, t, "dec-map-v51-p-len") + testDeepEqualErr(v51v3, v51v4, t, "equal-map-v51-p-len") } - for _, v := range []map[float32]float64{nil, map[float32]float64{}, map[float32]float64{10.1: 10.1}} { + for _, v := range []map[float32]float64{nil, {}, {11.1: 0, 22.2: 11.1}} { // fmt.Printf(">>>> running mammoth map v52: %v\n", v) var v52v1, v52v2 map[float32]float64 v52v1 = v bs52 := testMarshalErr(v52v1, h, t, "enc-map-v52") - if v != nil { + if v == nil { + v52v2 = nil + } else { v52v2 = make(map[float32]float64, len(v)) - } + } // reset map testUnmarshalErr(v52v2, bs52, h, t, "dec-map-v52") testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52") + if v == nil { + v52v2 = nil + } else { + v52v2 = make(map[float32]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v52v2), bs52, h, t, "dec-map-v52-noaddr") // decode into non-addressable map value + testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-noaddr") + if v == nil { + v52v2 = nil + } else { + v52v2 = make(map[float32]float64, len(v)) + } // reset map + testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-len") + testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-len") bs52 = testMarshalErr(&v52v1, h, t, "enc-map-v52-p") v52v2 = nil - testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p") - testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p") + testUnmarshalErr(&v52v2, bs52, h, t, "dec-map-v52-p-nil") + testDeepEqualErr(v52v1, v52v2, t, "equal-map-v52-p-nil") + // ... + if v == nil { + v52v2 = nil + } else { + v52v2 = make(map[float32]float64, len(v)) + } // reset map + var v52v3, v52v4 typMapMapFloat32Float64 + v52v3 = typMapMapFloat32Float64(v52v1) + v52v4 = typMapMapFloat32Float64(v52v2) + bs52 = testMarshalErr(v52v3, h, t, "enc-map-v52-custom") + testUnmarshalErr(v52v4, bs52, h, t, "dec-map-v52-p-len") + testDeepEqualErr(v52v3, v52v4, t, "equal-map-v52-p-len") } - for _, v := range []map[float32]bool{nil, map[float32]bool{}, map[float32]bool{10.1: true}} { + for _, v := range []map[float32]bool{nil, {}, {22.2: false, 11.1: true}} { // fmt.Printf(">>>> running mammoth map v53: %v\n", v) var v53v1, v53v2 map[float32]bool v53v1 = v bs53 := testMarshalErr(v53v1, h, t, "enc-map-v53") - if v != nil { + if v == nil { + v53v2 = nil + } else { v53v2 = make(map[float32]bool, len(v)) - } + } // reset map testUnmarshalErr(v53v2, bs53, h, t, "dec-map-v53") testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53") + if v == nil { + v53v2 = nil + } else { + v53v2 = make(map[float32]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v53v2), bs53, h, t, "dec-map-v53-noaddr") // decode into non-addressable map value + testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-noaddr") + if v == nil { + v53v2 = nil + } else { + v53v2 = make(map[float32]bool, len(v)) + } // reset map + testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-len") + testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-len") bs53 = testMarshalErr(&v53v1, h, t, "enc-map-v53-p") v53v2 = nil - testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p") - testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p") + testUnmarshalErr(&v53v2, bs53, h, t, "dec-map-v53-p-nil") + testDeepEqualErr(v53v1, v53v2, t, "equal-map-v53-p-nil") + // ... + if v == nil { + v53v2 = nil + } else { + v53v2 = make(map[float32]bool, len(v)) + } // reset map + var v53v3, v53v4 typMapMapFloat32Bool + v53v3 = typMapMapFloat32Bool(v53v1) + v53v4 = typMapMapFloat32Bool(v53v2) + bs53 = testMarshalErr(v53v3, h, t, "enc-map-v53-custom") + testUnmarshalErr(v53v4, bs53, h, t, "dec-map-v53-p-len") + testDeepEqualErr(v53v3, v53v4, t, "equal-map-v53-p-len") } - for _, v := range []map[float64]interface{}{nil, map[float64]interface{}{}, map[float64]interface{}{10.1: "string-is-an-interface"}} { + for _, v := range []map[float64]interface{}{nil, {}, {22.2: nil, 11.1: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v56: %v\n", v) var v56v1, v56v2 map[float64]interface{} v56v1 = v bs56 := testMarshalErr(v56v1, h, t, "enc-map-v56") - if v != nil { + if v == nil { + v56v2 = nil + } else { v56v2 = make(map[float64]interface{}, len(v)) - } + } // reset map testUnmarshalErr(v56v2, bs56, h, t, "dec-map-v56") testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56") + if v == nil { + v56v2 = nil + } else { + v56v2 = make(map[float64]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v56v2), bs56, h, t, "dec-map-v56-noaddr") // decode into non-addressable map value + testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-noaddr") + if v == nil { + v56v2 = nil + } else { + v56v2 = make(map[float64]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-len") + testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-len") bs56 = testMarshalErr(&v56v1, h, t, "enc-map-v56-p") v56v2 = nil - testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p") - testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p") + testUnmarshalErr(&v56v2, bs56, h, t, "dec-map-v56-p-nil") + testDeepEqualErr(v56v1, v56v2, t, "equal-map-v56-p-nil") + // ... + if v == nil { + v56v2 = nil + } else { + v56v2 = make(map[float64]interface{}, len(v)) + } // reset map + var v56v3, v56v4 typMapMapFloat64Intf + v56v3 = typMapMapFloat64Intf(v56v1) + v56v4 = typMapMapFloat64Intf(v56v2) + bs56 = testMarshalErr(v56v3, h, t, "enc-map-v56-custom") + testUnmarshalErr(v56v4, bs56, h, t, "dec-map-v56-p-len") + testDeepEqualErr(v56v3, v56v4, t, "equal-map-v56-p-len") } - for _, v := range []map[float64]string{nil, map[float64]string{}, map[float64]string{10.1: "some-string"}} { + for _, v := range []map[float64]string{nil, {}, {22.2: "", 11.1: "some-string"}} { // fmt.Printf(">>>> running mammoth map v57: %v\n", v) var v57v1, v57v2 map[float64]string v57v1 = v bs57 := testMarshalErr(v57v1, h, t, "enc-map-v57") - if v != nil { + if v == nil { + v57v2 = nil + } else { v57v2 = make(map[float64]string, len(v)) - } + } // reset map testUnmarshalErr(v57v2, bs57, h, t, "dec-map-v57") testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57") + if v == nil { + v57v2 = nil + } else { + v57v2 = make(map[float64]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v57v2), bs57, h, t, "dec-map-v57-noaddr") // decode into non-addressable map value + testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-noaddr") + if v == nil { + v57v2 = nil + } else { + v57v2 = make(map[float64]string, len(v)) + } // reset map + testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-len") + testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-len") bs57 = testMarshalErr(&v57v1, h, t, "enc-map-v57-p") v57v2 = nil - testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p") - testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p") + testUnmarshalErr(&v57v2, bs57, h, t, "dec-map-v57-p-nil") + testDeepEqualErr(v57v1, v57v2, t, "equal-map-v57-p-nil") + // ... + if v == nil { + v57v2 = nil + } else { + v57v2 = make(map[float64]string, len(v)) + } // reset map + var v57v3, v57v4 typMapMapFloat64String + v57v3 = typMapMapFloat64String(v57v1) + v57v4 = typMapMapFloat64String(v57v2) + bs57 = testMarshalErr(v57v3, h, t, "enc-map-v57-custom") + testUnmarshalErr(v57v4, bs57, h, t, "dec-map-v57-p-len") + testDeepEqualErr(v57v3, v57v4, t, "equal-map-v57-p-len") } - for _, v := range []map[float64]uint{nil, map[float64]uint{}, map[float64]uint{10.1: 10}} { + for _, v := range []map[float64]uint{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v58: %v\n", v) var v58v1, v58v2 map[float64]uint v58v1 = v bs58 := testMarshalErr(v58v1, h, t, "enc-map-v58") - if v != nil { + if v == nil { + v58v2 = nil + } else { v58v2 = make(map[float64]uint, len(v)) - } + } // reset map testUnmarshalErr(v58v2, bs58, h, t, "dec-map-v58") testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58") + if v == nil { + v58v2 = nil + } else { + v58v2 = make(map[float64]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v58v2), bs58, h, t, "dec-map-v58-noaddr") // decode into non-addressable map value + testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-noaddr") + if v == nil { + v58v2 = nil + } else { + v58v2 = make(map[float64]uint, len(v)) + } // reset map + testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-len") + testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-len") bs58 = testMarshalErr(&v58v1, h, t, "enc-map-v58-p") v58v2 = nil - testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p") - testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p") + testUnmarshalErr(&v58v2, bs58, h, t, "dec-map-v58-p-nil") + testDeepEqualErr(v58v1, v58v2, t, "equal-map-v58-p-nil") + // ... + if v == nil { + v58v2 = nil + } else { + v58v2 = make(map[float64]uint, len(v)) + } // reset map + var v58v3, v58v4 typMapMapFloat64Uint + v58v3 = typMapMapFloat64Uint(v58v1) + v58v4 = typMapMapFloat64Uint(v58v2) + bs58 = testMarshalErr(v58v3, h, t, "enc-map-v58-custom") + testUnmarshalErr(v58v4, bs58, h, t, "dec-map-v58-p-len") + testDeepEqualErr(v58v3, v58v4, t, "equal-map-v58-p-len") } - for _, v := range []map[float64]uint8{nil, map[float64]uint8{}, map[float64]uint8{10.1: 10}} { + for _, v := range []map[float64]uint8{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v59: %v\n", v) var v59v1, v59v2 map[float64]uint8 v59v1 = v bs59 := testMarshalErr(v59v1, h, t, "enc-map-v59") - if v != nil { + if v == nil { + v59v2 = nil + } else { v59v2 = make(map[float64]uint8, len(v)) - } + } // reset map testUnmarshalErr(v59v2, bs59, h, t, "dec-map-v59") testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59") + if v == nil { + v59v2 = nil + } else { + v59v2 = make(map[float64]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v59v2), bs59, h, t, "dec-map-v59-noaddr") // decode into non-addressable map value + testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-noaddr") + if v == nil { + v59v2 = nil + } else { + v59v2 = make(map[float64]uint8, len(v)) + } // reset map + testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-len") + testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-len") bs59 = testMarshalErr(&v59v1, h, t, "enc-map-v59-p") v59v2 = nil - testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p") - testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p") + testUnmarshalErr(&v59v2, bs59, h, t, "dec-map-v59-p-nil") + testDeepEqualErr(v59v1, v59v2, t, "equal-map-v59-p-nil") + // ... + if v == nil { + v59v2 = nil + } else { + v59v2 = make(map[float64]uint8, len(v)) + } // reset map + var v59v3, v59v4 typMapMapFloat64Uint8 + v59v3 = typMapMapFloat64Uint8(v59v1) + v59v4 = typMapMapFloat64Uint8(v59v2) + bs59 = testMarshalErr(v59v3, h, t, "enc-map-v59-custom") + testUnmarshalErr(v59v4, bs59, h, t, "dec-map-v59-p-len") + testDeepEqualErr(v59v3, v59v4, t, "equal-map-v59-p-len") } - for _, v := range []map[float64]uint16{nil, map[float64]uint16{}, map[float64]uint16{10.1: 10}} { + for _, v := range []map[float64]uint16{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v60: %v\n", v) var v60v1, v60v2 map[float64]uint16 v60v1 = v bs60 := testMarshalErr(v60v1, h, t, "enc-map-v60") - if v != nil { + if v == nil { + v60v2 = nil + } else { v60v2 = make(map[float64]uint16, len(v)) - } + } // reset map testUnmarshalErr(v60v2, bs60, h, t, "dec-map-v60") testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60") + if v == nil { + v60v2 = nil + } else { + v60v2 = make(map[float64]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v60v2), bs60, h, t, "dec-map-v60-noaddr") // decode into non-addressable map value + testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-noaddr") + if v == nil { + v60v2 = nil + } else { + v60v2 = make(map[float64]uint16, len(v)) + } // reset map + testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-len") + testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-len") bs60 = testMarshalErr(&v60v1, h, t, "enc-map-v60-p") v60v2 = nil - testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p") - testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p") + testUnmarshalErr(&v60v2, bs60, h, t, "dec-map-v60-p-nil") + testDeepEqualErr(v60v1, v60v2, t, "equal-map-v60-p-nil") + // ... + if v == nil { + v60v2 = nil + } else { + v60v2 = make(map[float64]uint16, len(v)) + } // reset map + var v60v3, v60v4 typMapMapFloat64Uint16 + v60v3 = typMapMapFloat64Uint16(v60v1) + v60v4 = typMapMapFloat64Uint16(v60v2) + bs60 = testMarshalErr(v60v3, h, t, "enc-map-v60-custom") + testUnmarshalErr(v60v4, bs60, h, t, "dec-map-v60-p-len") + testDeepEqualErr(v60v3, v60v4, t, "equal-map-v60-p-len") } - for _, v := range []map[float64]uint32{nil, map[float64]uint32{}, map[float64]uint32{10.1: 10}} { + for _, v := range []map[float64]uint32{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v61: %v\n", v) var v61v1, v61v2 map[float64]uint32 v61v1 = v bs61 := testMarshalErr(v61v1, h, t, "enc-map-v61") - if v != nil { + if v == nil { + v61v2 = nil + } else { v61v2 = make(map[float64]uint32, len(v)) - } + } // reset map testUnmarshalErr(v61v2, bs61, h, t, "dec-map-v61") testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61") + if v == nil { + v61v2 = nil + } else { + v61v2 = make(map[float64]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v61v2), bs61, h, t, "dec-map-v61-noaddr") // decode into non-addressable map value + testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-noaddr") + if v == nil { + v61v2 = nil + } else { + v61v2 = make(map[float64]uint32, len(v)) + } // reset map + testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-len") + testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-len") bs61 = testMarshalErr(&v61v1, h, t, "enc-map-v61-p") v61v2 = nil - testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p") - testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p") + testUnmarshalErr(&v61v2, bs61, h, t, "dec-map-v61-p-nil") + testDeepEqualErr(v61v1, v61v2, t, "equal-map-v61-p-nil") + // ... + if v == nil { + v61v2 = nil + } else { + v61v2 = make(map[float64]uint32, len(v)) + } // reset map + var v61v3, v61v4 typMapMapFloat64Uint32 + v61v3 = typMapMapFloat64Uint32(v61v1) + v61v4 = typMapMapFloat64Uint32(v61v2) + bs61 = testMarshalErr(v61v3, h, t, "enc-map-v61-custom") + testUnmarshalErr(v61v4, bs61, h, t, "dec-map-v61-p-len") + testDeepEqualErr(v61v3, v61v4, t, "equal-map-v61-p-len") } - for _, v := range []map[float64]uint64{nil, map[float64]uint64{}, map[float64]uint64{10.1: 10}} { + for _, v := range []map[float64]uint64{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v62: %v\n", v) var v62v1, v62v2 map[float64]uint64 v62v1 = v bs62 := testMarshalErr(v62v1, h, t, "enc-map-v62") - if v != nil { + if v == nil { + v62v2 = nil + } else { v62v2 = make(map[float64]uint64, len(v)) - } + } // reset map testUnmarshalErr(v62v2, bs62, h, t, "dec-map-v62") testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62") + if v == nil { + v62v2 = nil + } else { + v62v2 = make(map[float64]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v62v2), bs62, h, t, "dec-map-v62-noaddr") // decode into non-addressable map value + testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-noaddr") + if v == nil { + v62v2 = nil + } else { + v62v2 = make(map[float64]uint64, len(v)) + } // reset map + testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-len") + testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-len") bs62 = testMarshalErr(&v62v1, h, t, "enc-map-v62-p") v62v2 = nil - testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p") - testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p") + testUnmarshalErr(&v62v2, bs62, h, t, "dec-map-v62-p-nil") + testDeepEqualErr(v62v1, v62v2, t, "equal-map-v62-p-nil") + // ... + if v == nil { + v62v2 = nil + } else { + v62v2 = make(map[float64]uint64, len(v)) + } // reset map + var v62v3, v62v4 typMapMapFloat64Uint64 + v62v3 = typMapMapFloat64Uint64(v62v1) + v62v4 = typMapMapFloat64Uint64(v62v2) + bs62 = testMarshalErr(v62v3, h, t, "enc-map-v62-custom") + testUnmarshalErr(v62v4, bs62, h, t, "dec-map-v62-p-len") + testDeepEqualErr(v62v3, v62v4, t, "equal-map-v62-p-len") } - for _, v := range []map[float64]uintptr{nil, map[float64]uintptr{}, map[float64]uintptr{10.1: 10}} { + for _, v := range []map[float64]uintptr{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v63: %v\n", v) var v63v1, v63v2 map[float64]uintptr v63v1 = v bs63 := testMarshalErr(v63v1, h, t, "enc-map-v63") - if v != nil { + if v == nil { + v63v2 = nil + } else { v63v2 = make(map[float64]uintptr, len(v)) - } + } // reset map testUnmarshalErr(v63v2, bs63, h, t, "dec-map-v63") testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63") + if v == nil { + v63v2 = nil + } else { + v63v2 = make(map[float64]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v63v2), bs63, h, t, "dec-map-v63-noaddr") // decode into non-addressable map value + testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-noaddr") + if v == nil { + v63v2 = nil + } else { + v63v2 = make(map[float64]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-len") + testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-len") bs63 = testMarshalErr(&v63v1, h, t, "enc-map-v63-p") v63v2 = nil - testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p") - testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p") + testUnmarshalErr(&v63v2, bs63, h, t, "dec-map-v63-p-nil") + testDeepEqualErr(v63v1, v63v2, t, "equal-map-v63-p-nil") + // ... + if v == nil { + v63v2 = nil + } else { + v63v2 = make(map[float64]uintptr, len(v)) + } // reset map + var v63v3, v63v4 typMapMapFloat64Uintptr + v63v3 = typMapMapFloat64Uintptr(v63v1) + v63v4 = typMapMapFloat64Uintptr(v63v2) + bs63 = testMarshalErr(v63v3, h, t, "enc-map-v63-custom") + testUnmarshalErr(v63v4, bs63, h, t, "dec-map-v63-p-len") + testDeepEqualErr(v63v3, v63v4, t, "equal-map-v63-p-len") } - for _, v := range []map[float64]int{nil, map[float64]int{}, map[float64]int{10.1: 10}} { + for _, v := range []map[float64]int{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v64: %v\n", v) var v64v1, v64v2 map[float64]int v64v1 = v bs64 := testMarshalErr(v64v1, h, t, "enc-map-v64") - if v != nil { + if v == nil { + v64v2 = nil + } else { v64v2 = make(map[float64]int, len(v)) - } + } // reset map testUnmarshalErr(v64v2, bs64, h, t, "dec-map-v64") testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64") + if v == nil { + v64v2 = nil + } else { + v64v2 = make(map[float64]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v64v2), bs64, h, t, "dec-map-v64-noaddr") // decode into non-addressable map value + testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-noaddr") + if v == nil { + v64v2 = nil + } else { + v64v2 = make(map[float64]int, len(v)) + } // reset map + testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-len") + testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-len") bs64 = testMarshalErr(&v64v1, h, t, "enc-map-v64-p") v64v2 = nil - testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p") - testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p") + testUnmarshalErr(&v64v2, bs64, h, t, "dec-map-v64-p-nil") + testDeepEqualErr(v64v1, v64v2, t, "equal-map-v64-p-nil") + // ... + if v == nil { + v64v2 = nil + } else { + v64v2 = make(map[float64]int, len(v)) + } // reset map + var v64v3, v64v4 typMapMapFloat64Int + v64v3 = typMapMapFloat64Int(v64v1) + v64v4 = typMapMapFloat64Int(v64v2) + bs64 = testMarshalErr(v64v3, h, t, "enc-map-v64-custom") + testUnmarshalErr(v64v4, bs64, h, t, "dec-map-v64-p-len") + testDeepEqualErr(v64v3, v64v4, t, "equal-map-v64-p-len") } - for _, v := range []map[float64]int8{nil, map[float64]int8{}, map[float64]int8{10.1: 10}} { + for _, v := range []map[float64]int8{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v65: %v\n", v) var v65v1, v65v2 map[float64]int8 v65v1 = v bs65 := testMarshalErr(v65v1, h, t, "enc-map-v65") - if v != nil { + if v == nil { + v65v2 = nil + } else { v65v2 = make(map[float64]int8, len(v)) - } + } // reset map testUnmarshalErr(v65v2, bs65, h, t, "dec-map-v65") testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65") + if v == nil { + v65v2 = nil + } else { + v65v2 = make(map[float64]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v65v2), bs65, h, t, "dec-map-v65-noaddr") // decode into non-addressable map value + testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-noaddr") + if v == nil { + v65v2 = nil + } else { + v65v2 = make(map[float64]int8, len(v)) + } // reset map + testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-len") + testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-len") bs65 = testMarshalErr(&v65v1, h, t, "enc-map-v65-p") v65v2 = nil - testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p") - testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p") + testUnmarshalErr(&v65v2, bs65, h, t, "dec-map-v65-p-nil") + testDeepEqualErr(v65v1, v65v2, t, "equal-map-v65-p-nil") + // ... + if v == nil { + v65v2 = nil + } else { + v65v2 = make(map[float64]int8, len(v)) + } // reset map + var v65v3, v65v4 typMapMapFloat64Int8 + v65v3 = typMapMapFloat64Int8(v65v1) + v65v4 = typMapMapFloat64Int8(v65v2) + bs65 = testMarshalErr(v65v3, h, t, "enc-map-v65-custom") + testUnmarshalErr(v65v4, bs65, h, t, "dec-map-v65-p-len") + testDeepEqualErr(v65v3, v65v4, t, "equal-map-v65-p-len") } - for _, v := range []map[float64]int16{nil, map[float64]int16{}, map[float64]int16{10.1: 10}} { + for _, v := range []map[float64]int16{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v66: %v\n", v) var v66v1, v66v2 map[float64]int16 v66v1 = v bs66 := testMarshalErr(v66v1, h, t, "enc-map-v66") - if v != nil { + if v == nil { + v66v2 = nil + } else { v66v2 = make(map[float64]int16, len(v)) - } + } // reset map testUnmarshalErr(v66v2, bs66, h, t, "dec-map-v66") testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66") + if v == nil { + v66v2 = nil + } else { + v66v2 = make(map[float64]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v66v2), bs66, h, t, "dec-map-v66-noaddr") // decode into non-addressable map value + testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-noaddr") + if v == nil { + v66v2 = nil + } else { + v66v2 = make(map[float64]int16, len(v)) + } // reset map + testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-len") + testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-len") bs66 = testMarshalErr(&v66v1, h, t, "enc-map-v66-p") v66v2 = nil - testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p") - testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p") + testUnmarshalErr(&v66v2, bs66, h, t, "dec-map-v66-p-nil") + testDeepEqualErr(v66v1, v66v2, t, "equal-map-v66-p-nil") + // ... + if v == nil { + v66v2 = nil + } else { + v66v2 = make(map[float64]int16, len(v)) + } // reset map + var v66v3, v66v4 typMapMapFloat64Int16 + v66v3 = typMapMapFloat64Int16(v66v1) + v66v4 = typMapMapFloat64Int16(v66v2) + bs66 = testMarshalErr(v66v3, h, t, "enc-map-v66-custom") + testUnmarshalErr(v66v4, bs66, h, t, "dec-map-v66-p-len") + testDeepEqualErr(v66v3, v66v4, t, "equal-map-v66-p-len") } - for _, v := range []map[float64]int32{nil, map[float64]int32{}, map[float64]int32{10.1: 10}} { + for _, v := range []map[float64]int32{nil, {}, {22.2: 0, 11.1: 44}} { // fmt.Printf(">>>> running mammoth map v67: %v\n", v) var v67v1, v67v2 map[float64]int32 v67v1 = v bs67 := testMarshalErr(v67v1, h, t, "enc-map-v67") - if v != nil { + if v == nil { + v67v2 = nil + } else { v67v2 = make(map[float64]int32, len(v)) - } + } // reset map testUnmarshalErr(v67v2, bs67, h, t, "dec-map-v67") testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67") + if v == nil { + v67v2 = nil + } else { + v67v2 = make(map[float64]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v67v2), bs67, h, t, "dec-map-v67-noaddr") // decode into non-addressable map value + testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-noaddr") + if v == nil { + v67v2 = nil + } else { + v67v2 = make(map[float64]int32, len(v)) + } // reset map + testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-len") + testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-len") bs67 = testMarshalErr(&v67v1, h, t, "enc-map-v67-p") v67v2 = nil - testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p") - testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p") + testUnmarshalErr(&v67v2, bs67, h, t, "dec-map-v67-p-nil") + testDeepEqualErr(v67v1, v67v2, t, "equal-map-v67-p-nil") + // ... + if v == nil { + v67v2 = nil + } else { + v67v2 = make(map[float64]int32, len(v)) + } // reset map + var v67v3, v67v4 typMapMapFloat64Int32 + v67v3 = typMapMapFloat64Int32(v67v1) + v67v4 = typMapMapFloat64Int32(v67v2) + bs67 = testMarshalErr(v67v3, h, t, "enc-map-v67-custom") + testUnmarshalErr(v67v4, bs67, h, t, "dec-map-v67-p-len") + testDeepEqualErr(v67v3, v67v4, t, "equal-map-v67-p-len") } - for _, v := range []map[float64]int64{nil, map[float64]int64{}, map[float64]int64{10.1: 10}} { + for _, v := range []map[float64]int64{nil, {}, {22.2: 0, 11.1: 33}} { // fmt.Printf(">>>> running mammoth map v68: %v\n", v) var v68v1, v68v2 map[float64]int64 v68v1 = v bs68 := testMarshalErr(v68v1, h, t, "enc-map-v68") - if v != nil { + if v == nil { + v68v2 = nil + } else { v68v2 = make(map[float64]int64, len(v)) - } + } // reset map testUnmarshalErr(v68v2, bs68, h, t, "dec-map-v68") testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68") + if v == nil { + v68v2 = nil + } else { + v68v2 = make(map[float64]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v68v2), bs68, h, t, "dec-map-v68-noaddr") // decode into non-addressable map value + testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-noaddr") + if v == nil { + v68v2 = nil + } else { + v68v2 = make(map[float64]int64, len(v)) + } // reset map + testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-len") + testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-len") bs68 = testMarshalErr(&v68v1, h, t, "enc-map-v68-p") v68v2 = nil - testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p") - testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p") + testUnmarshalErr(&v68v2, bs68, h, t, "dec-map-v68-p-nil") + testDeepEqualErr(v68v1, v68v2, t, "equal-map-v68-p-nil") + // ... + if v == nil { + v68v2 = nil + } else { + v68v2 = make(map[float64]int64, len(v)) + } // reset map + var v68v3, v68v4 typMapMapFloat64Int64 + v68v3 = typMapMapFloat64Int64(v68v1) + v68v4 = typMapMapFloat64Int64(v68v2) + bs68 = testMarshalErr(v68v3, h, t, "enc-map-v68-custom") + testUnmarshalErr(v68v4, bs68, h, t, "dec-map-v68-p-len") + testDeepEqualErr(v68v3, v68v4, t, "equal-map-v68-p-len") } - for _, v := range []map[float64]float32{nil, map[float64]float32{}, map[float64]float32{10.1: 10.1}} { + for _, v := range []map[float64]float32{nil, {}, {22.2: 0, 11.1: 22.2}} { // fmt.Printf(">>>> running mammoth map v69: %v\n", v) var v69v1, v69v2 map[float64]float32 v69v1 = v bs69 := testMarshalErr(v69v1, h, t, "enc-map-v69") - if v != nil { + if v == nil { + v69v2 = nil + } else { v69v2 = make(map[float64]float32, len(v)) - } + } // reset map testUnmarshalErr(v69v2, bs69, h, t, "dec-map-v69") testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69") + if v == nil { + v69v2 = nil + } else { + v69v2 = make(map[float64]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v69v2), bs69, h, t, "dec-map-v69-noaddr") // decode into non-addressable map value + testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-noaddr") + if v == nil { + v69v2 = nil + } else { + v69v2 = make(map[float64]float32, len(v)) + } // reset map + testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-len") + testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-len") bs69 = testMarshalErr(&v69v1, h, t, "enc-map-v69-p") v69v2 = nil - testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p") - testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p") + testUnmarshalErr(&v69v2, bs69, h, t, "dec-map-v69-p-nil") + testDeepEqualErr(v69v1, v69v2, t, "equal-map-v69-p-nil") + // ... + if v == nil { + v69v2 = nil + } else { + v69v2 = make(map[float64]float32, len(v)) + } // reset map + var v69v3, v69v4 typMapMapFloat64Float32 + v69v3 = typMapMapFloat64Float32(v69v1) + v69v4 = typMapMapFloat64Float32(v69v2) + bs69 = testMarshalErr(v69v3, h, t, "enc-map-v69-custom") + testUnmarshalErr(v69v4, bs69, h, t, "dec-map-v69-p-len") + testDeepEqualErr(v69v3, v69v4, t, "equal-map-v69-p-len") } - for _, v := range []map[float64]float64{nil, map[float64]float64{}, map[float64]float64{10.1: 10.1}} { + for _, v := range []map[float64]float64{nil, {}, {11.1: 0, 22.2: 11.1}} { // fmt.Printf(">>>> running mammoth map v70: %v\n", v) var v70v1, v70v2 map[float64]float64 v70v1 = v bs70 := testMarshalErr(v70v1, h, t, "enc-map-v70") - if v != nil { + if v == nil { + v70v2 = nil + } else { v70v2 = make(map[float64]float64, len(v)) - } + } // reset map testUnmarshalErr(v70v2, bs70, h, t, "dec-map-v70") testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70") + if v == nil { + v70v2 = nil + } else { + v70v2 = make(map[float64]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v70v2), bs70, h, t, "dec-map-v70-noaddr") // decode into non-addressable map value + testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-noaddr") + if v == nil { + v70v2 = nil + } else { + v70v2 = make(map[float64]float64, len(v)) + } // reset map + testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-len") + testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-len") bs70 = testMarshalErr(&v70v1, h, t, "enc-map-v70-p") v70v2 = nil - testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p") - testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p") + testUnmarshalErr(&v70v2, bs70, h, t, "dec-map-v70-p-nil") + testDeepEqualErr(v70v1, v70v2, t, "equal-map-v70-p-nil") + // ... + if v == nil { + v70v2 = nil + } else { + v70v2 = make(map[float64]float64, len(v)) + } // reset map + var v70v3, v70v4 typMapMapFloat64Float64 + v70v3 = typMapMapFloat64Float64(v70v1) + v70v4 = typMapMapFloat64Float64(v70v2) + bs70 = testMarshalErr(v70v3, h, t, "enc-map-v70-custom") + testUnmarshalErr(v70v4, bs70, h, t, "dec-map-v70-p-len") + testDeepEqualErr(v70v3, v70v4, t, "equal-map-v70-p-len") } - for _, v := range []map[float64]bool{nil, map[float64]bool{}, map[float64]bool{10.1: true}} { + for _, v := range []map[float64]bool{nil, {}, {22.2: false, 11.1: true}} { // fmt.Printf(">>>> running mammoth map v71: %v\n", v) var v71v1, v71v2 map[float64]bool v71v1 = v bs71 := testMarshalErr(v71v1, h, t, "enc-map-v71") - if v != nil { + if v == nil { + v71v2 = nil + } else { v71v2 = make(map[float64]bool, len(v)) - } + } // reset map testUnmarshalErr(v71v2, bs71, h, t, "dec-map-v71") testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71") + if v == nil { + v71v2 = nil + } else { + v71v2 = make(map[float64]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v71v2), bs71, h, t, "dec-map-v71-noaddr") // decode into non-addressable map value + testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-noaddr") + if v == nil { + v71v2 = nil + } else { + v71v2 = make(map[float64]bool, len(v)) + } // reset map + testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-len") + testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-len") bs71 = testMarshalErr(&v71v1, h, t, "enc-map-v71-p") v71v2 = nil - testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p") - testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p") + testUnmarshalErr(&v71v2, bs71, h, t, "dec-map-v71-p-nil") + testDeepEqualErr(v71v1, v71v2, t, "equal-map-v71-p-nil") + // ... + if v == nil { + v71v2 = nil + } else { + v71v2 = make(map[float64]bool, len(v)) + } // reset map + var v71v3, v71v4 typMapMapFloat64Bool + v71v3 = typMapMapFloat64Bool(v71v1) + v71v4 = typMapMapFloat64Bool(v71v2) + bs71 = testMarshalErr(v71v3, h, t, "enc-map-v71-custom") + testUnmarshalErr(v71v4, bs71, h, t, "dec-map-v71-p-len") + testDeepEqualErr(v71v3, v71v4, t, "equal-map-v71-p-len") } - for _, v := range []map[uint]interface{}{nil, map[uint]interface{}{}, map[uint]interface{}{10: "string-is-an-interface"}} { + for _, v := range []map[uint]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v74: %v\n", v) var v74v1, v74v2 map[uint]interface{} v74v1 = v bs74 := testMarshalErr(v74v1, h, t, "enc-map-v74") - if v != nil { + if v == nil { + v74v2 = nil + } else { v74v2 = make(map[uint]interface{}, len(v)) - } + } // reset map testUnmarshalErr(v74v2, bs74, h, t, "dec-map-v74") testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74") + if v == nil { + v74v2 = nil + } else { + v74v2 = make(map[uint]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v74v2), bs74, h, t, "dec-map-v74-noaddr") // decode into non-addressable map value + testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-noaddr") + if v == nil { + v74v2 = nil + } else { + v74v2 = make(map[uint]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-len") + testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-len") bs74 = testMarshalErr(&v74v1, h, t, "enc-map-v74-p") v74v2 = nil - testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p") - testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p") + testUnmarshalErr(&v74v2, bs74, h, t, "dec-map-v74-p-nil") + testDeepEqualErr(v74v1, v74v2, t, "equal-map-v74-p-nil") + // ... + if v == nil { + v74v2 = nil + } else { + v74v2 = make(map[uint]interface{}, len(v)) + } // reset map + var v74v3, v74v4 typMapMapUintIntf + v74v3 = typMapMapUintIntf(v74v1) + v74v4 = typMapMapUintIntf(v74v2) + bs74 = testMarshalErr(v74v3, h, t, "enc-map-v74-custom") + testUnmarshalErr(v74v4, bs74, h, t, "dec-map-v74-p-len") + testDeepEqualErr(v74v3, v74v4, t, "equal-map-v74-p-len") } - for _, v := range []map[uint]string{nil, map[uint]string{}, map[uint]string{10: "some-string"}} { + for _, v := range []map[uint]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v75: %v\n", v) var v75v1, v75v2 map[uint]string v75v1 = v bs75 := testMarshalErr(v75v1, h, t, "enc-map-v75") - if v != nil { + if v == nil { + v75v2 = nil + } else { v75v2 = make(map[uint]string, len(v)) - } + } // reset map testUnmarshalErr(v75v2, bs75, h, t, "dec-map-v75") testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75") + if v == nil { + v75v2 = nil + } else { + v75v2 = make(map[uint]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v75v2), bs75, h, t, "dec-map-v75-noaddr") // decode into non-addressable map value + testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-noaddr") + if v == nil { + v75v2 = nil + } else { + v75v2 = make(map[uint]string, len(v)) + } // reset map + testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-len") + testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-len") bs75 = testMarshalErr(&v75v1, h, t, "enc-map-v75-p") v75v2 = nil - testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p") - testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p") + testUnmarshalErr(&v75v2, bs75, h, t, "dec-map-v75-p-nil") + testDeepEqualErr(v75v1, v75v2, t, "equal-map-v75-p-nil") + // ... + if v == nil { + v75v2 = nil + } else { + v75v2 = make(map[uint]string, len(v)) + } // reset map + var v75v3, v75v4 typMapMapUintString + v75v3 = typMapMapUintString(v75v1) + v75v4 = typMapMapUintString(v75v2) + bs75 = testMarshalErr(v75v3, h, t, "enc-map-v75-custom") + testUnmarshalErr(v75v4, bs75, h, t, "dec-map-v75-p-len") + testDeepEqualErr(v75v3, v75v4, t, "equal-map-v75-p-len") } - for _, v := range []map[uint]uint{nil, map[uint]uint{}, map[uint]uint{10: 10}} { + for _, v := range []map[uint]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v76: %v\n", v) var v76v1, v76v2 map[uint]uint v76v1 = v bs76 := testMarshalErr(v76v1, h, t, "enc-map-v76") - if v != nil { + if v == nil { + v76v2 = nil + } else { v76v2 = make(map[uint]uint, len(v)) - } + } // reset map testUnmarshalErr(v76v2, bs76, h, t, "dec-map-v76") testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76") + if v == nil { + v76v2 = nil + } else { + v76v2 = make(map[uint]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v76v2), bs76, h, t, "dec-map-v76-noaddr") // decode into non-addressable map value + testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-noaddr") + if v == nil { + v76v2 = nil + } else { + v76v2 = make(map[uint]uint, len(v)) + } // reset map + testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-len") + testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-len") bs76 = testMarshalErr(&v76v1, h, t, "enc-map-v76-p") v76v2 = nil - testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p") - testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p") + testUnmarshalErr(&v76v2, bs76, h, t, "dec-map-v76-p-nil") + testDeepEqualErr(v76v1, v76v2, t, "equal-map-v76-p-nil") + // ... + if v == nil { + v76v2 = nil + } else { + v76v2 = make(map[uint]uint, len(v)) + } // reset map + var v76v3, v76v4 typMapMapUintUint + v76v3 = typMapMapUintUint(v76v1) + v76v4 = typMapMapUintUint(v76v2) + bs76 = testMarshalErr(v76v3, h, t, "enc-map-v76-custom") + testUnmarshalErr(v76v4, bs76, h, t, "dec-map-v76-p-len") + testDeepEqualErr(v76v3, v76v4, t, "equal-map-v76-p-len") } - for _, v := range []map[uint]uint8{nil, map[uint]uint8{}, map[uint]uint8{10: 10}} { + for _, v := range []map[uint]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v77: %v\n", v) var v77v1, v77v2 map[uint]uint8 v77v1 = v bs77 := testMarshalErr(v77v1, h, t, "enc-map-v77") - if v != nil { + if v == nil { + v77v2 = nil + } else { v77v2 = make(map[uint]uint8, len(v)) - } + } // reset map testUnmarshalErr(v77v2, bs77, h, t, "dec-map-v77") testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77") + if v == nil { + v77v2 = nil + } else { + v77v2 = make(map[uint]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v77v2), bs77, h, t, "dec-map-v77-noaddr") // decode into non-addressable map value + testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-noaddr") + if v == nil { + v77v2 = nil + } else { + v77v2 = make(map[uint]uint8, len(v)) + } // reset map + testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-len") + testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-len") bs77 = testMarshalErr(&v77v1, h, t, "enc-map-v77-p") v77v2 = nil - testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p") - testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p") + testUnmarshalErr(&v77v2, bs77, h, t, "dec-map-v77-p-nil") + testDeepEqualErr(v77v1, v77v2, t, "equal-map-v77-p-nil") + // ... + if v == nil { + v77v2 = nil + } else { + v77v2 = make(map[uint]uint8, len(v)) + } // reset map + var v77v3, v77v4 typMapMapUintUint8 + v77v3 = typMapMapUintUint8(v77v1) + v77v4 = typMapMapUintUint8(v77v2) + bs77 = testMarshalErr(v77v3, h, t, "enc-map-v77-custom") + testUnmarshalErr(v77v4, bs77, h, t, "dec-map-v77-p-len") + testDeepEqualErr(v77v3, v77v4, t, "equal-map-v77-p-len") } - for _, v := range []map[uint]uint16{nil, map[uint]uint16{}, map[uint]uint16{10: 10}} { + for _, v := range []map[uint]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v78: %v\n", v) var v78v1, v78v2 map[uint]uint16 v78v1 = v bs78 := testMarshalErr(v78v1, h, t, "enc-map-v78") - if v != nil { + if v == nil { + v78v2 = nil + } else { v78v2 = make(map[uint]uint16, len(v)) - } + } // reset map testUnmarshalErr(v78v2, bs78, h, t, "dec-map-v78") testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78") + if v == nil { + v78v2 = nil + } else { + v78v2 = make(map[uint]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v78v2), bs78, h, t, "dec-map-v78-noaddr") // decode into non-addressable map value + testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-noaddr") + if v == nil { + v78v2 = nil + } else { + v78v2 = make(map[uint]uint16, len(v)) + } // reset map + testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-len") + testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-len") bs78 = testMarshalErr(&v78v1, h, t, "enc-map-v78-p") v78v2 = nil - testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p") - testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p") + testUnmarshalErr(&v78v2, bs78, h, t, "dec-map-v78-p-nil") + testDeepEqualErr(v78v1, v78v2, t, "equal-map-v78-p-nil") + // ... + if v == nil { + v78v2 = nil + } else { + v78v2 = make(map[uint]uint16, len(v)) + } // reset map + var v78v3, v78v4 typMapMapUintUint16 + v78v3 = typMapMapUintUint16(v78v1) + v78v4 = typMapMapUintUint16(v78v2) + bs78 = testMarshalErr(v78v3, h, t, "enc-map-v78-custom") + testUnmarshalErr(v78v4, bs78, h, t, "dec-map-v78-p-len") + testDeepEqualErr(v78v3, v78v4, t, "equal-map-v78-p-len") } - for _, v := range []map[uint]uint32{nil, map[uint]uint32{}, map[uint]uint32{10: 10}} { + for _, v := range []map[uint]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v79: %v\n", v) var v79v1, v79v2 map[uint]uint32 v79v1 = v bs79 := testMarshalErr(v79v1, h, t, "enc-map-v79") - if v != nil { + if v == nil { + v79v2 = nil + } else { v79v2 = make(map[uint]uint32, len(v)) - } + } // reset map testUnmarshalErr(v79v2, bs79, h, t, "dec-map-v79") testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79") + if v == nil { + v79v2 = nil + } else { + v79v2 = make(map[uint]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v79v2), bs79, h, t, "dec-map-v79-noaddr") // decode into non-addressable map value + testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-noaddr") + if v == nil { + v79v2 = nil + } else { + v79v2 = make(map[uint]uint32, len(v)) + } // reset map + testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-len") + testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-len") bs79 = testMarshalErr(&v79v1, h, t, "enc-map-v79-p") v79v2 = nil - testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p") - testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p") + testUnmarshalErr(&v79v2, bs79, h, t, "dec-map-v79-p-nil") + testDeepEqualErr(v79v1, v79v2, t, "equal-map-v79-p-nil") + // ... + if v == nil { + v79v2 = nil + } else { + v79v2 = make(map[uint]uint32, len(v)) + } // reset map + var v79v3, v79v4 typMapMapUintUint32 + v79v3 = typMapMapUintUint32(v79v1) + v79v4 = typMapMapUintUint32(v79v2) + bs79 = testMarshalErr(v79v3, h, t, "enc-map-v79-custom") + testUnmarshalErr(v79v4, bs79, h, t, "dec-map-v79-p-len") + testDeepEqualErr(v79v3, v79v4, t, "equal-map-v79-p-len") } - for _, v := range []map[uint]uint64{nil, map[uint]uint64{}, map[uint]uint64{10: 10}} { + for _, v := range []map[uint]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v80: %v\n", v) var v80v1, v80v2 map[uint]uint64 v80v1 = v bs80 := testMarshalErr(v80v1, h, t, "enc-map-v80") - if v != nil { + if v == nil { + v80v2 = nil + } else { v80v2 = make(map[uint]uint64, len(v)) - } + } // reset map testUnmarshalErr(v80v2, bs80, h, t, "dec-map-v80") testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80") + if v == nil { + v80v2 = nil + } else { + v80v2 = make(map[uint]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v80v2), bs80, h, t, "dec-map-v80-noaddr") // decode into non-addressable map value + testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-noaddr") + if v == nil { + v80v2 = nil + } else { + v80v2 = make(map[uint]uint64, len(v)) + } // reset map + testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-len") + testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-len") bs80 = testMarshalErr(&v80v1, h, t, "enc-map-v80-p") v80v2 = nil - testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p") - testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p") + testUnmarshalErr(&v80v2, bs80, h, t, "dec-map-v80-p-nil") + testDeepEqualErr(v80v1, v80v2, t, "equal-map-v80-p-nil") + // ... + if v == nil { + v80v2 = nil + } else { + v80v2 = make(map[uint]uint64, len(v)) + } // reset map + var v80v3, v80v4 typMapMapUintUint64 + v80v3 = typMapMapUintUint64(v80v1) + v80v4 = typMapMapUintUint64(v80v2) + bs80 = testMarshalErr(v80v3, h, t, "enc-map-v80-custom") + testUnmarshalErr(v80v4, bs80, h, t, "dec-map-v80-p-len") + testDeepEqualErr(v80v3, v80v4, t, "equal-map-v80-p-len") } - for _, v := range []map[uint]uintptr{nil, map[uint]uintptr{}, map[uint]uintptr{10: 10}} { + for _, v := range []map[uint]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v81: %v\n", v) var v81v1, v81v2 map[uint]uintptr v81v1 = v bs81 := testMarshalErr(v81v1, h, t, "enc-map-v81") - if v != nil { + if v == nil { + v81v2 = nil + } else { v81v2 = make(map[uint]uintptr, len(v)) - } + } // reset map testUnmarshalErr(v81v2, bs81, h, t, "dec-map-v81") testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81") + if v == nil { + v81v2 = nil + } else { + v81v2 = make(map[uint]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v81v2), bs81, h, t, "dec-map-v81-noaddr") // decode into non-addressable map value + testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-noaddr") + if v == nil { + v81v2 = nil + } else { + v81v2 = make(map[uint]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-len") + testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-len") bs81 = testMarshalErr(&v81v1, h, t, "enc-map-v81-p") v81v2 = nil - testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p") - testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p") + testUnmarshalErr(&v81v2, bs81, h, t, "dec-map-v81-p-nil") + testDeepEqualErr(v81v1, v81v2, t, "equal-map-v81-p-nil") + // ... + if v == nil { + v81v2 = nil + } else { + v81v2 = make(map[uint]uintptr, len(v)) + } // reset map + var v81v3, v81v4 typMapMapUintUintptr + v81v3 = typMapMapUintUintptr(v81v1) + v81v4 = typMapMapUintUintptr(v81v2) + bs81 = testMarshalErr(v81v3, h, t, "enc-map-v81-custom") + testUnmarshalErr(v81v4, bs81, h, t, "dec-map-v81-p-len") + testDeepEqualErr(v81v3, v81v4, t, "equal-map-v81-p-len") } - for _, v := range []map[uint]int{nil, map[uint]int{}, map[uint]int{10: 10}} { + for _, v := range []map[uint]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v82: %v\n", v) var v82v1, v82v2 map[uint]int v82v1 = v bs82 := testMarshalErr(v82v1, h, t, "enc-map-v82") - if v != nil { + if v == nil { + v82v2 = nil + } else { v82v2 = make(map[uint]int, len(v)) - } + } // reset map testUnmarshalErr(v82v2, bs82, h, t, "dec-map-v82") testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82") + if v == nil { + v82v2 = nil + } else { + v82v2 = make(map[uint]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v82v2), bs82, h, t, "dec-map-v82-noaddr") // decode into non-addressable map value + testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-noaddr") + if v == nil { + v82v2 = nil + } else { + v82v2 = make(map[uint]int, len(v)) + } // reset map + testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-len") + testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-len") bs82 = testMarshalErr(&v82v1, h, t, "enc-map-v82-p") v82v2 = nil - testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p") - testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p") + testUnmarshalErr(&v82v2, bs82, h, t, "dec-map-v82-p-nil") + testDeepEqualErr(v82v1, v82v2, t, "equal-map-v82-p-nil") + // ... + if v == nil { + v82v2 = nil + } else { + v82v2 = make(map[uint]int, len(v)) + } // reset map + var v82v3, v82v4 typMapMapUintInt + v82v3 = typMapMapUintInt(v82v1) + v82v4 = typMapMapUintInt(v82v2) + bs82 = testMarshalErr(v82v3, h, t, "enc-map-v82-custom") + testUnmarshalErr(v82v4, bs82, h, t, "dec-map-v82-p-len") + testDeepEqualErr(v82v3, v82v4, t, "equal-map-v82-p-len") } - for _, v := range []map[uint]int8{nil, map[uint]int8{}, map[uint]int8{10: 10}} { + for _, v := range []map[uint]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v83: %v\n", v) var v83v1, v83v2 map[uint]int8 v83v1 = v bs83 := testMarshalErr(v83v1, h, t, "enc-map-v83") - if v != nil { + if v == nil { + v83v2 = nil + } else { v83v2 = make(map[uint]int8, len(v)) - } + } // reset map testUnmarshalErr(v83v2, bs83, h, t, "dec-map-v83") testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83") + if v == nil { + v83v2 = nil + } else { + v83v2 = make(map[uint]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v83v2), bs83, h, t, "dec-map-v83-noaddr") // decode into non-addressable map value + testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-noaddr") + if v == nil { + v83v2 = nil + } else { + v83v2 = make(map[uint]int8, len(v)) + } // reset map + testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-len") + testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-len") bs83 = testMarshalErr(&v83v1, h, t, "enc-map-v83-p") v83v2 = nil - testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p") - testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p") + testUnmarshalErr(&v83v2, bs83, h, t, "dec-map-v83-p-nil") + testDeepEqualErr(v83v1, v83v2, t, "equal-map-v83-p-nil") + // ... + if v == nil { + v83v2 = nil + } else { + v83v2 = make(map[uint]int8, len(v)) + } // reset map + var v83v3, v83v4 typMapMapUintInt8 + v83v3 = typMapMapUintInt8(v83v1) + v83v4 = typMapMapUintInt8(v83v2) + bs83 = testMarshalErr(v83v3, h, t, "enc-map-v83-custom") + testUnmarshalErr(v83v4, bs83, h, t, "dec-map-v83-p-len") + testDeepEqualErr(v83v3, v83v4, t, "equal-map-v83-p-len") } - for _, v := range []map[uint]int16{nil, map[uint]int16{}, map[uint]int16{10: 10}} { + for _, v := range []map[uint]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v84: %v\n", v) var v84v1, v84v2 map[uint]int16 v84v1 = v bs84 := testMarshalErr(v84v1, h, t, "enc-map-v84") - if v != nil { + if v == nil { + v84v2 = nil + } else { v84v2 = make(map[uint]int16, len(v)) - } + } // reset map testUnmarshalErr(v84v2, bs84, h, t, "dec-map-v84") testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84") + if v == nil { + v84v2 = nil + } else { + v84v2 = make(map[uint]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v84v2), bs84, h, t, "dec-map-v84-noaddr") // decode into non-addressable map value + testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-noaddr") + if v == nil { + v84v2 = nil + } else { + v84v2 = make(map[uint]int16, len(v)) + } // reset map + testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-len") + testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-len") bs84 = testMarshalErr(&v84v1, h, t, "enc-map-v84-p") v84v2 = nil - testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p") - testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p") + testUnmarshalErr(&v84v2, bs84, h, t, "dec-map-v84-p-nil") + testDeepEqualErr(v84v1, v84v2, t, "equal-map-v84-p-nil") + // ... + if v == nil { + v84v2 = nil + } else { + v84v2 = make(map[uint]int16, len(v)) + } // reset map + var v84v3, v84v4 typMapMapUintInt16 + v84v3 = typMapMapUintInt16(v84v1) + v84v4 = typMapMapUintInt16(v84v2) + bs84 = testMarshalErr(v84v3, h, t, "enc-map-v84-custom") + testUnmarshalErr(v84v4, bs84, h, t, "dec-map-v84-p-len") + testDeepEqualErr(v84v3, v84v4, t, "equal-map-v84-p-len") } - for _, v := range []map[uint]int32{nil, map[uint]int32{}, map[uint]int32{10: 10}} { + for _, v := range []map[uint]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v85: %v\n", v) var v85v1, v85v2 map[uint]int32 v85v1 = v bs85 := testMarshalErr(v85v1, h, t, "enc-map-v85") - if v != nil { + if v == nil { + v85v2 = nil + } else { v85v2 = make(map[uint]int32, len(v)) - } + } // reset map testUnmarshalErr(v85v2, bs85, h, t, "dec-map-v85") testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85") + if v == nil { + v85v2 = nil + } else { + v85v2 = make(map[uint]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v85v2), bs85, h, t, "dec-map-v85-noaddr") // decode into non-addressable map value + testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-noaddr") + if v == nil { + v85v2 = nil + } else { + v85v2 = make(map[uint]int32, len(v)) + } // reset map + testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-len") + testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-len") bs85 = testMarshalErr(&v85v1, h, t, "enc-map-v85-p") v85v2 = nil - testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p") - testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p") + testUnmarshalErr(&v85v2, bs85, h, t, "dec-map-v85-p-nil") + testDeepEqualErr(v85v1, v85v2, t, "equal-map-v85-p-nil") + // ... + if v == nil { + v85v2 = nil + } else { + v85v2 = make(map[uint]int32, len(v)) + } // reset map + var v85v3, v85v4 typMapMapUintInt32 + v85v3 = typMapMapUintInt32(v85v1) + v85v4 = typMapMapUintInt32(v85v2) + bs85 = testMarshalErr(v85v3, h, t, "enc-map-v85-custom") + testUnmarshalErr(v85v4, bs85, h, t, "dec-map-v85-p-len") + testDeepEqualErr(v85v3, v85v4, t, "equal-map-v85-p-len") } - for _, v := range []map[uint]int64{nil, map[uint]int64{}, map[uint]int64{10: 10}} { + for _, v := range []map[uint]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v86: %v\n", v) var v86v1, v86v2 map[uint]int64 v86v1 = v bs86 := testMarshalErr(v86v1, h, t, "enc-map-v86") - if v != nil { + if v == nil { + v86v2 = nil + } else { v86v2 = make(map[uint]int64, len(v)) - } + } // reset map testUnmarshalErr(v86v2, bs86, h, t, "dec-map-v86") testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86") + if v == nil { + v86v2 = nil + } else { + v86v2 = make(map[uint]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v86v2), bs86, h, t, "dec-map-v86-noaddr") // decode into non-addressable map value + testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-noaddr") + if v == nil { + v86v2 = nil + } else { + v86v2 = make(map[uint]int64, len(v)) + } // reset map + testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-len") + testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-len") bs86 = testMarshalErr(&v86v1, h, t, "enc-map-v86-p") v86v2 = nil - testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p") - testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p") + testUnmarshalErr(&v86v2, bs86, h, t, "dec-map-v86-p-nil") + testDeepEqualErr(v86v1, v86v2, t, "equal-map-v86-p-nil") + // ... + if v == nil { + v86v2 = nil + } else { + v86v2 = make(map[uint]int64, len(v)) + } // reset map + var v86v3, v86v4 typMapMapUintInt64 + v86v3 = typMapMapUintInt64(v86v1) + v86v4 = typMapMapUintInt64(v86v2) + bs86 = testMarshalErr(v86v3, h, t, "enc-map-v86-custom") + testUnmarshalErr(v86v4, bs86, h, t, "dec-map-v86-p-len") + testDeepEqualErr(v86v3, v86v4, t, "equal-map-v86-p-len") } - for _, v := range []map[uint]float32{nil, map[uint]float32{}, map[uint]float32{10: 10.1}} { + for _, v := range []map[uint]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v87: %v\n", v) var v87v1, v87v2 map[uint]float32 v87v1 = v bs87 := testMarshalErr(v87v1, h, t, "enc-map-v87") - if v != nil { + if v == nil { + v87v2 = nil + } else { v87v2 = make(map[uint]float32, len(v)) - } + } // reset map testUnmarshalErr(v87v2, bs87, h, t, "dec-map-v87") testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87") + if v == nil { + v87v2 = nil + } else { + v87v2 = make(map[uint]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v87v2), bs87, h, t, "dec-map-v87-noaddr") // decode into non-addressable map value + testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-noaddr") + if v == nil { + v87v2 = nil + } else { + v87v2 = make(map[uint]float32, len(v)) + } // reset map + testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-len") + testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-len") bs87 = testMarshalErr(&v87v1, h, t, "enc-map-v87-p") v87v2 = nil - testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p") - testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p") + testUnmarshalErr(&v87v2, bs87, h, t, "dec-map-v87-p-nil") + testDeepEqualErr(v87v1, v87v2, t, "equal-map-v87-p-nil") + // ... + if v == nil { + v87v2 = nil + } else { + v87v2 = make(map[uint]float32, len(v)) + } // reset map + var v87v3, v87v4 typMapMapUintFloat32 + v87v3 = typMapMapUintFloat32(v87v1) + v87v4 = typMapMapUintFloat32(v87v2) + bs87 = testMarshalErr(v87v3, h, t, "enc-map-v87-custom") + testUnmarshalErr(v87v4, bs87, h, t, "dec-map-v87-p-len") + testDeepEqualErr(v87v3, v87v4, t, "equal-map-v87-p-len") } - for _, v := range []map[uint]float64{nil, map[uint]float64{}, map[uint]float64{10: 10.1}} { + for _, v := range []map[uint]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v88: %v\n", v) var v88v1, v88v2 map[uint]float64 v88v1 = v bs88 := testMarshalErr(v88v1, h, t, "enc-map-v88") - if v != nil { + if v == nil { + v88v2 = nil + } else { v88v2 = make(map[uint]float64, len(v)) - } + } // reset map testUnmarshalErr(v88v2, bs88, h, t, "dec-map-v88") testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88") + if v == nil { + v88v2 = nil + } else { + v88v2 = make(map[uint]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v88v2), bs88, h, t, "dec-map-v88-noaddr") // decode into non-addressable map value + testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-noaddr") + if v == nil { + v88v2 = nil + } else { + v88v2 = make(map[uint]float64, len(v)) + } // reset map + testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-len") + testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-len") bs88 = testMarshalErr(&v88v1, h, t, "enc-map-v88-p") v88v2 = nil - testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p") - testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p") + testUnmarshalErr(&v88v2, bs88, h, t, "dec-map-v88-p-nil") + testDeepEqualErr(v88v1, v88v2, t, "equal-map-v88-p-nil") + // ... + if v == nil { + v88v2 = nil + } else { + v88v2 = make(map[uint]float64, len(v)) + } // reset map + var v88v3, v88v4 typMapMapUintFloat64 + v88v3 = typMapMapUintFloat64(v88v1) + v88v4 = typMapMapUintFloat64(v88v2) + bs88 = testMarshalErr(v88v3, h, t, "enc-map-v88-custom") + testUnmarshalErr(v88v4, bs88, h, t, "dec-map-v88-p-len") + testDeepEqualErr(v88v3, v88v4, t, "equal-map-v88-p-len") } - for _, v := range []map[uint]bool{nil, map[uint]bool{}, map[uint]bool{10: true}} { + for _, v := range []map[uint]bool{nil, {}, {33: false, 44: true}} { // fmt.Printf(">>>> running mammoth map v89: %v\n", v) var v89v1, v89v2 map[uint]bool v89v1 = v bs89 := testMarshalErr(v89v1, h, t, "enc-map-v89") - if v != nil { + if v == nil { + v89v2 = nil + } else { v89v2 = make(map[uint]bool, len(v)) - } + } // reset map testUnmarshalErr(v89v2, bs89, h, t, "dec-map-v89") testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89") + if v == nil { + v89v2 = nil + } else { + v89v2 = make(map[uint]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v89v2), bs89, h, t, "dec-map-v89-noaddr") // decode into non-addressable map value + testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-noaddr") + if v == nil { + v89v2 = nil + } else { + v89v2 = make(map[uint]bool, len(v)) + } // reset map + testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-len") + testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-len") bs89 = testMarshalErr(&v89v1, h, t, "enc-map-v89-p") v89v2 = nil - testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p") - testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p") + testUnmarshalErr(&v89v2, bs89, h, t, "dec-map-v89-p-nil") + testDeepEqualErr(v89v1, v89v2, t, "equal-map-v89-p-nil") + // ... + if v == nil { + v89v2 = nil + } else { + v89v2 = make(map[uint]bool, len(v)) + } // reset map + var v89v3, v89v4 typMapMapUintBool + v89v3 = typMapMapUintBool(v89v1) + v89v4 = typMapMapUintBool(v89v2) + bs89 = testMarshalErr(v89v3, h, t, "enc-map-v89-custom") + testUnmarshalErr(v89v4, bs89, h, t, "dec-map-v89-p-len") + testDeepEqualErr(v89v3, v89v4, t, "equal-map-v89-p-len") } - for _, v := range []map[uint8]interface{}{nil, map[uint8]interface{}{}, map[uint8]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v91: %v\n", v) - var v91v1, v91v2 map[uint8]interface{} - v91v1 = v - bs91 := testMarshalErr(v91v1, h, t, "enc-map-v91") - if v != nil { - v91v2 = make(map[uint8]interface{}, len(v)) - } - testUnmarshalErr(v91v2, bs91, h, t, "dec-map-v91") - testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91") - bs91 = testMarshalErr(&v91v1, h, t, "enc-map-v91-p") - v91v2 = nil - testUnmarshalErr(&v91v2, bs91, h, t, "dec-map-v91-p") - testDeepEqualErr(v91v1, v91v2, t, "equal-map-v91-p") - } - - for _, v := range []map[uint8]string{nil, map[uint8]string{}, map[uint8]string{10: "some-string"}} { + for _, v := range []map[uint8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v92: %v\n", v) - var v92v1, v92v2 map[uint8]string + var v92v1, v92v2 map[uint8]interface{} v92v1 = v bs92 := testMarshalErr(v92v1, h, t, "enc-map-v92") - if v != nil { - v92v2 = make(map[uint8]string, len(v)) - } + if v == nil { + v92v2 = nil + } else { + v92v2 = make(map[uint8]interface{}, len(v)) + } // reset map testUnmarshalErr(v92v2, bs92, h, t, "dec-map-v92") testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92") + if v == nil { + v92v2 = nil + } else { + v92v2 = make(map[uint8]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v92v2), bs92, h, t, "dec-map-v92-noaddr") // decode into non-addressable map value + testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-noaddr") + if v == nil { + v92v2 = nil + } else { + v92v2 = make(map[uint8]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-len") + testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-len") bs92 = testMarshalErr(&v92v1, h, t, "enc-map-v92-p") v92v2 = nil - testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p") - testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p") + testUnmarshalErr(&v92v2, bs92, h, t, "dec-map-v92-p-nil") + testDeepEqualErr(v92v1, v92v2, t, "equal-map-v92-p-nil") + // ... + if v == nil { + v92v2 = nil + } else { + v92v2 = make(map[uint8]interface{}, len(v)) + } // reset map + var v92v3, v92v4 typMapMapUint8Intf + v92v3 = typMapMapUint8Intf(v92v1) + v92v4 = typMapMapUint8Intf(v92v2) + bs92 = testMarshalErr(v92v3, h, t, "enc-map-v92-custom") + testUnmarshalErr(v92v4, bs92, h, t, "dec-map-v92-p-len") + testDeepEqualErr(v92v3, v92v4, t, "equal-map-v92-p-len") } - for _, v := range []map[uint8]uint{nil, map[uint8]uint{}, map[uint8]uint{10: 10}} { + for _, v := range []map[uint8]string{nil, {}, {33: "", 44: "some-string"}} { // fmt.Printf(">>>> running mammoth map v93: %v\n", v) - var v93v1, v93v2 map[uint8]uint + var v93v1, v93v2 map[uint8]string v93v1 = v bs93 := testMarshalErr(v93v1, h, t, "enc-map-v93") - if v != nil { - v93v2 = make(map[uint8]uint, len(v)) - } + if v == nil { + v93v2 = nil + } else { + v93v2 = make(map[uint8]string, len(v)) + } // reset map testUnmarshalErr(v93v2, bs93, h, t, "dec-map-v93") testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93") + if v == nil { + v93v2 = nil + } else { + v93v2 = make(map[uint8]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v93v2), bs93, h, t, "dec-map-v93-noaddr") // decode into non-addressable map value + testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-noaddr") + if v == nil { + v93v2 = nil + } else { + v93v2 = make(map[uint8]string, len(v)) + } // reset map + testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-len") + testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-len") bs93 = testMarshalErr(&v93v1, h, t, "enc-map-v93-p") v93v2 = nil - testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p") - testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p") + testUnmarshalErr(&v93v2, bs93, h, t, "dec-map-v93-p-nil") + testDeepEqualErr(v93v1, v93v2, t, "equal-map-v93-p-nil") + // ... + if v == nil { + v93v2 = nil + } else { + v93v2 = make(map[uint8]string, len(v)) + } // reset map + var v93v3, v93v4 typMapMapUint8String + v93v3 = typMapMapUint8String(v93v1) + v93v4 = typMapMapUint8String(v93v2) + bs93 = testMarshalErr(v93v3, h, t, "enc-map-v93-custom") + testUnmarshalErr(v93v4, bs93, h, t, "dec-map-v93-p-len") + testDeepEqualErr(v93v3, v93v4, t, "equal-map-v93-p-len") } - for _, v := range []map[uint8]uint8{nil, map[uint8]uint8{}, map[uint8]uint8{10: 10}} { + for _, v := range []map[uint8]uint{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v94: %v\n", v) - var v94v1, v94v2 map[uint8]uint8 + var v94v1, v94v2 map[uint8]uint v94v1 = v bs94 := testMarshalErr(v94v1, h, t, "enc-map-v94") - if v != nil { - v94v2 = make(map[uint8]uint8, len(v)) - } + if v == nil { + v94v2 = nil + } else { + v94v2 = make(map[uint8]uint, len(v)) + } // reset map testUnmarshalErr(v94v2, bs94, h, t, "dec-map-v94") testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94") + if v == nil { + v94v2 = nil + } else { + v94v2 = make(map[uint8]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v94v2), bs94, h, t, "dec-map-v94-noaddr") // decode into non-addressable map value + testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-noaddr") + if v == nil { + v94v2 = nil + } else { + v94v2 = make(map[uint8]uint, len(v)) + } // reset map + testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-len") + testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-len") bs94 = testMarshalErr(&v94v1, h, t, "enc-map-v94-p") v94v2 = nil - testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p") - testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p") + testUnmarshalErr(&v94v2, bs94, h, t, "dec-map-v94-p-nil") + testDeepEqualErr(v94v1, v94v2, t, "equal-map-v94-p-nil") + // ... + if v == nil { + v94v2 = nil + } else { + v94v2 = make(map[uint8]uint, len(v)) + } // reset map + var v94v3, v94v4 typMapMapUint8Uint + v94v3 = typMapMapUint8Uint(v94v1) + v94v4 = typMapMapUint8Uint(v94v2) + bs94 = testMarshalErr(v94v3, h, t, "enc-map-v94-custom") + testUnmarshalErr(v94v4, bs94, h, t, "dec-map-v94-p-len") + testDeepEqualErr(v94v3, v94v4, t, "equal-map-v94-p-len") } - for _, v := range []map[uint8]uint16{nil, map[uint8]uint16{}, map[uint8]uint16{10: 10}} { + for _, v := range []map[uint8]uint8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v95: %v\n", v) - var v95v1, v95v2 map[uint8]uint16 + var v95v1, v95v2 map[uint8]uint8 v95v1 = v bs95 := testMarshalErr(v95v1, h, t, "enc-map-v95") - if v != nil { - v95v2 = make(map[uint8]uint16, len(v)) - } + if v == nil { + v95v2 = nil + } else { + v95v2 = make(map[uint8]uint8, len(v)) + } // reset map testUnmarshalErr(v95v2, bs95, h, t, "dec-map-v95") testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95") + if v == nil { + v95v2 = nil + } else { + v95v2 = make(map[uint8]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v95v2), bs95, h, t, "dec-map-v95-noaddr") // decode into non-addressable map value + testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-noaddr") + if v == nil { + v95v2 = nil + } else { + v95v2 = make(map[uint8]uint8, len(v)) + } // reset map + testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-len") + testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-len") bs95 = testMarshalErr(&v95v1, h, t, "enc-map-v95-p") v95v2 = nil - testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p") - testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p") + testUnmarshalErr(&v95v2, bs95, h, t, "dec-map-v95-p-nil") + testDeepEqualErr(v95v1, v95v2, t, "equal-map-v95-p-nil") + // ... + if v == nil { + v95v2 = nil + } else { + v95v2 = make(map[uint8]uint8, len(v)) + } // reset map + var v95v3, v95v4 typMapMapUint8Uint8 + v95v3 = typMapMapUint8Uint8(v95v1) + v95v4 = typMapMapUint8Uint8(v95v2) + bs95 = testMarshalErr(v95v3, h, t, "enc-map-v95-custom") + testUnmarshalErr(v95v4, bs95, h, t, "dec-map-v95-p-len") + testDeepEqualErr(v95v3, v95v4, t, "equal-map-v95-p-len") } - for _, v := range []map[uint8]uint32{nil, map[uint8]uint32{}, map[uint8]uint32{10: 10}} { + for _, v := range []map[uint8]uint16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v96: %v\n", v) - var v96v1, v96v2 map[uint8]uint32 + var v96v1, v96v2 map[uint8]uint16 v96v1 = v bs96 := testMarshalErr(v96v1, h, t, "enc-map-v96") - if v != nil { - v96v2 = make(map[uint8]uint32, len(v)) - } + if v == nil { + v96v2 = nil + } else { + v96v2 = make(map[uint8]uint16, len(v)) + } // reset map testUnmarshalErr(v96v2, bs96, h, t, "dec-map-v96") testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96") + if v == nil { + v96v2 = nil + } else { + v96v2 = make(map[uint8]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v96v2), bs96, h, t, "dec-map-v96-noaddr") // decode into non-addressable map value + testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-noaddr") + if v == nil { + v96v2 = nil + } else { + v96v2 = make(map[uint8]uint16, len(v)) + } // reset map + testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-len") + testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-len") bs96 = testMarshalErr(&v96v1, h, t, "enc-map-v96-p") v96v2 = nil - testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p") - testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p") + testUnmarshalErr(&v96v2, bs96, h, t, "dec-map-v96-p-nil") + testDeepEqualErr(v96v1, v96v2, t, "equal-map-v96-p-nil") + // ... + if v == nil { + v96v2 = nil + } else { + v96v2 = make(map[uint8]uint16, len(v)) + } // reset map + var v96v3, v96v4 typMapMapUint8Uint16 + v96v3 = typMapMapUint8Uint16(v96v1) + v96v4 = typMapMapUint8Uint16(v96v2) + bs96 = testMarshalErr(v96v3, h, t, "enc-map-v96-custom") + testUnmarshalErr(v96v4, bs96, h, t, "dec-map-v96-p-len") + testDeepEqualErr(v96v3, v96v4, t, "equal-map-v96-p-len") } - for _, v := range []map[uint8]uint64{nil, map[uint8]uint64{}, map[uint8]uint64{10: 10}} { + for _, v := range []map[uint8]uint32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v97: %v\n", v) - var v97v1, v97v2 map[uint8]uint64 + var v97v1, v97v2 map[uint8]uint32 v97v1 = v bs97 := testMarshalErr(v97v1, h, t, "enc-map-v97") - if v != nil { - v97v2 = make(map[uint8]uint64, len(v)) - } + if v == nil { + v97v2 = nil + } else { + v97v2 = make(map[uint8]uint32, len(v)) + } // reset map testUnmarshalErr(v97v2, bs97, h, t, "dec-map-v97") testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97") + if v == nil { + v97v2 = nil + } else { + v97v2 = make(map[uint8]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v97v2), bs97, h, t, "dec-map-v97-noaddr") // decode into non-addressable map value + testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-noaddr") + if v == nil { + v97v2 = nil + } else { + v97v2 = make(map[uint8]uint32, len(v)) + } // reset map + testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-len") + testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-len") bs97 = testMarshalErr(&v97v1, h, t, "enc-map-v97-p") v97v2 = nil - testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p") - testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p") + testUnmarshalErr(&v97v2, bs97, h, t, "dec-map-v97-p-nil") + testDeepEqualErr(v97v1, v97v2, t, "equal-map-v97-p-nil") + // ... + if v == nil { + v97v2 = nil + } else { + v97v2 = make(map[uint8]uint32, len(v)) + } // reset map + var v97v3, v97v4 typMapMapUint8Uint32 + v97v3 = typMapMapUint8Uint32(v97v1) + v97v4 = typMapMapUint8Uint32(v97v2) + bs97 = testMarshalErr(v97v3, h, t, "enc-map-v97-custom") + testUnmarshalErr(v97v4, bs97, h, t, "dec-map-v97-p-len") + testDeepEqualErr(v97v3, v97v4, t, "equal-map-v97-p-len") } - for _, v := range []map[uint8]uintptr{nil, map[uint8]uintptr{}, map[uint8]uintptr{10: 10}} { + for _, v := range []map[uint8]uint64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v98: %v\n", v) - var v98v1, v98v2 map[uint8]uintptr + var v98v1, v98v2 map[uint8]uint64 v98v1 = v bs98 := testMarshalErr(v98v1, h, t, "enc-map-v98") - if v != nil { - v98v2 = make(map[uint8]uintptr, len(v)) - } + if v == nil { + v98v2 = nil + } else { + v98v2 = make(map[uint8]uint64, len(v)) + } // reset map testUnmarshalErr(v98v2, bs98, h, t, "dec-map-v98") testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98") + if v == nil { + v98v2 = nil + } else { + v98v2 = make(map[uint8]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v98v2), bs98, h, t, "dec-map-v98-noaddr") // decode into non-addressable map value + testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-noaddr") + if v == nil { + v98v2 = nil + } else { + v98v2 = make(map[uint8]uint64, len(v)) + } // reset map + testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-len") + testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-len") bs98 = testMarshalErr(&v98v1, h, t, "enc-map-v98-p") v98v2 = nil - testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p") - testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p") + testUnmarshalErr(&v98v2, bs98, h, t, "dec-map-v98-p-nil") + testDeepEqualErr(v98v1, v98v2, t, "equal-map-v98-p-nil") + // ... + if v == nil { + v98v2 = nil + } else { + v98v2 = make(map[uint8]uint64, len(v)) + } // reset map + var v98v3, v98v4 typMapMapUint8Uint64 + v98v3 = typMapMapUint8Uint64(v98v1) + v98v4 = typMapMapUint8Uint64(v98v2) + bs98 = testMarshalErr(v98v3, h, t, "enc-map-v98-custom") + testUnmarshalErr(v98v4, bs98, h, t, "dec-map-v98-p-len") + testDeepEqualErr(v98v3, v98v4, t, "equal-map-v98-p-len") } - for _, v := range []map[uint8]int{nil, map[uint8]int{}, map[uint8]int{10: 10}} { + for _, v := range []map[uint8]uintptr{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v99: %v\n", v) - var v99v1, v99v2 map[uint8]int + var v99v1, v99v2 map[uint8]uintptr v99v1 = v bs99 := testMarshalErr(v99v1, h, t, "enc-map-v99") - if v != nil { - v99v2 = make(map[uint8]int, len(v)) - } + if v == nil { + v99v2 = nil + } else { + v99v2 = make(map[uint8]uintptr, len(v)) + } // reset map testUnmarshalErr(v99v2, bs99, h, t, "dec-map-v99") testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99") + if v == nil { + v99v2 = nil + } else { + v99v2 = make(map[uint8]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v99v2), bs99, h, t, "dec-map-v99-noaddr") // decode into non-addressable map value + testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-noaddr") + if v == nil { + v99v2 = nil + } else { + v99v2 = make(map[uint8]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-len") + testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-len") bs99 = testMarshalErr(&v99v1, h, t, "enc-map-v99-p") v99v2 = nil - testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p") - testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p") + testUnmarshalErr(&v99v2, bs99, h, t, "dec-map-v99-p-nil") + testDeepEqualErr(v99v1, v99v2, t, "equal-map-v99-p-nil") + // ... + if v == nil { + v99v2 = nil + } else { + v99v2 = make(map[uint8]uintptr, len(v)) + } // reset map + var v99v3, v99v4 typMapMapUint8Uintptr + v99v3 = typMapMapUint8Uintptr(v99v1) + v99v4 = typMapMapUint8Uintptr(v99v2) + bs99 = testMarshalErr(v99v3, h, t, "enc-map-v99-custom") + testUnmarshalErr(v99v4, bs99, h, t, "dec-map-v99-p-len") + testDeepEqualErr(v99v3, v99v4, t, "equal-map-v99-p-len") } - for _, v := range []map[uint8]int8{nil, map[uint8]int8{}, map[uint8]int8{10: 10}} { + for _, v := range []map[uint8]int{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v100: %v\n", v) - var v100v1, v100v2 map[uint8]int8 + var v100v1, v100v2 map[uint8]int v100v1 = v bs100 := testMarshalErr(v100v1, h, t, "enc-map-v100") - if v != nil { - v100v2 = make(map[uint8]int8, len(v)) - } + if v == nil { + v100v2 = nil + } else { + v100v2 = make(map[uint8]int, len(v)) + } // reset map testUnmarshalErr(v100v2, bs100, h, t, "dec-map-v100") testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100") + if v == nil { + v100v2 = nil + } else { + v100v2 = make(map[uint8]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v100v2), bs100, h, t, "dec-map-v100-noaddr") // decode into non-addressable map value + testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-noaddr") + if v == nil { + v100v2 = nil + } else { + v100v2 = make(map[uint8]int, len(v)) + } // reset map + testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-len") + testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-len") bs100 = testMarshalErr(&v100v1, h, t, "enc-map-v100-p") v100v2 = nil - testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p") - testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p") + testUnmarshalErr(&v100v2, bs100, h, t, "dec-map-v100-p-nil") + testDeepEqualErr(v100v1, v100v2, t, "equal-map-v100-p-nil") + // ... + if v == nil { + v100v2 = nil + } else { + v100v2 = make(map[uint8]int, len(v)) + } // reset map + var v100v3, v100v4 typMapMapUint8Int + v100v3 = typMapMapUint8Int(v100v1) + v100v4 = typMapMapUint8Int(v100v2) + bs100 = testMarshalErr(v100v3, h, t, "enc-map-v100-custom") + testUnmarshalErr(v100v4, bs100, h, t, "dec-map-v100-p-len") + testDeepEqualErr(v100v3, v100v4, t, "equal-map-v100-p-len") } - for _, v := range []map[uint8]int16{nil, map[uint8]int16{}, map[uint8]int16{10: 10}} { + for _, v := range []map[uint8]int8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v101: %v\n", v) - var v101v1, v101v2 map[uint8]int16 + var v101v1, v101v2 map[uint8]int8 v101v1 = v bs101 := testMarshalErr(v101v1, h, t, "enc-map-v101") - if v != nil { - v101v2 = make(map[uint8]int16, len(v)) - } + if v == nil { + v101v2 = nil + } else { + v101v2 = make(map[uint8]int8, len(v)) + } // reset map testUnmarshalErr(v101v2, bs101, h, t, "dec-map-v101") testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101") + if v == nil { + v101v2 = nil + } else { + v101v2 = make(map[uint8]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v101v2), bs101, h, t, "dec-map-v101-noaddr") // decode into non-addressable map value + testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-noaddr") + if v == nil { + v101v2 = nil + } else { + v101v2 = make(map[uint8]int8, len(v)) + } // reset map + testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-len") + testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-len") bs101 = testMarshalErr(&v101v1, h, t, "enc-map-v101-p") v101v2 = nil - testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p") - testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p") + testUnmarshalErr(&v101v2, bs101, h, t, "dec-map-v101-p-nil") + testDeepEqualErr(v101v1, v101v2, t, "equal-map-v101-p-nil") + // ... + if v == nil { + v101v2 = nil + } else { + v101v2 = make(map[uint8]int8, len(v)) + } // reset map + var v101v3, v101v4 typMapMapUint8Int8 + v101v3 = typMapMapUint8Int8(v101v1) + v101v4 = typMapMapUint8Int8(v101v2) + bs101 = testMarshalErr(v101v3, h, t, "enc-map-v101-custom") + testUnmarshalErr(v101v4, bs101, h, t, "dec-map-v101-p-len") + testDeepEqualErr(v101v3, v101v4, t, "equal-map-v101-p-len") } - for _, v := range []map[uint8]int32{nil, map[uint8]int32{}, map[uint8]int32{10: 10}} { + for _, v := range []map[uint8]int16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v102: %v\n", v) - var v102v1, v102v2 map[uint8]int32 + var v102v1, v102v2 map[uint8]int16 v102v1 = v bs102 := testMarshalErr(v102v1, h, t, "enc-map-v102") - if v != nil { - v102v2 = make(map[uint8]int32, len(v)) - } + if v == nil { + v102v2 = nil + } else { + v102v2 = make(map[uint8]int16, len(v)) + } // reset map testUnmarshalErr(v102v2, bs102, h, t, "dec-map-v102") testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102") + if v == nil { + v102v2 = nil + } else { + v102v2 = make(map[uint8]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v102v2), bs102, h, t, "dec-map-v102-noaddr") // decode into non-addressable map value + testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-noaddr") + if v == nil { + v102v2 = nil + } else { + v102v2 = make(map[uint8]int16, len(v)) + } // reset map + testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-len") + testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-len") bs102 = testMarshalErr(&v102v1, h, t, "enc-map-v102-p") v102v2 = nil - testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p") - testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p") + testUnmarshalErr(&v102v2, bs102, h, t, "dec-map-v102-p-nil") + testDeepEqualErr(v102v1, v102v2, t, "equal-map-v102-p-nil") + // ... + if v == nil { + v102v2 = nil + } else { + v102v2 = make(map[uint8]int16, len(v)) + } // reset map + var v102v3, v102v4 typMapMapUint8Int16 + v102v3 = typMapMapUint8Int16(v102v1) + v102v4 = typMapMapUint8Int16(v102v2) + bs102 = testMarshalErr(v102v3, h, t, "enc-map-v102-custom") + testUnmarshalErr(v102v4, bs102, h, t, "dec-map-v102-p-len") + testDeepEqualErr(v102v3, v102v4, t, "equal-map-v102-p-len") } - for _, v := range []map[uint8]int64{nil, map[uint8]int64{}, map[uint8]int64{10: 10}} { + for _, v := range []map[uint8]int32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v103: %v\n", v) - var v103v1, v103v2 map[uint8]int64 + var v103v1, v103v2 map[uint8]int32 v103v1 = v bs103 := testMarshalErr(v103v1, h, t, "enc-map-v103") - if v != nil { - v103v2 = make(map[uint8]int64, len(v)) - } + if v == nil { + v103v2 = nil + } else { + v103v2 = make(map[uint8]int32, len(v)) + } // reset map testUnmarshalErr(v103v2, bs103, h, t, "dec-map-v103") testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103") + if v == nil { + v103v2 = nil + } else { + v103v2 = make(map[uint8]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v103v2), bs103, h, t, "dec-map-v103-noaddr") // decode into non-addressable map value + testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-noaddr") + if v == nil { + v103v2 = nil + } else { + v103v2 = make(map[uint8]int32, len(v)) + } // reset map + testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-len") + testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-len") bs103 = testMarshalErr(&v103v1, h, t, "enc-map-v103-p") v103v2 = nil - testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p") - testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p") + testUnmarshalErr(&v103v2, bs103, h, t, "dec-map-v103-p-nil") + testDeepEqualErr(v103v1, v103v2, t, "equal-map-v103-p-nil") + // ... + if v == nil { + v103v2 = nil + } else { + v103v2 = make(map[uint8]int32, len(v)) + } // reset map + var v103v3, v103v4 typMapMapUint8Int32 + v103v3 = typMapMapUint8Int32(v103v1) + v103v4 = typMapMapUint8Int32(v103v2) + bs103 = testMarshalErr(v103v3, h, t, "enc-map-v103-custom") + testUnmarshalErr(v103v4, bs103, h, t, "dec-map-v103-p-len") + testDeepEqualErr(v103v3, v103v4, t, "equal-map-v103-p-len") } - for _, v := range []map[uint8]float32{nil, map[uint8]float32{}, map[uint8]float32{10: 10.1}} { + for _, v := range []map[uint8]int64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v104: %v\n", v) - var v104v1, v104v2 map[uint8]float32 + var v104v1, v104v2 map[uint8]int64 v104v1 = v bs104 := testMarshalErr(v104v1, h, t, "enc-map-v104") - if v != nil { - v104v2 = make(map[uint8]float32, len(v)) - } + if v == nil { + v104v2 = nil + } else { + v104v2 = make(map[uint8]int64, len(v)) + } // reset map testUnmarshalErr(v104v2, bs104, h, t, "dec-map-v104") testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104") + if v == nil { + v104v2 = nil + } else { + v104v2 = make(map[uint8]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v104v2), bs104, h, t, "dec-map-v104-noaddr") // decode into non-addressable map value + testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-noaddr") + if v == nil { + v104v2 = nil + } else { + v104v2 = make(map[uint8]int64, len(v)) + } // reset map + testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-len") + testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-len") bs104 = testMarshalErr(&v104v1, h, t, "enc-map-v104-p") v104v2 = nil - testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p") - testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p") + testUnmarshalErr(&v104v2, bs104, h, t, "dec-map-v104-p-nil") + testDeepEqualErr(v104v1, v104v2, t, "equal-map-v104-p-nil") + // ... + if v == nil { + v104v2 = nil + } else { + v104v2 = make(map[uint8]int64, len(v)) + } // reset map + var v104v3, v104v4 typMapMapUint8Int64 + v104v3 = typMapMapUint8Int64(v104v1) + v104v4 = typMapMapUint8Int64(v104v2) + bs104 = testMarshalErr(v104v3, h, t, "enc-map-v104-custom") + testUnmarshalErr(v104v4, bs104, h, t, "dec-map-v104-p-len") + testDeepEqualErr(v104v3, v104v4, t, "equal-map-v104-p-len") } - for _, v := range []map[uint8]float64{nil, map[uint8]float64{}, map[uint8]float64{10: 10.1}} { + for _, v := range []map[uint8]float32{nil, {}, {44: 0, 33: 22.2}} { // fmt.Printf(">>>> running mammoth map v105: %v\n", v) - var v105v1, v105v2 map[uint8]float64 + var v105v1, v105v2 map[uint8]float32 v105v1 = v bs105 := testMarshalErr(v105v1, h, t, "enc-map-v105") - if v != nil { - v105v2 = make(map[uint8]float64, len(v)) - } + if v == nil { + v105v2 = nil + } else { + v105v2 = make(map[uint8]float32, len(v)) + } // reset map testUnmarshalErr(v105v2, bs105, h, t, "dec-map-v105") testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105") + if v == nil { + v105v2 = nil + } else { + v105v2 = make(map[uint8]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v105v2), bs105, h, t, "dec-map-v105-noaddr") // decode into non-addressable map value + testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-noaddr") + if v == nil { + v105v2 = nil + } else { + v105v2 = make(map[uint8]float32, len(v)) + } // reset map + testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-len") + testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-len") bs105 = testMarshalErr(&v105v1, h, t, "enc-map-v105-p") v105v2 = nil - testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p") - testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p") + testUnmarshalErr(&v105v2, bs105, h, t, "dec-map-v105-p-nil") + testDeepEqualErr(v105v1, v105v2, t, "equal-map-v105-p-nil") + // ... + if v == nil { + v105v2 = nil + } else { + v105v2 = make(map[uint8]float32, len(v)) + } // reset map + var v105v3, v105v4 typMapMapUint8Float32 + v105v3 = typMapMapUint8Float32(v105v1) + v105v4 = typMapMapUint8Float32(v105v2) + bs105 = testMarshalErr(v105v3, h, t, "enc-map-v105-custom") + testUnmarshalErr(v105v4, bs105, h, t, "dec-map-v105-p-len") + testDeepEqualErr(v105v3, v105v4, t, "equal-map-v105-p-len") } - for _, v := range []map[uint8]bool{nil, map[uint8]bool{}, map[uint8]bool{10: true}} { + for _, v := range []map[uint8]float64{nil, {}, {44: 0, 33: 11.1}} { // fmt.Printf(">>>> running mammoth map v106: %v\n", v) - var v106v1, v106v2 map[uint8]bool + var v106v1, v106v2 map[uint8]float64 v106v1 = v bs106 := testMarshalErr(v106v1, h, t, "enc-map-v106") - if v != nil { - v106v2 = make(map[uint8]bool, len(v)) - } + if v == nil { + v106v2 = nil + } else { + v106v2 = make(map[uint8]float64, len(v)) + } // reset map testUnmarshalErr(v106v2, bs106, h, t, "dec-map-v106") testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106") + if v == nil { + v106v2 = nil + } else { + v106v2 = make(map[uint8]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v106v2), bs106, h, t, "dec-map-v106-noaddr") // decode into non-addressable map value + testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-noaddr") + if v == nil { + v106v2 = nil + } else { + v106v2 = make(map[uint8]float64, len(v)) + } // reset map + testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-len") + testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-len") bs106 = testMarshalErr(&v106v1, h, t, "enc-map-v106-p") v106v2 = nil - testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p") - testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p") + testUnmarshalErr(&v106v2, bs106, h, t, "dec-map-v106-p-nil") + testDeepEqualErr(v106v1, v106v2, t, "equal-map-v106-p-nil") + // ... + if v == nil { + v106v2 = nil + } else { + v106v2 = make(map[uint8]float64, len(v)) + } // reset map + var v106v3, v106v4 typMapMapUint8Float64 + v106v3 = typMapMapUint8Float64(v106v1) + v106v4 = typMapMapUint8Float64(v106v2) + bs106 = testMarshalErr(v106v3, h, t, "enc-map-v106-custom") + testUnmarshalErr(v106v4, bs106, h, t, "dec-map-v106-p-len") + testDeepEqualErr(v106v3, v106v4, t, "equal-map-v106-p-len") } - for _, v := range []map[uint16]interface{}{nil, map[uint16]interface{}{}, map[uint16]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v109: %v\n", v) - var v109v1, v109v2 map[uint16]interface{} - v109v1 = v - bs109 := testMarshalErr(v109v1, h, t, "enc-map-v109") - if v != nil { - v109v2 = make(map[uint16]interface{}, len(v)) - } - testUnmarshalErr(v109v2, bs109, h, t, "dec-map-v109") - testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109") - bs109 = testMarshalErr(&v109v1, h, t, "enc-map-v109-p") - v109v2 = nil - testUnmarshalErr(&v109v2, bs109, h, t, "dec-map-v109-p") - testDeepEqualErr(v109v1, v109v2, t, "equal-map-v109-p") + for _, v := range []map[uint8]bool{nil, {}, {44: false, 33: true}} { + // fmt.Printf(">>>> running mammoth map v107: %v\n", v) + var v107v1, v107v2 map[uint8]bool + v107v1 = v + bs107 := testMarshalErr(v107v1, h, t, "enc-map-v107") + if v == nil { + v107v2 = nil + } else { + v107v2 = make(map[uint8]bool, len(v)) + } // reset map + testUnmarshalErr(v107v2, bs107, h, t, "dec-map-v107") + testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107") + if v == nil { + v107v2 = nil + } else { + v107v2 = make(map[uint8]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v107v2), bs107, h, t, "dec-map-v107-noaddr") // decode into non-addressable map value + testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-noaddr") + if v == nil { + v107v2 = nil + } else { + v107v2 = make(map[uint8]bool, len(v)) + } // reset map + testUnmarshalErr(&v107v2, bs107, h, t, "dec-map-v107-p-len") + testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-p-len") + bs107 = testMarshalErr(&v107v1, h, t, "enc-map-v107-p") + v107v2 = nil + testUnmarshalErr(&v107v2, bs107, h, t, "dec-map-v107-p-nil") + testDeepEqualErr(v107v1, v107v2, t, "equal-map-v107-p-nil") + // ... + if v == nil { + v107v2 = nil + } else { + v107v2 = make(map[uint8]bool, len(v)) + } // reset map + var v107v3, v107v4 typMapMapUint8Bool + v107v3 = typMapMapUint8Bool(v107v1) + v107v4 = typMapMapUint8Bool(v107v2) + bs107 = testMarshalErr(v107v3, h, t, "enc-map-v107-custom") + testUnmarshalErr(v107v4, bs107, h, t, "dec-map-v107-p-len") + testDeepEqualErr(v107v3, v107v4, t, "equal-map-v107-p-len") } - for _, v := range []map[uint16]string{nil, map[uint16]string{}, map[uint16]string{10: "some-string"}} { + for _, v := range []map[uint16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v110: %v\n", v) - var v110v1, v110v2 map[uint16]string + var v110v1, v110v2 map[uint16]interface{} v110v1 = v bs110 := testMarshalErr(v110v1, h, t, "enc-map-v110") - if v != nil { - v110v2 = make(map[uint16]string, len(v)) - } + if v == nil { + v110v2 = nil + } else { + v110v2 = make(map[uint16]interface{}, len(v)) + } // reset map testUnmarshalErr(v110v2, bs110, h, t, "dec-map-v110") testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110") + if v == nil { + v110v2 = nil + } else { + v110v2 = make(map[uint16]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v110v2), bs110, h, t, "dec-map-v110-noaddr") // decode into non-addressable map value + testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-noaddr") + if v == nil { + v110v2 = nil + } else { + v110v2 = make(map[uint16]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-len") + testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-len") bs110 = testMarshalErr(&v110v1, h, t, "enc-map-v110-p") v110v2 = nil - testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p") - testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p") + testUnmarshalErr(&v110v2, bs110, h, t, "dec-map-v110-p-nil") + testDeepEqualErr(v110v1, v110v2, t, "equal-map-v110-p-nil") + // ... + if v == nil { + v110v2 = nil + } else { + v110v2 = make(map[uint16]interface{}, len(v)) + } // reset map + var v110v3, v110v4 typMapMapUint16Intf + v110v3 = typMapMapUint16Intf(v110v1) + v110v4 = typMapMapUint16Intf(v110v2) + bs110 = testMarshalErr(v110v3, h, t, "enc-map-v110-custom") + testUnmarshalErr(v110v4, bs110, h, t, "dec-map-v110-p-len") + testDeepEqualErr(v110v3, v110v4, t, "equal-map-v110-p-len") } - for _, v := range []map[uint16]uint{nil, map[uint16]uint{}, map[uint16]uint{10: 10}} { + for _, v := range []map[uint16]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v111: %v\n", v) - var v111v1, v111v2 map[uint16]uint + var v111v1, v111v2 map[uint16]string v111v1 = v bs111 := testMarshalErr(v111v1, h, t, "enc-map-v111") - if v != nil { - v111v2 = make(map[uint16]uint, len(v)) - } + if v == nil { + v111v2 = nil + } else { + v111v2 = make(map[uint16]string, len(v)) + } // reset map testUnmarshalErr(v111v2, bs111, h, t, "dec-map-v111") testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111") + if v == nil { + v111v2 = nil + } else { + v111v2 = make(map[uint16]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v111v2), bs111, h, t, "dec-map-v111-noaddr") // decode into non-addressable map value + testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-noaddr") + if v == nil { + v111v2 = nil + } else { + v111v2 = make(map[uint16]string, len(v)) + } // reset map + testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-len") + testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-len") bs111 = testMarshalErr(&v111v1, h, t, "enc-map-v111-p") v111v2 = nil - testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p") - testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p") + testUnmarshalErr(&v111v2, bs111, h, t, "dec-map-v111-p-nil") + testDeepEqualErr(v111v1, v111v2, t, "equal-map-v111-p-nil") + // ... + if v == nil { + v111v2 = nil + } else { + v111v2 = make(map[uint16]string, len(v)) + } // reset map + var v111v3, v111v4 typMapMapUint16String + v111v3 = typMapMapUint16String(v111v1) + v111v4 = typMapMapUint16String(v111v2) + bs111 = testMarshalErr(v111v3, h, t, "enc-map-v111-custom") + testUnmarshalErr(v111v4, bs111, h, t, "dec-map-v111-p-len") + testDeepEqualErr(v111v3, v111v4, t, "equal-map-v111-p-len") } - for _, v := range []map[uint16]uint8{nil, map[uint16]uint8{}, map[uint16]uint8{10: 10}} { + for _, v := range []map[uint16]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v112: %v\n", v) - var v112v1, v112v2 map[uint16]uint8 + var v112v1, v112v2 map[uint16]uint v112v1 = v bs112 := testMarshalErr(v112v1, h, t, "enc-map-v112") - if v != nil { - v112v2 = make(map[uint16]uint8, len(v)) - } + if v == nil { + v112v2 = nil + } else { + v112v2 = make(map[uint16]uint, len(v)) + } // reset map testUnmarshalErr(v112v2, bs112, h, t, "dec-map-v112") testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112") + if v == nil { + v112v2 = nil + } else { + v112v2 = make(map[uint16]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v112v2), bs112, h, t, "dec-map-v112-noaddr") // decode into non-addressable map value + testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-noaddr") + if v == nil { + v112v2 = nil + } else { + v112v2 = make(map[uint16]uint, len(v)) + } // reset map + testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-len") + testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-len") bs112 = testMarshalErr(&v112v1, h, t, "enc-map-v112-p") v112v2 = nil - testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p") - testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p") + testUnmarshalErr(&v112v2, bs112, h, t, "dec-map-v112-p-nil") + testDeepEqualErr(v112v1, v112v2, t, "equal-map-v112-p-nil") + // ... + if v == nil { + v112v2 = nil + } else { + v112v2 = make(map[uint16]uint, len(v)) + } // reset map + var v112v3, v112v4 typMapMapUint16Uint + v112v3 = typMapMapUint16Uint(v112v1) + v112v4 = typMapMapUint16Uint(v112v2) + bs112 = testMarshalErr(v112v3, h, t, "enc-map-v112-custom") + testUnmarshalErr(v112v4, bs112, h, t, "dec-map-v112-p-len") + testDeepEqualErr(v112v3, v112v4, t, "equal-map-v112-p-len") } - for _, v := range []map[uint16]uint16{nil, map[uint16]uint16{}, map[uint16]uint16{10: 10}} { + for _, v := range []map[uint16]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v113: %v\n", v) - var v113v1, v113v2 map[uint16]uint16 + var v113v1, v113v2 map[uint16]uint8 v113v1 = v bs113 := testMarshalErr(v113v1, h, t, "enc-map-v113") - if v != nil { - v113v2 = make(map[uint16]uint16, len(v)) - } + if v == nil { + v113v2 = nil + } else { + v113v2 = make(map[uint16]uint8, len(v)) + } // reset map testUnmarshalErr(v113v2, bs113, h, t, "dec-map-v113") testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113") + if v == nil { + v113v2 = nil + } else { + v113v2 = make(map[uint16]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v113v2), bs113, h, t, "dec-map-v113-noaddr") // decode into non-addressable map value + testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-noaddr") + if v == nil { + v113v2 = nil + } else { + v113v2 = make(map[uint16]uint8, len(v)) + } // reset map + testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-len") + testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-len") bs113 = testMarshalErr(&v113v1, h, t, "enc-map-v113-p") v113v2 = nil - testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p") - testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p") + testUnmarshalErr(&v113v2, bs113, h, t, "dec-map-v113-p-nil") + testDeepEqualErr(v113v1, v113v2, t, "equal-map-v113-p-nil") + // ... + if v == nil { + v113v2 = nil + } else { + v113v2 = make(map[uint16]uint8, len(v)) + } // reset map + var v113v3, v113v4 typMapMapUint16Uint8 + v113v3 = typMapMapUint16Uint8(v113v1) + v113v4 = typMapMapUint16Uint8(v113v2) + bs113 = testMarshalErr(v113v3, h, t, "enc-map-v113-custom") + testUnmarshalErr(v113v4, bs113, h, t, "dec-map-v113-p-len") + testDeepEqualErr(v113v3, v113v4, t, "equal-map-v113-p-len") } - for _, v := range []map[uint16]uint32{nil, map[uint16]uint32{}, map[uint16]uint32{10: 10}} { + for _, v := range []map[uint16]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v114: %v\n", v) - var v114v1, v114v2 map[uint16]uint32 + var v114v1, v114v2 map[uint16]uint16 v114v1 = v bs114 := testMarshalErr(v114v1, h, t, "enc-map-v114") - if v != nil { - v114v2 = make(map[uint16]uint32, len(v)) - } + if v == nil { + v114v2 = nil + } else { + v114v2 = make(map[uint16]uint16, len(v)) + } // reset map testUnmarshalErr(v114v2, bs114, h, t, "dec-map-v114") testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114") + if v == nil { + v114v2 = nil + } else { + v114v2 = make(map[uint16]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v114v2), bs114, h, t, "dec-map-v114-noaddr") // decode into non-addressable map value + testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-noaddr") + if v == nil { + v114v2 = nil + } else { + v114v2 = make(map[uint16]uint16, len(v)) + } // reset map + testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-len") + testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-len") bs114 = testMarshalErr(&v114v1, h, t, "enc-map-v114-p") v114v2 = nil - testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p") - testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p") + testUnmarshalErr(&v114v2, bs114, h, t, "dec-map-v114-p-nil") + testDeepEqualErr(v114v1, v114v2, t, "equal-map-v114-p-nil") + // ... + if v == nil { + v114v2 = nil + } else { + v114v2 = make(map[uint16]uint16, len(v)) + } // reset map + var v114v3, v114v4 typMapMapUint16Uint16 + v114v3 = typMapMapUint16Uint16(v114v1) + v114v4 = typMapMapUint16Uint16(v114v2) + bs114 = testMarshalErr(v114v3, h, t, "enc-map-v114-custom") + testUnmarshalErr(v114v4, bs114, h, t, "dec-map-v114-p-len") + testDeepEqualErr(v114v3, v114v4, t, "equal-map-v114-p-len") } - for _, v := range []map[uint16]uint64{nil, map[uint16]uint64{}, map[uint16]uint64{10: 10}} { + for _, v := range []map[uint16]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v115: %v\n", v) - var v115v1, v115v2 map[uint16]uint64 + var v115v1, v115v2 map[uint16]uint32 v115v1 = v bs115 := testMarshalErr(v115v1, h, t, "enc-map-v115") - if v != nil { - v115v2 = make(map[uint16]uint64, len(v)) - } + if v == nil { + v115v2 = nil + } else { + v115v2 = make(map[uint16]uint32, len(v)) + } // reset map testUnmarshalErr(v115v2, bs115, h, t, "dec-map-v115") testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115") + if v == nil { + v115v2 = nil + } else { + v115v2 = make(map[uint16]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v115v2), bs115, h, t, "dec-map-v115-noaddr") // decode into non-addressable map value + testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-noaddr") + if v == nil { + v115v2 = nil + } else { + v115v2 = make(map[uint16]uint32, len(v)) + } // reset map + testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-len") + testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-len") bs115 = testMarshalErr(&v115v1, h, t, "enc-map-v115-p") v115v2 = nil - testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p") - testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p") + testUnmarshalErr(&v115v2, bs115, h, t, "dec-map-v115-p-nil") + testDeepEqualErr(v115v1, v115v2, t, "equal-map-v115-p-nil") + // ... + if v == nil { + v115v2 = nil + } else { + v115v2 = make(map[uint16]uint32, len(v)) + } // reset map + var v115v3, v115v4 typMapMapUint16Uint32 + v115v3 = typMapMapUint16Uint32(v115v1) + v115v4 = typMapMapUint16Uint32(v115v2) + bs115 = testMarshalErr(v115v3, h, t, "enc-map-v115-custom") + testUnmarshalErr(v115v4, bs115, h, t, "dec-map-v115-p-len") + testDeepEqualErr(v115v3, v115v4, t, "equal-map-v115-p-len") } - for _, v := range []map[uint16]uintptr{nil, map[uint16]uintptr{}, map[uint16]uintptr{10: 10}} { + for _, v := range []map[uint16]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v116: %v\n", v) - var v116v1, v116v2 map[uint16]uintptr + var v116v1, v116v2 map[uint16]uint64 v116v1 = v bs116 := testMarshalErr(v116v1, h, t, "enc-map-v116") - if v != nil { - v116v2 = make(map[uint16]uintptr, len(v)) - } + if v == nil { + v116v2 = nil + } else { + v116v2 = make(map[uint16]uint64, len(v)) + } // reset map testUnmarshalErr(v116v2, bs116, h, t, "dec-map-v116") testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116") + if v == nil { + v116v2 = nil + } else { + v116v2 = make(map[uint16]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v116v2), bs116, h, t, "dec-map-v116-noaddr") // decode into non-addressable map value + testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-noaddr") + if v == nil { + v116v2 = nil + } else { + v116v2 = make(map[uint16]uint64, len(v)) + } // reset map + testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-len") + testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-len") bs116 = testMarshalErr(&v116v1, h, t, "enc-map-v116-p") v116v2 = nil - testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p") - testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p") + testUnmarshalErr(&v116v2, bs116, h, t, "dec-map-v116-p-nil") + testDeepEqualErr(v116v1, v116v2, t, "equal-map-v116-p-nil") + // ... + if v == nil { + v116v2 = nil + } else { + v116v2 = make(map[uint16]uint64, len(v)) + } // reset map + var v116v3, v116v4 typMapMapUint16Uint64 + v116v3 = typMapMapUint16Uint64(v116v1) + v116v4 = typMapMapUint16Uint64(v116v2) + bs116 = testMarshalErr(v116v3, h, t, "enc-map-v116-custom") + testUnmarshalErr(v116v4, bs116, h, t, "dec-map-v116-p-len") + testDeepEqualErr(v116v3, v116v4, t, "equal-map-v116-p-len") } - for _, v := range []map[uint16]int{nil, map[uint16]int{}, map[uint16]int{10: 10}} { + for _, v := range []map[uint16]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v117: %v\n", v) - var v117v1, v117v2 map[uint16]int + var v117v1, v117v2 map[uint16]uintptr v117v1 = v bs117 := testMarshalErr(v117v1, h, t, "enc-map-v117") - if v != nil { - v117v2 = make(map[uint16]int, len(v)) - } + if v == nil { + v117v2 = nil + } else { + v117v2 = make(map[uint16]uintptr, len(v)) + } // reset map testUnmarshalErr(v117v2, bs117, h, t, "dec-map-v117") testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117") + if v == nil { + v117v2 = nil + } else { + v117v2 = make(map[uint16]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v117v2), bs117, h, t, "dec-map-v117-noaddr") // decode into non-addressable map value + testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-noaddr") + if v == nil { + v117v2 = nil + } else { + v117v2 = make(map[uint16]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-len") + testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-len") bs117 = testMarshalErr(&v117v1, h, t, "enc-map-v117-p") v117v2 = nil - testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p") - testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p") + testUnmarshalErr(&v117v2, bs117, h, t, "dec-map-v117-p-nil") + testDeepEqualErr(v117v1, v117v2, t, "equal-map-v117-p-nil") + // ... + if v == nil { + v117v2 = nil + } else { + v117v2 = make(map[uint16]uintptr, len(v)) + } // reset map + var v117v3, v117v4 typMapMapUint16Uintptr + v117v3 = typMapMapUint16Uintptr(v117v1) + v117v4 = typMapMapUint16Uintptr(v117v2) + bs117 = testMarshalErr(v117v3, h, t, "enc-map-v117-custom") + testUnmarshalErr(v117v4, bs117, h, t, "dec-map-v117-p-len") + testDeepEqualErr(v117v3, v117v4, t, "equal-map-v117-p-len") } - for _, v := range []map[uint16]int8{nil, map[uint16]int8{}, map[uint16]int8{10: 10}} { + for _, v := range []map[uint16]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v118: %v\n", v) - var v118v1, v118v2 map[uint16]int8 + var v118v1, v118v2 map[uint16]int v118v1 = v bs118 := testMarshalErr(v118v1, h, t, "enc-map-v118") - if v != nil { - v118v2 = make(map[uint16]int8, len(v)) - } + if v == nil { + v118v2 = nil + } else { + v118v2 = make(map[uint16]int, len(v)) + } // reset map testUnmarshalErr(v118v2, bs118, h, t, "dec-map-v118") testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118") + if v == nil { + v118v2 = nil + } else { + v118v2 = make(map[uint16]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v118v2), bs118, h, t, "dec-map-v118-noaddr") // decode into non-addressable map value + testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-noaddr") + if v == nil { + v118v2 = nil + } else { + v118v2 = make(map[uint16]int, len(v)) + } // reset map + testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-len") + testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-len") bs118 = testMarshalErr(&v118v1, h, t, "enc-map-v118-p") v118v2 = nil - testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p") - testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p") + testUnmarshalErr(&v118v2, bs118, h, t, "dec-map-v118-p-nil") + testDeepEqualErr(v118v1, v118v2, t, "equal-map-v118-p-nil") + // ... + if v == nil { + v118v2 = nil + } else { + v118v2 = make(map[uint16]int, len(v)) + } // reset map + var v118v3, v118v4 typMapMapUint16Int + v118v3 = typMapMapUint16Int(v118v1) + v118v4 = typMapMapUint16Int(v118v2) + bs118 = testMarshalErr(v118v3, h, t, "enc-map-v118-custom") + testUnmarshalErr(v118v4, bs118, h, t, "dec-map-v118-p-len") + testDeepEqualErr(v118v3, v118v4, t, "equal-map-v118-p-len") } - for _, v := range []map[uint16]int16{nil, map[uint16]int16{}, map[uint16]int16{10: 10}} { + for _, v := range []map[uint16]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v119: %v\n", v) - var v119v1, v119v2 map[uint16]int16 + var v119v1, v119v2 map[uint16]int8 v119v1 = v bs119 := testMarshalErr(v119v1, h, t, "enc-map-v119") - if v != nil { - v119v2 = make(map[uint16]int16, len(v)) - } + if v == nil { + v119v2 = nil + } else { + v119v2 = make(map[uint16]int8, len(v)) + } // reset map testUnmarshalErr(v119v2, bs119, h, t, "dec-map-v119") testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119") + if v == nil { + v119v2 = nil + } else { + v119v2 = make(map[uint16]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v119v2), bs119, h, t, "dec-map-v119-noaddr") // decode into non-addressable map value + testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-noaddr") + if v == nil { + v119v2 = nil + } else { + v119v2 = make(map[uint16]int8, len(v)) + } // reset map + testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-len") + testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-len") bs119 = testMarshalErr(&v119v1, h, t, "enc-map-v119-p") v119v2 = nil - testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p") - testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p") + testUnmarshalErr(&v119v2, bs119, h, t, "dec-map-v119-p-nil") + testDeepEqualErr(v119v1, v119v2, t, "equal-map-v119-p-nil") + // ... + if v == nil { + v119v2 = nil + } else { + v119v2 = make(map[uint16]int8, len(v)) + } // reset map + var v119v3, v119v4 typMapMapUint16Int8 + v119v3 = typMapMapUint16Int8(v119v1) + v119v4 = typMapMapUint16Int8(v119v2) + bs119 = testMarshalErr(v119v3, h, t, "enc-map-v119-custom") + testUnmarshalErr(v119v4, bs119, h, t, "dec-map-v119-p-len") + testDeepEqualErr(v119v3, v119v4, t, "equal-map-v119-p-len") } - for _, v := range []map[uint16]int32{nil, map[uint16]int32{}, map[uint16]int32{10: 10}} { + for _, v := range []map[uint16]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v120: %v\n", v) - var v120v1, v120v2 map[uint16]int32 + var v120v1, v120v2 map[uint16]int16 v120v1 = v bs120 := testMarshalErr(v120v1, h, t, "enc-map-v120") - if v != nil { - v120v2 = make(map[uint16]int32, len(v)) - } + if v == nil { + v120v2 = nil + } else { + v120v2 = make(map[uint16]int16, len(v)) + } // reset map testUnmarshalErr(v120v2, bs120, h, t, "dec-map-v120") testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120") + if v == nil { + v120v2 = nil + } else { + v120v2 = make(map[uint16]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v120v2), bs120, h, t, "dec-map-v120-noaddr") // decode into non-addressable map value + testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-noaddr") + if v == nil { + v120v2 = nil + } else { + v120v2 = make(map[uint16]int16, len(v)) + } // reset map + testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-len") + testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-len") bs120 = testMarshalErr(&v120v1, h, t, "enc-map-v120-p") v120v2 = nil - testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p") - testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p") + testUnmarshalErr(&v120v2, bs120, h, t, "dec-map-v120-p-nil") + testDeepEqualErr(v120v1, v120v2, t, "equal-map-v120-p-nil") + // ... + if v == nil { + v120v2 = nil + } else { + v120v2 = make(map[uint16]int16, len(v)) + } // reset map + var v120v3, v120v4 typMapMapUint16Int16 + v120v3 = typMapMapUint16Int16(v120v1) + v120v4 = typMapMapUint16Int16(v120v2) + bs120 = testMarshalErr(v120v3, h, t, "enc-map-v120-custom") + testUnmarshalErr(v120v4, bs120, h, t, "dec-map-v120-p-len") + testDeepEqualErr(v120v3, v120v4, t, "equal-map-v120-p-len") } - for _, v := range []map[uint16]int64{nil, map[uint16]int64{}, map[uint16]int64{10: 10}} { + for _, v := range []map[uint16]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v121: %v\n", v) - var v121v1, v121v2 map[uint16]int64 + var v121v1, v121v2 map[uint16]int32 v121v1 = v bs121 := testMarshalErr(v121v1, h, t, "enc-map-v121") - if v != nil { - v121v2 = make(map[uint16]int64, len(v)) - } + if v == nil { + v121v2 = nil + } else { + v121v2 = make(map[uint16]int32, len(v)) + } // reset map testUnmarshalErr(v121v2, bs121, h, t, "dec-map-v121") testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121") + if v == nil { + v121v2 = nil + } else { + v121v2 = make(map[uint16]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v121v2), bs121, h, t, "dec-map-v121-noaddr") // decode into non-addressable map value + testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-noaddr") + if v == nil { + v121v2 = nil + } else { + v121v2 = make(map[uint16]int32, len(v)) + } // reset map + testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-len") + testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-len") bs121 = testMarshalErr(&v121v1, h, t, "enc-map-v121-p") v121v2 = nil - testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p") - testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p") + testUnmarshalErr(&v121v2, bs121, h, t, "dec-map-v121-p-nil") + testDeepEqualErr(v121v1, v121v2, t, "equal-map-v121-p-nil") + // ... + if v == nil { + v121v2 = nil + } else { + v121v2 = make(map[uint16]int32, len(v)) + } // reset map + var v121v3, v121v4 typMapMapUint16Int32 + v121v3 = typMapMapUint16Int32(v121v1) + v121v4 = typMapMapUint16Int32(v121v2) + bs121 = testMarshalErr(v121v3, h, t, "enc-map-v121-custom") + testUnmarshalErr(v121v4, bs121, h, t, "dec-map-v121-p-len") + testDeepEqualErr(v121v3, v121v4, t, "equal-map-v121-p-len") } - for _, v := range []map[uint16]float32{nil, map[uint16]float32{}, map[uint16]float32{10: 10.1}} { + for _, v := range []map[uint16]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v122: %v\n", v) - var v122v1, v122v2 map[uint16]float32 + var v122v1, v122v2 map[uint16]int64 v122v1 = v bs122 := testMarshalErr(v122v1, h, t, "enc-map-v122") - if v != nil { - v122v2 = make(map[uint16]float32, len(v)) - } + if v == nil { + v122v2 = nil + } else { + v122v2 = make(map[uint16]int64, len(v)) + } // reset map testUnmarshalErr(v122v2, bs122, h, t, "dec-map-v122") testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122") + if v == nil { + v122v2 = nil + } else { + v122v2 = make(map[uint16]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v122v2), bs122, h, t, "dec-map-v122-noaddr") // decode into non-addressable map value + testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-noaddr") + if v == nil { + v122v2 = nil + } else { + v122v2 = make(map[uint16]int64, len(v)) + } // reset map + testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-len") + testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-len") bs122 = testMarshalErr(&v122v1, h, t, "enc-map-v122-p") v122v2 = nil - testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p") - testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p") + testUnmarshalErr(&v122v2, bs122, h, t, "dec-map-v122-p-nil") + testDeepEqualErr(v122v1, v122v2, t, "equal-map-v122-p-nil") + // ... + if v == nil { + v122v2 = nil + } else { + v122v2 = make(map[uint16]int64, len(v)) + } // reset map + var v122v3, v122v4 typMapMapUint16Int64 + v122v3 = typMapMapUint16Int64(v122v1) + v122v4 = typMapMapUint16Int64(v122v2) + bs122 = testMarshalErr(v122v3, h, t, "enc-map-v122-custom") + testUnmarshalErr(v122v4, bs122, h, t, "dec-map-v122-p-len") + testDeepEqualErr(v122v3, v122v4, t, "equal-map-v122-p-len") } - for _, v := range []map[uint16]float64{nil, map[uint16]float64{}, map[uint16]float64{10: 10.1}} { + for _, v := range []map[uint16]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v123: %v\n", v) - var v123v1, v123v2 map[uint16]float64 + var v123v1, v123v2 map[uint16]float32 v123v1 = v bs123 := testMarshalErr(v123v1, h, t, "enc-map-v123") - if v != nil { - v123v2 = make(map[uint16]float64, len(v)) - } + if v == nil { + v123v2 = nil + } else { + v123v2 = make(map[uint16]float32, len(v)) + } // reset map testUnmarshalErr(v123v2, bs123, h, t, "dec-map-v123") testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123") + if v == nil { + v123v2 = nil + } else { + v123v2 = make(map[uint16]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v123v2), bs123, h, t, "dec-map-v123-noaddr") // decode into non-addressable map value + testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-noaddr") + if v == nil { + v123v2 = nil + } else { + v123v2 = make(map[uint16]float32, len(v)) + } // reset map + testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-len") + testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-len") bs123 = testMarshalErr(&v123v1, h, t, "enc-map-v123-p") v123v2 = nil - testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p") - testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p") + testUnmarshalErr(&v123v2, bs123, h, t, "dec-map-v123-p-nil") + testDeepEqualErr(v123v1, v123v2, t, "equal-map-v123-p-nil") + // ... + if v == nil { + v123v2 = nil + } else { + v123v2 = make(map[uint16]float32, len(v)) + } // reset map + var v123v3, v123v4 typMapMapUint16Float32 + v123v3 = typMapMapUint16Float32(v123v1) + v123v4 = typMapMapUint16Float32(v123v2) + bs123 = testMarshalErr(v123v3, h, t, "enc-map-v123-custom") + testUnmarshalErr(v123v4, bs123, h, t, "dec-map-v123-p-len") + testDeepEqualErr(v123v3, v123v4, t, "equal-map-v123-p-len") } - for _, v := range []map[uint16]bool{nil, map[uint16]bool{}, map[uint16]bool{10: true}} { + for _, v := range []map[uint16]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v124: %v\n", v) - var v124v1, v124v2 map[uint16]bool + var v124v1, v124v2 map[uint16]float64 v124v1 = v bs124 := testMarshalErr(v124v1, h, t, "enc-map-v124") - if v != nil { - v124v2 = make(map[uint16]bool, len(v)) - } + if v == nil { + v124v2 = nil + } else { + v124v2 = make(map[uint16]float64, len(v)) + } // reset map testUnmarshalErr(v124v2, bs124, h, t, "dec-map-v124") testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124") + if v == nil { + v124v2 = nil + } else { + v124v2 = make(map[uint16]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v124v2), bs124, h, t, "dec-map-v124-noaddr") // decode into non-addressable map value + testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-noaddr") + if v == nil { + v124v2 = nil + } else { + v124v2 = make(map[uint16]float64, len(v)) + } // reset map + testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-len") + testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-len") bs124 = testMarshalErr(&v124v1, h, t, "enc-map-v124-p") v124v2 = nil - testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p") - testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p") + testUnmarshalErr(&v124v2, bs124, h, t, "dec-map-v124-p-nil") + testDeepEqualErr(v124v1, v124v2, t, "equal-map-v124-p-nil") + // ... + if v == nil { + v124v2 = nil + } else { + v124v2 = make(map[uint16]float64, len(v)) + } // reset map + var v124v3, v124v4 typMapMapUint16Float64 + v124v3 = typMapMapUint16Float64(v124v1) + v124v4 = typMapMapUint16Float64(v124v2) + bs124 = testMarshalErr(v124v3, h, t, "enc-map-v124-custom") + testUnmarshalErr(v124v4, bs124, h, t, "dec-map-v124-p-len") + testDeepEqualErr(v124v3, v124v4, t, "equal-map-v124-p-len") } - for _, v := range []map[uint32]interface{}{nil, map[uint32]interface{}{}, map[uint32]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v127: %v\n", v) - var v127v1, v127v2 map[uint32]interface{} - v127v1 = v - bs127 := testMarshalErr(v127v1, h, t, "enc-map-v127") - if v != nil { - v127v2 = make(map[uint32]interface{}, len(v)) - } - testUnmarshalErr(v127v2, bs127, h, t, "dec-map-v127") - testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127") - bs127 = testMarshalErr(&v127v1, h, t, "enc-map-v127-p") - v127v2 = nil - testUnmarshalErr(&v127v2, bs127, h, t, "dec-map-v127-p") - testDeepEqualErr(v127v1, v127v2, t, "equal-map-v127-p") + for _, v := range []map[uint16]bool{nil, {}, {33: false, 44: true}} { + // fmt.Printf(">>>> running mammoth map v125: %v\n", v) + var v125v1, v125v2 map[uint16]bool + v125v1 = v + bs125 := testMarshalErr(v125v1, h, t, "enc-map-v125") + if v == nil { + v125v2 = nil + } else { + v125v2 = make(map[uint16]bool, len(v)) + } // reset map + testUnmarshalErr(v125v2, bs125, h, t, "dec-map-v125") + testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125") + if v == nil { + v125v2 = nil + } else { + v125v2 = make(map[uint16]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v125v2), bs125, h, t, "dec-map-v125-noaddr") // decode into non-addressable map value + testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-noaddr") + if v == nil { + v125v2 = nil + } else { + v125v2 = make(map[uint16]bool, len(v)) + } // reset map + testUnmarshalErr(&v125v2, bs125, h, t, "dec-map-v125-p-len") + testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-p-len") + bs125 = testMarshalErr(&v125v1, h, t, "enc-map-v125-p") + v125v2 = nil + testUnmarshalErr(&v125v2, bs125, h, t, "dec-map-v125-p-nil") + testDeepEqualErr(v125v1, v125v2, t, "equal-map-v125-p-nil") + // ... + if v == nil { + v125v2 = nil + } else { + v125v2 = make(map[uint16]bool, len(v)) + } // reset map + var v125v3, v125v4 typMapMapUint16Bool + v125v3 = typMapMapUint16Bool(v125v1) + v125v4 = typMapMapUint16Bool(v125v2) + bs125 = testMarshalErr(v125v3, h, t, "enc-map-v125-custom") + testUnmarshalErr(v125v4, bs125, h, t, "dec-map-v125-p-len") + testDeepEqualErr(v125v3, v125v4, t, "equal-map-v125-p-len") } - for _, v := range []map[uint32]string{nil, map[uint32]string{}, map[uint32]string{10: "some-string"}} { + for _, v := range []map[uint32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v128: %v\n", v) - var v128v1, v128v2 map[uint32]string + var v128v1, v128v2 map[uint32]interface{} v128v1 = v bs128 := testMarshalErr(v128v1, h, t, "enc-map-v128") - if v != nil { - v128v2 = make(map[uint32]string, len(v)) - } + if v == nil { + v128v2 = nil + } else { + v128v2 = make(map[uint32]interface{}, len(v)) + } // reset map testUnmarshalErr(v128v2, bs128, h, t, "dec-map-v128") testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128") + if v == nil { + v128v2 = nil + } else { + v128v2 = make(map[uint32]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v128v2), bs128, h, t, "dec-map-v128-noaddr") // decode into non-addressable map value + testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-noaddr") + if v == nil { + v128v2 = nil + } else { + v128v2 = make(map[uint32]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-len") + testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-len") bs128 = testMarshalErr(&v128v1, h, t, "enc-map-v128-p") v128v2 = nil - testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p") - testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p") + testUnmarshalErr(&v128v2, bs128, h, t, "dec-map-v128-p-nil") + testDeepEqualErr(v128v1, v128v2, t, "equal-map-v128-p-nil") + // ... + if v == nil { + v128v2 = nil + } else { + v128v2 = make(map[uint32]interface{}, len(v)) + } // reset map + var v128v3, v128v4 typMapMapUint32Intf + v128v3 = typMapMapUint32Intf(v128v1) + v128v4 = typMapMapUint32Intf(v128v2) + bs128 = testMarshalErr(v128v3, h, t, "enc-map-v128-custom") + testUnmarshalErr(v128v4, bs128, h, t, "dec-map-v128-p-len") + testDeepEqualErr(v128v3, v128v4, t, "equal-map-v128-p-len") } - for _, v := range []map[uint32]uint{nil, map[uint32]uint{}, map[uint32]uint{10: 10}} { + for _, v := range []map[uint32]string{nil, {}, {33: "", 44: "some-string"}} { // fmt.Printf(">>>> running mammoth map v129: %v\n", v) - var v129v1, v129v2 map[uint32]uint + var v129v1, v129v2 map[uint32]string v129v1 = v bs129 := testMarshalErr(v129v1, h, t, "enc-map-v129") - if v != nil { - v129v2 = make(map[uint32]uint, len(v)) - } + if v == nil { + v129v2 = nil + } else { + v129v2 = make(map[uint32]string, len(v)) + } // reset map testUnmarshalErr(v129v2, bs129, h, t, "dec-map-v129") testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129") + if v == nil { + v129v2 = nil + } else { + v129v2 = make(map[uint32]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v129v2), bs129, h, t, "dec-map-v129-noaddr") // decode into non-addressable map value + testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-noaddr") + if v == nil { + v129v2 = nil + } else { + v129v2 = make(map[uint32]string, len(v)) + } // reset map + testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-len") + testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-len") bs129 = testMarshalErr(&v129v1, h, t, "enc-map-v129-p") v129v2 = nil - testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p") - testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p") + testUnmarshalErr(&v129v2, bs129, h, t, "dec-map-v129-p-nil") + testDeepEqualErr(v129v1, v129v2, t, "equal-map-v129-p-nil") + // ... + if v == nil { + v129v2 = nil + } else { + v129v2 = make(map[uint32]string, len(v)) + } // reset map + var v129v3, v129v4 typMapMapUint32String + v129v3 = typMapMapUint32String(v129v1) + v129v4 = typMapMapUint32String(v129v2) + bs129 = testMarshalErr(v129v3, h, t, "enc-map-v129-custom") + testUnmarshalErr(v129v4, bs129, h, t, "dec-map-v129-p-len") + testDeepEqualErr(v129v3, v129v4, t, "equal-map-v129-p-len") } - for _, v := range []map[uint32]uint8{nil, map[uint32]uint8{}, map[uint32]uint8{10: 10}} { + for _, v := range []map[uint32]uint{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v130: %v\n", v) - var v130v1, v130v2 map[uint32]uint8 + var v130v1, v130v2 map[uint32]uint v130v1 = v bs130 := testMarshalErr(v130v1, h, t, "enc-map-v130") - if v != nil { - v130v2 = make(map[uint32]uint8, len(v)) - } + if v == nil { + v130v2 = nil + } else { + v130v2 = make(map[uint32]uint, len(v)) + } // reset map testUnmarshalErr(v130v2, bs130, h, t, "dec-map-v130") testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130") + if v == nil { + v130v2 = nil + } else { + v130v2 = make(map[uint32]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v130v2), bs130, h, t, "dec-map-v130-noaddr") // decode into non-addressable map value + testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-noaddr") + if v == nil { + v130v2 = nil + } else { + v130v2 = make(map[uint32]uint, len(v)) + } // reset map + testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-len") + testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-len") bs130 = testMarshalErr(&v130v1, h, t, "enc-map-v130-p") v130v2 = nil - testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p") - testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p") + testUnmarshalErr(&v130v2, bs130, h, t, "dec-map-v130-p-nil") + testDeepEqualErr(v130v1, v130v2, t, "equal-map-v130-p-nil") + // ... + if v == nil { + v130v2 = nil + } else { + v130v2 = make(map[uint32]uint, len(v)) + } // reset map + var v130v3, v130v4 typMapMapUint32Uint + v130v3 = typMapMapUint32Uint(v130v1) + v130v4 = typMapMapUint32Uint(v130v2) + bs130 = testMarshalErr(v130v3, h, t, "enc-map-v130-custom") + testUnmarshalErr(v130v4, bs130, h, t, "dec-map-v130-p-len") + testDeepEqualErr(v130v3, v130v4, t, "equal-map-v130-p-len") } - for _, v := range []map[uint32]uint16{nil, map[uint32]uint16{}, map[uint32]uint16{10: 10}} { + for _, v := range []map[uint32]uint8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v131: %v\n", v) - var v131v1, v131v2 map[uint32]uint16 + var v131v1, v131v2 map[uint32]uint8 v131v1 = v bs131 := testMarshalErr(v131v1, h, t, "enc-map-v131") - if v != nil { - v131v2 = make(map[uint32]uint16, len(v)) - } + if v == nil { + v131v2 = nil + } else { + v131v2 = make(map[uint32]uint8, len(v)) + } // reset map testUnmarshalErr(v131v2, bs131, h, t, "dec-map-v131") testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131") + if v == nil { + v131v2 = nil + } else { + v131v2 = make(map[uint32]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v131v2), bs131, h, t, "dec-map-v131-noaddr") // decode into non-addressable map value + testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-noaddr") + if v == nil { + v131v2 = nil + } else { + v131v2 = make(map[uint32]uint8, len(v)) + } // reset map + testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-len") + testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-len") bs131 = testMarshalErr(&v131v1, h, t, "enc-map-v131-p") v131v2 = nil - testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p") - testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p") + testUnmarshalErr(&v131v2, bs131, h, t, "dec-map-v131-p-nil") + testDeepEqualErr(v131v1, v131v2, t, "equal-map-v131-p-nil") + // ... + if v == nil { + v131v2 = nil + } else { + v131v2 = make(map[uint32]uint8, len(v)) + } // reset map + var v131v3, v131v4 typMapMapUint32Uint8 + v131v3 = typMapMapUint32Uint8(v131v1) + v131v4 = typMapMapUint32Uint8(v131v2) + bs131 = testMarshalErr(v131v3, h, t, "enc-map-v131-custom") + testUnmarshalErr(v131v4, bs131, h, t, "dec-map-v131-p-len") + testDeepEqualErr(v131v3, v131v4, t, "equal-map-v131-p-len") } - for _, v := range []map[uint32]uint32{nil, map[uint32]uint32{}, map[uint32]uint32{10: 10}} { + for _, v := range []map[uint32]uint16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v132: %v\n", v) - var v132v1, v132v2 map[uint32]uint32 + var v132v1, v132v2 map[uint32]uint16 v132v1 = v bs132 := testMarshalErr(v132v1, h, t, "enc-map-v132") - if v != nil { - v132v2 = make(map[uint32]uint32, len(v)) - } + if v == nil { + v132v2 = nil + } else { + v132v2 = make(map[uint32]uint16, len(v)) + } // reset map testUnmarshalErr(v132v2, bs132, h, t, "dec-map-v132") testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132") + if v == nil { + v132v2 = nil + } else { + v132v2 = make(map[uint32]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v132v2), bs132, h, t, "dec-map-v132-noaddr") // decode into non-addressable map value + testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-noaddr") + if v == nil { + v132v2 = nil + } else { + v132v2 = make(map[uint32]uint16, len(v)) + } // reset map + testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-len") + testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-len") bs132 = testMarshalErr(&v132v1, h, t, "enc-map-v132-p") v132v2 = nil - testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p") - testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p") + testUnmarshalErr(&v132v2, bs132, h, t, "dec-map-v132-p-nil") + testDeepEqualErr(v132v1, v132v2, t, "equal-map-v132-p-nil") + // ... + if v == nil { + v132v2 = nil + } else { + v132v2 = make(map[uint32]uint16, len(v)) + } // reset map + var v132v3, v132v4 typMapMapUint32Uint16 + v132v3 = typMapMapUint32Uint16(v132v1) + v132v4 = typMapMapUint32Uint16(v132v2) + bs132 = testMarshalErr(v132v3, h, t, "enc-map-v132-custom") + testUnmarshalErr(v132v4, bs132, h, t, "dec-map-v132-p-len") + testDeepEqualErr(v132v3, v132v4, t, "equal-map-v132-p-len") } - for _, v := range []map[uint32]uint64{nil, map[uint32]uint64{}, map[uint32]uint64{10: 10}} { + for _, v := range []map[uint32]uint32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v133: %v\n", v) - var v133v1, v133v2 map[uint32]uint64 + var v133v1, v133v2 map[uint32]uint32 v133v1 = v bs133 := testMarshalErr(v133v1, h, t, "enc-map-v133") - if v != nil { - v133v2 = make(map[uint32]uint64, len(v)) - } + if v == nil { + v133v2 = nil + } else { + v133v2 = make(map[uint32]uint32, len(v)) + } // reset map testUnmarshalErr(v133v2, bs133, h, t, "dec-map-v133") testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133") + if v == nil { + v133v2 = nil + } else { + v133v2 = make(map[uint32]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v133v2), bs133, h, t, "dec-map-v133-noaddr") // decode into non-addressable map value + testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-noaddr") + if v == nil { + v133v2 = nil + } else { + v133v2 = make(map[uint32]uint32, len(v)) + } // reset map + testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-len") + testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-len") bs133 = testMarshalErr(&v133v1, h, t, "enc-map-v133-p") v133v2 = nil - testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p") - testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p") + testUnmarshalErr(&v133v2, bs133, h, t, "dec-map-v133-p-nil") + testDeepEqualErr(v133v1, v133v2, t, "equal-map-v133-p-nil") + // ... + if v == nil { + v133v2 = nil + } else { + v133v2 = make(map[uint32]uint32, len(v)) + } // reset map + var v133v3, v133v4 typMapMapUint32Uint32 + v133v3 = typMapMapUint32Uint32(v133v1) + v133v4 = typMapMapUint32Uint32(v133v2) + bs133 = testMarshalErr(v133v3, h, t, "enc-map-v133-custom") + testUnmarshalErr(v133v4, bs133, h, t, "dec-map-v133-p-len") + testDeepEqualErr(v133v3, v133v4, t, "equal-map-v133-p-len") } - for _, v := range []map[uint32]uintptr{nil, map[uint32]uintptr{}, map[uint32]uintptr{10: 10}} { + for _, v := range []map[uint32]uint64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v134: %v\n", v) - var v134v1, v134v2 map[uint32]uintptr + var v134v1, v134v2 map[uint32]uint64 v134v1 = v bs134 := testMarshalErr(v134v1, h, t, "enc-map-v134") - if v != nil { - v134v2 = make(map[uint32]uintptr, len(v)) - } + if v == nil { + v134v2 = nil + } else { + v134v2 = make(map[uint32]uint64, len(v)) + } // reset map testUnmarshalErr(v134v2, bs134, h, t, "dec-map-v134") testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134") + if v == nil { + v134v2 = nil + } else { + v134v2 = make(map[uint32]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v134v2), bs134, h, t, "dec-map-v134-noaddr") // decode into non-addressable map value + testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-noaddr") + if v == nil { + v134v2 = nil + } else { + v134v2 = make(map[uint32]uint64, len(v)) + } // reset map + testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-len") + testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-len") bs134 = testMarshalErr(&v134v1, h, t, "enc-map-v134-p") v134v2 = nil - testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p") - testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p") + testUnmarshalErr(&v134v2, bs134, h, t, "dec-map-v134-p-nil") + testDeepEqualErr(v134v1, v134v2, t, "equal-map-v134-p-nil") + // ... + if v == nil { + v134v2 = nil + } else { + v134v2 = make(map[uint32]uint64, len(v)) + } // reset map + var v134v3, v134v4 typMapMapUint32Uint64 + v134v3 = typMapMapUint32Uint64(v134v1) + v134v4 = typMapMapUint32Uint64(v134v2) + bs134 = testMarshalErr(v134v3, h, t, "enc-map-v134-custom") + testUnmarshalErr(v134v4, bs134, h, t, "dec-map-v134-p-len") + testDeepEqualErr(v134v3, v134v4, t, "equal-map-v134-p-len") } - for _, v := range []map[uint32]int{nil, map[uint32]int{}, map[uint32]int{10: 10}} { + for _, v := range []map[uint32]uintptr{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v135: %v\n", v) - var v135v1, v135v2 map[uint32]int + var v135v1, v135v2 map[uint32]uintptr v135v1 = v bs135 := testMarshalErr(v135v1, h, t, "enc-map-v135") - if v != nil { - v135v2 = make(map[uint32]int, len(v)) - } + if v == nil { + v135v2 = nil + } else { + v135v2 = make(map[uint32]uintptr, len(v)) + } // reset map testUnmarshalErr(v135v2, bs135, h, t, "dec-map-v135") testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135") + if v == nil { + v135v2 = nil + } else { + v135v2 = make(map[uint32]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v135v2), bs135, h, t, "dec-map-v135-noaddr") // decode into non-addressable map value + testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-noaddr") + if v == nil { + v135v2 = nil + } else { + v135v2 = make(map[uint32]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-len") + testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-len") bs135 = testMarshalErr(&v135v1, h, t, "enc-map-v135-p") v135v2 = nil - testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p") - testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p") + testUnmarshalErr(&v135v2, bs135, h, t, "dec-map-v135-p-nil") + testDeepEqualErr(v135v1, v135v2, t, "equal-map-v135-p-nil") + // ... + if v == nil { + v135v2 = nil + } else { + v135v2 = make(map[uint32]uintptr, len(v)) + } // reset map + var v135v3, v135v4 typMapMapUint32Uintptr + v135v3 = typMapMapUint32Uintptr(v135v1) + v135v4 = typMapMapUint32Uintptr(v135v2) + bs135 = testMarshalErr(v135v3, h, t, "enc-map-v135-custom") + testUnmarshalErr(v135v4, bs135, h, t, "dec-map-v135-p-len") + testDeepEqualErr(v135v3, v135v4, t, "equal-map-v135-p-len") } - for _, v := range []map[uint32]int8{nil, map[uint32]int8{}, map[uint32]int8{10: 10}} { + for _, v := range []map[uint32]int{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v136: %v\n", v) - var v136v1, v136v2 map[uint32]int8 + var v136v1, v136v2 map[uint32]int v136v1 = v bs136 := testMarshalErr(v136v1, h, t, "enc-map-v136") - if v != nil { - v136v2 = make(map[uint32]int8, len(v)) - } + if v == nil { + v136v2 = nil + } else { + v136v2 = make(map[uint32]int, len(v)) + } // reset map testUnmarshalErr(v136v2, bs136, h, t, "dec-map-v136") testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136") + if v == nil { + v136v2 = nil + } else { + v136v2 = make(map[uint32]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v136v2), bs136, h, t, "dec-map-v136-noaddr") // decode into non-addressable map value + testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-noaddr") + if v == nil { + v136v2 = nil + } else { + v136v2 = make(map[uint32]int, len(v)) + } // reset map + testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-len") + testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-len") bs136 = testMarshalErr(&v136v1, h, t, "enc-map-v136-p") v136v2 = nil - testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p") - testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p") + testUnmarshalErr(&v136v2, bs136, h, t, "dec-map-v136-p-nil") + testDeepEqualErr(v136v1, v136v2, t, "equal-map-v136-p-nil") + // ... + if v == nil { + v136v2 = nil + } else { + v136v2 = make(map[uint32]int, len(v)) + } // reset map + var v136v3, v136v4 typMapMapUint32Int + v136v3 = typMapMapUint32Int(v136v1) + v136v4 = typMapMapUint32Int(v136v2) + bs136 = testMarshalErr(v136v3, h, t, "enc-map-v136-custom") + testUnmarshalErr(v136v4, bs136, h, t, "dec-map-v136-p-len") + testDeepEqualErr(v136v3, v136v4, t, "equal-map-v136-p-len") } - for _, v := range []map[uint32]int16{nil, map[uint32]int16{}, map[uint32]int16{10: 10}} { + for _, v := range []map[uint32]int8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v137: %v\n", v) - var v137v1, v137v2 map[uint32]int16 + var v137v1, v137v2 map[uint32]int8 v137v1 = v bs137 := testMarshalErr(v137v1, h, t, "enc-map-v137") - if v != nil { - v137v2 = make(map[uint32]int16, len(v)) - } + if v == nil { + v137v2 = nil + } else { + v137v2 = make(map[uint32]int8, len(v)) + } // reset map testUnmarshalErr(v137v2, bs137, h, t, "dec-map-v137") testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137") + if v == nil { + v137v2 = nil + } else { + v137v2 = make(map[uint32]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v137v2), bs137, h, t, "dec-map-v137-noaddr") // decode into non-addressable map value + testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-noaddr") + if v == nil { + v137v2 = nil + } else { + v137v2 = make(map[uint32]int8, len(v)) + } // reset map + testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-len") + testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-len") bs137 = testMarshalErr(&v137v1, h, t, "enc-map-v137-p") v137v2 = nil - testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p") - testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p") + testUnmarshalErr(&v137v2, bs137, h, t, "dec-map-v137-p-nil") + testDeepEqualErr(v137v1, v137v2, t, "equal-map-v137-p-nil") + // ... + if v == nil { + v137v2 = nil + } else { + v137v2 = make(map[uint32]int8, len(v)) + } // reset map + var v137v3, v137v4 typMapMapUint32Int8 + v137v3 = typMapMapUint32Int8(v137v1) + v137v4 = typMapMapUint32Int8(v137v2) + bs137 = testMarshalErr(v137v3, h, t, "enc-map-v137-custom") + testUnmarshalErr(v137v4, bs137, h, t, "dec-map-v137-p-len") + testDeepEqualErr(v137v3, v137v4, t, "equal-map-v137-p-len") } - for _, v := range []map[uint32]int32{nil, map[uint32]int32{}, map[uint32]int32{10: 10}} { + for _, v := range []map[uint32]int16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v138: %v\n", v) - var v138v1, v138v2 map[uint32]int32 + var v138v1, v138v2 map[uint32]int16 v138v1 = v bs138 := testMarshalErr(v138v1, h, t, "enc-map-v138") - if v != nil { - v138v2 = make(map[uint32]int32, len(v)) - } + if v == nil { + v138v2 = nil + } else { + v138v2 = make(map[uint32]int16, len(v)) + } // reset map testUnmarshalErr(v138v2, bs138, h, t, "dec-map-v138") testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138") + if v == nil { + v138v2 = nil + } else { + v138v2 = make(map[uint32]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v138v2), bs138, h, t, "dec-map-v138-noaddr") // decode into non-addressable map value + testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-noaddr") + if v == nil { + v138v2 = nil + } else { + v138v2 = make(map[uint32]int16, len(v)) + } // reset map + testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-len") + testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-len") bs138 = testMarshalErr(&v138v1, h, t, "enc-map-v138-p") v138v2 = nil - testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p") - testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p") + testUnmarshalErr(&v138v2, bs138, h, t, "dec-map-v138-p-nil") + testDeepEqualErr(v138v1, v138v2, t, "equal-map-v138-p-nil") + // ... + if v == nil { + v138v2 = nil + } else { + v138v2 = make(map[uint32]int16, len(v)) + } // reset map + var v138v3, v138v4 typMapMapUint32Int16 + v138v3 = typMapMapUint32Int16(v138v1) + v138v4 = typMapMapUint32Int16(v138v2) + bs138 = testMarshalErr(v138v3, h, t, "enc-map-v138-custom") + testUnmarshalErr(v138v4, bs138, h, t, "dec-map-v138-p-len") + testDeepEqualErr(v138v3, v138v4, t, "equal-map-v138-p-len") } - for _, v := range []map[uint32]int64{nil, map[uint32]int64{}, map[uint32]int64{10: 10}} { + for _, v := range []map[uint32]int32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v139: %v\n", v) - var v139v1, v139v2 map[uint32]int64 + var v139v1, v139v2 map[uint32]int32 v139v1 = v bs139 := testMarshalErr(v139v1, h, t, "enc-map-v139") - if v != nil { - v139v2 = make(map[uint32]int64, len(v)) - } + if v == nil { + v139v2 = nil + } else { + v139v2 = make(map[uint32]int32, len(v)) + } // reset map testUnmarshalErr(v139v2, bs139, h, t, "dec-map-v139") testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139") + if v == nil { + v139v2 = nil + } else { + v139v2 = make(map[uint32]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v139v2), bs139, h, t, "dec-map-v139-noaddr") // decode into non-addressable map value + testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-noaddr") + if v == nil { + v139v2 = nil + } else { + v139v2 = make(map[uint32]int32, len(v)) + } // reset map + testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-len") + testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-len") bs139 = testMarshalErr(&v139v1, h, t, "enc-map-v139-p") v139v2 = nil - testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p") - testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p") + testUnmarshalErr(&v139v2, bs139, h, t, "dec-map-v139-p-nil") + testDeepEqualErr(v139v1, v139v2, t, "equal-map-v139-p-nil") + // ... + if v == nil { + v139v2 = nil + } else { + v139v2 = make(map[uint32]int32, len(v)) + } // reset map + var v139v3, v139v4 typMapMapUint32Int32 + v139v3 = typMapMapUint32Int32(v139v1) + v139v4 = typMapMapUint32Int32(v139v2) + bs139 = testMarshalErr(v139v3, h, t, "enc-map-v139-custom") + testUnmarshalErr(v139v4, bs139, h, t, "dec-map-v139-p-len") + testDeepEqualErr(v139v3, v139v4, t, "equal-map-v139-p-len") } - for _, v := range []map[uint32]float32{nil, map[uint32]float32{}, map[uint32]float32{10: 10.1}} { + for _, v := range []map[uint32]int64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v140: %v\n", v) - var v140v1, v140v2 map[uint32]float32 + var v140v1, v140v2 map[uint32]int64 v140v1 = v bs140 := testMarshalErr(v140v1, h, t, "enc-map-v140") - if v != nil { - v140v2 = make(map[uint32]float32, len(v)) - } + if v == nil { + v140v2 = nil + } else { + v140v2 = make(map[uint32]int64, len(v)) + } // reset map testUnmarshalErr(v140v2, bs140, h, t, "dec-map-v140") testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140") + if v == nil { + v140v2 = nil + } else { + v140v2 = make(map[uint32]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v140v2), bs140, h, t, "dec-map-v140-noaddr") // decode into non-addressable map value + testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-noaddr") + if v == nil { + v140v2 = nil + } else { + v140v2 = make(map[uint32]int64, len(v)) + } // reset map + testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-len") + testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-len") bs140 = testMarshalErr(&v140v1, h, t, "enc-map-v140-p") v140v2 = nil - testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p") - testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p") + testUnmarshalErr(&v140v2, bs140, h, t, "dec-map-v140-p-nil") + testDeepEqualErr(v140v1, v140v2, t, "equal-map-v140-p-nil") + // ... + if v == nil { + v140v2 = nil + } else { + v140v2 = make(map[uint32]int64, len(v)) + } // reset map + var v140v3, v140v4 typMapMapUint32Int64 + v140v3 = typMapMapUint32Int64(v140v1) + v140v4 = typMapMapUint32Int64(v140v2) + bs140 = testMarshalErr(v140v3, h, t, "enc-map-v140-custom") + testUnmarshalErr(v140v4, bs140, h, t, "dec-map-v140-p-len") + testDeepEqualErr(v140v3, v140v4, t, "equal-map-v140-p-len") } - for _, v := range []map[uint32]float64{nil, map[uint32]float64{}, map[uint32]float64{10: 10.1}} { + for _, v := range []map[uint32]float32{nil, {}, {44: 0, 33: 22.2}} { // fmt.Printf(">>>> running mammoth map v141: %v\n", v) - var v141v1, v141v2 map[uint32]float64 + var v141v1, v141v2 map[uint32]float32 v141v1 = v bs141 := testMarshalErr(v141v1, h, t, "enc-map-v141") - if v != nil { - v141v2 = make(map[uint32]float64, len(v)) - } + if v == nil { + v141v2 = nil + } else { + v141v2 = make(map[uint32]float32, len(v)) + } // reset map testUnmarshalErr(v141v2, bs141, h, t, "dec-map-v141") testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141") + if v == nil { + v141v2 = nil + } else { + v141v2 = make(map[uint32]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v141v2), bs141, h, t, "dec-map-v141-noaddr") // decode into non-addressable map value + testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-noaddr") + if v == nil { + v141v2 = nil + } else { + v141v2 = make(map[uint32]float32, len(v)) + } // reset map + testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-len") + testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-len") bs141 = testMarshalErr(&v141v1, h, t, "enc-map-v141-p") v141v2 = nil - testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p") - testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p") + testUnmarshalErr(&v141v2, bs141, h, t, "dec-map-v141-p-nil") + testDeepEqualErr(v141v1, v141v2, t, "equal-map-v141-p-nil") + // ... + if v == nil { + v141v2 = nil + } else { + v141v2 = make(map[uint32]float32, len(v)) + } // reset map + var v141v3, v141v4 typMapMapUint32Float32 + v141v3 = typMapMapUint32Float32(v141v1) + v141v4 = typMapMapUint32Float32(v141v2) + bs141 = testMarshalErr(v141v3, h, t, "enc-map-v141-custom") + testUnmarshalErr(v141v4, bs141, h, t, "dec-map-v141-p-len") + testDeepEqualErr(v141v3, v141v4, t, "equal-map-v141-p-len") } - for _, v := range []map[uint32]bool{nil, map[uint32]bool{}, map[uint32]bool{10: true}} { + for _, v := range []map[uint32]float64{nil, {}, {44: 0, 33: 11.1}} { // fmt.Printf(">>>> running mammoth map v142: %v\n", v) - var v142v1, v142v2 map[uint32]bool + var v142v1, v142v2 map[uint32]float64 v142v1 = v bs142 := testMarshalErr(v142v1, h, t, "enc-map-v142") - if v != nil { - v142v2 = make(map[uint32]bool, len(v)) - } + if v == nil { + v142v2 = nil + } else { + v142v2 = make(map[uint32]float64, len(v)) + } // reset map testUnmarshalErr(v142v2, bs142, h, t, "dec-map-v142") testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142") + if v == nil { + v142v2 = nil + } else { + v142v2 = make(map[uint32]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v142v2), bs142, h, t, "dec-map-v142-noaddr") // decode into non-addressable map value + testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-noaddr") + if v == nil { + v142v2 = nil + } else { + v142v2 = make(map[uint32]float64, len(v)) + } // reset map + testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-len") + testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-len") bs142 = testMarshalErr(&v142v1, h, t, "enc-map-v142-p") v142v2 = nil - testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p") - testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p") + testUnmarshalErr(&v142v2, bs142, h, t, "dec-map-v142-p-nil") + testDeepEqualErr(v142v1, v142v2, t, "equal-map-v142-p-nil") + // ... + if v == nil { + v142v2 = nil + } else { + v142v2 = make(map[uint32]float64, len(v)) + } // reset map + var v142v3, v142v4 typMapMapUint32Float64 + v142v3 = typMapMapUint32Float64(v142v1) + v142v4 = typMapMapUint32Float64(v142v2) + bs142 = testMarshalErr(v142v3, h, t, "enc-map-v142-custom") + testUnmarshalErr(v142v4, bs142, h, t, "dec-map-v142-p-len") + testDeepEqualErr(v142v3, v142v4, t, "equal-map-v142-p-len") } - for _, v := range []map[uint64]interface{}{nil, map[uint64]interface{}{}, map[uint64]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v145: %v\n", v) - var v145v1, v145v2 map[uint64]interface{} - v145v1 = v - bs145 := testMarshalErr(v145v1, h, t, "enc-map-v145") - if v != nil { - v145v2 = make(map[uint64]interface{}, len(v)) - } - testUnmarshalErr(v145v2, bs145, h, t, "dec-map-v145") - testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145") - bs145 = testMarshalErr(&v145v1, h, t, "enc-map-v145-p") - v145v2 = nil - testUnmarshalErr(&v145v2, bs145, h, t, "dec-map-v145-p") - testDeepEqualErr(v145v1, v145v2, t, "equal-map-v145-p") + for _, v := range []map[uint32]bool{nil, {}, {44: false, 33: true}} { + // fmt.Printf(">>>> running mammoth map v143: %v\n", v) + var v143v1, v143v2 map[uint32]bool + v143v1 = v + bs143 := testMarshalErr(v143v1, h, t, "enc-map-v143") + if v == nil { + v143v2 = nil + } else { + v143v2 = make(map[uint32]bool, len(v)) + } // reset map + testUnmarshalErr(v143v2, bs143, h, t, "dec-map-v143") + testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143") + if v == nil { + v143v2 = nil + } else { + v143v2 = make(map[uint32]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v143v2), bs143, h, t, "dec-map-v143-noaddr") // decode into non-addressable map value + testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-noaddr") + if v == nil { + v143v2 = nil + } else { + v143v2 = make(map[uint32]bool, len(v)) + } // reset map + testUnmarshalErr(&v143v2, bs143, h, t, "dec-map-v143-p-len") + testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-p-len") + bs143 = testMarshalErr(&v143v1, h, t, "enc-map-v143-p") + v143v2 = nil + testUnmarshalErr(&v143v2, bs143, h, t, "dec-map-v143-p-nil") + testDeepEqualErr(v143v1, v143v2, t, "equal-map-v143-p-nil") + // ... + if v == nil { + v143v2 = nil + } else { + v143v2 = make(map[uint32]bool, len(v)) + } // reset map + var v143v3, v143v4 typMapMapUint32Bool + v143v3 = typMapMapUint32Bool(v143v1) + v143v4 = typMapMapUint32Bool(v143v2) + bs143 = testMarshalErr(v143v3, h, t, "enc-map-v143-custom") + testUnmarshalErr(v143v4, bs143, h, t, "dec-map-v143-p-len") + testDeepEqualErr(v143v3, v143v4, t, "equal-map-v143-p-len") } - for _, v := range []map[uint64]string{nil, map[uint64]string{}, map[uint64]string{10: "some-string"}} { + for _, v := range []map[uint64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v146: %v\n", v) - var v146v1, v146v2 map[uint64]string + var v146v1, v146v2 map[uint64]interface{} v146v1 = v bs146 := testMarshalErr(v146v1, h, t, "enc-map-v146") - if v != nil { - v146v2 = make(map[uint64]string, len(v)) - } + if v == nil { + v146v2 = nil + } else { + v146v2 = make(map[uint64]interface{}, len(v)) + } // reset map testUnmarshalErr(v146v2, bs146, h, t, "dec-map-v146") testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146") + if v == nil { + v146v2 = nil + } else { + v146v2 = make(map[uint64]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v146v2), bs146, h, t, "dec-map-v146-noaddr") // decode into non-addressable map value + testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-noaddr") + if v == nil { + v146v2 = nil + } else { + v146v2 = make(map[uint64]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-len") + testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-len") bs146 = testMarshalErr(&v146v1, h, t, "enc-map-v146-p") v146v2 = nil - testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p") - testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p") + testUnmarshalErr(&v146v2, bs146, h, t, "dec-map-v146-p-nil") + testDeepEqualErr(v146v1, v146v2, t, "equal-map-v146-p-nil") + // ... + if v == nil { + v146v2 = nil + } else { + v146v2 = make(map[uint64]interface{}, len(v)) + } // reset map + var v146v3, v146v4 typMapMapUint64Intf + v146v3 = typMapMapUint64Intf(v146v1) + v146v4 = typMapMapUint64Intf(v146v2) + bs146 = testMarshalErr(v146v3, h, t, "enc-map-v146-custom") + testUnmarshalErr(v146v4, bs146, h, t, "dec-map-v146-p-len") + testDeepEqualErr(v146v3, v146v4, t, "equal-map-v146-p-len") } - for _, v := range []map[uint64]uint{nil, map[uint64]uint{}, map[uint64]uint{10: 10}} { + for _, v := range []map[uint64]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v147: %v\n", v) - var v147v1, v147v2 map[uint64]uint + var v147v1, v147v2 map[uint64]string v147v1 = v bs147 := testMarshalErr(v147v1, h, t, "enc-map-v147") - if v != nil { - v147v2 = make(map[uint64]uint, len(v)) - } + if v == nil { + v147v2 = nil + } else { + v147v2 = make(map[uint64]string, len(v)) + } // reset map testUnmarshalErr(v147v2, bs147, h, t, "dec-map-v147") testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147") + if v == nil { + v147v2 = nil + } else { + v147v2 = make(map[uint64]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v147v2), bs147, h, t, "dec-map-v147-noaddr") // decode into non-addressable map value + testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-noaddr") + if v == nil { + v147v2 = nil + } else { + v147v2 = make(map[uint64]string, len(v)) + } // reset map + testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-len") + testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-len") bs147 = testMarshalErr(&v147v1, h, t, "enc-map-v147-p") v147v2 = nil - testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p") - testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p") + testUnmarshalErr(&v147v2, bs147, h, t, "dec-map-v147-p-nil") + testDeepEqualErr(v147v1, v147v2, t, "equal-map-v147-p-nil") + // ... + if v == nil { + v147v2 = nil + } else { + v147v2 = make(map[uint64]string, len(v)) + } // reset map + var v147v3, v147v4 typMapMapUint64String + v147v3 = typMapMapUint64String(v147v1) + v147v4 = typMapMapUint64String(v147v2) + bs147 = testMarshalErr(v147v3, h, t, "enc-map-v147-custom") + testUnmarshalErr(v147v4, bs147, h, t, "dec-map-v147-p-len") + testDeepEqualErr(v147v3, v147v4, t, "equal-map-v147-p-len") } - for _, v := range []map[uint64]uint8{nil, map[uint64]uint8{}, map[uint64]uint8{10: 10}} { + for _, v := range []map[uint64]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v148: %v\n", v) - var v148v1, v148v2 map[uint64]uint8 + var v148v1, v148v2 map[uint64]uint v148v1 = v bs148 := testMarshalErr(v148v1, h, t, "enc-map-v148") - if v != nil { - v148v2 = make(map[uint64]uint8, len(v)) - } + if v == nil { + v148v2 = nil + } else { + v148v2 = make(map[uint64]uint, len(v)) + } // reset map testUnmarshalErr(v148v2, bs148, h, t, "dec-map-v148") testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148") + if v == nil { + v148v2 = nil + } else { + v148v2 = make(map[uint64]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v148v2), bs148, h, t, "dec-map-v148-noaddr") // decode into non-addressable map value + testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-noaddr") + if v == nil { + v148v2 = nil + } else { + v148v2 = make(map[uint64]uint, len(v)) + } // reset map + testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-len") + testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-len") bs148 = testMarshalErr(&v148v1, h, t, "enc-map-v148-p") v148v2 = nil - testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p") - testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p") + testUnmarshalErr(&v148v2, bs148, h, t, "dec-map-v148-p-nil") + testDeepEqualErr(v148v1, v148v2, t, "equal-map-v148-p-nil") + // ... + if v == nil { + v148v2 = nil + } else { + v148v2 = make(map[uint64]uint, len(v)) + } // reset map + var v148v3, v148v4 typMapMapUint64Uint + v148v3 = typMapMapUint64Uint(v148v1) + v148v4 = typMapMapUint64Uint(v148v2) + bs148 = testMarshalErr(v148v3, h, t, "enc-map-v148-custom") + testUnmarshalErr(v148v4, bs148, h, t, "dec-map-v148-p-len") + testDeepEqualErr(v148v3, v148v4, t, "equal-map-v148-p-len") } - for _, v := range []map[uint64]uint16{nil, map[uint64]uint16{}, map[uint64]uint16{10: 10}} { + for _, v := range []map[uint64]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v149: %v\n", v) - var v149v1, v149v2 map[uint64]uint16 + var v149v1, v149v2 map[uint64]uint8 v149v1 = v bs149 := testMarshalErr(v149v1, h, t, "enc-map-v149") - if v != nil { - v149v2 = make(map[uint64]uint16, len(v)) - } + if v == nil { + v149v2 = nil + } else { + v149v2 = make(map[uint64]uint8, len(v)) + } // reset map testUnmarshalErr(v149v2, bs149, h, t, "dec-map-v149") testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149") + if v == nil { + v149v2 = nil + } else { + v149v2 = make(map[uint64]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v149v2), bs149, h, t, "dec-map-v149-noaddr") // decode into non-addressable map value + testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-noaddr") + if v == nil { + v149v2 = nil + } else { + v149v2 = make(map[uint64]uint8, len(v)) + } // reset map + testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-len") + testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-len") bs149 = testMarshalErr(&v149v1, h, t, "enc-map-v149-p") v149v2 = nil - testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p") - testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p") + testUnmarshalErr(&v149v2, bs149, h, t, "dec-map-v149-p-nil") + testDeepEqualErr(v149v1, v149v2, t, "equal-map-v149-p-nil") + // ... + if v == nil { + v149v2 = nil + } else { + v149v2 = make(map[uint64]uint8, len(v)) + } // reset map + var v149v3, v149v4 typMapMapUint64Uint8 + v149v3 = typMapMapUint64Uint8(v149v1) + v149v4 = typMapMapUint64Uint8(v149v2) + bs149 = testMarshalErr(v149v3, h, t, "enc-map-v149-custom") + testUnmarshalErr(v149v4, bs149, h, t, "dec-map-v149-p-len") + testDeepEqualErr(v149v3, v149v4, t, "equal-map-v149-p-len") } - for _, v := range []map[uint64]uint32{nil, map[uint64]uint32{}, map[uint64]uint32{10: 10}} { + for _, v := range []map[uint64]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v150: %v\n", v) - var v150v1, v150v2 map[uint64]uint32 + var v150v1, v150v2 map[uint64]uint16 v150v1 = v bs150 := testMarshalErr(v150v1, h, t, "enc-map-v150") - if v != nil { - v150v2 = make(map[uint64]uint32, len(v)) - } + if v == nil { + v150v2 = nil + } else { + v150v2 = make(map[uint64]uint16, len(v)) + } // reset map testUnmarshalErr(v150v2, bs150, h, t, "dec-map-v150") testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150") + if v == nil { + v150v2 = nil + } else { + v150v2 = make(map[uint64]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v150v2), bs150, h, t, "dec-map-v150-noaddr") // decode into non-addressable map value + testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-noaddr") + if v == nil { + v150v2 = nil + } else { + v150v2 = make(map[uint64]uint16, len(v)) + } // reset map + testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-len") + testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-len") bs150 = testMarshalErr(&v150v1, h, t, "enc-map-v150-p") v150v2 = nil - testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p") - testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p") + testUnmarshalErr(&v150v2, bs150, h, t, "dec-map-v150-p-nil") + testDeepEqualErr(v150v1, v150v2, t, "equal-map-v150-p-nil") + // ... + if v == nil { + v150v2 = nil + } else { + v150v2 = make(map[uint64]uint16, len(v)) + } // reset map + var v150v3, v150v4 typMapMapUint64Uint16 + v150v3 = typMapMapUint64Uint16(v150v1) + v150v4 = typMapMapUint64Uint16(v150v2) + bs150 = testMarshalErr(v150v3, h, t, "enc-map-v150-custom") + testUnmarshalErr(v150v4, bs150, h, t, "dec-map-v150-p-len") + testDeepEqualErr(v150v3, v150v4, t, "equal-map-v150-p-len") } - for _, v := range []map[uint64]uint64{nil, map[uint64]uint64{}, map[uint64]uint64{10: 10}} { + for _, v := range []map[uint64]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v151: %v\n", v) - var v151v1, v151v2 map[uint64]uint64 + var v151v1, v151v2 map[uint64]uint32 v151v1 = v bs151 := testMarshalErr(v151v1, h, t, "enc-map-v151") - if v != nil { - v151v2 = make(map[uint64]uint64, len(v)) - } + if v == nil { + v151v2 = nil + } else { + v151v2 = make(map[uint64]uint32, len(v)) + } // reset map testUnmarshalErr(v151v2, bs151, h, t, "dec-map-v151") testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151") + if v == nil { + v151v2 = nil + } else { + v151v2 = make(map[uint64]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v151v2), bs151, h, t, "dec-map-v151-noaddr") // decode into non-addressable map value + testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-noaddr") + if v == nil { + v151v2 = nil + } else { + v151v2 = make(map[uint64]uint32, len(v)) + } // reset map + testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-len") + testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-len") bs151 = testMarshalErr(&v151v1, h, t, "enc-map-v151-p") v151v2 = nil - testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p") - testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p") + testUnmarshalErr(&v151v2, bs151, h, t, "dec-map-v151-p-nil") + testDeepEqualErr(v151v1, v151v2, t, "equal-map-v151-p-nil") + // ... + if v == nil { + v151v2 = nil + } else { + v151v2 = make(map[uint64]uint32, len(v)) + } // reset map + var v151v3, v151v4 typMapMapUint64Uint32 + v151v3 = typMapMapUint64Uint32(v151v1) + v151v4 = typMapMapUint64Uint32(v151v2) + bs151 = testMarshalErr(v151v3, h, t, "enc-map-v151-custom") + testUnmarshalErr(v151v4, bs151, h, t, "dec-map-v151-p-len") + testDeepEqualErr(v151v3, v151v4, t, "equal-map-v151-p-len") } - for _, v := range []map[uint64]uintptr{nil, map[uint64]uintptr{}, map[uint64]uintptr{10: 10}} { + for _, v := range []map[uint64]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v152: %v\n", v) - var v152v1, v152v2 map[uint64]uintptr + var v152v1, v152v2 map[uint64]uint64 v152v1 = v bs152 := testMarshalErr(v152v1, h, t, "enc-map-v152") - if v != nil { - v152v2 = make(map[uint64]uintptr, len(v)) - } + if v == nil { + v152v2 = nil + } else { + v152v2 = make(map[uint64]uint64, len(v)) + } // reset map testUnmarshalErr(v152v2, bs152, h, t, "dec-map-v152") testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152") + if v == nil { + v152v2 = nil + } else { + v152v2 = make(map[uint64]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v152v2), bs152, h, t, "dec-map-v152-noaddr") // decode into non-addressable map value + testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-noaddr") + if v == nil { + v152v2 = nil + } else { + v152v2 = make(map[uint64]uint64, len(v)) + } // reset map + testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-len") + testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-len") bs152 = testMarshalErr(&v152v1, h, t, "enc-map-v152-p") v152v2 = nil - testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p") - testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p") + testUnmarshalErr(&v152v2, bs152, h, t, "dec-map-v152-p-nil") + testDeepEqualErr(v152v1, v152v2, t, "equal-map-v152-p-nil") + // ... + if v == nil { + v152v2 = nil + } else { + v152v2 = make(map[uint64]uint64, len(v)) + } // reset map + var v152v3, v152v4 typMapMapUint64Uint64 + v152v3 = typMapMapUint64Uint64(v152v1) + v152v4 = typMapMapUint64Uint64(v152v2) + bs152 = testMarshalErr(v152v3, h, t, "enc-map-v152-custom") + testUnmarshalErr(v152v4, bs152, h, t, "dec-map-v152-p-len") + testDeepEqualErr(v152v3, v152v4, t, "equal-map-v152-p-len") } - for _, v := range []map[uint64]int{nil, map[uint64]int{}, map[uint64]int{10: 10}} { + for _, v := range []map[uint64]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v153: %v\n", v) - var v153v1, v153v2 map[uint64]int + var v153v1, v153v2 map[uint64]uintptr v153v1 = v bs153 := testMarshalErr(v153v1, h, t, "enc-map-v153") - if v != nil { - v153v2 = make(map[uint64]int, len(v)) - } + if v == nil { + v153v2 = nil + } else { + v153v2 = make(map[uint64]uintptr, len(v)) + } // reset map testUnmarshalErr(v153v2, bs153, h, t, "dec-map-v153") testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153") + if v == nil { + v153v2 = nil + } else { + v153v2 = make(map[uint64]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v153v2), bs153, h, t, "dec-map-v153-noaddr") // decode into non-addressable map value + testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-noaddr") + if v == nil { + v153v2 = nil + } else { + v153v2 = make(map[uint64]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-len") + testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-len") bs153 = testMarshalErr(&v153v1, h, t, "enc-map-v153-p") v153v2 = nil - testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p") - testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p") + testUnmarshalErr(&v153v2, bs153, h, t, "dec-map-v153-p-nil") + testDeepEqualErr(v153v1, v153v2, t, "equal-map-v153-p-nil") + // ... + if v == nil { + v153v2 = nil + } else { + v153v2 = make(map[uint64]uintptr, len(v)) + } // reset map + var v153v3, v153v4 typMapMapUint64Uintptr + v153v3 = typMapMapUint64Uintptr(v153v1) + v153v4 = typMapMapUint64Uintptr(v153v2) + bs153 = testMarshalErr(v153v3, h, t, "enc-map-v153-custom") + testUnmarshalErr(v153v4, bs153, h, t, "dec-map-v153-p-len") + testDeepEqualErr(v153v3, v153v4, t, "equal-map-v153-p-len") } - for _, v := range []map[uint64]int8{nil, map[uint64]int8{}, map[uint64]int8{10: 10}} { + for _, v := range []map[uint64]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v154: %v\n", v) - var v154v1, v154v2 map[uint64]int8 + var v154v1, v154v2 map[uint64]int v154v1 = v bs154 := testMarshalErr(v154v1, h, t, "enc-map-v154") - if v != nil { - v154v2 = make(map[uint64]int8, len(v)) - } + if v == nil { + v154v2 = nil + } else { + v154v2 = make(map[uint64]int, len(v)) + } // reset map testUnmarshalErr(v154v2, bs154, h, t, "dec-map-v154") testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154") + if v == nil { + v154v2 = nil + } else { + v154v2 = make(map[uint64]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v154v2), bs154, h, t, "dec-map-v154-noaddr") // decode into non-addressable map value + testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-noaddr") + if v == nil { + v154v2 = nil + } else { + v154v2 = make(map[uint64]int, len(v)) + } // reset map + testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-len") + testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-len") bs154 = testMarshalErr(&v154v1, h, t, "enc-map-v154-p") v154v2 = nil - testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p") - testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p") + testUnmarshalErr(&v154v2, bs154, h, t, "dec-map-v154-p-nil") + testDeepEqualErr(v154v1, v154v2, t, "equal-map-v154-p-nil") + // ... + if v == nil { + v154v2 = nil + } else { + v154v2 = make(map[uint64]int, len(v)) + } // reset map + var v154v3, v154v4 typMapMapUint64Int + v154v3 = typMapMapUint64Int(v154v1) + v154v4 = typMapMapUint64Int(v154v2) + bs154 = testMarshalErr(v154v3, h, t, "enc-map-v154-custom") + testUnmarshalErr(v154v4, bs154, h, t, "dec-map-v154-p-len") + testDeepEqualErr(v154v3, v154v4, t, "equal-map-v154-p-len") } - for _, v := range []map[uint64]int16{nil, map[uint64]int16{}, map[uint64]int16{10: 10}} { + for _, v := range []map[uint64]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v155: %v\n", v) - var v155v1, v155v2 map[uint64]int16 + var v155v1, v155v2 map[uint64]int8 v155v1 = v bs155 := testMarshalErr(v155v1, h, t, "enc-map-v155") - if v != nil { - v155v2 = make(map[uint64]int16, len(v)) - } + if v == nil { + v155v2 = nil + } else { + v155v2 = make(map[uint64]int8, len(v)) + } // reset map testUnmarshalErr(v155v2, bs155, h, t, "dec-map-v155") testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155") + if v == nil { + v155v2 = nil + } else { + v155v2 = make(map[uint64]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v155v2), bs155, h, t, "dec-map-v155-noaddr") // decode into non-addressable map value + testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-noaddr") + if v == nil { + v155v2 = nil + } else { + v155v2 = make(map[uint64]int8, len(v)) + } // reset map + testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-len") + testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-len") bs155 = testMarshalErr(&v155v1, h, t, "enc-map-v155-p") v155v2 = nil - testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p") - testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p") + testUnmarshalErr(&v155v2, bs155, h, t, "dec-map-v155-p-nil") + testDeepEqualErr(v155v1, v155v2, t, "equal-map-v155-p-nil") + // ... + if v == nil { + v155v2 = nil + } else { + v155v2 = make(map[uint64]int8, len(v)) + } // reset map + var v155v3, v155v4 typMapMapUint64Int8 + v155v3 = typMapMapUint64Int8(v155v1) + v155v4 = typMapMapUint64Int8(v155v2) + bs155 = testMarshalErr(v155v3, h, t, "enc-map-v155-custom") + testUnmarshalErr(v155v4, bs155, h, t, "dec-map-v155-p-len") + testDeepEqualErr(v155v3, v155v4, t, "equal-map-v155-p-len") } - for _, v := range []map[uint64]int32{nil, map[uint64]int32{}, map[uint64]int32{10: 10}} { + for _, v := range []map[uint64]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v156: %v\n", v) - var v156v1, v156v2 map[uint64]int32 + var v156v1, v156v2 map[uint64]int16 v156v1 = v bs156 := testMarshalErr(v156v1, h, t, "enc-map-v156") - if v != nil { - v156v2 = make(map[uint64]int32, len(v)) - } + if v == nil { + v156v2 = nil + } else { + v156v2 = make(map[uint64]int16, len(v)) + } // reset map testUnmarshalErr(v156v2, bs156, h, t, "dec-map-v156") testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156") + if v == nil { + v156v2 = nil + } else { + v156v2 = make(map[uint64]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v156v2), bs156, h, t, "dec-map-v156-noaddr") // decode into non-addressable map value + testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-noaddr") + if v == nil { + v156v2 = nil + } else { + v156v2 = make(map[uint64]int16, len(v)) + } // reset map + testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-len") + testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-len") bs156 = testMarshalErr(&v156v1, h, t, "enc-map-v156-p") v156v2 = nil - testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p") - testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p") + testUnmarshalErr(&v156v2, bs156, h, t, "dec-map-v156-p-nil") + testDeepEqualErr(v156v1, v156v2, t, "equal-map-v156-p-nil") + // ... + if v == nil { + v156v2 = nil + } else { + v156v2 = make(map[uint64]int16, len(v)) + } // reset map + var v156v3, v156v4 typMapMapUint64Int16 + v156v3 = typMapMapUint64Int16(v156v1) + v156v4 = typMapMapUint64Int16(v156v2) + bs156 = testMarshalErr(v156v3, h, t, "enc-map-v156-custom") + testUnmarshalErr(v156v4, bs156, h, t, "dec-map-v156-p-len") + testDeepEqualErr(v156v3, v156v4, t, "equal-map-v156-p-len") } - for _, v := range []map[uint64]int64{nil, map[uint64]int64{}, map[uint64]int64{10: 10}} { + for _, v := range []map[uint64]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v157: %v\n", v) - var v157v1, v157v2 map[uint64]int64 + var v157v1, v157v2 map[uint64]int32 v157v1 = v bs157 := testMarshalErr(v157v1, h, t, "enc-map-v157") - if v != nil { - v157v2 = make(map[uint64]int64, len(v)) - } + if v == nil { + v157v2 = nil + } else { + v157v2 = make(map[uint64]int32, len(v)) + } // reset map testUnmarshalErr(v157v2, bs157, h, t, "dec-map-v157") testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157") + if v == nil { + v157v2 = nil + } else { + v157v2 = make(map[uint64]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v157v2), bs157, h, t, "dec-map-v157-noaddr") // decode into non-addressable map value + testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-noaddr") + if v == nil { + v157v2 = nil + } else { + v157v2 = make(map[uint64]int32, len(v)) + } // reset map + testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-len") + testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-len") bs157 = testMarshalErr(&v157v1, h, t, "enc-map-v157-p") v157v2 = nil - testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p") - testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p") + testUnmarshalErr(&v157v2, bs157, h, t, "dec-map-v157-p-nil") + testDeepEqualErr(v157v1, v157v2, t, "equal-map-v157-p-nil") + // ... + if v == nil { + v157v2 = nil + } else { + v157v2 = make(map[uint64]int32, len(v)) + } // reset map + var v157v3, v157v4 typMapMapUint64Int32 + v157v3 = typMapMapUint64Int32(v157v1) + v157v4 = typMapMapUint64Int32(v157v2) + bs157 = testMarshalErr(v157v3, h, t, "enc-map-v157-custom") + testUnmarshalErr(v157v4, bs157, h, t, "dec-map-v157-p-len") + testDeepEqualErr(v157v3, v157v4, t, "equal-map-v157-p-len") } - for _, v := range []map[uint64]float32{nil, map[uint64]float32{}, map[uint64]float32{10: 10.1}} { + for _, v := range []map[uint64]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v158: %v\n", v) - var v158v1, v158v2 map[uint64]float32 + var v158v1, v158v2 map[uint64]int64 v158v1 = v bs158 := testMarshalErr(v158v1, h, t, "enc-map-v158") - if v != nil { - v158v2 = make(map[uint64]float32, len(v)) - } + if v == nil { + v158v2 = nil + } else { + v158v2 = make(map[uint64]int64, len(v)) + } // reset map testUnmarshalErr(v158v2, bs158, h, t, "dec-map-v158") testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158") + if v == nil { + v158v2 = nil + } else { + v158v2 = make(map[uint64]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v158v2), bs158, h, t, "dec-map-v158-noaddr") // decode into non-addressable map value + testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-noaddr") + if v == nil { + v158v2 = nil + } else { + v158v2 = make(map[uint64]int64, len(v)) + } // reset map + testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-len") + testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-len") bs158 = testMarshalErr(&v158v1, h, t, "enc-map-v158-p") v158v2 = nil - testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p") - testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p") + testUnmarshalErr(&v158v2, bs158, h, t, "dec-map-v158-p-nil") + testDeepEqualErr(v158v1, v158v2, t, "equal-map-v158-p-nil") + // ... + if v == nil { + v158v2 = nil + } else { + v158v2 = make(map[uint64]int64, len(v)) + } // reset map + var v158v3, v158v4 typMapMapUint64Int64 + v158v3 = typMapMapUint64Int64(v158v1) + v158v4 = typMapMapUint64Int64(v158v2) + bs158 = testMarshalErr(v158v3, h, t, "enc-map-v158-custom") + testUnmarshalErr(v158v4, bs158, h, t, "dec-map-v158-p-len") + testDeepEqualErr(v158v3, v158v4, t, "equal-map-v158-p-len") } - for _, v := range []map[uint64]float64{nil, map[uint64]float64{}, map[uint64]float64{10: 10.1}} { + for _, v := range []map[uint64]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v159: %v\n", v) - var v159v1, v159v2 map[uint64]float64 + var v159v1, v159v2 map[uint64]float32 v159v1 = v bs159 := testMarshalErr(v159v1, h, t, "enc-map-v159") - if v != nil { - v159v2 = make(map[uint64]float64, len(v)) - } + if v == nil { + v159v2 = nil + } else { + v159v2 = make(map[uint64]float32, len(v)) + } // reset map testUnmarshalErr(v159v2, bs159, h, t, "dec-map-v159") testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159") + if v == nil { + v159v2 = nil + } else { + v159v2 = make(map[uint64]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v159v2), bs159, h, t, "dec-map-v159-noaddr") // decode into non-addressable map value + testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-noaddr") + if v == nil { + v159v2 = nil + } else { + v159v2 = make(map[uint64]float32, len(v)) + } // reset map + testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-len") + testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-len") bs159 = testMarshalErr(&v159v1, h, t, "enc-map-v159-p") v159v2 = nil - testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p") - testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p") + testUnmarshalErr(&v159v2, bs159, h, t, "dec-map-v159-p-nil") + testDeepEqualErr(v159v1, v159v2, t, "equal-map-v159-p-nil") + // ... + if v == nil { + v159v2 = nil + } else { + v159v2 = make(map[uint64]float32, len(v)) + } // reset map + var v159v3, v159v4 typMapMapUint64Float32 + v159v3 = typMapMapUint64Float32(v159v1) + v159v4 = typMapMapUint64Float32(v159v2) + bs159 = testMarshalErr(v159v3, h, t, "enc-map-v159-custom") + testUnmarshalErr(v159v4, bs159, h, t, "dec-map-v159-p-len") + testDeepEqualErr(v159v3, v159v4, t, "equal-map-v159-p-len") } - for _, v := range []map[uint64]bool{nil, map[uint64]bool{}, map[uint64]bool{10: true}} { + for _, v := range []map[uint64]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v160: %v\n", v) - var v160v1, v160v2 map[uint64]bool + var v160v1, v160v2 map[uint64]float64 v160v1 = v bs160 := testMarshalErr(v160v1, h, t, "enc-map-v160") - if v != nil { - v160v2 = make(map[uint64]bool, len(v)) - } + if v == nil { + v160v2 = nil + } else { + v160v2 = make(map[uint64]float64, len(v)) + } // reset map testUnmarshalErr(v160v2, bs160, h, t, "dec-map-v160") testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160") + if v == nil { + v160v2 = nil + } else { + v160v2 = make(map[uint64]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v160v2), bs160, h, t, "dec-map-v160-noaddr") // decode into non-addressable map value + testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-noaddr") + if v == nil { + v160v2 = nil + } else { + v160v2 = make(map[uint64]float64, len(v)) + } // reset map + testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-len") + testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-len") bs160 = testMarshalErr(&v160v1, h, t, "enc-map-v160-p") v160v2 = nil - testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p") - testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p") + testUnmarshalErr(&v160v2, bs160, h, t, "dec-map-v160-p-nil") + testDeepEqualErr(v160v1, v160v2, t, "equal-map-v160-p-nil") + // ... + if v == nil { + v160v2 = nil + } else { + v160v2 = make(map[uint64]float64, len(v)) + } // reset map + var v160v3, v160v4 typMapMapUint64Float64 + v160v3 = typMapMapUint64Float64(v160v1) + v160v4 = typMapMapUint64Float64(v160v2) + bs160 = testMarshalErr(v160v3, h, t, "enc-map-v160-custom") + testUnmarshalErr(v160v4, bs160, h, t, "dec-map-v160-p-len") + testDeepEqualErr(v160v3, v160v4, t, "equal-map-v160-p-len") } - for _, v := range []map[uintptr]interface{}{nil, map[uintptr]interface{}{}, map[uintptr]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v163: %v\n", v) - var v163v1, v163v2 map[uintptr]interface{} - v163v1 = v - bs163 := testMarshalErr(v163v1, h, t, "enc-map-v163") - if v != nil { - v163v2 = make(map[uintptr]interface{}, len(v)) - } - testUnmarshalErr(v163v2, bs163, h, t, "dec-map-v163") - testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163") - bs163 = testMarshalErr(&v163v1, h, t, "enc-map-v163-p") - v163v2 = nil - testUnmarshalErr(&v163v2, bs163, h, t, "dec-map-v163-p") - testDeepEqualErr(v163v1, v163v2, t, "equal-map-v163-p") + for _, v := range []map[uint64]bool{nil, {}, {33: false, 44: true}} { + // fmt.Printf(">>>> running mammoth map v161: %v\n", v) + var v161v1, v161v2 map[uint64]bool + v161v1 = v + bs161 := testMarshalErr(v161v1, h, t, "enc-map-v161") + if v == nil { + v161v2 = nil + } else { + v161v2 = make(map[uint64]bool, len(v)) + } // reset map + testUnmarshalErr(v161v2, bs161, h, t, "dec-map-v161") + testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161") + if v == nil { + v161v2 = nil + } else { + v161v2 = make(map[uint64]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v161v2), bs161, h, t, "dec-map-v161-noaddr") // decode into non-addressable map value + testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-noaddr") + if v == nil { + v161v2 = nil + } else { + v161v2 = make(map[uint64]bool, len(v)) + } // reset map + testUnmarshalErr(&v161v2, bs161, h, t, "dec-map-v161-p-len") + testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-p-len") + bs161 = testMarshalErr(&v161v1, h, t, "enc-map-v161-p") + v161v2 = nil + testUnmarshalErr(&v161v2, bs161, h, t, "dec-map-v161-p-nil") + testDeepEqualErr(v161v1, v161v2, t, "equal-map-v161-p-nil") + // ... + if v == nil { + v161v2 = nil + } else { + v161v2 = make(map[uint64]bool, len(v)) + } // reset map + var v161v3, v161v4 typMapMapUint64Bool + v161v3 = typMapMapUint64Bool(v161v1) + v161v4 = typMapMapUint64Bool(v161v2) + bs161 = testMarshalErr(v161v3, h, t, "enc-map-v161-custom") + testUnmarshalErr(v161v4, bs161, h, t, "dec-map-v161-p-len") + testDeepEqualErr(v161v3, v161v4, t, "equal-map-v161-p-len") } - for _, v := range []map[uintptr]string{nil, map[uintptr]string{}, map[uintptr]string{10: "some-string"}} { + for _, v := range []map[uintptr]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v164: %v\n", v) - var v164v1, v164v2 map[uintptr]string + var v164v1, v164v2 map[uintptr]interface{} v164v1 = v bs164 := testMarshalErr(v164v1, h, t, "enc-map-v164") - if v != nil { - v164v2 = make(map[uintptr]string, len(v)) - } + if v == nil { + v164v2 = nil + } else { + v164v2 = make(map[uintptr]interface{}, len(v)) + } // reset map testUnmarshalErr(v164v2, bs164, h, t, "dec-map-v164") testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164") + if v == nil { + v164v2 = nil + } else { + v164v2 = make(map[uintptr]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v164v2), bs164, h, t, "dec-map-v164-noaddr") // decode into non-addressable map value + testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-noaddr") + if v == nil { + v164v2 = nil + } else { + v164v2 = make(map[uintptr]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-len") + testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-len") bs164 = testMarshalErr(&v164v1, h, t, "enc-map-v164-p") v164v2 = nil - testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p") - testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p") + testUnmarshalErr(&v164v2, bs164, h, t, "dec-map-v164-p-nil") + testDeepEqualErr(v164v1, v164v2, t, "equal-map-v164-p-nil") + // ... + if v == nil { + v164v2 = nil + } else { + v164v2 = make(map[uintptr]interface{}, len(v)) + } // reset map + var v164v3, v164v4 typMapMapUintptrIntf + v164v3 = typMapMapUintptrIntf(v164v1) + v164v4 = typMapMapUintptrIntf(v164v2) + bs164 = testMarshalErr(v164v3, h, t, "enc-map-v164-custom") + testUnmarshalErr(v164v4, bs164, h, t, "dec-map-v164-p-len") + testDeepEqualErr(v164v3, v164v4, t, "equal-map-v164-p-len") } - for _, v := range []map[uintptr]uint{nil, map[uintptr]uint{}, map[uintptr]uint{10: 10}} { + for _, v := range []map[uintptr]string{nil, {}, {33: "", 44: "some-string"}} { // fmt.Printf(">>>> running mammoth map v165: %v\n", v) - var v165v1, v165v2 map[uintptr]uint + var v165v1, v165v2 map[uintptr]string v165v1 = v bs165 := testMarshalErr(v165v1, h, t, "enc-map-v165") - if v != nil { - v165v2 = make(map[uintptr]uint, len(v)) - } + if v == nil { + v165v2 = nil + } else { + v165v2 = make(map[uintptr]string, len(v)) + } // reset map testUnmarshalErr(v165v2, bs165, h, t, "dec-map-v165") testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165") + if v == nil { + v165v2 = nil + } else { + v165v2 = make(map[uintptr]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v165v2), bs165, h, t, "dec-map-v165-noaddr") // decode into non-addressable map value + testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-noaddr") + if v == nil { + v165v2 = nil + } else { + v165v2 = make(map[uintptr]string, len(v)) + } // reset map + testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-len") + testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-len") bs165 = testMarshalErr(&v165v1, h, t, "enc-map-v165-p") v165v2 = nil - testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p") - testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p") + testUnmarshalErr(&v165v2, bs165, h, t, "dec-map-v165-p-nil") + testDeepEqualErr(v165v1, v165v2, t, "equal-map-v165-p-nil") + // ... + if v == nil { + v165v2 = nil + } else { + v165v2 = make(map[uintptr]string, len(v)) + } // reset map + var v165v3, v165v4 typMapMapUintptrString + v165v3 = typMapMapUintptrString(v165v1) + v165v4 = typMapMapUintptrString(v165v2) + bs165 = testMarshalErr(v165v3, h, t, "enc-map-v165-custom") + testUnmarshalErr(v165v4, bs165, h, t, "dec-map-v165-p-len") + testDeepEqualErr(v165v3, v165v4, t, "equal-map-v165-p-len") } - for _, v := range []map[uintptr]uint8{nil, map[uintptr]uint8{}, map[uintptr]uint8{10: 10}} { + for _, v := range []map[uintptr]uint{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v166: %v\n", v) - var v166v1, v166v2 map[uintptr]uint8 + var v166v1, v166v2 map[uintptr]uint v166v1 = v bs166 := testMarshalErr(v166v1, h, t, "enc-map-v166") - if v != nil { - v166v2 = make(map[uintptr]uint8, len(v)) - } + if v == nil { + v166v2 = nil + } else { + v166v2 = make(map[uintptr]uint, len(v)) + } // reset map testUnmarshalErr(v166v2, bs166, h, t, "dec-map-v166") testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166") + if v == nil { + v166v2 = nil + } else { + v166v2 = make(map[uintptr]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v166v2), bs166, h, t, "dec-map-v166-noaddr") // decode into non-addressable map value + testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-noaddr") + if v == nil { + v166v2 = nil + } else { + v166v2 = make(map[uintptr]uint, len(v)) + } // reset map + testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-len") + testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-len") bs166 = testMarshalErr(&v166v1, h, t, "enc-map-v166-p") v166v2 = nil - testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p") - testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p") + testUnmarshalErr(&v166v2, bs166, h, t, "dec-map-v166-p-nil") + testDeepEqualErr(v166v1, v166v2, t, "equal-map-v166-p-nil") + // ... + if v == nil { + v166v2 = nil + } else { + v166v2 = make(map[uintptr]uint, len(v)) + } // reset map + var v166v3, v166v4 typMapMapUintptrUint + v166v3 = typMapMapUintptrUint(v166v1) + v166v4 = typMapMapUintptrUint(v166v2) + bs166 = testMarshalErr(v166v3, h, t, "enc-map-v166-custom") + testUnmarshalErr(v166v4, bs166, h, t, "dec-map-v166-p-len") + testDeepEqualErr(v166v3, v166v4, t, "equal-map-v166-p-len") } - for _, v := range []map[uintptr]uint16{nil, map[uintptr]uint16{}, map[uintptr]uint16{10: 10}} { + for _, v := range []map[uintptr]uint8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v167: %v\n", v) - var v167v1, v167v2 map[uintptr]uint16 + var v167v1, v167v2 map[uintptr]uint8 v167v1 = v bs167 := testMarshalErr(v167v1, h, t, "enc-map-v167") - if v != nil { - v167v2 = make(map[uintptr]uint16, len(v)) - } + if v == nil { + v167v2 = nil + } else { + v167v2 = make(map[uintptr]uint8, len(v)) + } // reset map testUnmarshalErr(v167v2, bs167, h, t, "dec-map-v167") testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167") + if v == nil { + v167v2 = nil + } else { + v167v2 = make(map[uintptr]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v167v2), bs167, h, t, "dec-map-v167-noaddr") // decode into non-addressable map value + testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-noaddr") + if v == nil { + v167v2 = nil + } else { + v167v2 = make(map[uintptr]uint8, len(v)) + } // reset map + testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-len") + testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-len") bs167 = testMarshalErr(&v167v1, h, t, "enc-map-v167-p") v167v2 = nil - testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p") - testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p") + testUnmarshalErr(&v167v2, bs167, h, t, "dec-map-v167-p-nil") + testDeepEqualErr(v167v1, v167v2, t, "equal-map-v167-p-nil") + // ... + if v == nil { + v167v2 = nil + } else { + v167v2 = make(map[uintptr]uint8, len(v)) + } // reset map + var v167v3, v167v4 typMapMapUintptrUint8 + v167v3 = typMapMapUintptrUint8(v167v1) + v167v4 = typMapMapUintptrUint8(v167v2) + bs167 = testMarshalErr(v167v3, h, t, "enc-map-v167-custom") + testUnmarshalErr(v167v4, bs167, h, t, "dec-map-v167-p-len") + testDeepEqualErr(v167v3, v167v4, t, "equal-map-v167-p-len") } - for _, v := range []map[uintptr]uint32{nil, map[uintptr]uint32{}, map[uintptr]uint32{10: 10}} { + for _, v := range []map[uintptr]uint16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v168: %v\n", v) - var v168v1, v168v2 map[uintptr]uint32 + var v168v1, v168v2 map[uintptr]uint16 v168v1 = v bs168 := testMarshalErr(v168v1, h, t, "enc-map-v168") - if v != nil { - v168v2 = make(map[uintptr]uint32, len(v)) - } + if v == nil { + v168v2 = nil + } else { + v168v2 = make(map[uintptr]uint16, len(v)) + } // reset map testUnmarshalErr(v168v2, bs168, h, t, "dec-map-v168") testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168") + if v == nil { + v168v2 = nil + } else { + v168v2 = make(map[uintptr]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v168v2), bs168, h, t, "dec-map-v168-noaddr") // decode into non-addressable map value + testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-noaddr") + if v == nil { + v168v2 = nil + } else { + v168v2 = make(map[uintptr]uint16, len(v)) + } // reset map + testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-len") + testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-len") bs168 = testMarshalErr(&v168v1, h, t, "enc-map-v168-p") v168v2 = nil - testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p") - testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p") + testUnmarshalErr(&v168v2, bs168, h, t, "dec-map-v168-p-nil") + testDeepEqualErr(v168v1, v168v2, t, "equal-map-v168-p-nil") + // ... + if v == nil { + v168v2 = nil + } else { + v168v2 = make(map[uintptr]uint16, len(v)) + } // reset map + var v168v3, v168v4 typMapMapUintptrUint16 + v168v3 = typMapMapUintptrUint16(v168v1) + v168v4 = typMapMapUintptrUint16(v168v2) + bs168 = testMarshalErr(v168v3, h, t, "enc-map-v168-custom") + testUnmarshalErr(v168v4, bs168, h, t, "dec-map-v168-p-len") + testDeepEqualErr(v168v3, v168v4, t, "equal-map-v168-p-len") } - for _, v := range []map[uintptr]uint64{nil, map[uintptr]uint64{}, map[uintptr]uint64{10: 10}} { + for _, v := range []map[uintptr]uint32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v169: %v\n", v) - var v169v1, v169v2 map[uintptr]uint64 + var v169v1, v169v2 map[uintptr]uint32 v169v1 = v bs169 := testMarshalErr(v169v1, h, t, "enc-map-v169") - if v != nil { - v169v2 = make(map[uintptr]uint64, len(v)) - } + if v == nil { + v169v2 = nil + } else { + v169v2 = make(map[uintptr]uint32, len(v)) + } // reset map testUnmarshalErr(v169v2, bs169, h, t, "dec-map-v169") testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169") + if v == nil { + v169v2 = nil + } else { + v169v2 = make(map[uintptr]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v169v2), bs169, h, t, "dec-map-v169-noaddr") // decode into non-addressable map value + testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-noaddr") + if v == nil { + v169v2 = nil + } else { + v169v2 = make(map[uintptr]uint32, len(v)) + } // reset map + testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-len") + testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-len") bs169 = testMarshalErr(&v169v1, h, t, "enc-map-v169-p") v169v2 = nil - testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p") - testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p") + testUnmarshalErr(&v169v2, bs169, h, t, "dec-map-v169-p-nil") + testDeepEqualErr(v169v1, v169v2, t, "equal-map-v169-p-nil") + // ... + if v == nil { + v169v2 = nil + } else { + v169v2 = make(map[uintptr]uint32, len(v)) + } // reset map + var v169v3, v169v4 typMapMapUintptrUint32 + v169v3 = typMapMapUintptrUint32(v169v1) + v169v4 = typMapMapUintptrUint32(v169v2) + bs169 = testMarshalErr(v169v3, h, t, "enc-map-v169-custom") + testUnmarshalErr(v169v4, bs169, h, t, "dec-map-v169-p-len") + testDeepEqualErr(v169v3, v169v4, t, "equal-map-v169-p-len") } - for _, v := range []map[uintptr]uintptr{nil, map[uintptr]uintptr{}, map[uintptr]uintptr{10: 10}} { + for _, v := range []map[uintptr]uint64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v170: %v\n", v) - var v170v1, v170v2 map[uintptr]uintptr + var v170v1, v170v2 map[uintptr]uint64 v170v1 = v bs170 := testMarshalErr(v170v1, h, t, "enc-map-v170") - if v != nil { - v170v2 = make(map[uintptr]uintptr, len(v)) - } + if v == nil { + v170v2 = nil + } else { + v170v2 = make(map[uintptr]uint64, len(v)) + } // reset map testUnmarshalErr(v170v2, bs170, h, t, "dec-map-v170") testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170") + if v == nil { + v170v2 = nil + } else { + v170v2 = make(map[uintptr]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v170v2), bs170, h, t, "dec-map-v170-noaddr") // decode into non-addressable map value + testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-noaddr") + if v == nil { + v170v2 = nil + } else { + v170v2 = make(map[uintptr]uint64, len(v)) + } // reset map + testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-len") + testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-len") bs170 = testMarshalErr(&v170v1, h, t, "enc-map-v170-p") v170v2 = nil - testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p") - testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p") + testUnmarshalErr(&v170v2, bs170, h, t, "dec-map-v170-p-nil") + testDeepEqualErr(v170v1, v170v2, t, "equal-map-v170-p-nil") + // ... + if v == nil { + v170v2 = nil + } else { + v170v2 = make(map[uintptr]uint64, len(v)) + } // reset map + var v170v3, v170v4 typMapMapUintptrUint64 + v170v3 = typMapMapUintptrUint64(v170v1) + v170v4 = typMapMapUintptrUint64(v170v2) + bs170 = testMarshalErr(v170v3, h, t, "enc-map-v170-custom") + testUnmarshalErr(v170v4, bs170, h, t, "dec-map-v170-p-len") + testDeepEqualErr(v170v3, v170v4, t, "equal-map-v170-p-len") } - for _, v := range []map[uintptr]int{nil, map[uintptr]int{}, map[uintptr]int{10: 10}} { + for _, v := range []map[uintptr]uintptr{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v171: %v\n", v) - var v171v1, v171v2 map[uintptr]int + var v171v1, v171v2 map[uintptr]uintptr v171v1 = v bs171 := testMarshalErr(v171v1, h, t, "enc-map-v171") - if v != nil { - v171v2 = make(map[uintptr]int, len(v)) - } + if v == nil { + v171v2 = nil + } else { + v171v2 = make(map[uintptr]uintptr, len(v)) + } // reset map testUnmarshalErr(v171v2, bs171, h, t, "dec-map-v171") testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171") + if v == nil { + v171v2 = nil + } else { + v171v2 = make(map[uintptr]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v171v2), bs171, h, t, "dec-map-v171-noaddr") // decode into non-addressable map value + testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-noaddr") + if v == nil { + v171v2 = nil + } else { + v171v2 = make(map[uintptr]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-len") + testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-len") bs171 = testMarshalErr(&v171v1, h, t, "enc-map-v171-p") v171v2 = nil - testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p") - testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p") + testUnmarshalErr(&v171v2, bs171, h, t, "dec-map-v171-p-nil") + testDeepEqualErr(v171v1, v171v2, t, "equal-map-v171-p-nil") + // ... + if v == nil { + v171v2 = nil + } else { + v171v2 = make(map[uintptr]uintptr, len(v)) + } // reset map + var v171v3, v171v4 typMapMapUintptrUintptr + v171v3 = typMapMapUintptrUintptr(v171v1) + v171v4 = typMapMapUintptrUintptr(v171v2) + bs171 = testMarshalErr(v171v3, h, t, "enc-map-v171-custom") + testUnmarshalErr(v171v4, bs171, h, t, "dec-map-v171-p-len") + testDeepEqualErr(v171v3, v171v4, t, "equal-map-v171-p-len") } - for _, v := range []map[uintptr]int8{nil, map[uintptr]int8{}, map[uintptr]int8{10: 10}} { + for _, v := range []map[uintptr]int{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v172: %v\n", v) - var v172v1, v172v2 map[uintptr]int8 + var v172v1, v172v2 map[uintptr]int v172v1 = v bs172 := testMarshalErr(v172v1, h, t, "enc-map-v172") - if v != nil { - v172v2 = make(map[uintptr]int8, len(v)) - } + if v == nil { + v172v2 = nil + } else { + v172v2 = make(map[uintptr]int, len(v)) + } // reset map testUnmarshalErr(v172v2, bs172, h, t, "dec-map-v172") testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172") + if v == nil { + v172v2 = nil + } else { + v172v2 = make(map[uintptr]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v172v2), bs172, h, t, "dec-map-v172-noaddr") // decode into non-addressable map value + testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-noaddr") + if v == nil { + v172v2 = nil + } else { + v172v2 = make(map[uintptr]int, len(v)) + } // reset map + testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-len") + testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-len") bs172 = testMarshalErr(&v172v1, h, t, "enc-map-v172-p") v172v2 = nil - testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p") - testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p") + testUnmarshalErr(&v172v2, bs172, h, t, "dec-map-v172-p-nil") + testDeepEqualErr(v172v1, v172v2, t, "equal-map-v172-p-nil") + // ... + if v == nil { + v172v2 = nil + } else { + v172v2 = make(map[uintptr]int, len(v)) + } // reset map + var v172v3, v172v4 typMapMapUintptrInt + v172v3 = typMapMapUintptrInt(v172v1) + v172v4 = typMapMapUintptrInt(v172v2) + bs172 = testMarshalErr(v172v3, h, t, "enc-map-v172-custom") + testUnmarshalErr(v172v4, bs172, h, t, "dec-map-v172-p-len") + testDeepEqualErr(v172v3, v172v4, t, "equal-map-v172-p-len") } - for _, v := range []map[uintptr]int16{nil, map[uintptr]int16{}, map[uintptr]int16{10: 10}} { + for _, v := range []map[uintptr]int8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v173: %v\n", v) - var v173v1, v173v2 map[uintptr]int16 + var v173v1, v173v2 map[uintptr]int8 v173v1 = v bs173 := testMarshalErr(v173v1, h, t, "enc-map-v173") - if v != nil { - v173v2 = make(map[uintptr]int16, len(v)) - } + if v == nil { + v173v2 = nil + } else { + v173v2 = make(map[uintptr]int8, len(v)) + } // reset map testUnmarshalErr(v173v2, bs173, h, t, "dec-map-v173") testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173") + if v == nil { + v173v2 = nil + } else { + v173v2 = make(map[uintptr]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v173v2), bs173, h, t, "dec-map-v173-noaddr") // decode into non-addressable map value + testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-noaddr") + if v == nil { + v173v2 = nil + } else { + v173v2 = make(map[uintptr]int8, len(v)) + } // reset map + testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-len") + testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-len") bs173 = testMarshalErr(&v173v1, h, t, "enc-map-v173-p") v173v2 = nil - testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p") - testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p") + testUnmarshalErr(&v173v2, bs173, h, t, "dec-map-v173-p-nil") + testDeepEqualErr(v173v1, v173v2, t, "equal-map-v173-p-nil") + // ... + if v == nil { + v173v2 = nil + } else { + v173v2 = make(map[uintptr]int8, len(v)) + } // reset map + var v173v3, v173v4 typMapMapUintptrInt8 + v173v3 = typMapMapUintptrInt8(v173v1) + v173v4 = typMapMapUintptrInt8(v173v2) + bs173 = testMarshalErr(v173v3, h, t, "enc-map-v173-custom") + testUnmarshalErr(v173v4, bs173, h, t, "dec-map-v173-p-len") + testDeepEqualErr(v173v3, v173v4, t, "equal-map-v173-p-len") } - for _, v := range []map[uintptr]int32{nil, map[uintptr]int32{}, map[uintptr]int32{10: 10}} { + for _, v := range []map[uintptr]int16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v174: %v\n", v) - var v174v1, v174v2 map[uintptr]int32 + var v174v1, v174v2 map[uintptr]int16 v174v1 = v bs174 := testMarshalErr(v174v1, h, t, "enc-map-v174") - if v != nil { - v174v2 = make(map[uintptr]int32, len(v)) - } + if v == nil { + v174v2 = nil + } else { + v174v2 = make(map[uintptr]int16, len(v)) + } // reset map testUnmarshalErr(v174v2, bs174, h, t, "dec-map-v174") testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174") + if v == nil { + v174v2 = nil + } else { + v174v2 = make(map[uintptr]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v174v2), bs174, h, t, "dec-map-v174-noaddr") // decode into non-addressable map value + testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-noaddr") + if v == nil { + v174v2 = nil + } else { + v174v2 = make(map[uintptr]int16, len(v)) + } // reset map + testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-len") + testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-len") bs174 = testMarshalErr(&v174v1, h, t, "enc-map-v174-p") v174v2 = nil - testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p") - testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p") + testUnmarshalErr(&v174v2, bs174, h, t, "dec-map-v174-p-nil") + testDeepEqualErr(v174v1, v174v2, t, "equal-map-v174-p-nil") + // ... + if v == nil { + v174v2 = nil + } else { + v174v2 = make(map[uintptr]int16, len(v)) + } // reset map + var v174v3, v174v4 typMapMapUintptrInt16 + v174v3 = typMapMapUintptrInt16(v174v1) + v174v4 = typMapMapUintptrInt16(v174v2) + bs174 = testMarshalErr(v174v3, h, t, "enc-map-v174-custom") + testUnmarshalErr(v174v4, bs174, h, t, "dec-map-v174-p-len") + testDeepEqualErr(v174v3, v174v4, t, "equal-map-v174-p-len") } - for _, v := range []map[uintptr]int64{nil, map[uintptr]int64{}, map[uintptr]int64{10: 10}} { + for _, v := range []map[uintptr]int32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v175: %v\n", v) - var v175v1, v175v2 map[uintptr]int64 + var v175v1, v175v2 map[uintptr]int32 v175v1 = v bs175 := testMarshalErr(v175v1, h, t, "enc-map-v175") - if v != nil { - v175v2 = make(map[uintptr]int64, len(v)) - } + if v == nil { + v175v2 = nil + } else { + v175v2 = make(map[uintptr]int32, len(v)) + } // reset map testUnmarshalErr(v175v2, bs175, h, t, "dec-map-v175") testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175") + if v == nil { + v175v2 = nil + } else { + v175v2 = make(map[uintptr]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v175v2), bs175, h, t, "dec-map-v175-noaddr") // decode into non-addressable map value + testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-noaddr") + if v == nil { + v175v2 = nil + } else { + v175v2 = make(map[uintptr]int32, len(v)) + } // reset map + testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-len") + testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-len") bs175 = testMarshalErr(&v175v1, h, t, "enc-map-v175-p") v175v2 = nil - testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p") - testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p") + testUnmarshalErr(&v175v2, bs175, h, t, "dec-map-v175-p-nil") + testDeepEqualErr(v175v1, v175v2, t, "equal-map-v175-p-nil") + // ... + if v == nil { + v175v2 = nil + } else { + v175v2 = make(map[uintptr]int32, len(v)) + } // reset map + var v175v3, v175v4 typMapMapUintptrInt32 + v175v3 = typMapMapUintptrInt32(v175v1) + v175v4 = typMapMapUintptrInt32(v175v2) + bs175 = testMarshalErr(v175v3, h, t, "enc-map-v175-custom") + testUnmarshalErr(v175v4, bs175, h, t, "dec-map-v175-p-len") + testDeepEqualErr(v175v3, v175v4, t, "equal-map-v175-p-len") } - for _, v := range []map[uintptr]float32{nil, map[uintptr]float32{}, map[uintptr]float32{10: 10.1}} { + for _, v := range []map[uintptr]int64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v176: %v\n", v) - var v176v1, v176v2 map[uintptr]float32 + var v176v1, v176v2 map[uintptr]int64 v176v1 = v bs176 := testMarshalErr(v176v1, h, t, "enc-map-v176") - if v != nil { - v176v2 = make(map[uintptr]float32, len(v)) - } + if v == nil { + v176v2 = nil + } else { + v176v2 = make(map[uintptr]int64, len(v)) + } // reset map testUnmarshalErr(v176v2, bs176, h, t, "dec-map-v176") testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176") + if v == nil { + v176v2 = nil + } else { + v176v2 = make(map[uintptr]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v176v2), bs176, h, t, "dec-map-v176-noaddr") // decode into non-addressable map value + testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-noaddr") + if v == nil { + v176v2 = nil + } else { + v176v2 = make(map[uintptr]int64, len(v)) + } // reset map + testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-len") + testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-len") bs176 = testMarshalErr(&v176v1, h, t, "enc-map-v176-p") v176v2 = nil - testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p") - testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p") + testUnmarshalErr(&v176v2, bs176, h, t, "dec-map-v176-p-nil") + testDeepEqualErr(v176v1, v176v2, t, "equal-map-v176-p-nil") + // ... + if v == nil { + v176v2 = nil + } else { + v176v2 = make(map[uintptr]int64, len(v)) + } // reset map + var v176v3, v176v4 typMapMapUintptrInt64 + v176v3 = typMapMapUintptrInt64(v176v1) + v176v4 = typMapMapUintptrInt64(v176v2) + bs176 = testMarshalErr(v176v3, h, t, "enc-map-v176-custom") + testUnmarshalErr(v176v4, bs176, h, t, "dec-map-v176-p-len") + testDeepEqualErr(v176v3, v176v4, t, "equal-map-v176-p-len") } - for _, v := range []map[uintptr]float64{nil, map[uintptr]float64{}, map[uintptr]float64{10: 10.1}} { + for _, v := range []map[uintptr]float32{nil, {}, {44: 0, 33: 22.2}} { // fmt.Printf(">>>> running mammoth map v177: %v\n", v) - var v177v1, v177v2 map[uintptr]float64 + var v177v1, v177v2 map[uintptr]float32 v177v1 = v bs177 := testMarshalErr(v177v1, h, t, "enc-map-v177") - if v != nil { - v177v2 = make(map[uintptr]float64, len(v)) - } + if v == nil { + v177v2 = nil + } else { + v177v2 = make(map[uintptr]float32, len(v)) + } // reset map testUnmarshalErr(v177v2, bs177, h, t, "dec-map-v177") testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177") + if v == nil { + v177v2 = nil + } else { + v177v2 = make(map[uintptr]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v177v2), bs177, h, t, "dec-map-v177-noaddr") // decode into non-addressable map value + testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-noaddr") + if v == nil { + v177v2 = nil + } else { + v177v2 = make(map[uintptr]float32, len(v)) + } // reset map + testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-len") + testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-len") bs177 = testMarshalErr(&v177v1, h, t, "enc-map-v177-p") v177v2 = nil - testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p") - testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p") + testUnmarshalErr(&v177v2, bs177, h, t, "dec-map-v177-p-nil") + testDeepEqualErr(v177v1, v177v2, t, "equal-map-v177-p-nil") + // ... + if v == nil { + v177v2 = nil + } else { + v177v2 = make(map[uintptr]float32, len(v)) + } // reset map + var v177v3, v177v4 typMapMapUintptrFloat32 + v177v3 = typMapMapUintptrFloat32(v177v1) + v177v4 = typMapMapUintptrFloat32(v177v2) + bs177 = testMarshalErr(v177v3, h, t, "enc-map-v177-custom") + testUnmarshalErr(v177v4, bs177, h, t, "dec-map-v177-p-len") + testDeepEqualErr(v177v3, v177v4, t, "equal-map-v177-p-len") } - for _, v := range []map[uintptr]bool{nil, map[uintptr]bool{}, map[uintptr]bool{10: true}} { + for _, v := range []map[uintptr]float64{nil, {}, {44: 0, 33: 11.1}} { // fmt.Printf(">>>> running mammoth map v178: %v\n", v) - var v178v1, v178v2 map[uintptr]bool + var v178v1, v178v2 map[uintptr]float64 v178v1 = v bs178 := testMarshalErr(v178v1, h, t, "enc-map-v178") - if v != nil { - v178v2 = make(map[uintptr]bool, len(v)) - } + if v == nil { + v178v2 = nil + } else { + v178v2 = make(map[uintptr]float64, len(v)) + } // reset map testUnmarshalErr(v178v2, bs178, h, t, "dec-map-v178") testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178") + if v == nil { + v178v2 = nil + } else { + v178v2 = make(map[uintptr]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v178v2), bs178, h, t, "dec-map-v178-noaddr") // decode into non-addressable map value + testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-noaddr") + if v == nil { + v178v2 = nil + } else { + v178v2 = make(map[uintptr]float64, len(v)) + } // reset map + testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-len") + testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-len") bs178 = testMarshalErr(&v178v1, h, t, "enc-map-v178-p") v178v2 = nil - testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p") - testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p") + testUnmarshalErr(&v178v2, bs178, h, t, "dec-map-v178-p-nil") + testDeepEqualErr(v178v1, v178v2, t, "equal-map-v178-p-nil") + // ... + if v == nil { + v178v2 = nil + } else { + v178v2 = make(map[uintptr]float64, len(v)) + } // reset map + var v178v3, v178v4 typMapMapUintptrFloat64 + v178v3 = typMapMapUintptrFloat64(v178v1) + v178v4 = typMapMapUintptrFloat64(v178v2) + bs178 = testMarshalErr(v178v3, h, t, "enc-map-v178-custom") + testUnmarshalErr(v178v4, bs178, h, t, "dec-map-v178-p-len") + testDeepEqualErr(v178v3, v178v4, t, "equal-map-v178-p-len") } - for _, v := range []map[int]interface{}{nil, map[int]interface{}{}, map[int]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v181: %v\n", v) - var v181v1, v181v2 map[int]interface{} - v181v1 = v - bs181 := testMarshalErr(v181v1, h, t, "enc-map-v181") - if v != nil { - v181v2 = make(map[int]interface{}, len(v)) - } - testUnmarshalErr(v181v2, bs181, h, t, "dec-map-v181") - testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181") - bs181 = testMarshalErr(&v181v1, h, t, "enc-map-v181-p") - v181v2 = nil - testUnmarshalErr(&v181v2, bs181, h, t, "dec-map-v181-p") - testDeepEqualErr(v181v1, v181v2, t, "equal-map-v181-p") + for _, v := range []map[uintptr]bool{nil, {}, {44: false, 33: true}} { + // fmt.Printf(">>>> running mammoth map v179: %v\n", v) + var v179v1, v179v2 map[uintptr]bool + v179v1 = v + bs179 := testMarshalErr(v179v1, h, t, "enc-map-v179") + if v == nil { + v179v2 = nil + } else { + v179v2 = make(map[uintptr]bool, len(v)) + } // reset map + testUnmarshalErr(v179v2, bs179, h, t, "dec-map-v179") + testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179") + if v == nil { + v179v2 = nil + } else { + v179v2 = make(map[uintptr]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v179v2), bs179, h, t, "dec-map-v179-noaddr") // decode into non-addressable map value + testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-noaddr") + if v == nil { + v179v2 = nil + } else { + v179v2 = make(map[uintptr]bool, len(v)) + } // reset map + testUnmarshalErr(&v179v2, bs179, h, t, "dec-map-v179-p-len") + testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-p-len") + bs179 = testMarshalErr(&v179v1, h, t, "enc-map-v179-p") + v179v2 = nil + testUnmarshalErr(&v179v2, bs179, h, t, "dec-map-v179-p-nil") + testDeepEqualErr(v179v1, v179v2, t, "equal-map-v179-p-nil") + // ... + if v == nil { + v179v2 = nil + } else { + v179v2 = make(map[uintptr]bool, len(v)) + } // reset map + var v179v3, v179v4 typMapMapUintptrBool + v179v3 = typMapMapUintptrBool(v179v1) + v179v4 = typMapMapUintptrBool(v179v2) + bs179 = testMarshalErr(v179v3, h, t, "enc-map-v179-custom") + testUnmarshalErr(v179v4, bs179, h, t, "dec-map-v179-p-len") + testDeepEqualErr(v179v3, v179v4, t, "equal-map-v179-p-len") } - for _, v := range []map[int]string{nil, map[int]string{}, map[int]string{10: "some-string"}} { + for _, v := range []map[int]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v182: %v\n", v) - var v182v1, v182v2 map[int]string + var v182v1, v182v2 map[int]interface{} v182v1 = v bs182 := testMarshalErr(v182v1, h, t, "enc-map-v182") - if v != nil { - v182v2 = make(map[int]string, len(v)) - } + if v == nil { + v182v2 = nil + } else { + v182v2 = make(map[int]interface{}, len(v)) + } // reset map testUnmarshalErr(v182v2, bs182, h, t, "dec-map-v182") testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182") + if v == nil { + v182v2 = nil + } else { + v182v2 = make(map[int]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v182v2), bs182, h, t, "dec-map-v182-noaddr") // decode into non-addressable map value + testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-noaddr") + if v == nil { + v182v2 = nil + } else { + v182v2 = make(map[int]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-len") + testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-len") bs182 = testMarshalErr(&v182v1, h, t, "enc-map-v182-p") v182v2 = nil - testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p") - testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p") + testUnmarshalErr(&v182v2, bs182, h, t, "dec-map-v182-p-nil") + testDeepEqualErr(v182v1, v182v2, t, "equal-map-v182-p-nil") + // ... + if v == nil { + v182v2 = nil + } else { + v182v2 = make(map[int]interface{}, len(v)) + } // reset map + var v182v3, v182v4 typMapMapIntIntf + v182v3 = typMapMapIntIntf(v182v1) + v182v4 = typMapMapIntIntf(v182v2) + bs182 = testMarshalErr(v182v3, h, t, "enc-map-v182-custom") + testUnmarshalErr(v182v4, bs182, h, t, "dec-map-v182-p-len") + testDeepEqualErr(v182v3, v182v4, t, "equal-map-v182-p-len") } - for _, v := range []map[int]uint{nil, map[int]uint{}, map[int]uint{10: 10}} { + for _, v := range []map[int]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v183: %v\n", v) - var v183v1, v183v2 map[int]uint + var v183v1, v183v2 map[int]string v183v1 = v bs183 := testMarshalErr(v183v1, h, t, "enc-map-v183") - if v != nil { - v183v2 = make(map[int]uint, len(v)) - } + if v == nil { + v183v2 = nil + } else { + v183v2 = make(map[int]string, len(v)) + } // reset map testUnmarshalErr(v183v2, bs183, h, t, "dec-map-v183") testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183") + if v == nil { + v183v2 = nil + } else { + v183v2 = make(map[int]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v183v2), bs183, h, t, "dec-map-v183-noaddr") // decode into non-addressable map value + testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-noaddr") + if v == nil { + v183v2 = nil + } else { + v183v2 = make(map[int]string, len(v)) + } // reset map + testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-len") + testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-len") bs183 = testMarshalErr(&v183v1, h, t, "enc-map-v183-p") v183v2 = nil - testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p") - testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p") + testUnmarshalErr(&v183v2, bs183, h, t, "dec-map-v183-p-nil") + testDeepEqualErr(v183v1, v183v2, t, "equal-map-v183-p-nil") + // ... + if v == nil { + v183v2 = nil + } else { + v183v2 = make(map[int]string, len(v)) + } // reset map + var v183v3, v183v4 typMapMapIntString + v183v3 = typMapMapIntString(v183v1) + v183v4 = typMapMapIntString(v183v2) + bs183 = testMarshalErr(v183v3, h, t, "enc-map-v183-custom") + testUnmarshalErr(v183v4, bs183, h, t, "dec-map-v183-p-len") + testDeepEqualErr(v183v3, v183v4, t, "equal-map-v183-p-len") } - for _, v := range []map[int]uint8{nil, map[int]uint8{}, map[int]uint8{10: 10}} { + for _, v := range []map[int]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v184: %v\n", v) - var v184v1, v184v2 map[int]uint8 + var v184v1, v184v2 map[int]uint v184v1 = v bs184 := testMarshalErr(v184v1, h, t, "enc-map-v184") - if v != nil { - v184v2 = make(map[int]uint8, len(v)) - } + if v == nil { + v184v2 = nil + } else { + v184v2 = make(map[int]uint, len(v)) + } // reset map testUnmarshalErr(v184v2, bs184, h, t, "dec-map-v184") testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184") + if v == nil { + v184v2 = nil + } else { + v184v2 = make(map[int]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v184v2), bs184, h, t, "dec-map-v184-noaddr") // decode into non-addressable map value + testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-noaddr") + if v == nil { + v184v2 = nil + } else { + v184v2 = make(map[int]uint, len(v)) + } // reset map + testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-len") + testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-len") bs184 = testMarshalErr(&v184v1, h, t, "enc-map-v184-p") v184v2 = nil - testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p") - testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p") + testUnmarshalErr(&v184v2, bs184, h, t, "dec-map-v184-p-nil") + testDeepEqualErr(v184v1, v184v2, t, "equal-map-v184-p-nil") + // ... + if v == nil { + v184v2 = nil + } else { + v184v2 = make(map[int]uint, len(v)) + } // reset map + var v184v3, v184v4 typMapMapIntUint + v184v3 = typMapMapIntUint(v184v1) + v184v4 = typMapMapIntUint(v184v2) + bs184 = testMarshalErr(v184v3, h, t, "enc-map-v184-custom") + testUnmarshalErr(v184v4, bs184, h, t, "dec-map-v184-p-len") + testDeepEqualErr(v184v3, v184v4, t, "equal-map-v184-p-len") } - for _, v := range []map[int]uint16{nil, map[int]uint16{}, map[int]uint16{10: 10}} { + for _, v := range []map[int]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v185: %v\n", v) - var v185v1, v185v2 map[int]uint16 + var v185v1, v185v2 map[int]uint8 v185v1 = v bs185 := testMarshalErr(v185v1, h, t, "enc-map-v185") - if v != nil { - v185v2 = make(map[int]uint16, len(v)) - } + if v == nil { + v185v2 = nil + } else { + v185v2 = make(map[int]uint8, len(v)) + } // reset map testUnmarshalErr(v185v2, bs185, h, t, "dec-map-v185") testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185") + if v == nil { + v185v2 = nil + } else { + v185v2 = make(map[int]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v185v2), bs185, h, t, "dec-map-v185-noaddr") // decode into non-addressable map value + testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-noaddr") + if v == nil { + v185v2 = nil + } else { + v185v2 = make(map[int]uint8, len(v)) + } // reset map + testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-len") + testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-len") bs185 = testMarshalErr(&v185v1, h, t, "enc-map-v185-p") v185v2 = nil - testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p") - testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p") + testUnmarshalErr(&v185v2, bs185, h, t, "dec-map-v185-p-nil") + testDeepEqualErr(v185v1, v185v2, t, "equal-map-v185-p-nil") + // ... + if v == nil { + v185v2 = nil + } else { + v185v2 = make(map[int]uint8, len(v)) + } // reset map + var v185v3, v185v4 typMapMapIntUint8 + v185v3 = typMapMapIntUint8(v185v1) + v185v4 = typMapMapIntUint8(v185v2) + bs185 = testMarshalErr(v185v3, h, t, "enc-map-v185-custom") + testUnmarshalErr(v185v4, bs185, h, t, "dec-map-v185-p-len") + testDeepEqualErr(v185v3, v185v4, t, "equal-map-v185-p-len") } - for _, v := range []map[int]uint32{nil, map[int]uint32{}, map[int]uint32{10: 10}} { + for _, v := range []map[int]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v186: %v\n", v) - var v186v1, v186v2 map[int]uint32 + var v186v1, v186v2 map[int]uint16 v186v1 = v bs186 := testMarshalErr(v186v1, h, t, "enc-map-v186") - if v != nil { - v186v2 = make(map[int]uint32, len(v)) - } + if v == nil { + v186v2 = nil + } else { + v186v2 = make(map[int]uint16, len(v)) + } // reset map testUnmarshalErr(v186v2, bs186, h, t, "dec-map-v186") testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186") + if v == nil { + v186v2 = nil + } else { + v186v2 = make(map[int]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v186v2), bs186, h, t, "dec-map-v186-noaddr") // decode into non-addressable map value + testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-noaddr") + if v == nil { + v186v2 = nil + } else { + v186v2 = make(map[int]uint16, len(v)) + } // reset map + testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-len") + testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-len") bs186 = testMarshalErr(&v186v1, h, t, "enc-map-v186-p") v186v2 = nil - testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p") - testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p") + testUnmarshalErr(&v186v2, bs186, h, t, "dec-map-v186-p-nil") + testDeepEqualErr(v186v1, v186v2, t, "equal-map-v186-p-nil") + // ... + if v == nil { + v186v2 = nil + } else { + v186v2 = make(map[int]uint16, len(v)) + } // reset map + var v186v3, v186v4 typMapMapIntUint16 + v186v3 = typMapMapIntUint16(v186v1) + v186v4 = typMapMapIntUint16(v186v2) + bs186 = testMarshalErr(v186v3, h, t, "enc-map-v186-custom") + testUnmarshalErr(v186v4, bs186, h, t, "dec-map-v186-p-len") + testDeepEqualErr(v186v3, v186v4, t, "equal-map-v186-p-len") } - for _, v := range []map[int]uint64{nil, map[int]uint64{}, map[int]uint64{10: 10}} { + for _, v := range []map[int]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v187: %v\n", v) - var v187v1, v187v2 map[int]uint64 + var v187v1, v187v2 map[int]uint32 v187v1 = v bs187 := testMarshalErr(v187v1, h, t, "enc-map-v187") - if v != nil { - v187v2 = make(map[int]uint64, len(v)) - } + if v == nil { + v187v2 = nil + } else { + v187v2 = make(map[int]uint32, len(v)) + } // reset map testUnmarshalErr(v187v2, bs187, h, t, "dec-map-v187") testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187") + if v == nil { + v187v2 = nil + } else { + v187v2 = make(map[int]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v187v2), bs187, h, t, "dec-map-v187-noaddr") // decode into non-addressable map value + testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-noaddr") + if v == nil { + v187v2 = nil + } else { + v187v2 = make(map[int]uint32, len(v)) + } // reset map + testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-len") + testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-len") bs187 = testMarshalErr(&v187v1, h, t, "enc-map-v187-p") v187v2 = nil - testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p") - testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p") + testUnmarshalErr(&v187v2, bs187, h, t, "dec-map-v187-p-nil") + testDeepEqualErr(v187v1, v187v2, t, "equal-map-v187-p-nil") + // ... + if v == nil { + v187v2 = nil + } else { + v187v2 = make(map[int]uint32, len(v)) + } // reset map + var v187v3, v187v4 typMapMapIntUint32 + v187v3 = typMapMapIntUint32(v187v1) + v187v4 = typMapMapIntUint32(v187v2) + bs187 = testMarshalErr(v187v3, h, t, "enc-map-v187-custom") + testUnmarshalErr(v187v4, bs187, h, t, "dec-map-v187-p-len") + testDeepEqualErr(v187v3, v187v4, t, "equal-map-v187-p-len") } - for _, v := range []map[int]uintptr{nil, map[int]uintptr{}, map[int]uintptr{10: 10}} { + for _, v := range []map[int]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v188: %v\n", v) - var v188v1, v188v2 map[int]uintptr + var v188v1, v188v2 map[int]uint64 v188v1 = v bs188 := testMarshalErr(v188v1, h, t, "enc-map-v188") - if v != nil { - v188v2 = make(map[int]uintptr, len(v)) - } + if v == nil { + v188v2 = nil + } else { + v188v2 = make(map[int]uint64, len(v)) + } // reset map testUnmarshalErr(v188v2, bs188, h, t, "dec-map-v188") testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188") + if v == nil { + v188v2 = nil + } else { + v188v2 = make(map[int]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v188v2), bs188, h, t, "dec-map-v188-noaddr") // decode into non-addressable map value + testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-noaddr") + if v == nil { + v188v2 = nil + } else { + v188v2 = make(map[int]uint64, len(v)) + } // reset map + testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-len") + testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-len") bs188 = testMarshalErr(&v188v1, h, t, "enc-map-v188-p") v188v2 = nil - testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p") - testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p") + testUnmarshalErr(&v188v2, bs188, h, t, "dec-map-v188-p-nil") + testDeepEqualErr(v188v1, v188v2, t, "equal-map-v188-p-nil") + // ... + if v == nil { + v188v2 = nil + } else { + v188v2 = make(map[int]uint64, len(v)) + } // reset map + var v188v3, v188v4 typMapMapIntUint64 + v188v3 = typMapMapIntUint64(v188v1) + v188v4 = typMapMapIntUint64(v188v2) + bs188 = testMarshalErr(v188v3, h, t, "enc-map-v188-custom") + testUnmarshalErr(v188v4, bs188, h, t, "dec-map-v188-p-len") + testDeepEqualErr(v188v3, v188v4, t, "equal-map-v188-p-len") } - for _, v := range []map[int]int{nil, map[int]int{}, map[int]int{10: 10}} { + for _, v := range []map[int]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v189: %v\n", v) - var v189v1, v189v2 map[int]int + var v189v1, v189v2 map[int]uintptr v189v1 = v bs189 := testMarshalErr(v189v1, h, t, "enc-map-v189") - if v != nil { - v189v2 = make(map[int]int, len(v)) - } + if v == nil { + v189v2 = nil + } else { + v189v2 = make(map[int]uintptr, len(v)) + } // reset map testUnmarshalErr(v189v2, bs189, h, t, "dec-map-v189") testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189") + if v == nil { + v189v2 = nil + } else { + v189v2 = make(map[int]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v189v2), bs189, h, t, "dec-map-v189-noaddr") // decode into non-addressable map value + testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-noaddr") + if v == nil { + v189v2 = nil + } else { + v189v2 = make(map[int]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-len") + testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-len") bs189 = testMarshalErr(&v189v1, h, t, "enc-map-v189-p") v189v2 = nil - testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p") - testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p") + testUnmarshalErr(&v189v2, bs189, h, t, "dec-map-v189-p-nil") + testDeepEqualErr(v189v1, v189v2, t, "equal-map-v189-p-nil") + // ... + if v == nil { + v189v2 = nil + } else { + v189v2 = make(map[int]uintptr, len(v)) + } // reset map + var v189v3, v189v4 typMapMapIntUintptr + v189v3 = typMapMapIntUintptr(v189v1) + v189v4 = typMapMapIntUintptr(v189v2) + bs189 = testMarshalErr(v189v3, h, t, "enc-map-v189-custom") + testUnmarshalErr(v189v4, bs189, h, t, "dec-map-v189-p-len") + testDeepEqualErr(v189v3, v189v4, t, "equal-map-v189-p-len") } - for _, v := range []map[int]int8{nil, map[int]int8{}, map[int]int8{10: 10}} { + for _, v := range []map[int]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v190: %v\n", v) - var v190v1, v190v2 map[int]int8 + var v190v1, v190v2 map[int]int v190v1 = v bs190 := testMarshalErr(v190v1, h, t, "enc-map-v190") - if v != nil { - v190v2 = make(map[int]int8, len(v)) - } + if v == nil { + v190v2 = nil + } else { + v190v2 = make(map[int]int, len(v)) + } // reset map testUnmarshalErr(v190v2, bs190, h, t, "dec-map-v190") testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190") + if v == nil { + v190v2 = nil + } else { + v190v2 = make(map[int]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v190v2), bs190, h, t, "dec-map-v190-noaddr") // decode into non-addressable map value + testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-noaddr") + if v == nil { + v190v2 = nil + } else { + v190v2 = make(map[int]int, len(v)) + } // reset map + testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-len") + testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-len") bs190 = testMarshalErr(&v190v1, h, t, "enc-map-v190-p") v190v2 = nil - testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p") - testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p") + testUnmarshalErr(&v190v2, bs190, h, t, "dec-map-v190-p-nil") + testDeepEqualErr(v190v1, v190v2, t, "equal-map-v190-p-nil") + // ... + if v == nil { + v190v2 = nil + } else { + v190v2 = make(map[int]int, len(v)) + } // reset map + var v190v3, v190v4 typMapMapIntInt + v190v3 = typMapMapIntInt(v190v1) + v190v4 = typMapMapIntInt(v190v2) + bs190 = testMarshalErr(v190v3, h, t, "enc-map-v190-custom") + testUnmarshalErr(v190v4, bs190, h, t, "dec-map-v190-p-len") + testDeepEqualErr(v190v3, v190v4, t, "equal-map-v190-p-len") } - for _, v := range []map[int]int16{nil, map[int]int16{}, map[int]int16{10: 10}} { + for _, v := range []map[int]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v191: %v\n", v) - var v191v1, v191v2 map[int]int16 + var v191v1, v191v2 map[int]int8 v191v1 = v bs191 := testMarshalErr(v191v1, h, t, "enc-map-v191") - if v != nil { - v191v2 = make(map[int]int16, len(v)) - } + if v == nil { + v191v2 = nil + } else { + v191v2 = make(map[int]int8, len(v)) + } // reset map testUnmarshalErr(v191v2, bs191, h, t, "dec-map-v191") testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191") + if v == nil { + v191v2 = nil + } else { + v191v2 = make(map[int]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v191v2), bs191, h, t, "dec-map-v191-noaddr") // decode into non-addressable map value + testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-noaddr") + if v == nil { + v191v2 = nil + } else { + v191v2 = make(map[int]int8, len(v)) + } // reset map + testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-len") + testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-len") bs191 = testMarshalErr(&v191v1, h, t, "enc-map-v191-p") v191v2 = nil - testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p") - testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p") + testUnmarshalErr(&v191v2, bs191, h, t, "dec-map-v191-p-nil") + testDeepEqualErr(v191v1, v191v2, t, "equal-map-v191-p-nil") + // ... + if v == nil { + v191v2 = nil + } else { + v191v2 = make(map[int]int8, len(v)) + } // reset map + var v191v3, v191v4 typMapMapIntInt8 + v191v3 = typMapMapIntInt8(v191v1) + v191v4 = typMapMapIntInt8(v191v2) + bs191 = testMarshalErr(v191v3, h, t, "enc-map-v191-custom") + testUnmarshalErr(v191v4, bs191, h, t, "dec-map-v191-p-len") + testDeepEqualErr(v191v3, v191v4, t, "equal-map-v191-p-len") } - for _, v := range []map[int]int32{nil, map[int]int32{}, map[int]int32{10: 10}} { + for _, v := range []map[int]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v192: %v\n", v) - var v192v1, v192v2 map[int]int32 + var v192v1, v192v2 map[int]int16 v192v1 = v bs192 := testMarshalErr(v192v1, h, t, "enc-map-v192") - if v != nil { - v192v2 = make(map[int]int32, len(v)) - } + if v == nil { + v192v2 = nil + } else { + v192v2 = make(map[int]int16, len(v)) + } // reset map testUnmarshalErr(v192v2, bs192, h, t, "dec-map-v192") testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192") + if v == nil { + v192v2 = nil + } else { + v192v2 = make(map[int]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v192v2), bs192, h, t, "dec-map-v192-noaddr") // decode into non-addressable map value + testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-noaddr") + if v == nil { + v192v2 = nil + } else { + v192v2 = make(map[int]int16, len(v)) + } // reset map + testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-len") + testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-len") bs192 = testMarshalErr(&v192v1, h, t, "enc-map-v192-p") v192v2 = nil - testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p") - testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p") + testUnmarshalErr(&v192v2, bs192, h, t, "dec-map-v192-p-nil") + testDeepEqualErr(v192v1, v192v2, t, "equal-map-v192-p-nil") + // ... + if v == nil { + v192v2 = nil + } else { + v192v2 = make(map[int]int16, len(v)) + } // reset map + var v192v3, v192v4 typMapMapIntInt16 + v192v3 = typMapMapIntInt16(v192v1) + v192v4 = typMapMapIntInt16(v192v2) + bs192 = testMarshalErr(v192v3, h, t, "enc-map-v192-custom") + testUnmarshalErr(v192v4, bs192, h, t, "dec-map-v192-p-len") + testDeepEqualErr(v192v3, v192v4, t, "equal-map-v192-p-len") } - for _, v := range []map[int]int64{nil, map[int]int64{}, map[int]int64{10: 10}} { + for _, v := range []map[int]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v193: %v\n", v) - var v193v1, v193v2 map[int]int64 + var v193v1, v193v2 map[int]int32 v193v1 = v bs193 := testMarshalErr(v193v1, h, t, "enc-map-v193") - if v != nil { - v193v2 = make(map[int]int64, len(v)) - } + if v == nil { + v193v2 = nil + } else { + v193v2 = make(map[int]int32, len(v)) + } // reset map testUnmarshalErr(v193v2, bs193, h, t, "dec-map-v193") testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193") + if v == nil { + v193v2 = nil + } else { + v193v2 = make(map[int]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v193v2), bs193, h, t, "dec-map-v193-noaddr") // decode into non-addressable map value + testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-noaddr") + if v == nil { + v193v2 = nil + } else { + v193v2 = make(map[int]int32, len(v)) + } // reset map + testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-len") + testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-len") bs193 = testMarshalErr(&v193v1, h, t, "enc-map-v193-p") v193v2 = nil - testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p") - testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p") + testUnmarshalErr(&v193v2, bs193, h, t, "dec-map-v193-p-nil") + testDeepEqualErr(v193v1, v193v2, t, "equal-map-v193-p-nil") + // ... + if v == nil { + v193v2 = nil + } else { + v193v2 = make(map[int]int32, len(v)) + } // reset map + var v193v3, v193v4 typMapMapIntInt32 + v193v3 = typMapMapIntInt32(v193v1) + v193v4 = typMapMapIntInt32(v193v2) + bs193 = testMarshalErr(v193v3, h, t, "enc-map-v193-custom") + testUnmarshalErr(v193v4, bs193, h, t, "dec-map-v193-p-len") + testDeepEqualErr(v193v3, v193v4, t, "equal-map-v193-p-len") } - for _, v := range []map[int]float32{nil, map[int]float32{}, map[int]float32{10: 10.1}} { + for _, v := range []map[int]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v194: %v\n", v) - var v194v1, v194v2 map[int]float32 + var v194v1, v194v2 map[int]int64 v194v1 = v bs194 := testMarshalErr(v194v1, h, t, "enc-map-v194") - if v != nil { - v194v2 = make(map[int]float32, len(v)) - } + if v == nil { + v194v2 = nil + } else { + v194v2 = make(map[int]int64, len(v)) + } // reset map testUnmarshalErr(v194v2, bs194, h, t, "dec-map-v194") testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194") + if v == nil { + v194v2 = nil + } else { + v194v2 = make(map[int]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v194v2), bs194, h, t, "dec-map-v194-noaddr") // decode into non-addressable map value + testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-noaddr") + if v == nil { + v194v2 = nil + } else { + v194v2 = make(map[int]int64, len(v)) + } // reset map + testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-len") + testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-len") bs194 = testMarshalErr(&v194v1, h, t, "enc-map-v194-p") v194v2 = nil - testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p") - testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p") + testUnmarshalErr(&v194v2, bs194, h, t, "dec-map-v194-p-nil") + testDeepEqualErr(v194v1, v194v2, t, "equal-map-v194-p-nil") + // ... + if v == nil { + v194v2 = nil + } else { + v194v2 = make(map[int]int64, len(v)) + } // reset map + var v194v3, v194v4 typMapMapIntInt64 + v194v3 = typMapMapIntInt64(v194v1) + v194v4 = typMapMapIntInt64(v194v2) + bs194 = testMarshalErr(v194v3, h, t, "enc-map-v194-custom") + testUnmarshalErr(v194v4, bs194, h, t, "dec-map-v194-p-len") + testDeepEqualErr(v194v3, v194v4, t, "equal-map-v194-p-len") } - for _, v := range []map[int]float64{nil, map[int]float64{}, map[int]float64{10: 10.1}} { + for _, v := range []map[int]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v195: %v\n", v) - var v195v1, v195v2 map[int]float64 + var v195v1, v195v2 map[int]float32 v195v1 = v bs195 := testMarshalErr(v195v1, h, t, "enc-map-v195") - if v != nil { - v195v2 = make(map[int]float64, len(v)) - } + if v == nil { + v195v2 = nil + } else { + v195v2 = make(map[int]float32, len(v)) + } // reset map testUnmarshalErr(v195v2, bs195, h, t, "dec-map-v195") testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195") + if v == nil { + v195v2 = nil + } else { + v195v2 = make(map[int]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v195v2), bs195, h, t, "dec-map-v195-noaddr") // decode into non-addressable map value + testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-noaddr") + if v == nil { + v195v2 = nil + } else { + v195v2 = make(map[int]float32, len(v)) + } // reset map + testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-len") + testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-len") bs195 = testMarshalErr(&v195v1, h, t, "enc-map-v195-p") v195v2 = nil - testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p") - testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p") + testUnmarshalErr(&v195v2, bs195, h, t, "dec-map-v195-p-nil") + testDeepEqualErr(v195v1, v195v2, t, "equal-map-v195-p-nil") + // ... + if v == nil { + v195v2 = nil + } else { + v195v2 = make(map[int]float32, len(v)) + } // reset map + var v195v3, v195v4 typMapMapIntFloat32 + v195v3 = typMapMapIntFloat32(v195v1) + v195v4 = typMapMapIntFloat32(v195v2) + bs195 = testMarshalErr(v195v3, h, t, "enc-map-v195-custom") + testUnmarshalErr(v195v4, bs195, h, t, "dec-map-v195-p-len") + testDeepEqualErr(v195v3, v195v4, t, "equal-map-v195-p-len") } - for _, v := range []map[int]bool{nil, map[int]bool{}, map[int]bool{10: true}} { + for _, v := range []map[int]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v196: %v\n", v) - var v196v1, v196v2 map[int]bool + var v196v1, v196v2 map[int]float64 v196v1 = v bs196 := testMarshalErr(v196v1, h, t, "enc-map-v196") - if v != nil { - v196v2 = make(map[int]bool, len(v)) - } + if v == nil { + v196v2 = nil + } else { + v196v2 = make(map[int]float64, len(v)) + } // reset map testUnmarshalErr(v196v2, bs196, h, t, "dec-map-v196") testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196") + if v == nil { + v196v2 = nil + } else { + v196v2 = make(map[int]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v196v2), bs196, h, t, "dec-map-v196-noaddr") // decode into non-addressable map value + testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-noaddr") + if v == nil { + v196v2 = nil + } else { + v196v2 = make(map[int]float64, len(v)) + } // reset map + testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-len") + testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-len") bs196 = testMarshalErr(&v196v1, h, t, "enc-map-v196-p") v196v2 = nil - testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p") - testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p") + testUnmarshalErr(&v196v2, bs196, h, t, "dec-map-v196-p-nil") + testDeepEqualErr(v196v1, v196v2, t, "equal-map-v196-p-nil") + // ... + if v == nil { + v196v2 = nil + } else { + v196v2 = make(map[int]float64, len(v)) + } // reset map + var v196v3, v196v4 typMapMapIntFloat64 + v196v3 = typMapMapIntFloat64(v196v1) + v196v4 = typMapMapIntFloat64(v196v2) + bs196 = testMarshalErr(v196v3, h, t, "enc-map-v196-custom") + testUnmarshalErr(v196v4, bs196, h, t, "dec-map-v196-p-len") + testDeepEqualErr(v196v3, v196v4, t, "equal-map-v196-p-len") } - for _, v := range []map[int8]interface{}{nil, map[int8]interface{}{}, map[int8]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v199: %v\n", v) - var v199v1, v199v2 map[int8]interface{} - v199v1 = v - bs199 := testMarshalErr(v199v1, h, t, "enc-map-v199") - if v != nil { - v199v2 = make(map[int8]interface{}, len(v)) - } - testUnmarshalErr(v199v2, bs199, h, t, "dec-map-v199") - testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199") - bs199 = testMarshalErr(&v199v1, h, t, "enc-map-v199-p") - v199v2 = nil - testUnmarshalErr(&v199v2, bs199, h, t, "dec-map-v199-p") - testDeepEqualErr(v199v1, v199v2, t, "equal-map-v199-p") + for _, v := range []map[int]bool{nil, {}, {33: false, 44: true}} { + // fmt.Printf(">>>> running mammoth map v197: %v\n", v) + var v197v1, v197v2 map[int]bool + v197v1 = v + bs197 := testMarshalErr(v197v1, h, t, "enc-map-v197") + if v == nil { + v197v2 = nil + } else { + v197v2 = make(map[int]bool, len(v)) + } // reset map + testUnmarshalErr(v197v2, bs197, h, t, "dec-map-v197") + testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197") + if v == nil { + v197v2 = nil + } else { + v197v2 = make(map[int]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v197v2), bs197, h, t, "dec-map-v197-noaddr") // decode into non-addressable map value + testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-noaddr") + if v == nil { + v197v2 = nil + } else { + v197v2 = make(map[int]bool, len(v)) + } // reset map + testUnmarshalErr(&v197v2, bs197, h, t, "dec-map-v197-p-len") + testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-p-len") + bs197 = testMarshalErr(&v197v1, h, t, "enc-map-v197-p") + v197v2 = nil + testUnmarshalErr(&v197v2, bs197, h, t, "dec-map-v197-p-nil") + testDeepEqualErr(v197v1, v197v2, t, "equal-map-v197-p-nil") + // ... + if v == nil { + v197v2 = nil + } else { + v197v2 = make(map[int]bool, len(v)) + } // reset map + var v197v3, v197v4 typMapMapIntBool + v197v3 = typMapMapIntBool(v197v1) + v197v4 = typMapMapIntBool(v197v2) + bs197 = testMarshalErr(v197v3, h, t, "enc-map-v197-custom") + testUnmarshalErr(v197v4, bs197, h, t, "dec-map-v197-p-len") + testDeepEqualErr(v197v3, v197v4, t, "equal-map-v197-p-len") } - for _, v := range []map[int8]string{nil, map[int8]string{}, map[int8]string{10: "some-string"}} { + for _, v := range []map[int8]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v200: %v\n", v) - var v200v1, v200v2 map[int8]string + var v200v1, v200v2 map[int8]interface{} v200v1 = v bs200 := testMarshalErr(v200v1, h, t, "enc-map-v200") - if v != nil { - v200v2 = make(map[int8]string, len(v)) - } + if v == nil { + v200v2 = nil + } else { + v200v2 = make(map[int8]interface{}, len(v)) + } // reset map testUnmarshalErr(v200v2, bs200, h, t, "dec-map-v200") testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200") + if v == nil { + v200v2 = nil + } else { + v200v2 = make(map[int8]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v200v2), bs200, h, t, "dec-map-v200-noaddr") // decode into non-addressable map value + testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-noaddr") + if v == nil { + v200v2 = nil + } else { + v200v2 = make(map[int8]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-len") + testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-len") bs200 = testMarshalErr(&v200v1, h, t, "enc-map-v200-p") v200v2 = nil - testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p") - testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p") + testUnmarshalErr(&v200v2, bs200, h, t, "dec-map-v200-p-nil") + testDeepEqualErr(v200v1, v200v2, t, "equal-map-v200-p-nil") + // ... + if v == nil { + v200v2 = nil + } else { + v200v2 = make(map[int8]interface{}, len(v)) + } // reset map + var v200v3, v200v4 typMapMapInt8Intf + v200v3 = typMapMapInt8Intf(v200v1) + v200v4 = typMapMapInt8Intf(v200v2) + bs200 = testMarshalErr(v200v3, h, t, "enc-map-v200-custom") + testUnmarshalErr(v200v4, bs200, h, t, "dec-map-v200-p-len") + testDeepEqualErr(v200v3, v200v4, t, "equal-map-v200-p-len") } - for _, v := range []map[int8]uint{nil, map[int8]uint{}, map[int8]uint{10: 10}} { + for _, v := range []map[int8]string{nil, {}, {33: "", 44: "some-string"}} { // fmt.Printf(">>>> running mammoth map v201: %v\n", v) - var v201v1, v201v2 map[int8]uint + var v201v1, v201v2 map[int8]string v201v1 = v bs201 := testMarshalErr(v201v1, h, t, "enc-map-v201") - if v != nil { - v201v2 = make(map[int8]uint, len(v)) - } + if v == nil { + v201v2 = nil + } else { + v201v2 = make(map[int8]string, len(v)) + } // reset map testUnmarshalErr(v201v2, bs201, h, t, "dec-map-v201") testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201") + if v == nil { + v201v2 = nil + } else { + v201v2 = make(map[int8]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v201v2), bs201, h, t, "dec-map-v201-noaddr") // decode into non-addressable map value + testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-noaddr") + if v == nil { + v201v2 = nil + } else { + v201v2 = make(map[int8]string, len(v)) + } // reset map + testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-len") + testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-len") bs201 = testMarshalErr(&v201v1, h, t, "enc-map-v201-p") v201v2 = nil - testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p") - testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p") + testUnmarshalErr(&v201v2, bs201, h, t, "dec-map-v201-p-nil") + testDeepEqualErr(v201v1, v201v2, t, "equal-map-v201-p-nil") + // ... + if v == nil { + v201v2 = nil + } else { + v201v2 = make(map[int8]string, len(v)) + } // reset map + var v201v3, v201v4 typMapMapInt8String + v201v3 = typMapMapInt8String(v201v1) + v201v4 = typMapMapInt8String(v201v2) + bs201 = testMarshalErr(v201v3, h, t, "enc-map-v201-custom") + testUnmarshalErr(v201v4, bs201, h, t, "dec-map-v201-p-len") + testDeepEqualErr(v201v3, v201v4, t, "equal-map-v201-p-len") } - for _, v := range []map[int8]uint8{nil, map[int8]uint8{}, map[int8]uint8{10: 10}} { + for _, v := range []map[int8]uint{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v202: %v\n", v) - var v202v1, v202v2 map[int8]uint8 + var v202v1, v202v2 map[int8]uint v202v1 = v bs202 := testMarshalErr(v202v1, h, t, "enc-map-v202") - if v != nil { - v202v2 = make(map[int8]uint8, len(v)) - } + if v == nil { + v202v2 = nil + } else { + v202v2 = make(map[int8]uint, len(v)) + } // reset map testUnmarshalErr(v202v2, bs202, h, t, "dec-map-v202") testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202") + if v == nil { + v202v2 = nil + } else { + v202v2 = make(map[int8]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v202v2), bs202, h, t, "dec-map-v202-noaddr") // decode into non-addressable map value + testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-noaddr") + if v == nil { + v202v2 = nil + } else { + v202v2 = make(map[int8]uint, len(v)) + } // reset map + testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-len") + testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-len") bs202 = testMarshalErr(&v202v1, h, t, "enc-map-v202-p") v202v2 = nil - testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p") - testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p") + testUnmarshalErr(&v202v2, bs202, h, t, "dec-map-v202-p-nil") + testDeepEqualErr(v202v1, v202v2, t, "equal-map-v202-p-nil") + // ... + if v == nil { + v202v2 = nil + } else { + v202v2 = make(map[int8]uint, len(v)) + } // reset map + var v202v3, v202v4 typMapMapInt8Uint + v202v3 = typMapMapInt8Uint(v202v1) + v202v4 = typMapMapInt8Uint(v202v2) + bs202 = testMarshalErr(v202v3, h, t, "enc-map-v202-custom") + testUnmarshalErr(v202v4, bs202, h, t, "dec-map-v202-p-len") + testDeepEqualErr(v202v3, v202v4, t, "equal-map-v202-p-len") } - for _, v := range []map[int8]uint16{nil, map[int8]uint16{}, map[int8]uint16{10: 10}} { + for _, v := range []map[int8]uint8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v203: %v\n", v) - var v203v1, v203v2 map[int8]uint16 + var v203v1, v203v2 map[int8]uint8 v203v1 = v bs203 := testMarshalErr(v203v1, h, t, "enc-map-v203") - if v != nil { - v203v2 = make(map[int8]uint16, len(v)) - } + if v == nil { + v203v2 = nil + } else { + v203v2 = make(map[int8]uint8, len(v)) + } // reset map testUnmarshalErr(v203v2, bs203, h, t, "dec-map-v203") testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203") + if v == nil { + v203v2 = nil + } else { + v203v2 = make(map[int8]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v203v2), bs203, h, t, "dec-map-v203-noaddr") // decode into non-addressable map value + testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-noaddr") + if v == nil { + v203v2 = nil + } else { + v203v2 = make(map[int8]uint8, len(v)) + } // reset map + testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-len") + testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-len") bs203 = testMarshalErr(&v203v1, h, t, "enc-map-v203-p") v203v2 = nil - testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p") - testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p") + testUnmarshalErr(&v203v2, bs203, h, t, "dec-map-v203-p-nil") + testDeepEqualErr(v203v1, v203v2, t, "equal-map-v203-p-nil") + // ... + if v == nil { + v203v2 = nil + } else { + v203v2 = make(map[int8]uint8, len(v)) + } // reset map + var v203v3, v203v4 typMapMapInt8Uint8 + v203v3 = typMapMapInt8Uint8(v203v1) + v203v4 = typMapMapInt8Uint8(v203v2) + bs203 = testMarshalErr(v203v3, h, t, "enc-map-v203-custom") + testUnmarshalErr(v203v4, bs203, h, t, "dec-map-v203-p-len") + testDeepEqualErr(v203v3, v203v4, t, "equal-map-v203-p-len") } - for _, v := range []map[int8]uint32{nil, map[int8]uint32{}, map[int8]uint32{10: 10}} { + for _, v := range []map[int8]uint16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v204: %v\n", v) - var v204v1, v204v2 map[int8]uint32 + var v204v1, v204v2 map[int8]uint16 v204v1 = v bs204 := testMarshalErr(v204v1, h, t, "enc-map-v204") - if v != nil { - v204v2 = make(map[int8]uint32, len(v)) - } + if v == nil { + v204v2 = nil + } else { + v204v2 = make(map[int8]uint16, len(v)) + } // reset map testUnmarshalErr(v204v2, bs204, h, t, "dec-map-v204") testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204") + if v == nil { + v204v2 = nil + } else { + v204v2 = make(map[int8]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v204v2), bs204, h, t, "dec-map-v204-noaddr") // decode into non-addressable map value + testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-noaddr") + if v == nil { + v204v2 = nil + } else { + v204v2 = make(map[int8]uint16, len(v)) + } // reset map + testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-len") + testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-len") bs204 = testMarshalErr(&v204v1, h, t, "enc-map-v204-p") v204v2 = nil - testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p") - testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p") + testUnmarshalErr(&v204v2, bs204, h, t, "dec-map-v204-p-nil") + testDeepEqualErr(v204v1, v204v2, t, "equal-map-v204-p-nil") + // ... + if v == nil { + v204v2 = nil + } else { + v204v2 = make(map[int8]uint16, len(v)) + } // reset map + var v204v3, v204v4 typMapMapInt8Uint16 + v204v3 = typMapMapInt8Uint16(v204v1) + v204v4 = typMapMapInt8Uint16(v204v2) + bs204 = testMarshalErr(v204v3, h, t, "enc-map-v204-custom") + testUnmarshalErr(v204v4, bs204, h, t, "dec-map-v204-p-len") + testDeepEqualErr(v204v3, v204v4, t, "equal-map-v204-p-len") } - for _, v := range []map[int8]uint64{nil, map[int8]uint64{}, map[int8]uint64{10: 10}} { + for _, v := range []map[int8]uint32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v205: %v\n", v) - var v205v1, v205v2 map[int8]uint64 + var v205v1, v205v2 map[int8]uint32 v205v1 = v bs205 := testMarshalErr(v205v1, h, t, "enc-map-v205") - if v != nil { - v205v2 = make(map[int8]uint64, len(v)) - } + if v == nil { + v205v2 = nil + } else { + v205v2 = make(map[int8]uint32, len(v)) + } // reset map testUnmarshalErr(v205v2, bs205, h, t, "dec-map-v205") testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205") + if v == nil { + v205v2 = nil + } else { + v205v2 = make(map[int8]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v205v2), bs205, h, t, "dec-map-v205-noaddr") // decode into non-addressable map value + testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-noaddr") + if v == nil { + v205v2 = nil + } else { + v205v2 = make(map[int8]uint32, len(v)) + } // reset map + testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-len") + testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-len") bs205 = testMarshalErr(&v205v1, h, t, "enc-map-v205-p") v205v2 = nil - testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p") - testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p") + testUnmarshalErr(&v205v2, bs205, h, t, "dec-map-v205-p-nil") + testDeepEqualErr(v205v1, v205v2, t, "equal-map-v205-p-nil") + // ... + if v == nil { + v205v2 = nil + } else { + v205v2 = make(map[int8]uint32, len(v)) + } // reset map + var v205v3, v205v4 typMapMapInt8Uint32 + v205v3 = typMapMapInt8Uint32(v205v1) + v205v4 = typMapMapInt8Uint32(v205v2) + bs205 = testMarshalErr(v205v3, h, t, "enc-map-v205-custom") + testUnmarshalErr(v205v4, bs205, h, t, "dec-map-v205-p-len") + testDeepEqualErr(v205v3, v205v4, t, "equal-map-v205-p-len") } - for _, v := range []map[int8]uintptr{nil, map[int8]uintptr{}, map[int8]uintptr{10: 10}} { + for _, v := range []map[int8]uint64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v206: %v\n", v) - var v206v1, v206v2 map[int8]uintptr + var v206v1, v206v2 map[int8]uint64 v206v1 = v bs206 := testMarshalErr(v206v1, h, t, "enc-map-v206") - if v != nil { - v206v2 = make(map[int8]uintptr, len(v)) - } + if v == nil { + v206v2 = nil + } else { + v206v2 = make(map[int8]uint64, len(v)) + } // reset map testUnmarshalErr(v206v2, bs206, h, t, "dec-map-v206") testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206") + if v == nil { + v206v2 = nil + } else { + v206v2 = make(map[int8]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v206v2), bs206, h, t, "dec-map-v206-noaddr") // decode into non-addressable map value + testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-noaddr") + if v == nil { + v206v2 = nil + } else { + v206v2 = make(map[int8]uint64, len(v)) + } // reset map + testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-len") + testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-len") bs206 = testMarshalErr(&v206v1, h, t, "enc-map-v206-p") v206v2 = nil - testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p") - testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p") + testUnmarshalErr(&v206v2, bs206, h, t, "dec-map-v206-p-nil") + testDeepEqualErr(v206v1, v206v2, t, "equal-map-v206-p-nil") + // ... + if v == nil { + v206v2 = nil + } else { + v206v2 = make(map[int8]uint64, len(v)) + } // reset map + var v206v3, v206v4 typMapMapInt8Uint64 + v206v3 = typMapMapInt8Uint64(v206v1) + v206v4 = typMapMapInt8Uint64(v206v2) + bs206 = testMarshalErr(v206v3, h, t, "enc-map-v206-custom") + testUnmarshalErr(v206v4, bs206, h, t, "dec-map-v206-p-len") + testDeepEqualErr(v206v3, v206v4, t, "equal-map-v206-p-len") } - for _, v := range []map[int8]int{nil, map[int8]int{}, map[int8]int{10: 10}} { + for _, v := range []map[int8]uintptr{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v207: %v\n", v) - var v207v1, v207v2 map[int8]int + var v207v1, v207v2 map[int8]uintptr v207v1 = v bs207 := testMarshalErr(v207v1, h, t, "enc-map-v207") - if v != nil { - v207v2 = make(map[int8]int, len(v)) - } + if v == nil { + v207v2 = nil + } else { + v207v2 = make(map[int8]uintptr, len(v)) + } // reset map testUnmarshalErr(v207v2, bs207, h, t, "dec-map-v207") testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207") + if v == nil { + v207v2 = nil + } else { + v207v2 = make(map[int8]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v207v2), bs207, h, t, "dec-map-v207-noaddr") // decode into non-addressable map value + testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-noaddr") + if v == nil { + v207v2 = nil + } else { + v207v2 = make(map[int8]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-len") + testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-len") bs207 = testMarshalErr(&v207v1, h, t, "enc-map-v207-p") v207v2 = nil - testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p") - testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p") + testUnmarshalErr(&v207v2, bs207, h, t, "dec-map-v207-p-nil") + testDeepEqualErr(v207v1, v207v2, t, "equal-map-v207-p-nil") + // ... + if v == nil { + v207v2 = nil + } else { + v207v2 = make(map[int8]uintptr, len(v)) + } // reset map + var v207v3, v207v4 typMapMapInt8Uintptr + v207v3 = typMapMapInt8Uintptr(v207v1) + v207v4 = typMapMapInt8Uintptr(v207v2) + bs207 = testMarshalErr(v207v3, h, t, "enc-map-v207-custom") + testUnmarshalErr(v207v4, bs207, h, t, "dec-map-v207-p-len") + testDeepEqualErr(v207v3, v207v4, t, "equal-map-v207-p-len") } - for _, v := range []map[int8]int8{nil, map[int8]int8{}, map[int8]int8{10: 10}} { + for _, v := range []map[int8]int{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v208: %v\n", v) - var v208v1, v208v2 map[int8]int8 + var v208v1, v208v2 map[int8]int v208v1 = v bs208 := testMarshalErr(v208v1, h, t, "enc-map-v208") - if v != nil { - v208v2 = make(map[int8]int8, len(v)) - } + if v == nil { + v208v2 = nil + } else { + v208v2 = make(map[int8]int, len(v)) + } // reset map testUnmarshalErr(v208v2, bs208, h, t, "dec-map-v208") testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208") + if v == nil { + v208v2 = nil + } else { + v208v2 = make(map[int8]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v208v2), bs208, h, t, "dec-map-v208-noaddr") // decode into non-addressable map value + testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-noaddr") + if v == nil { + v208v2 = nil + } else { + v208v2 = make(map[int8]int, len(v)) + } // reset map + testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-len") + testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-len") bs208 = testMarshalErr(&v208v1, h, t, "enc-map-v208-p") v208v2 = nil - testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p") - testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p") + testUnmarshalErr(&v208v2, bs208, h, t, "dec-map-v208-p-nil") + testDeepEqualErr(v208v1, v208v2, t, "equal-map-v208-p-nil") + // ... + if v == nil { + v208v2 = nil + } else { + v208v2 = make(map[int8]int, len(v)) + } // reset map + var v208v3, v208v4 typMapMapInt8Int + v208v3 = typMapMapInt8Int(v208v1) + v208v4 = typMapMapInt8Int(v208v2) + bs208 = testMarshalErr(v208v3, h, t, "enc-map-v208-custom") + testUnmarshalErr(v208v4, bs208, h, t, "dec-map-v208-p-len") + testDeepEqualErr(v208v3, v208v4, t, "equal-map-v208-p-len") } - for _, v := range []map[int8]int16{nil, map[int8]int16{}, map[int8]int16{10: 10}} { + for _, v := range []map[int8]int8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v209: %v\n", v) - var v209v1, v209v2 map[int8]int16 + var v209v1, v209v2 map[int8]int8 v209v1 = v bs209 := testMarshalErr(v209v1, h, t, "enc-map-v209") - if v != nil { - v209v2 = make(map[int8]int16, len(v)) - } + if v == nil { + v209v2 = nil + } else { + v209v2 = make(map[int8]int8, len(v)) + } // reset map testUnmarshalErr(v209v2, bs209, h, t, "dec-map-v209") testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209") + if v == nil { + v209v2 = nil + } else { + v209v2 = make(map[int8]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v209v2), bs209, h, t, "dec-map-v209-noaddr") // decode into non-addressable map value + testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-noaddr") + if v == nil { + v209v2 = nil + } else { + v209v2 = make(map[int8]int8, len(v)) + } // reset map + testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-len") + testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-len") bs209 = testMarshalErr(&v209v1, h, t, "enc-map-v209-p") v209v2 = nil - testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p") - testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p") + testUnmarshalErr(&v209v2, bs209, h, t, "dec-map-v209-p-nil") + testDeepEqualErr(v209v1, v209v2, t, "equal-map-v209-p-nil") + // ... + if v == nil { + v209v2 = nil + } else { + v209v2 = make(map[int8]int8, len(v)) + } // reset map + var v209v3, v209v4 typMapMapInt8Int8 + v209v3 = typMapMapInt8Int8(v209v1) + v209v4 = typMapMapInt8Int8(v209v2) + bs209 = testMarshalErr(v209v3, h, t, "enc-map-v209-custom") + testUnmarshalErr(v209v4, bs209, h, t, "dec-map-v209-p-len") + testDeepEqualErr(v209v3, v209v4, t, "equal-map-v209-p-len") } - for _, v := range []map[int8]int32{nil, map[int8]int32{}, map[int8]int32{10: 10}} { + for _, v := range []map[int8]int16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v210: %v\n", v) - var v210v1, v210v2 map[int8]int32 + var v210v1, v210v2 map[int8]int16 v210v1 = v bs210 := testMarshalErr(v210v1, h, t, "enc-map-v210") - if v != nil { - v210v2 = make(map[int8]int32, len(v)) - } + if v == nil { + v210v2 = nil + } else { + v210v2 = make(map[int8]int16, len(v)) + } // reset map testUnmarshalErr(v210v2, bs210, h, t, "dec-map-v210") testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210") + if v == nil { + v210v2 = nil + } else { + v210v2 = make(map[int8]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v210v2), bs210, h, t, "dec-map-v210-noaddr") // decode into non-addressable map value + testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-noaddr") + if v == nil { + v210v2 = nil + } else { + v210v2 = make(map[int8]int16, len(v)) + } // reset map + testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-len") + testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-len") bs210 = testMarshalErr(&v210v1, h, t, "enc-map-v210-p") v210v2 = nil - testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p") - testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p") + testUnmarshalErr(&v210v2, bs210, h, t, "dec-map-v210-p-nil") + testDeepEqualErr(v210v1, v210v2, t, "equal-map-v210-p-nil") + // ... + if v == nil { + v210v2 = nil + } else { + v210v2 = make(map[int8]int16, len(v)) + } // reset map + var v210v3, v210v4 typMapMapInt8Int16 + v210v3 = typMapMapInt8Int16(v210v1) + v210v4 = typMapMapInt8Int16(v210v2) + bs210 = testMarshalErr(v210v3, h, t, "enc-map-v210-custom") + testUnmarshalErr(v210v4, bs210, h, t, "dec-map-v210-p-len") + testDeepEqualErr(v210v3, v210v4, t, "equal-map-v210-p-len") } - for _, v := range []map[int8]int64{nil, map[int8]int64{}, map[int8]int64{10: 10}} { + for _, v := range []map[int8]int32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v211: %v\n", v) - var v211v1, v211v2 map[int8]int64 + var v211v1, v211v2 map[int8]int32 v211v1 = v bs211 := testMarshalErr(v211v1, h, t, "enc-map-v211") - if v != nil { - v211v2 = make(map[int8]int64, len(v)) - } + if v == nil { + v211v2 = nil + } else { + v211v2 = make(map[int8]int32, len(v)) + } // reset map testUnmarshalErr(v211v2, bs211, h, t, "dec-map-v211") testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211") + if v == nil { + v211v2 = nil + } else { + v211v2 = make(map[int8]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v211v2), bs211, h, t, "dec-map-v211-noaddr") // decode into non-addressable map value + testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-noaddr") + if v == nil { + v211v2 = nil + } else { + v211v2 = make(map[int8]int32, len(v)) + } // reset map + testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-len") + testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-len") bs211 = testMarshalErr(&v211v1, h, t, "enc-map-v211-p") v211v2 = nil - testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p") - testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p") + testUnmarshalErr(&v211v2, bs211, h, t, "dec-map-v211-p-nil") + testDeepEqualErr(v211v1, v211v2, t, "equal-map-v211-p-nil") + // ... + if v == nil { + v211v2 = nil + } else { + v211v2 = make(map[int8]int32, len(v)) + } // reset map + var v211v3, v211v4 typMapMapInt8Int32 + v211v3 = typMapMapInt8Int32(v211v1) + v211v4 = typMapMapInt8Int32(v211v2) + bs211 = testMarshalErr(v211v3, h, t, "enc-map-v211-custom") + testUnmarshalErr(v211v4, bs211, h, t, "dec-map-v211-p-len") + testDeepEqualErr(v211v3, v211v4, t, "equal-map-v211-p-len") } - for _, v := range []map[int8]float32{nil, map[int8]float32{}, map[int8]float32{10: 10.1}} { + for _, v := range []map[int8]int64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v212: %v\n", v) - var v212v1, v212v2 map[int8]float32 + var v212v1, v212v2 map[int8]int64 v212v1 = v bs212 := testMarshalErr(v212v1, h, t, "enc-map-v212") - if v != nil { - v212v2 = make(map[int8]float32, len(v)) - } + if v == nil { + v212v2 = nil + } else { + v212v2 = make(map[int8]int64, len(v)) + } // reset map testUnmarshalErr(v212v2, bs212, h, t, "dec-map-v212") testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212") + if v == nil { + v212v2 = nil + } else { + v212v2 = make(map[int8]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v212v2), bs212, h, t, "dec-map-v212-noaddr") // decode into non-addressable map value + testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-noaddr") + if v == nil { + v212v2 = nil + } else { + v212v2 = make(map[int8]int64, len(v)) + } // reset map + testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-len") + testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-len") bs212 = testMarshalErr(&v212v1, h, t, "enc-map-v212-p") v212v2 = nil - testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p") - testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p") + testUnmarshalErr(&v212v2, bs212, h, t, "dec-map-v212-p-nil") + testDeepEqualErr(v212v1, v212v2, t, "equal-map-v212-p-nil") + // ... + if v == nil { + v212v2 = nil + } else { + v212v2 = make(map[int8]int64, len(v)) + } // reset map + var v212v3, v212v4 typMapMapInt8Int64 + v212v3 = typMapMapInt8Int64(v212v1) + v212v4 = typMapMapInt8Int64(v212v2) + bs212 = testMarshalErr(v212v3, h, t, "enc-map-v212-custom") + testUnmarshalErr(v212v4, bs212, h, t, "dec-map-v212-p-len") + testDeepEqualErr(v212v3, v212v4, t, "equal-map-v212-p-len") } - for _, v := range []map[int8]float64{nil, map[int8]float64{}, map[int8]float64{10: 10.1}} { + for _, v := range []map[int8]float32{nil, {}, {44: 0, 33: 22.2}} { // fmt.Printf(">>>> running mammoth map v213: %v\n", v) - var v213v1, v213v2 map[int8]float64 + var v213v1, v213v2 map[int8]float32 v213v1 = v bs213 := testMarshalErr(v213v1, h, t, "enc-map-v213") - if v != nil { - v213v2 = make(map[int8]float64, len(v)) - } + if v == nil { + v213v2 = nil + } else { + v213v2 = make(map[int8]float32, len(v)) + } // reset map testUnmarshalErr(v213v2, bs213, h, t, "dec-map-v213") testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213") + if v == nil { + v213v2 = nil + } else { + v213v2 = make(map[int8]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v213v2), bs213, h, t, "dec-map-v213-noaddr") // decode into non-addressable map value + testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-noaddr") + if v == nil { + v213v2 = nil + } else { + v213v2 = make(map[int8]float32, len(v)) + } // reset map + testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-len") + testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-len") bs213 = testMarshalErr(&v213v1, h, t, "enc-map-v213-p") v213v2 = nil - testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p") - testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p") + testUnmarshalErr(&v213v2, bs213, h, t, "dec-map-v213-p-nil") + testDeepEqualErr(v213v1, v213v2, t, "equal-map-v213-p-nil") + // ... + if v == nil { + v213v2 = nil + } else { + v213v2 = make(map[int8]float32, len(v)) + } // reset map + var v213v3, v213v4 typMapMapInt8Float32 + v213v3 = typMapMapInt8Float32(v213v1) + v213v4 = typMapMapInt8Float32(v213v2) + bs213 = testMarshalErr(v213v3, h, t, "enc-map-v213-custom") + testUnmarshalErr(v213v4, bs213, h, t, "dec-map-v213-p-len") + testDeepEqualErr(v213v3, v213v4, t, "equal-map-v213-p-len") } - for _, v := range []map[int8]bool{nil, map[int8]bool{}, map[int8]bool{10: true}} { + for _, v := range []map[int8]float64{nil, {}, {44: 0, 33: 11.1}} { // fmt.Printf(">>>> running mammoth map v214: %v\n", v) - var v214v1, v214v2 map[int8]bool + var v214v1, v214v2 map[int8]float64 v214v1 = v bs214 := testMarshalErr(v214v1, h, t, "enc-map-v214") - if v != nil { - v214v2 = make(map[int8]bool, len(v)) - } + if v == nil { + v214v2 = nil + } else { + v214v2 = make(map[int8]float64, len(v)) + } // reset map testUnmarshalErr(v214v2, bs214, h, t, "dec-map-v214") testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214") + if v == nil { + v214v2 = nil + } else { + v214v2 = make(map[int8]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v214v2), bs214, h, t, "dec-map-v214-noaddr") // decode into non-addressable map value + testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-noaddr") + if v == nil { + v214v2 = nil + } else { + v214v2 = make(map[int8]float64, len(v)) + } // reset map + testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-len") + testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-len") bs214 = testMarshalErr(&v214v1, h, t, "enc-map-v214-p") v214v2 = nil - testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p") - testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p") + testUnmarshalErr(&v214v2, bs214, h, t, "dec-map-v214-p-nil") + testDeepEqualErr(v214v1, v214v2, t, "equal-map-v214-p-nil") + // ... + if v == nil { + v214v2 = nil + } else { + v214v2 = make(map[int8]float64, len(v)) + } // reset map + var v214v3, v214v4 typMapMapInt8Float64 + v214v3 = typMapMapInt8Float64(v214v1) + v214v4 = typMapMapInt8Float64(v214v2) + bs214 = testMarshalErr(v214v3, h, t, "enc-map-v214-custom") + testUnmarshalErr(v214v4, bs214, h, t, "dec-map-v214-p-len") + testDeepEqualErr(v214v3, v214v4, t, "equal-map-v214-p-len") } - for _, v := range []map[int16]interface{}{nil, map[int16]interface{}{}, map[int16]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v217: %v\n", v) - var v217v1, v217v2 map[int16]interface{} - v217v1 = v - bs217 := testMarshalErr(v217v1, h, t, "enc-map-v217") - if v != nil { - v217v2 = make(map[int16]interface{}, len(v)) - } - testUnmarshalErr(v217v2, bs217, h, t, "dec-map-v217") - testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217") - bs217 = testMarshalErr(&v217v1, h, t, "enc-map-v217-p") - v217v2 = nil - testUnmarshalErr(&v217v2, bs217, h, t, "dec-map-v217-p") - testDeepEqualErr(v217v1, v217v2, t, "equal-map-v217-p") + for _, v := range []map[int8]bool{nil, {}, {44: false, 33: true}} { + // fmt.Printf(">>>> running mammoth map v215: %v\n", v) + var v215v1, v215v2 map[int8]bool + v215v1 = v + bs215 := testMarshalErr(v215v1, h, t, "enc-map-v215") + if v == nil { + v215v2 = nil + } else { + v215v2 = make(map[int8]bool, len(v)) + } // reset map + testUnmarshalErr(v215v2, bs215, h, t, "dec-map-v215") + testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215") + if v == nil { + v215v2 = nil + } else { + v215v2 = make(map[int8]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v215v2), bs215, h, t, "dec-map-v215-noaddr") // decode into non-addressable map value + testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-noaddr") + if v == nil { + v215v2 = nil + } else { + v215v2 = make(map[int8]bool, len(v)) + } // reset map + testUnmarshalErr(&v215v2, bs215, h, t, "dec-map-v215-p-len") + testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-p-len") + bs215 = testMarshalErr(&v215v1, h, t, "enc-map-v215-p") + v215v2 = nil + testUnmarshalErr(&v215v2, bs215, h, t, "dec-map-v215-p-nil") + testDeepEqualErr(v215v1, v215v2, t, "equal-map-v215-p-nil") + // ... + if v == nil { + v215v2 = nil + } else { + v215v2 = make(map[int8]bool, len(v)) + } // reset map + var v215v3, v215v4 typMapMapInt8Bool + v215v3 = typMapMapInt8Bool(v215v1) + v215v4 = typMapMapInt8Bool(v215v2) + bs215 = testMarshalErr(v215v3, h, t, "enc-map-v215-custom") + testUnmarshalErr(v215v4, bs215, h, t, "dec-map-v215-p-len") + testDeepEqualErr(v215v3, v215v4, t, "equal-map-v215-p-len") } - for _, v := range []map[int16]string{nil, map[int16]string{}, map[int16]string{10: "some-string"}} { + for _, v := range []map[int16]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v218: %v\n", v) - var v218v1, v218v2 map[int16]string + var v218v1, v218v2 map[int16]interface{} v218v1 = v bs218 := testMarshalErr(v218v1, h, t, "enc-map-v218") - if v != nil { - v218v2 = make(map[int16]string, len(v)) - } + if v == nil { + v218v2 = nil + } else { + v218v2 = make(map[int16]interface{}, len(v)) + } // reset map testUnmarshalErr(v218v2, bs218, h, t, "dec-map-v218") testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218") + if v == nil { + v218v2 = nil + } else { + v218v2 = make(map[int16]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v218v2), bs218, h, t, "dec-map-v218-noaddr") // decode into non-addressable map value + testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-noaddr") + if v == nil { + v218v2 = nil + } else { + v218v2 = make(map[int16]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-len") + testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-len") bs218 = testMarshalErr(&v218v1, h, t, "enc-map-v218-p") v218v2 = nil - testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p") - testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p") + testUnmarshalErr(&v218v2, bs218, h, t, "dec-map-v218-p-nil") + testDeepEqualErr(v218v1, v218v2, t, "equal-map-v218-p-nil") + // ... + if v == nil { + v218v2 = nil + } else { + v218v2 = make(map[int16]interface{}, len(v)) + } // reset map + var v218v3, v218v4 typMapMapInt16Intf + v218v3 = typMapMapInt16Intf(v218v1) + v218v4 = typMapMapInt16Intf(v218v2) + bs218 = testMarshalErr(v218v3, h, t, "enc-map-v218-custom") + testUnmarshalErr(v218v4, bs218, h, t, "dec-map-v218-p-len") + testDeepEqualErr(v218v3, v218v4, t, "equal-map-v218-p-len") } - for _, v := range []map[int16]uint{nil, map[int16]uint{}, map[int16]uint{10: 10}} { + for _, v := range []map[int16]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v219: %v\n", v) - var v219v1, v219v2 map[int16]uint + var v219v1, v219v2 map[int16]string v219v1 = v bs219 := testMarshalErr(v219v1, h, t, "enc-map-v219") - if v != nil { - v219v2 = make(map[int16]uint, len(v)) - } + if v == nil { + v219v2 = nil + } else { + v219v2 = make(map[int16]string, len(v)) + } // reset map testUnmarshalErr(v219v2, bs219, h, t, "dec-map-v219") testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219") + if v == nil { + v219v2 = nil + } else { + v219v2 = make(map[int16]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v219v2), bs219, h, t, "dec-map-v219-noaddr") // decode into non-addressable map value + testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-noaddr") + if v == nil { + v219v2 = nil + } else { + v219v2 = make(map[int16]string, len(v)) + } // reset map + testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-len") + testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-len") bs219 = testMarshalErr(&v219v1, h, t, "enc-map-v219-p") v219v2 = nil - testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p") - testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p") + testUnmarshalErr(&v219v2, bs219, h, t, "dec-map-v219-p-nil") + testDeepEqualErr(v219v1, v219v2, t, "equal-map-v219-p-nil") + // ... + if v == nil { + v219v2 = nil + } else { + v219v2 = make(map[int16]string, len(v)) + } // reset map + var v219v3, v219v4 typMapMapInt16String + v219v3 = typMapMapInt16String(v219v1) + v219v4 = typMapMapInt16String(v219v2) + bs219 = testMarshalErr(v219v3, h, t, "enc-map-v219-custom") + testUnmarshalErr(v219v4, bs219, h, t, "dec-map-v219-p-len") + testDeepEqualErr(v219v3, v219v4, t, "equal-map-v219-p-len") } - for _, v := range []map[int16]uint8{nil, map[int16]uint8{}, map[int16]uint8{10: 10}} { + for _, v := range []map[int16]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v220: %v\n", v) - var v220v1, v220v2 map[int16]uint8 + var v220v1, v220v2 map[int16]uint v220v1 = v bs220 := testMarshalErr(v220v1, h, t, "enc-map-v220") - if v != nil { - v220v2 = make(map[int16]uint8, len(v)) - } + if v == nil { + v220v2 = nil + } else { + v220v2 = make(map[int16]uint, len(v)) + } // reset map testUnmarshalErr(v220v2, bs220, h, t, "dec-map-v220") testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220") + if v == nil { + v220v2 = nil + } else { + v220v2 = make(map[int16]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v220v2), bs220, h, t, "dec-map-v220-noaddr") // decode into non-addressable map value + testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-noaddr") + if v == nil { + v220v2 = nil + } else { + v220v2 = make(map[int16]uint, len(v)) + } // reset map + testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-len") + testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-len") bs220 = testMarshalErr(&v220v1, h, t, "enc-map-v220-p") v220v2 = nil - testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p") - testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p") + testUnmarshalErr(&v220v2, bs220, h, t, "dec-map-v220-p-nil") + testDeepEqualErr(v220v1, v220v2, t, "equal-map-v220-p-nil") + // ... + if v == nil { + v220v2 = nil + } else { + v220v2 = make(map[int16]uint, len(v)) + } // reset map + var v220v3, v220v4 typMapMapInt16Uint + v220v3 = typMapMapInt16Uint(v220v1) + v220v4 = typMapMapInt16Uint(v220v2) + bs220 = testMarshalErr(v220v3, h, t, "enc-map-v220-custom") + testUnmarshalErr(v220v4, bs220, h, t, "dec-map-v220-p-len") + testDeepEqualErr(v220v3, v220v4, t, "equal-map-v220-p-len") } - for _, v := range []map[int16]uint16{nil, map[int16]uint16{}, map[int16]uint16{10: 10}} { + for _, v := range []map[int16]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v221: %v\n", v) - var v221v1, v221v2 map[int16]uint16 + var v221v1, v221v2 map[int16]uint8 v221v1 = v bs221 := testMarshalErr(v221v1, h, t, "enc-map-v221") - if v != nil { - v221v2 = make(map[int16]uint16, len(v)) - } + if v == nil { + v221v2 = nil + } else { + v221v2 = make(map[int16]uint8, len(v)) + } // reset map testUnmarshalErr(v221v2, bs221, h, t, "dec-map-v221") testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221") + if v == nil { + v221v2 = nil + } else { + v221v2 = make(map[int16]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v221v2), bs221, h, t, "dec-map-v221-noaddr") // decode into non-addressable map value + testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-noaddr") + if v == nil { + v221v2 = nil + } else { + v221v2 = make(map[int16]uint8, len(v)) + } // reset map + testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-len") + testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-len") bs221 = testMarshalErr(&v221v1, h, t, "enc-map-v221-p") v221v2 = nil - testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p") - testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p") + testUnmarshalErr(&v221v2, bs221, h, t, "dec-map-v221-p-nil") + testDeepEqualErr(v221v1, v221v2, t, "equal-map-v221-p-nil") + // ... + if v == nil { + v221v2 = nil + } else { + v221v2 = make(map[int16]uint8, len(v)) + } // reset map + var v221v3, v221v4 typMapMapInt16Uint8 + v221v3 = typMapMapInt16Uint8(v221v1) + v221v4 = typMapMapInt16Uint8(v221v2) + bs221 = testMarshalErr(v221v3, h, t, "enc-map-v221-custom") + testUnmarshalErr(v221v4, bs221, h, t, "dec-map-v221-p-len") + testDeepEqualErr(v221v3, v221v4, t, "equal-map-v221-p-len") } - for _, v := range []map[int16]uint32{nil, map[int16]uint32{}, map[int16]uint32{10: 10}} { + for _, v := range []map[int16]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v222: %v\n", v) - var v222v1, v222v2 map[int16]uint32 + var v222v1, v222v2 map[int16]uint16 v222v1 = v bs222 := testMarshalErr(v222v1, h, t, "enc-map-v222") - if v != nil { - v222v2 = make(map[int16]uint32, len(v)) - } + if v == nil { + v222v2 = nil + } else { + v222v2 = make(map[int16]uint16, len(v)) + } // reset map testUnmarshalErr(v222v2, bs222, h, t, "dec-map-v222") testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222") + if v == nil { + v222v2 = nil + } else { + v222v2 = make(map[int16]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v222v2), bs222, h, t, "dec-map-v222-noaddr") // decode into non-addressable map value + testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-noaddr") + if v == nil { + v222v2 = nil + } else { + v222v2 = make(map[int16]uint16, len(v)) + } // reset map + testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-len") + testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-len") bs222 = testMarshalErr(&v222v1, h, t, "enc-map-v222-p") v222v2 = nil - testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p") - testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p") + testUnmarshalErr(&v222v2, bs222, h, t, "dec-map-v222-p-nil") + testDeepEqualErr(v222v1, v222v2, t, "equal-map-v222-p-nil") + // ... + if v == nil { + v222v2 = nil + } else { + v222v2 = make(map[int16]uint16, len(v)) + } // reset map + var v222v3, v222v4 typMapMapInt16Uint16 + v222v3 = typMapMapInt16Uint16(v222v1) + v222v4 = typMapMapInt16Uint16(v222v2) + bs222 = testMarshalErr(v222v3, h, t, "enc-map-v222-custom") + testUnmarshalErr(v222v4, bs222, h, t, "dec-map-v222-p-len") + testDeepEqualErr(v222v3, v222v4, t, "equal-map-v222-p-len") } - for _, v := range []map[int16]uint64{nil, map[int16]uint64{}, map[int16]uint64{10: 10}} { + for _, v := range []map[int16]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v223: %v\n", v) - var v223v1, v223v2 map[int16]uint64 + var v223v1, v223v2 map[int16]uint32 v223v1 = v bs223 := testMarshalErr(v223v1, h, t, "enc-map-v223") - if v != nil { - v223v2 = make(map[int16]uint64, len(v)) - } + if v == nil { + v223v2 = nil + } else { + v223v2 = make(map[int16]uint32, len(v)) + } // reset map testUnmarshalErr(v223v2, bs223, h, t, "dec-map-v223") testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223") + if v == nil { + v223v2 = nil + } else { + v223v2 = make(map[int16]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v223v2), bs223, h, t, "dec-map-v223-noaddr") // decode into non-addressable map value + testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-noaddr") + if v == nil { + v223v2 = nil + } else { + v223v2 = make(map[int16]uint32, len(v)) + } // reset map + testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-len") + testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-len") bs223 = testMarshalErr(&v223v1, h, t, "enc-map-v223-p") v223v2 = nil - testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p") - testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p") + testUnmarshalErr(&v223v2, bs223, h, t, "dec-map-v223-p-nil") + testDeepEqualErr(v223v1, v223v2, t, "equal-map-v223-p-nil") + // ... + if v == nil { + v223v2 = nil + } else { + v223v2 = make(map[int16]uint32, len(v)) + } // reset map + var v223v3, v223v4 typMapMapInt16Uint32 + v223v3 = typMapMapInt16Uint32(v223v1) + v223v4 = typMapMapInt16Uint32(v223v2) + bs223 = testMarshalErr(v223v3, h, t, "enc-map-v223-custom") + testUnmarshalErr(v223v4, bs223, h, t, "dec-map-v223-p-len") + testDeepEqualErr(v223v3, v223v4, t, "equal-map-v223-p-len") } - for _, v := range []map[int16]uintptr{nil, map[int16]uintptr{}, map[int16]uintptr{10: 10}} { + for _, v := range []map[int16]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v224: %v\n", v) - var v224v1, v224v2 map[int16]uintptr + var v224v1, v224v2 map[int16]uint64 v224v1 = v bs224 := testMarshalErr(v224v1, h, t, "enc-map-v224") - if v != nil { - v224v2 = make(map[int16]uintptr, len(v)) - } + if v == nil { + v224v2 = nil + } else { + v224v2 = make(map[int16]uint64, len(v)) + } // reset map testUnmarshalErr(v224v2, bs224, h, t, "dec-map-v224") testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224") + if v == nil { + v224v2 = nil + } else { + v224v2 = make(map[int16]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v224v2), bs224, h, t, "dec-map-v224-noaddr") // decode into non-addressable map value + testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-noaddr") + if v == nil { + v224v2 = nil + } else { + v224v2 = make(map[int16]uint64, len(v)) + } // reset map + testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-len") + testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-len") bs224 = testMarshalErr(&v224v1, h, t, "enc-map-v224-p") v224v2 = nil - testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p") - testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p") + testUnmarshalErr(&v224v2, bs224, h, t, "dec-map-v224-p-nil") + testDeepEqualErr(v224v1, v224v2, t, "equal-map-v224-p-nil") + // ... + if v == nil { + v224v2 = nil + } else { + v224v2 = make(map[int16]uint64, len(v)) + } // reset map + var v224v3, v224v4 typMapMapInt16Uint64 + v224v3 = typMapMapInt16Uint64(v224v1) + v224v4 = typMapMapInt16Uint64(v224v2) + bs224 = testMarshalErr(v224v3, h, t, "enc-map-v224-custom") + testUnmarshalErr(v224v4, bs224, h, t, "dec-map-v224-p-len") + testDeepEqualErr(v224v3, v224v4, t, "equal-map-v224-p-len") } - for _, v := range []map[int16]int{nil, map[int16]int{}, map[int16]int{10: 10}} { + for _, v := range []map[int16]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v225: %v\n", v) - var v225v1, v225v2 map[int16]int + var v225v1, v225v2 map[int16]uintptr v225v1 = v bs225 := testMarshalErr(v225v1, h, t, "enc-map-v225") - if v != nil { - v225v2 = make(map[int16]int, len(v)) - } + if v == nil { + v225v2 = nil + } else { + v225v2 = make(map[int16]uintptr, len(v)) + } // reset map testUnmarshalErr(v225v2, bs225, h, t, "dec-map-v225") testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225") + if v == nil { + v225v2 = nil + } else { + v225v2 = make(map[int16]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v225v2), bs225, h, t, "dec-map-v225-noaddr") // decode into non-addressable map value + testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-noaddr") + if v == nil { + v225v2 = nil + } else { + v225v2 = make(map[int16]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-len") + testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-len") bs225 = testMarshalErr(&v225v1, h, t, "enc-map-v225-p") v225v2 = nil - testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p") - testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p") + testUnmarshalErr(&v225v2, bs225, h, t, "dec-map-v225-p-nil") + testDeepEqualErr(v225v1, v225v2, t, "equal-map-v225-p-nil") + // ... + if v == nil { + v225v2 = nil + } else { + v225v2 = make(map[int16]uintptr, len(v)) + } // reset map + var v225v3, v225v4 typMapMapInt16Uintptr + v225v3 = typMapMapInt16Uintptr(v225v1) + v225v4 = typMapMapInt16Uintptr(v225v2) + bs225 = testMarshalErr(v225v3, h, t, "enc-map-v225-custom") + testUnmarshalErr(v225v4, bs225, h, t, "dec-map-v225-p-len") + testDeepEqualErr(v225v3, v225v4, t, "equal-map-v225-p-len") } - for _, v := range []map[int16]int8{nil, map[int16]int8{}, map[int16]int8{10: 10}} { + for _, v := range []map[int16]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v226: %v\n", v) - var v226v1, v226v2 map[int16]int8 + var v226v1, v226v2 map[int16]int v226v1 = v bs226 := testMarshalErr(v226v1, h, t, "enc-map-v226") - if v != nil { - v226v2 = make(map[int16]int8, len(v)) - } + if v == nil { + v226v2 = nil + } else { + v226v2 = make(map[int16]int, len(v)) + } // reset map testUnmarshalErr(v226v2, bs226, h, t, "dec-map-v226") testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226") + if v == nil { + v226v2 = nil + } else { + v226v2 = make(map[int16]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v226v2), bs226, h, t, "dec-map-v226-noaddr") // decode into non-addressable map value + testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-noaddr") + if v == nil { + v226v2 = nil + } else { + v226v2 = make(map[int16]int, len(v)) + } // reset map + testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-len") + testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-len") bs226 = testMarshalErr(&v226v1, h, t, "enc-map-v226-p") v226v2 = nil - testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p") - testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p") + testUnmarshalErr(&v226v2, bs226, h, t, "dec-map-v226-p-nil") + testDeepEqualErr(v226v1, v226v2, t, "equal-map-v226-p-nil") + // ... + if v == nil { + v226v2 = nil + } else { + v226v2 = make(map[int16]int, len(v)) + } // reset map + var v226v3, v226v4 typMapMapInt16Int + v226v3 = typMapMapInt16Int(v226v1) + v226v4 = typMapMapInt16Int(v226v2) + bs226 = testMarshalErr(v226v3, h, t, "enc-map-v226-custom") + testUnmarshalErr(v226v4, bs226, h, t, "dec-map-v226-p-len") + testDeepEqualErr(v226v3, v226v4, t, "equal-map-v226-p-len") } - for _, v := range []map[int16]int16{nil, map[int16]int16{}, map[int16]int16{10: 10}} { + for _, v := range []map[int16]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v227: %v\n", v) - var v227v1, v227v2 map[int16]int16 + var v227v1, v227v2 map[int16]int8 v227v1 = v bs227 := testMarshalErr(v227v1, h, t, "enc-map-v227") - if v != nil { - v227v2 = make(map[int16]int16, len(v)) - } + if v == nil { + v227v2 = nil + } else { + v227v2 = make(map[int16]int8, len(v)) + } // reset map testUnmarshalErr(v227v2, bs227, h, t, "dec-map-v227") testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227") + if v == nil { + v227v2 = nil + } else { + v227v2 = make(map[int16]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v227v2), bs227, h, t, "dec-map-v227-noaddr") // decode into non-addressable map value + testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-noaddr") + if v == nil { + v227v2 = nil + } else { + v227v2 = make(map[int16]int8, len(v)) + } // reset map + testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-len") + testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-len") bs227 = testMarshalErr(&v227v1, h, t, "enc-map-v227-p") v227v2 = nil - testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p") - testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p") + testUnmarshalErr(&v227v2, bs227, h, t, "dec-map-v227-p-nil") + testDeepEqualErr(v227v1, v227v2, t, "equal-map-v227-p-nil") + // ... + if v == nil { + v227v2 = nil + } else { + v227v2 = make(map[int16]int8, len(v)) + } // reset map + var v227v3, v227v4 typMapMapInt16Int8 + v227v3 = typMapMapInt16Int8(v227v1) + v227v4 = typMapMapInt16Int8(v227v2) + bs227 = testMarshalErr(v227v3, h, t, "enc-map-v227-custom") + testUnmarshalErr(v227v4, bs227, h, t, "dec-map-v227-p-len") + testDeepEqualErr(v227v3, v227v4, t, "equal-map-v227-p-len") } - for _, v := range []map[int16]int32{nil, map[int16]int32{}, map[int16]int32{10: 10}} { + for _, v := range []map[int16]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v228: %v\n", v) - var v228v1, v228v2 map[int16]int32 + var v228v1, v228v2 map[int16]int16 v228v1 = v bs228 := testMarshalErr(v228v1, h, t, "enc-map-v228") - if v != nil { - v228v2 = make(map[int16]int32, len(v)) - } + if v == nil { + v228v2 = nil + } else { + v228v2 = make(map[int16]int16, len(v)) + } // reset map testUnmarshalErr(v228v2, bs228, h, t, "dec-map-v228") testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228") + if v == nil { + v228v2 = nil + } else { + v228v2 = make(map[int16]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v228v2), bs228, h, t, "dec-map-v228-noaddr") // decode into non-addressable map value + testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-noaddr") + if v == nil { + v228v2 = nil + } else { + v228v2 = make(map[int16]int16, len(v)) + } // reset map + testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-len") + testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-len") bs228 = testMarshalErr(&v228v1, h, t, "enc-map-v228-p") v228v2 = nil - testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p") - testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p") + testUnmarshalErr(&v228v2, bs228, h, t, "dec-map-v228-p-nil") + testDeepEqualErr(v228v1, v228v2, t, "equal-map-v228-p-nil") + // ... + if v == nil { + v228v2 = nil + } else { + v228v2 = make(map[int16]int16, len(v)) + } // reset map + var v228v3, v228v4 typMapMapInt16Int16 + v228v3 = typMapMapInt16Int16(v228v1) + v228v4 = typMapMapInt16Int16(v228v2) + bs228 = testMarshalErr(v228v3, h, t, "enc-map-v228-custom") + testUnmarshalErr(v228v4, bs228, h, t, "dec-map-v228-p-len") + testDeepEqualErr(v228v3, v228v4, t, "equal-map-v228-p-len") } - for _, v := range []map[int16]int64{nil, map[int16]int64{}, map[int16]int64{10: 10}} { + for _, v := range []map[int16]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v229: %v\n", v) - var v229v1, v229v2 map[int16]int64 + var v229v1, v229v2 map[int16]int32 v229v1 = v bs229 := testMarshalErr(v229v1, h, t, "enc-map-v229") - if v != nil { - v229v2 = make(map[int16]int64, len(v)) - } + if v == nil { + v229v2 = nil + } else { + v229v2 = make(map[int16]int32, len(v)) + } // reset map testUnmarshalErr(v229v2, bs229, h, t, "dec-map-v229") testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229") + if v == nil { + v229v2 = nil + } else { + v229v2 = make(map[int16]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v229v2), bs229, h, t, "dec-map-v229-noaddr") // decode into non-addressable map value + testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-noaddr") + if v == nil { + v229v2 = nil + } else { + v229v2 = make(map[int16]int32, len(v)) + } // reset map + testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-len") + testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-len") bs229 = testMarshalErr(&v229v1, h, t, "enc-map-v229-p") v229v2 = nil - testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p") - testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p") + testUnmarshalErr(&v229v2, bs229, h, t, "dec-map-v229-p-nil") + testDeepEqualErr(v229v1, v229v2, t, "equal-map-v229-p-nil") + // ... + if v == nil { + v229v2 = nil + } else { + v229v2 = make(map[int16]int32, len(v)) + } // reset map + var v229v3, v229v4 typMapMapInt16Int32 + v229v3 = typMapMapInt16Int32(v229v1) + v229v4 = typMapMapInt16Int32(v229v2) + bs229 = testMarshalErr(v229v3, h, t, "enc-map-v229-custom") + testUnmarshalErr(v229v4, bs229, h, t, "dec-map-v229-p-len") + testDeepEqualErr(v229v3, v229v4, t, "equal-map-v229-p-len") } - for _, v := range []map[int16]float32{nil, map[int16]float32{}, map[int16]float32{10: 10.1}} { + for _, v := range []map[int16]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v230: %v\n", v) - var v230v1, v230v2 map[int16]float32 + var v230v1, v230v2 map[int16]int64 v230v1 = v bs230 := testMarshalErr(v230v1, h, t, "enc-map-v230") - if v != nil { - v230v2 = make(map[int16]float32, len(v)) - } + if v == nil { + v230v2 = nil + } else { + v230v2 = make(map[int16]int64, len(v)) + } // reset map testUnmarshalErr(v230v2, bs230, h, t, "dec-map-v230") testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230") + if v == nil { + v230v2 = nil + } else { + v230v2 = make(map[int16]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v230v2), bs230, h, t, "dec-map-v230-noaddr") // decode into non-addressable map value + testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-noaddr") + if v == nil { + v230v2 = nil + } else { + v230v2 = make(map[int16]int64, len(v)) + } // reset map + testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-len") + testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-len") bs230 = testMarshalErr(&v230v1, h, t, "enc-map-v230-p") v230v2 = nil - testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p") - testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p") + testUnmarshalErr(&v230v2, bs230, h, t, "dec-map-v230-p-nil") + testDeepEqualErr(v230v1, v230v2, t, "equal-map-v230-p-nil") + // ... + if v == nil { + v230v2 = nil + } else { + v230v2 = make(map[int16]int64, len(v)) + } // reset map + var v230v3, v230v4 typMapMapInt16Int64 + v230v3 = typMapMapInt16Int64(v230v1) + v230v4 = typMapMapInt16Int64(v230v2) + bs230 = testMarshalErr(v230v3, h, t, "enc-map-v230-custom") + testUnmarshalErr(v230v4, bs230, h, t, "dec-map-v230-p-len") + testDeepEqualErr(v230v3, v230v4, t, "equal-map-v230-p-len") } - for _, v := range []map[int16]float64{nil, map[int16]float64{}, map[int16]float64{10: 10.1}} { + for _, v := range []map[int16]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v231: %v\n", v) - var v231v1, v231v2 map[int16]float64 + var v231v1, v231v2 map[int16]float32 v231v1 = v bs231 := testMarshalErr(v231v1, h, t, "enc-map-v231") - if v != nil { - v231v2 = make(map[int16]float64, len(v)) - } + if v == nil { + v231v2 = nil + } else { + v231v2 = make(map[int16]float32, len(v)) + } // reset map testUnmarshalErr(v231v2, bs231, h, t, "dec-map-v231") testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231") + if v == nil { + v231v2 = nil + } else { + v231v2 = make(map[int16]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v231v2), bs231, h, t, "dec-map-v231-noaddr") // decode into non-addressable map value + testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-noaddr") + if v == nil { + v231v2 = nil + } else { + v231v2 = make(map[int16]float32, len(v)) + } // reset map + testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-len") + testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-len") bs231 = testMarshalErr(&v231v1, h, t, "enc-map-v231-p") v231v2 = nil - testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p") - testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p") + testUnmarshalErr(&v231v2, bs231, h, t, "dec-map-v231-p-nil") + testDeepEqualErr(v231v1, v231v2, t, "equal-map-v231-p-nil") + // ... + if v == nil { + v231v2 = nil + } else { + v231v2 = make(map[int16]float32, len(v)) + } // reset map + var v231v3, v231v4 typMapMapInt16Float32 + v231v3 = typMapMapInt16Float32(v231v1) + v231v4 = typMapMapInt16Float32(v231v2) + bs231 = testMarshalErr(v231v3, h, t, "enc-map-v231-custom") + testUnmarshalErr(v231v4, bs231, h, t, "dec-map-v231-p-len") + testDeepEqualErr(v231v3, v231v4, t, "equal-map-v231-p-len") } - for _, v := range []map[int16]bool{nil, map[int16]bool{}, map[int16]bool{10: true}} { + for _, v := range []map[int16]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v232: %v\n", v) - var v232v1, v232v2 map[int16]bool + var v232v1, v232v2 map[int16]float64 v232v1 = v bs232 := testMarshalErr(v232v1, h, t, "enc-map-v232") - if v != nil { - v232v2 = make(map[int16]bool, len(v)) - } + if v == nil { + v232v2 = nil + } else { + v232v2 = make(map[int16]float64, len(v)) + } // reset map testUnmarshalErr(v232v2, bs232, h, t, "dec-map-v232") testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232") + if v == nil { + v232v2 = nil + } else { + v232v2 = make(map[int16]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v232v2), bs232, h, t, "dec-map-v232-noaddr") // decode into non-addressable map value + testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-noaddr") + if v == nil { + v232v2 = nil + } else { + v232v2 = make(map[int16]float64, len(v)) + } // reset map + testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-len") + testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-len") bs232 = testMarshalErr(&v232v1, h, t, "enc-map-v232-p") v232v2 = nil - testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p") - testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p") + testUnmarshalErr(&v232v2, bs232, h, t, "dec-map-v232-p-nil") + testDeepEqualErr(v232v1, v232v2, t, "equal-map-v232-p-nil") + // ... + if v == nil { + v232v2 = nil + } else { + v232v2 = make(map[int16]float64, len(v)) + } // reset map + var v232v3, v232v4 typMapMapInt16Float64 + v232v3 = typMapMapInt16Float64(v232v1) + v232v4 = typMapMapInt16Float64(v232v2) + bs232 = testMarshalErr(v232v3, h, t, "enc-map-v232-custom") + testUnmarshalErr(v232v4, bs232, h, t, "dec-map-v232-p-len") + testDeepEqualErr(v232v3, v232v4, t, "equal-map-v232-p-len") } - for _, v := range []map[int32]interface{}{nil, map[int32]interface{}{}, map[int32]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v235: %v\n", v) - var v235v1, v235v2 map[int32]interface{} - v235v1 = v - bs235 := testMarshalErr(v235v1, h, t, "enc-map-v235") - if v != nil { - v235v2 = make(map[int32]interface{}, len(v)) - } - testUnmarshalErr(v235v2, bs235, h, t, "dec-map-v235") - testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235") - bs235 = testMarshalErr(&v235v1, h, t, "enc-map-v235-p") - v235v2 = nil - testUnmarshalErr(&v235v2, bs235, h, t, "dec-map-v235-p") - testDeepEqualErr(v235v1, v235v2, t, "equal-map-v235-p") + for _, v := range []map[int16]bool{nil, {}, {33: false, 44: true}} { + // fmt.Printf(">>>> running mammoth map v233: %v\n", v) + var v233v1, v233v2 map[int16]bool + v233v1 = v + bs233 := testMarshalErr(v233v1, h, t, "enc-map-v233") + if v == nil { + v233v2 = nil + } else { + v233v2 = make(map[int16]bool, len(v)) + } // reset map + testUnmarshalErr(v233v2, bs233, h, t, "dec-map-v233") + testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233") + if v == nil { + v233v2 = nil + } else { + v233v2 = make(map[int16]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v233v2), bs233, h, t, "dec-map-v233-noaddr") // decode into non-addressable map value + testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-noaddr") + if v == nil { + v233v2 = nil + } else { + v233v2 = make(map[int16]bool, len(v)) + } // reset map + testUnmarshalErr(&v233v2, bs233, h, t, "dec-map-v233-p-len") + testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-p-len") + bs233 = testMarshalErr(&v233v1, h, t, "enc-map-v233-p") + v233v2 = nil + testUnmarshalErr(&v233v2, bs233, h, t, "dec-map-v233-p-nil") + testDeepEqualErr(v233v1, v233v2, t, "equal-map-v233-p-nil") + // ... + if v == nil { + v233v2 = nil + } else { + v233v2 = make(map[int16]bool, len(v)) + } // reset map + var v233v3, v233v4 typMapMapInt16Bool + v233v3 = typMapMapInt16Bool(v233v1) + v233v4 = typMapMapInt16Bool(v233v2) + bs233 = testMarshalErr(v233v3, h, t, "enc-map-v233-custom") + testUnmarshalErr(v233v4, bs233, h, t, "dec-map-v233-p-len") + testDeepEqualErr(v233v3, v233v4, t, "equal-map-v233-p-len") } - for _, v := range []map[int32]string{nil, map[int32]string{}, map[int32]string{10: "some-string"}} { + for _, v := range []map[int32]interface{}{nil, {}, {33: nil, 44: "string-is-an-interface"}} { // fmt.Printf(">>>> running mammoth map v236: %v\n", v) - var v236v1, v236v2 map[int32]string + var v236v1, v236v2 map[int32]interface{} v236v1 = v bs236 := testMarshalErr(v236v1, h, t, "enc-map-v236") - if v != nil { - v236v2 = make(map[int32]string, len(v)) - } + if v == nil { + v236v2 = nil + } else { + v236v2 = make(map[int32]interface{}, len(v)) + } // reset map testUnmarshalErr(v236v2, bs236, h, t, "dec-map-v236") testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236") + if v == nil { + v236v2 = nil + } else { + v236v2 = make(map[int32]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v236v2), bs236, h, t, "dec-map-v236-noaddr") // decode into non-addressable map value + testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-noaddr") + if v == nil { + v236v2 = nil + } else { + v236v2 = make(map[int32]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-len") + testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-len") bs236 = testMarshalErr(&v236v1, h, t, "enc-map-v236-p") v236v2 = nil - testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p") - testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p") + testUnmarshalErr(&v236v2, bs236, h, t, "dec-map-v236-p-nil") + testDeepEqualErr(v236v1, v236v2, t, "equal-map-v236-p-nil") + // ... + if v == nil { + v236v2 = nil + } else { + v236v2 = make(map[int32]interface{}, len(v)) + } // reset map + var v236v3, v236v4 typMapMapInt32Intf + v236v3 = typMapMapInt32Intf(v236v1) + v236v4 = typMapMapInt32Intf(v236v2) + bs236 = testMarshalErr(v236v3, h, t, "enc-map-v236-custom") + testUnmarshalErr(v236v4, bs236, h, t, "dec-map-v236-p-len") + testDeepEqualErr(v236v3, v236v4, t, "equal-map-v236-p-len") } - for _, v := range []map[int32]uint{nil, map[int32]uint{}, map[int32]uint{10: 10}} { + for _, v := range []map[int32]string{nil, {}, {33: "", 44: "some-string"}} { // fmt.Printf(">>>> running mammoth map v237: %v\n", v) - var v237v1, v237v2 map[int32]uint + var v237v1, v237v2 map[int32]string v237v1 = v bs237 := testMarshalErr(v237v1, h, t, "enc-map-v237") - if v != nil { - v237v2 = make(map[int32]uint, len(v)) - } + if v == nil { + v237v2 = nil + } else { + v237v2 = make(map[int32]string, len(v)) + } // reset map testUnmarshalErr(v237v2, bs237, h, t, "dec-map-v237") testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237") + if v == nil { + v237v2 = nil + } else { + v237v2 = make(map[int32]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v237v2), bs237, h, t, "dec-map-v237-noaddr") // decode into non-addressable map value + testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-noaddr") + if v == nil { + v237v2 = nil + } else { + v237v2 = make(map[int32]string, len(v)) + } // reset map + testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-len") + testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-len") bs237 = testMarshalErr(&v237v1, h, t, "enc-map-v237-p") v237v2 = nil - testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p") - testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p") + testUnmarshalErr(&v237v2, bs237, h, t, "dec-map-v237-p-nil") + testDeepEqualErr(v237v1, v237v2, t, "equal-map-v237-p-nil") + // ... + if v == nil { + v237v2 = nil + } else { + v237v2 = make(map[int32]string, len(v)) + } // reset map + var v237v3, v237v4 typMapMapInt32String + v237v3 = typMapMapInt32String(v237v1) + v237v4 = typMapMapInt32String(v237v2) + bs237 = testMarshalErr(v237v3, h, t, "enc-map-v237-custom") + testUnmarshalErr(v237v4, bs237, h, t, "dec-map-v237-p-len") + testDeepEqualErr(v237v3, v237v4, t, "equal-map-v237-p-len") } - for _, v := range []map[int32]uint8{nil, map[int32]uint8{}, map[int32]uint8{10: 10}} { + for _, v := range []map[int32]uint{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v238: %v\n", v) - var v238v1, v238v2 map[int32]uint8 + var v238v1, v238v2 map[int32]uint v238v1 = v bs238 := testMarshalErr(v238v1, h, t, "enc-map-v238") - if v != nil { - v238v2 = make(map[int32]uint8, len(v)) - } + if v == nil { + v238v2 = nil + } else { + v238v2 = make(map[int32]uint, len(v)) + } // reset map testUnmarshalErr(v238v2, bs238, h, t, "dec-map-v238") testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238") + if v == nil { + v238v2 = nil + } else { + v238v2 = make(map[int32]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v238v2), bs238, h, t, "dec-map-v238-noaddr") // decode into non-addressable map value + testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-noaddr") + if v == nil { + v238v2 = nil + } else { + v238v2 = make(map[int32]uint, len(v)) + } // reset map + testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-len") + testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-len") bs238 = testMarshalErr(&v238v1, h, t, "enc-map-v238-p") v238v2 = nil - testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p") - testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p") + testUnmarshalErr(&v238v2, bs238, h, t, "dec-map-v238-p-nil") + testDeepEqualErr(v238v1, v238v2, t, "equal-map-v238-p-nil") + // ... + if v == nil { + v238v2 = nil + } else { + v238v2 = make(map[int32]uint, len(v)) + } // reset map + var v238v3, v238v4 typMapMapInt32Uint + v238v3 = typMapMapInt32Uint(v238v1) + v238v4 = typMapMapInt32Uint(v238v2) + bs238 = testMarshalErr(v238v3, h, t, "enc-map-v238-custom") + testUnmarshalErr(v238v4, bs238, h, t, "dec-map-v238-p-len") + testDeepEqualErr(v238v3, v238v4, t, "equal-map-v238-p-len") } - for _, v := range []map[int32]uint16{nil, map[int32]uint16{}, map[int32]uint16{10: 10}} { + for _, v := range []map[int32]uint8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v239: %v\n", v) - var v239v1, v239v2 map[int32]uint16 + var v239v1, v239v2 map[int32]uint8 v239v1 = v bs239 := testMarshalErr(v239v1, h, t, "enc-map-v239") - if v != nil { - v239v2 = make(map[int32]uint16, len(v)) - } + if v == nil { + v239v2 = nil + } else { + v239v2 = make(map[int32]uint8, len(v)) + } // reset map testUnmarshalErr(v239v2, bs239, h, t, "dec-map-v239") testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239") + if v == nil { + v239v2 = nil + } else { + v239v2 = make(map[int32]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v239v2), bs239, h, t, "dec-map-v239-noaddr") // decode into non-addressable map value + testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-noaddr") + if v == nil { + v239v2 = nil + } else { + v239v2 = make(map[int32]uint8, len(v)) + } // reset map + testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-len") + testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-len") bs239 = testMarshalErr(&v239v1, h, t, "enc-map-v239-p") v239v2 = nil - testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p") - testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p") + testUnmarshalErr(&v239v2, bs239, h, t, "dec-map-v239-p-nil") + testDeepEqualErr(v239v1, v239v2, t, "equal-map-v239-p-nil") + // ... + if v == nil { + v239v2 = nil + } else { + v239v2 = make(map[int32]uint8, len(v)) + } // reset map + var v239v3, v239v4 typMapMapInt32Uint8 + v239v3 = typMapMapInt32Uint8(v239v1) + v239v4 = typMapMapInt32Uint8(v239v2) + bs239 = testMarshalErr(v239v3, h, t, "enc-map-v239-custom") + testUnmarshalErr(v239v4, bs239, h, t, "dec-map-v239-p-len") + testDeepEqualErr(v239v3, v239v4, t, "equal-map-v239-p-len") } - for _, v := range []map[int32]uint32{nil, map[int32]uint32{}, map[int32]uint32{10: 10}} { + for _, v := range []map[int32]uint16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v240: %v\n", v) - var v240v1, v240v2 map[int32]uint32 + var v240v1, v240v2 map[int32]uint16 v240v1 = v bs240 := testMarshalErr(v240v1, h, t, "enc-map-v240") - if v != nil { - v240v2 = make(map[int32]uint32, len(v)) - } + if v == nil { + v240v2 = nil + } else { + v240v2 = make(map[int32]uint16, len(v)) + } // reset map testUnmarshalErr(v240v2, bs240, h, t, "dec-map-v240") testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240") + if v == nil { + v240v2 = nil + } else { + v240v2 = make(map[int32]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v240v2), bs240, h, t, "dec-map-v240-noaddr") // decode into non-addressable map value + testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-noaddr") + if v == nil { + v240v2 = nil + } else { + v240v2 = make(map[int32]uint16, len(v)) + } // reset map + testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-len") + testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-len") bs240 = testMarshalErr(&v240v1, h, t, "enc-map-v240-p") v240v2 = nil - testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p") - testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p") + testUnmarshalErr(&v240v2, bs240, h, t, "dec-map-v240-p-nil") + testDeepEqualErr(v240v1, v240v2, t, "equal-map-v240-p-nil") + // ... + if v == nil { + v240v2 = nil + } else { + v240v2 = make(map[int32]uint16, len(v)) + } // reset map + var v240v3, v240v4 typMapMapInt32Uint16 + v240v3 = typMapMapInt32Uint16(v240v1) + v240v4 = typMapMapInt32Uint16(v240v2) + bs240 = testMarshalErr(v240v3, h, t, "enc-map-v240-custom") + testUnmarshalErr(v240v4, bs240, h, t, "dec-map-v240-p-len") + testDeepEqualErr(v240v3, v240v4, t, "equal-map-v240-p-len") } - for _, v := range []map[int32]uint64{nil, map[int32]uint64{}, map[int32]uint64{10: 10}} { + for _, v := range []map[int32]uint32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v241: %v\n", v) - var v241v1, v241v2 map[int32]uint64 + var v241v1, v241v2 map[int32]uint32 v241v1 = v bs241 := testMarshalErr(v241v1, h, t, "enc-map-v241") - if v != nil { - v241v2 = make(map[int32]uint64, len(v)) - } + if v == nil { + v241v2 = nil + } else { + v241v2 = make(map[int32]uint32, len(v)) + } // reset map testUnmarshalErr(v241v2, bs241, h, t, "dec-map-v241") testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241") + if v == nil { + v241v2 = nil + } else { + v241v2 = make(map[int32]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v241v2), bs241, h, t, "dec-map-v241-noaddr") // decode into non-addressable map value + testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-noaddr") + if v == nil { + v241v2 = nil + } else { + v241v2 = make(map[int32]uint32, len(v)) + } // reset map + testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-len") + testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-len") bs241 = testMarshalErr(&v241v1, h, t, "enc-map-v241-p") v241v2 = nil - testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p") - testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p") + testUnmarshalErr(&v241v2, bs241, h, t, "dec-map-v241-p-nil") + testDeepEqualErr(v241v1, v241v2, t, "equal-map-v241-p-nil") + // ... + if v == nil { + v241v2 = nil + } else { + v241v2 = make(map[int32]uint32, len(v)) + } // reset map + var v241v3, v241v4 typMapMapInt32Uint32 + v241v3 = typMapMapInt32Uint32(v241v1) + v241v4 = typMapMapInt32Uint32(v241v2) + bs241 = testMarshalErr(v241v3, h, t, "enc-map-v241-custom") + testUnmarshalErr(v241v4, bs241, h, t, "dec-map-v241-p-len") + testDeepEqualErr(v241v3, v241v4, t, "equal-map-v241-p-len") } - for _, v := range []map[int32]uintptr{nil, map[int32]uintptr{}, map[int32]uintptr{10: 10}} { + for _, v := range []map[int32]uint64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v242: %v\n", v) - var v242v1, v242v2 map[int32]uintptr + var v242v1, v242v2 map[int32]uint64 v242v1 = v bs242 := testMarshalErr(v242v1, h, t, "enc-map-v242") - if v != nil { - v242v2 = make(map[int32]uintptr, len(v)) - } + if v == nil { + v242v2 = nil + } else { + v242v2 = make(map[int32]uint64, len(v)) + } // reset map testUnmarshalErr(v242v2, bs242, h, t, "dec-map-v242") testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242") + if v == nil { + v242v2 = nil + } else { + v242v2 = make(map[int32]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v242v2), bs242, h, t, "dec-map-v242-noaddr") // decode into non-addressable map value + testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-noaddr") + if v == nil { + v242v2 = nil + } else { + v242v2 = make(map[int32]uint64, len(v)) + } // reset map + testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-len") + testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-len") bs242 = testMarshalErr(&v242v1, h, t, "enc-map-v242-p") v242v2 = nil - testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p") - testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p") + testUnmarshalErr(&v242v2, bs242, h, t, "dec-map-v242-p-nil") + testDeepEqualErr(v242v1, v242v2, t, "equal-map-v242-p-nil") + // ... + if v == nil { + v242v2 = nil + } else { + v242v2 = make(map[int32]uint64, len(v)) + } // reset map + var v242v3, v242v4 typMapMapInt32Uint64 + v242v3 = typMapMapInt32Uint64(v242v1) + v242v4 = typMapMapInt32Uint64(v242v2) + bs242 = testMarshalErr(v242v3, h, t, "enc-map-v242-custom") + testUnmarshalErr(v242v4, bs242, h, t, "dec-map-v242-p-len") + testDeepEqualErr(v242v3, v242v4, t, "equal-map-v242-p-len") } - for _, v := range []map[int32]int{nil, map[int32]int{}, map[int32]int{10: 10}} { + for _, v := range []map[int32]uintptr{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v243: %v\n", v) - var v243v1, v243v2 map[int32]int + var v243v1, v243v2 map[int32]uintptr v243v1 = v bs243 := testMarshalErr(v243v1, h, t, "enc-map-v243") - if v != nil { - v243v2 = make(map[int32]int, len(v)) - } + if v == nil { + v243v2 = nil + } else { + v243v2 = make(map[int32]uintptr, len(v)) + } // reset map testUnmarshalErr(v243v2, bs243, h, t, "dec-map-v243") testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243") + if v == nil { + v243v2 = nil + } else { + v243v2 = make(map[int32]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v243v2), bs243, h, t, "dec-map-v243-noaddr") // decode into non-addressable map value + testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-noaddr") + if v == nil { + v243v2 = nil + } else { + v243v2 = make(map[int32]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-len") + testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-len") bs243 = testMarshalErr(&v243v1, h, t, "enc-map-v243-p") v243v2 = nil - testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p") - testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p") + testUnmarshalErr(&v243v2, bs243, h, t, "dec-map-v243-p-nil") + testDeepEqualErr(v243v1, v243v2, t, "equal-map-v243-p-nil") + // ... + if v == nil { + v243v2 = nil + } else { + v243v2 = make(map[int32]uintptr, len(v)) + } // reset map + var v243v3, v243v4 typMapMapInt32Uintptr + v243v3 = typMapMapInt32Uintptr(v243v1) + v243v4 = typMapMapInt32Uintptr(v243v2) + bs243 = testMarshalErr(v243v3, h, t, "enc-map-v243-custom") + testUnmarshalErr(v243v4, bs243, h, t, "dec-map-v243-p-len") + testDeepEqualErr(v243v3, v243v4, t, "equal-map-v243-p-len") } - for _, v := range []map[int32]int8{nil, map[int32]int8{}, map[int32]int8{10: 10}} { + for _, v := range []map[int32]int{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v244: %v\n", v) - var v244v1, v244v2 map[int32]int8 + var v244v1, v244v2 map[int32]int v244v1 = v bs244 := testMarshalErr(v244v1, h, t, "enc-map-v244") - if v != nil { - v244v2 = make(map[int32]int8, len(v)) - } + if v == nil { + v244v2 = nil + } else { + v244v2 = make(map[int32]int, len(v)) + } // reset map testUnmarshalErr(v244v2, bs244, h, t, "dec-map-v244") testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244") + if v == nil { + v244v2 = nil + } else { + v244v2 = make(map[int32]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v244v2), bs244, h, t, "dec-map-v244-noaddr") // decode into non-addressable map value + testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-noaddr") + if v == nil { + v244v2 = nil + } else { + v244v2 = make(map[int32]int, len(v)) + } // reset map + testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-len") + testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-len") bs244 = testMarshalErr(&v244v1, h, t, "enc-map-v244-p") v244v2 = nil - testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p") - testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p") + testUnmarshalErr(&v244v2, bs244, h, t, "dec-map-v244-p-nil") + testDeepEqualErr(v244v1, v244v2, t, "equal-map-v244-p-nil") + // ... + if v == nil { + v244v2 = nil + } else { + v244v2 = make(map[int32]int, len(v)) + } // reset map + var v244v3, v244v4 typMapMapInt32Int + v244v3 = typMapMapInt32Int(v244v1) + v244v4 = typMapMapInt32Int(v244v2) + bs244 = testMarshalErr(v244v3, h, t, "enc-map-v244-custom") + testUnmarshalErr(v244v4, bs244, h, t, "dec-map-v244-p-len") + testDeepEqualErr(v244v3, v244v4, t, "equal-map-v244-p-len") } - for _, v := range []map[int32]int16{nil, map[int32]int16{}, map[int32]int16{10: 10}} { + for _, v := range []map[int32]int8{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v245: %v\n", v) - var v245v1, v245v2 map[int32]int16 + var v245v1, v245v2 map[int32]int8 v245v1 = v bs245 := testMarshalErr(v245v1, h, t, "enc-map-v245") - if v != nil { - v245v2 = make(map[int32]int16, len(v)) - } + if v == nil { + v245v2 = nil + } else { + v245v2 = make(map[int32]int8, len(v)) + } // reset map testUnmarshalErr(v245v2, bs245, h, t, "dec-map-v245") testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245") + if v == nil { + v245v2 = nil + } else { + v245v2 = make(map[int32]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v245v2), bs245, h, t, "dec-map-v245-noaddr") // decode into non-addressable map value + testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-noaddr") + if v == nil { + v245v2 = nil + } else { + v245v2 = make(map[int32]int8, len(v)) + } // reset map + testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-len") + testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-len") bs245 = testMarshalErr(&v245v1, h, t, "enc-map-v245-p") v245v2 = nil - testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p") - testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p") + testUnmarshalErr(&v245v2, bs245, h, t, "dec-map-v245-p-nil") + testDeepEqualErr(v245v1, v245v2, t, "equal-map-v245-p-nil") + // ... + if v == nil { + v245v2 = nil + } else { + v245v2 = make(map[int32]int8, len(v)) + } // reset map + var v245v3, v245v4 typMapMapInt32Int8 + v245v3 = typMapMapInt32Int8(v245v1) + v245v4 = typMapMapInt32Int8(v245v2) + bs245 = testMarshalErr(v245v3, h, t, "enc-map-v245-custom") + testUnmarshalErr(v245v4, bs245, h, t, "dec-map-v245-p-len") + testDeepEqualErr(v245v3, v245v4, t, "equal-map-v245-p-len") } - for _, v := range []map[int32]int32{nil, map[int32]int32{}, map[int32]int32{10: 10}} { + for _, v := range []map[int32]int16{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v246: %v\n", v) - var v246v1, v246v2 map[int32]int32 + var v246v1, v246v2 map[int32]int16 v246v1 = v bs246 := testMarshalErr(v246v1, h, t, "enc-map-v246") - if v != nil { - v246v2 = make(map[int32]int32, len(v)) - } + if v == nil { + v246v2 = nil + } else { + v246v2 = make(map[int32]int16, len(v)) + } // reset map testUnmarshalErr(v246v2, bs246, h, t, "dec-map-v246") testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246") + if v == nil { + v246v2 = nil + } else { + v246v2 = make(map[int32]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v246v2), bs246, h, t, "dec-map-v246-noaddr") // decode into non-addressable map value + testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-noaddr") + if v == nil { + v246v2 = nil + } else { + v246v2 = make(map[int32]int16, len(v)) + } // reset map + testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-len") + testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-len") bs246 = testMarshalErr(&v246v1, h, t, "enc-map-v246-p") v246v2 = nil - testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p") - testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p") + testUnmarshalErr(&v246v2, bs246, h, t, "dec-map-v246-p-nil") + testDeepEqualErr(v246v1, v246v2, t, "equal-map-v246-p-nil") + // ... + if v == nil { + v246v2 = nil + } else { + v246v2 = make(map[int32]int16, len(v)) + } // reset map + var v246v3, v246v4 typMapMapInt32Int16 + v246v3 = typMapMapInt32Int16(v246v1) + v246v4 = typMapMapInt32Int16(v246v2) + bs246 = testMarshalErr(v246v3, h, t, "enc-map-v246-custom") + testUnmarshalErr(v246v4, bs246, h, t, "dec-map-v246-p-len") + testDeepEqualErr(v246v3, v246v4, t, "equal-map-v246-p-len") } - for _, v := range []map[int32]int64{nil, map[int32]int64{}, map[int32]int64{10: 10}} { + for _, v := range []map[int32]int32{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v247: %v\n", v) - var v247v1, v247v2 map[int32]int64 + var v247v1, v247v2 map[int32]int32 v247v1 = v bs247 := testMarshalErr(v247v1, h, t, "enc-map-v247") - if v != nil { - v247v2 = make(map[int32]int64, len(v)) - } + if v == nil { + v247v2 = nil + } else { + v247v2 = make(map[int32]int32, len(v)) + } // reset map testUnmarshalErr(v247v2, bs247, h, t, "dec-map-v247") testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247") + if v == nil { + v247v2 = nil + } else { + v247v2 = make(map[int32]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v247v2), bs247, h, t, "dec-map-v247-noaddr") // decode into non-addressable map value + testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-noaddr") + if v == nil { + v247v2 = nil + } else { + v247v2 = make(map[int32]int32, len(v)) + } // reset map + testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-len") + testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-len") bs247 = testMarshalErr(&v247v1, h, t, "enc-map-v247-p") v247v2 = nil - testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p") - testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p") + testUnmarshalErr(&v247v2, bs247, h, t, "dec-map-v247-p-nil") + testDeepEqualErr(v247v1, v247v2, t, "equal-map-v247-p-nil") + // ... + if v == nil { + v247v2 = nil + } else { + v247v2 = make(map[int32]int32, len(v)) + } // reset map + var v247v3, v247v4 typMapMapInt32Int32 + v247v3 = typMapMapInt32Int32(v247v1) + v247v4 = typMapMapInt32Int32(v247v2) + bs247 = testMarshalErr(v247v3, h, t, "enc-map-v247-custom") + testUnmarshalErr(v247v4, bs247, h, t, "dec-map-v247-p-len") + testDeepEqualErr(v247v3, v247v4, t, "equal-map-v247-p-len") } - for _, v := range []map[int32]float32{nil, map[int32]float32{}, map[int32]float32{10: 10.1}} { + for _, v := range []map[int32]int64{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v248: %v\n", v) - var v248v1, v248v2 map[int32]float32 + var v248v1, v248v2 map[int32]int64 v248v1 = v bs248 := testMarshalErr(v248v1, h, t, "enc-map-v248") - if v != nil { - v248v2 = make(map[int32]float32, len(v)) - } + if v == nil { + v248v2 = nil + } else { + v248v2 = make(map[int32]int64, len(v)) + } // reset map testUnmarshalErr(v248v2, bs248, h, t, "dec-map-v248") testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248") + if v == nil { + v248v2 = nil + } else { + v248v2 = make(map[int32]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v248v2), bs248, h, t, "dec-map-v248-noaddr") // decode into non-addressable map value + testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-noaddr") + if v == nil { + v248v2 = nil + } else { + v248v2 = make(map[int32]int64, len(v)) + } // reset map + testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-len") + testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-len") bs248 = testMarshalErr(&v248v1, h, t, "enc-map-v248-p") v248v2 = nil - testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p") - testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p") + testUnmarshalErr(&v248v2, bs248, h, t, "dec-map-v248-p-nil") + testDeepEqualErr(v248v1, v248v2, t, "equal-map-v248-p-nil") + // ... + if v == nil { + v248v2 = nil + } else { + v248v2 = make(map[int32]int64, len(v)) + } // reset map + var v248v3, v248v4 typMapMapInt32Int64 + v248v3 = typMapMapInt32Int64(v248v1) + v248v4 = typMapMapInt32Int64(v248v2) + bs248 = testMarshalErr(v248v3, h, t, "enc-map-v248-custom") + testUnmarshalErr(v248v4, bs248, h, t, "dec-map-v248-p-len") + testDeepEqualErr(v248v3, v248v4, t, "equal-map-v248-p-len") } - for _, v := range []map[int32]float64{nil, map[int32]float64{}, map[int32]float64{10: 10.1}} { + for _, v := range []map[int32]float32{nil, {}, {44: 0, 33: 22.2}} { // fmt.Printf(">>>> running mammoth map v249: %v\n", v) - var v249v1, v249v2 map[int32]float64 + var v249v1, v249v2 map[int32]float32 v249v1 = v bs249 := testMarshalErr(v249v1, h, t, "enc-map-v249") - if v != nil { - v249v2 = make(map[int32]float64, len(v)) - } + if v == nil { + v249v2 = nil + } else { + v249v2 = make(map[int32]float32, len(v)) + } // reset map testUnmarshalErr(v249v2, bs249, h, t, "dec-map-v249") testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249") + if v == nil { + v249v2 = nil + } else { + v249v2 = make(map[int32]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v249v2), bs249, h, t, "dec-map-v249-noaddr") // decode into non-addressable map value + testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-noaddr") + if v == nil { + v249v2 = nil + } else { + v249v2 = make(map[int32]float32, len(v)) + } // reset map + testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-len") + testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-len") bs249 = testMarshalErr(&v249v1, h, t, "enc-map-v249-p") v249v2 = nil - testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p") - testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p") + testUnmarshalErr(&v249v2, bs249, h, t, "dec-map-v249-p-nil") + testDeepEqualErr(v249v1, v249v2, t, "equal-map-v249-p-nil") + // ... + if v == nil { + v249v2 = nil + } else { + v249v2 = make(map[int32]float32, len(v)) + } // reset map + var v249v3, v249v4 typMapMapInt32Float32 + v249v3 = typMapMapInt32Float32(v249v1) + v249v4 = typMapMapInt32Float32(v249v2) + bs249 = testMarshalErr(v249v3, h, t, "enc-map-v249-custom") + testUnmarshalErr(v249v4, bs249, h, t, "dec-map-v249-p-len") + testDeepEqualErr(v249v3, v249v4, t, "equal-map-v249-p-len") } - for _, v := range []map[int32]bool{nil, map[int32]bool{}, map[int32]bool{10: true}} { + for _, v := range []map[int32]float64{nil, {}, {44: 0, 33: 11.1}} { // fmt.Printf(">>>> running mammoth map v250: %v\n", v) - var v250v1, v250v2 map[int32]bool + var v250v1, v250v2 map[int32]float64 v250v1 = v bs250 := testMarshalErr(v250v1, h, t, "enc-map-v250") - if v != nil { - v250v2 = make(map[int32]bool, len(v)) - } + if v == nil { + v250v2 = nil + } else { + v250v2 = make(map[int32]float64, len(v)) + } // reset map testUnmarshalErr(v250v2, bs250, h, t, "dec-map-v250") testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250") + if v == nil { + v250v2 = nil + } else { + v250v2 = make(map[int32]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v250v2), bs250, h, t, "dec-map-v250-noaddr") // decode into non-addressable map value + testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-noaddr") + if v == nil { + v250v2 = nil + } else { + v250v2 = make(map[int32]float64, len(v)) + } // reset map + testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-len") + testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-len") bs250 = testMarshalErr(&v250v1, h, t, "enc-map-v250-p") v250v2 = nil - testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p") - testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p") + testUnmarshalErr(&v250v2, bs250, h, t, "dec-map-v250-p-nil") + testDeepEqualErr(v250v1, v250v2, t, "equal-map-v250-p-nil") + // ... + if v == nil { + v250v2 = nil + } else { + v250v2 = make(map[int32]float64, len(v)) + } // reset map + var v250v3, v250v4 typMapMapInt32Float64 + v250v3 = typMapMapInt32Float64(v250v1) + v250v4 = typMapMapInt32Float64(v250v2) + bs250 = testMarshalErr(v250v3, h, t, "enc-map-v250-custom") + testUnmarshalErr(v250v4, bs250, h, t, "dec-map-v250-p-len") + testDeepEqualErr(v250v3, v250v4, t, "equal-map-v250-p-len") } - for _, v := range []map[int64]interface{}{nil, map[int64]interface{}{}, map[int64]interface{}{10: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v253: %v\n", v) - var v253v1, v253v2 map[int64]interface{} - v253v1 = v - bs253 := testMarshalErr(v253v1, h, t, "enc-map-v253") - if v != nil { - v253v2 = make(map[int64]interface{}, len(v)) - } - testUnmarshalErr(v253v2, bs253, h, t, "dec-map-v253") - testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253") - bs253 = testMarshalErr(&v253v1, h, t, "enc-map-v253-p") - v253v2 = nil - testUnmarshalErr(&v253v2, bs253, h, t, "dec-map-v253-p") - testDeepEqualErr(v253v1, v253v2, t, "equal-map-v253-p") + for _, v := range []map[int32]bool{nil, {}, {44: false, 33: true}} { + // fmt.Printf(">>>> running mammoth map v251: %v\n", v) + var v251v1, v251v2 map[int32]bool + v251v1 = v + bs251 := testMarshalErr(v251v1, h, t, "enc-map-v251") + if v == nil { + v251v2 = nil + } else { + v251v2 = make(map[int32]bool, len(v)) + } // reset map + testUnmarshalErr(v251v2, bs251, h, t, "dec-map-v251") + testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251") + if v == nil { + v251v2 = nil + } else { + v251v2 = make(map[int32]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v251v2), bs251, h, t, "dec-map-v251-noaddr") // decode into non-addressable map value + testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-noaddr") + if v == nil { + v251v2 = nil + } else { + v251v2 = make(map[int32]bool, len(v)) + } // reset map + testUnmarshalErr(&v251v2, bs251, h, t, "dec-map-v251-p-len") + testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-p-len") + bs251 = testMarshalErr(&v251v1, h, t, "enc-map-v251-p") + v251v2 = nil + testUnmarshalErr(&v251v2, bs251, h, t, "dec-map-v251-p-nil") + testDeepEqualErr(v251v1, v251v2, t, "equal-map-v251-p-nil") + // ... + if v == nil { + v251v2 = nil + } else { + v251v2 = make(map[int32]bool, len(v)) + } // reset map + var v251v3, v251v4 typMapMapInt32Bool + v251v3 = typMapMapInt32Bool(v251v1) + v251v4 = typMapMapInt32Bool(v251v2) + bs251 = testMarshalErr(v251v3, h, t, "enc-map-v251-custom") + testUnmarshalErr(v251v4, bs251, h, t, "dec-map-v251-p-len") + testDeepEqualErr(v251v3, v251v4, t, "equal-map-v251-p-len") } - for _, v := range []map[int64]string{nil, map[int64]string{}, map[int64]string{10: "some-string"}} { + for _, v := range []map[int64]interface{}{nil, {}, {44: nil, 33: "string-is-an-interface-2"}} { // fmt.Printf(">>>> running mammoth map v254: %v\n", v) - var v254v1, v254v2 map[int64]string + var v254v1, v254v2 map[int64]interface{} v254v1 = v bs254 := testMarshalErr(v254v1, h, t, "enc-map-v254") - if v != nil { - v254v2 = make(map[int64]string, len(v)) - } + if v == nil { + v254v2 = nil + } else { + v254v2 = make(map[int64]interface{}, len(v)) + } // reset map testUnmarshalErr(v254v2, bs254, h, t, "dec-map-v254") testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254") + if v == nil { + v254v2 = nil + } else { + v254v2 = make(map[int64]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v254v2), bs254, h, t, "dec-map-v254-noaddr") // decode into non-addressable map value + testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-noaddr") + if v == nil { + v254v2 = nil + } else { + v254v2 = make(map[int64]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-len") + testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-len") bs254 = testMarshalErr(&v254v1, h, t, "enc-map-v254-p") v254v2 = nil - testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p") - testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p") + testUnmarshalErr(&v254v2, bs254, h, t, "dec-map-v254-p-nil") + testDeepEqualErr(v254v1, v254v2, t, "equal-map-v254-p-nil") + // ... + if v == nil { + v254v2 = nil + } else { + v254v2 = make(map[int64]interface{}, len(v)) + } // reset map + var v254v3, v254v4 typMapMapInt64Intf + v254v3 = typMapMapInt64Intf(v254v1) + v254v4 = typMapMapInt64Intf(v254v2) + bs254 = testMarshalErr(v254v3, h, t, "enc-map-v254-custom") + testUnmarshalErr(v254v4, bs254, h, t, "dec-map-v254-p-len") + testDeepEqualErr(v254v3, v254v4, t, "equal-map-v254-p-len") } - for _, v := range []map[int64]uint{nil, map[int64]uint{}, map[int64]uint{10: 10}} { + for _, v := range []map[int64]string{nil, {}, {44: "", 33: "some-string-2"}} { // fmt.Printf(">>>> running mammoth map v255: %v\n", v) - var v255v1, v255v2 map[int64]uint + var v255v1, v255v2 map[int64]string v255v1 = v bs255 := testMarshalErr(v255v1, h, t, "enc-map-v255") - if v != nil { - v255v2 = make(map[int64]uint, len(v)) - } + if v == nil { + v255v2 = nil + } else { + v255v2 = make(map[int64]string, len(v)) + } // reset map testUnmarshalErr(v255v2, bs255, h, t, "dec-map-v255") testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255") + if v == nil { + v255v2 = nil + } else { + v255v2 = make(map[int64]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v255v2), bs255, h, t, "dec-map-v255-noaddr") // decode into non-addressable map value + testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-noaddr") + if v == nil { + v255v2 = nil + } else { + v255v2 = make(map[int64]string, len(v)) + } // reset map + testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-len") + testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-len") bs255 = testMarshalErr(&v255v1, h, t, "enc-map-v255-p") v255v2 = nil - testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p") - testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p") + testUnmarshalErr(&v255v2, bs255, h, t, "dec-map-v255-p-nil") + testDeepEqualErr(v255v1, v255v2, t, "equal-map-v255-p-nil") + // ... + if v == nil { + v255v2 = nil + } else { + v255v2 = make(map[int64]string, len(v)) + } // reset map + var v255v3, v255v4 typMapMapInt64String + v255v3 = typMapMapInt64String(v255v1) + v255v4 = typMapMapInt64String(v255v2) + bs255 = testMarshalErr(v255v3, h, t, "enc-map-v255-custom") + testUnmarshalErr(v255v4, bs255, h, t, "dec-map-v255-p-len") + testDeepEqualErr(v255v3, v255v4, t, "equal-map-v255-p-len") } - for _, v := range []map[int64]uint8{nil, map[int64]uint8{}, map[int64]uint8{10: 10}} { + for _, v := range []map[int64]uint{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v256: %v\n", v) - var v256v1, v256v2 map[int64]uint8 + var v256v1, v256v2 map[int64]uint v256v1 = v bs256 := testMarshalErr(v256v1, h, t, "enc-map-v256") - if v != nil { - v256v2 = make(map[int64]uint8, len(v)) - } + if v == nil { + v256v2 = nil + } else { + v256v2 = make(map[int64]uint, len(v)) + } // reset map testUnmarshalErr(v256v2, bs256, h, t, "dec-map-v256") testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256") + if v == nil { + v256v2 = nil + } else { + v256v2 = make(map[int64]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v256v2), bs256, h, t, "dec-map-v256-noaddr") // decode into non-addressable map value + testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-noaddr") + if v == nil { + v256v2 = nil + } else { + v256v2 = make(map[int64]uint, len(v)) + } // reset map + testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-len") + testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-len") bs256 = testMarshalErr(&v256v1, h, t, "enc-map-v256-p") v256v2 = nil - testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p") - testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p") + testUnmarshalErr(&v256v2, bs256, h, t, "dec-map-v256-p-nil") + testDeepEqualErr(v256v1, v256v2, t, "equal-map-v256-p-nil") + // ... + if v == nil { + v256v2 = nil + } else { + v256v2 = make(map[int64]uint, len(v)) + } // reset map + var v256v3, v256v4 typMapMapInt64Uint + v256v3 = typMapMapInt64Uint(v256v1) + v256v4 = typMapMapInt64Uint(v256v2) + bs256 = testMarshalErr(v256v3, h, t, "enc-map-v256-custom") + testUnmarshalErr(v256v4, bs256, h, t, "dec-map-v256-p-len") + testDeepEqualErr(v256v3, v256v4, t, "equal-map-v256-p-len") } - for _, v := range []map[int64]uint16{nil, map[int64]uint16{}, map[int64]uint16{10: 10}} { + for _, v := range []map[int64]uint8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v257: %v\n", v) - var v257v1, v257v2 map[int64]uint16 + var v257v1, v257v2 map[int64]uint8 v257v1 = v bs257 := testMarshalErr(v257v1, h, t, "enc-map-v257") - if v != nil { - v257v2 = make(map[int64]uint16, len(v)) - } + if v == nil { + v257v2 = nil + } else { + v257v2 = make(map[int64]uint8, len(v)) + } // reset map testUnmarshalErr(v257v2, bs257, h, t, "dec-map-v257") testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257") + if v == nil { + v257v2 = nil + } else { + v257v2 = make(map[int64]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v257v2), bs257, h, t, "dec-map-v257-noaddr") // decode into non-addressable map value + testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-noaddr") + if v == nil { + v257v2 = nil + } else { + v257v2 = make(map[int64]uint8, len(v)) + } // reset map + testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-len") + testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-len") bs257 = testMarshalErr(&v257v1, h, t, "enc-map-v257-p") v257v2 = nil - testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p") - testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p") + testUnmarshalErr(&v257v2, bs257, h, t, "dec-map-v257-p-nil") + testDeepEqualErr(v257v1, v257v2, t, "equal-map-v257-p-nil") + // ... + if v == nil { + v257v2 = nil + } else { + v257v2 = make(map[int64]uint8, len(v)) + } // reset map + var v257v3, v257v4 typMapMapInt64Uint8 + v257v3 = typMapMapInt64Uint8(v257v1) + v257v4 = typMapMapInt64Uint8(v257v2) + bs257 = testMarshalErr(v257v3, h, t, "enc-map-v257-custom") + testUnmarshalErr(v257v4, bs257, h, t, "dec-map-v257-p-len") + testDeepEqualErr(v257v3, v257v4, t, "equal-map-v257-p-len") } - for _, v := range []map[int64]uint32{nil, map[int64]uint32{}, map[int64]uint32{10: 10}} { + for _, v := range []map[int64]uint16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v258: %v\n", v) - var v258v1, v258v2 map[int64]uint32 + var v258v1, v258v2 map[int64]uint16 v258v1 = v bs258 := testMarshalErr(v258v1, h, t, "enc-map-v258") - if v != nil { - v258v2 = make(map[int64]uint32, len(v)) - } + if v == nil { + v258v2 = nil + } else { + v258v2 = make(map[int64]uint16, len(v)) + } // reset map testUnmarshalErr(v258v2, bs258, h, t, "dec-map-v258") testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258") + if v == nil { + v258v2 = nil + } else { + v258v2 = make(map[int64]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v258v2), bs258, h, t, "dec-map-v258-noaddr") // decode into non-addressable map value + testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-noaddr") + if v == nil { + v258v2 = nil + } else { + v258v2 = make(map[int64]uint16, len(v)) + } // reset map + testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-len") + testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-len") bs258 = testMarshalErr(&v258v1, h, t, "enc-map-v258-p") v258v2 = nil - testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p") - testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p") + testUnmarshalErr(&v258v2, bs258, h, t, "dec-map-v258-p-nil") + testDeepEqualErr(v258v1, v258v2, t, "equal-map-v258-p-nil") + // ... + if v == nil { + v258v2 = nil + } else { + v258v2 = make(map[int64]uint16, len(v)) + } // reset map + var v258v3, v258v4 typMapMapInt64Uint16 + v258v3 = typMapMapInt64Uint16(v258v1) + v258v4 = typMapMapInt64Uint16(v258v2) + bs258 = testMarshalErr(v258v3, h, t, "enc-map-v258-custom") + testUnmarshalErr(v258v4, bs258, h, t, "dec-map-v258-p-len") + testDeepEqualErr(v258v3, v258v4, t, "equal-map-v258-p-len") } - for _, v := range []map[int64]uint64{nil, map[int64]uint64{}, map[int64]uint64{10: 10}} { + for _, v := range []map[int64]uint32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v259: %v\n", v) - var v259v1, v259v2 map[int64]uint64 + var v259v1, v259v2 map[int64]uint32 v259v1 = v bs259 := testMarshalErr(v259v1, h, t, "enc-map-v259") - if v != nil { - v259v2 = make(map[int64]uint64, len(v)) - } + if v == nil { + v259v2 = nil + } else { + v259v2 = make(map[int64]uint32, len(v)) + } // reset map testUnmarshalErr(v259v2, bs259, h, t, "dec-map-v259") testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259") + if v == nil { + v259v2 = nil + } else { + v259v2 = make(map[int64]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v259v2), bs259, h, t, "dec-map-v259-noaddr") // decode into non-addressable map value + testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-noaddr") + if v == nil { + v259v2 = nil + } else { + v259v2 = make(map[int64]uint32, len(v)) + } // reset map + testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-len") + testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-len") bs259 = testMarshalErr(&v259v1, h, t, "enc-map-v259-p") v259v2 = nil - testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p") - testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p") + testUnmarshalErr(&v259v2, bs259, h, t, "dec-map-v259-p-nil") + testDeepEqualErr(v259v1, v259v2, t, "equal-map-v259-p-nil") + // ... + if v == nil { + v259v2 = nil + } else { + v259v2 = make(map[int64]uint32, len(v)) + } // reset map + var v259v3, v259v4 typMapMapInt64Uint32 + v259v3 = typMapMapInt64Uint32(v259v1) + v259v4 = typMapMapInt64Uint32(v259v2) + bs259 = testMarshalErr(v259v3, h, t, "enc-map-v259-custom") + testUnmarshalErr(v259v4, bs259, h, t, "dec-map-v259-p-len") + testDeepEqualErr(v259v3, v259v4, t, "equal-map-v259-p-len") } - for _, v := range []map[int64]uintptr{nil, map[int64]uintptr{}, map[int64]uintptr{10: 10}} { + for _, v := range []map[int64]uint64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v260: %v\n", v) - var v260v1, v260v2 map[int64]uintptr + var v260v1, v260v2 map[int64]uint64 v260v1 = v bs260 := testMarshalErr(v260v1, h, t, "enc-map-v260") - if v != nil { - v260v2 = make(map[int64]uintptr, len(v)) - } + if v == nil { + v260v2 = nil + } else { + v260v2 = make(map[int64]uint64, len(v)) + } // reset map testUnmarshalErr(v260v2, bs260, h, t, "dec-map-v260") testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260") + if v == nil { + v260v2 = nil + } else { + v260v2 = make(map[int64]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v260v2), bs260, h, t, "dec-map-v260-noaddr") // decode into non-addressable map value + testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-noaddr") + if v == nil { + v260v2 = nil + } else { + v260v2 = make(map[int64]uint64, len(v)) + } // reset map + testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-len") + testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-len") bs260 = testMarshalErr(&v260v1, h, t, "enc-map-v260-p") v260v2 = nil - testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p") - testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p") + testUnmarshalErr(&v260v2, bs260, h, t, "dec-map-v260-p-nil") + testDeepEqualErr(v260v1, v260v2, t, "equal-map-v260-p-nil") + // ... + if v == nil { + v260v2 = nil + } else { + v260v2 = make(map[int64]uint64, len(v)) + } // reset map + var v260v3, v260v4 typMapMapInt64Uint64 + v260v3 = typMapMapInt64Uint64(v260v1) + v260v4 = typMapMapInt64Uint64(v260v2) + bs260 = testMarshalErr(v260v3, h, t, "enc-map-v260-custom") + testUnmarshalErr(v260v4, bs260, h, t, "dec-map-v260-p-len") + testDeepEqualErr(v260v3, v260v4, t, "equal-map-v260-p-len") } - for _, v := range []map[int64]int{nil, map[int64]int{}, map[int64]int{10: 10}} { + for _, v := range []map[int64]uintptr{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v261: %v\n", v) - var v261v1, v261v2 map[int64]int + var v261v1, v261v2 map[int64]uintptr v261v1 = v bs261 := testMarshalErr(v261v1, h, t, "enc-map-v261") - if v != nil { - v261v2 = make(map[int64]int, len(v)) - } + if v == nil { + v261v2 = nil + } else { + v261v2 = make(map[int64]uintptr, len(v)) + } // reset map testUnmarshalErr(v261v2, bs261, h, t, "dec-map-v261") testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261") + if v == nil { + v261v2 = nil + } else { + v261v2 = make(map[int64]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v261v2), bs261, h, t, "dec-map-v261-noaddr") // decode into non-addressable map value + testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-noaddr") + if v == nil { + v261v2 = nil + } else { + v261v2 = make(map[int64]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-len") + testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-len") bs261 = testMarshalErr(&v261v1, h, t, "enc-map-v261-p") v261v2 = nil - testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p") - testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p") + testUnmarshalErr(&v261v2, bs261, h, t, "dec-map-v261-p-nil") + testDeepEqualErr(v261v1, v261v2, t, "equal-map-v261-p-nil") + // ... + if v == nil { + v261v2 = nil + } else { + v261v2 = make(map[int64]uintptr, len(v)) + } // reset map + var v261v3, v261v4 typMapMapInt64Uintptr + v261v3 = typMapMapInt64Uintptr(v261v1) + v261v4 = typMapMapInt64Uintptr(v261v2) + bs261 = testMarshalErr(v261v3, h, t, "enc-map-v261-custom") + testUnmarshalErr(v261v4, bs261, h, t, "dec-map-v261-p-len") + testDeepEqualErr(v261v3, v261v4, t, "equal-map-v261-p-len") } - for _, v := range []map[int64]int8{nil, map[int64]int8{}, map[int64]int8{10: 10}} { + for _, v := range []map[int64]int{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v262: %v\n", v) - var v262v1, v262v2 map[int64]int8 + var v262v1, v262v2 map[int64]int v262v1 = v bs262 := testMarshalErr(v262v1, h, t, "enc-map-v262") - if v != nil { - v262v2 = make(map[int64]int8, len(v)) - } + if v == nil { + v262v2 = nil + } else { + v262v2 = make(map[int64]int, len(v)) + } // reset map testUnmarshalErr(v262v2, bs262, h, t, "dec-map-v262") testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262") + if v == nil { + v262v2 = nil + } else { + v262v2 = make(map[int64]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v262v2), bs262, h, t, "dec-map-v262-noaddr") // decode into non-addressable map value + testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-noaddr") + if v == nil { + v262v2 = nil + } else { + v262v2 = make(map[int64]int, len(v)) + } // reset map + testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-len") + testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-len") bs262 = testMarshalErr(&v262v1, h, t, "enc-map-v262-p") v262v2 = nil - testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p") - testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p") + testUnmarshalErr(&v262v2, bs262, h, t, "dec-map-v262-p-nil") + testDeepEqualErr(v262v1, v262v2, t, "equal-map-v262-p-nil") + // ... + if v == nil { + v262v2 = nil + } else { + v262v2 = make(map[int64]int, len(v)) + } // reset map + var v262v3, v262v4 typMapMapInt64Int + v262v3 = typMapMapInt64Int(v262v1) + v262v4 = typMapMapInt64Int(v262v2) + bs262 = testMarshalErr(v262v3, h, t, "enc-map-v262-custom") + testUnmarshalErr(v262v4, bs262, h, t, "dec-map-v262-p-len") + testDeepEqualErr(v262v3, v262v4, t, "equal-map-v262-p-len") } - for _, v := range []map[int64]int16{nil, map[int64]int16{}, map[int64]int16{10: 10}} { + for _, v := range []map[int64]int8{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v263: %v\n", v) - var v263v1, v263v2 map[int64]int16 + var v263v1, v263v2 map[int64]int8 v263v1 = v bs263 := testMarshalErr(v263v1, h, t, "enc-map-v263") - if v != nil { - v263v2 = make(map[int64]int16, len(v)) - } + if v == nil { + v263v2 = nil + } else { + v263v2 = make(map[int64]int8, len(v)) + } // reset map testUnmarshalErr(v263v2, bs263, h, t, "dec-map-v263") testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263") + if v == nil { + v263v2 = nil + } else { + v263v2 = make(map[int64]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v263v2), bs263, h, t, "dec-map-v263-noaddr") // decode into non-addressable map value + testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-noaddr") + if v == nil { + v263v2 = nil + } else { + v263v2 = make(map[int64]int8, len(v)) + } // reset map + testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-len") + testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-len") bs263 = testMarshalErr(&v263v1, h, t, "enc-map-v263-p") v263v2 = nil - testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p") - testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p") + testUnmarshalErr(&v263v2, bs263, h, t, "dec-map-v263-p-nil") + testDeepEqualErr(v263v1, v263v2, t, "equal-map-v263-p-nil") + // ... + if v == nil { + v263v2 = nil + } else { + v263v2 = make(map[int64]int8, len(v)) + } // reset map + var v263v3, v263v4 typMapMapInt64Int8 + v263v3 = typMapMapInt64Int8(v263v1) + v263v4 = typMapMapInt64Int8(v263v2) + bs263 = testMarshalErr(v263v3, h, t, "enc-map-v263-custom") + testUnmarshalErr(v263v4, bs263, h, t, "dec-map-v263-p-len") + testDeepEqualErr(v263v3, v263v4, t, "equal-map-v263-p-len") } - for _, v := range []map[int64]int32{nil, map[int64]int32{}, map[int64]int32{10: 10}} { + for _, v := range []map[int64]int16{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v264: %v\n", v) - var v264v1, v264v2 map[int64]int32 + var v264v1, v264v2 map[int64]int16 v264v1 = v bs264 := testMarshalErr(v264v1, h, t, "enc-map-v264") - if v != nil { - v264v2 = make(map[int64]int32, len(v)) - } + if v == nil { + v264v2 = nil + } else { + v264v2 = make(map[int64]int16, len(v)) + } // reset map testUnmarshalErr(v264v2, bs264, h, t, "dec-map-v264") testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264") + if v == nil { + v264v2 = nil + } else { + v264v2 = make(map[int64]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v264v2), bs264, h, t, "dec-map-v264-noaddr") // decode into non-addressable map value + testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-noaddr") + if v == nil { + v264v2 = nil + } else { + v264v2 = make(map[int64]int16, len(v)) + } // reset map + testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-len") + testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-len") bs264 = testMarshalErr(&v264v1, h, t, "enc-map-v264-p") v264v2 = nil - testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p") - testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p") + testUnmarshalErr(&v264v2, bs264, h, t, "dec-map-v264-p-nil") + testDeepEqualErr(v264v1, v264v2, t, "equal-map-v264-p-nil") + // ... + if v == nil { + v264v2 = nil + } else { + v264v2 = make(map[int64]int16, len(v)) + } // reset map + var v264v3, v264v4 typMapMapInt64Int16 + v264v3 = typMapMapInt64Int16(v264v1) + v264v4 = typMapMapInt64Int16(v264v2) + bs264 = testMarshalErr(v264v3, h, t, "enc-map-v264-custom") + testUnmarshalErr(v264v4, bs264, h, t, "dec-map-v264-p-len") + testDeepEqualErr(v264v3, v264v4, t, "equal-map-v264-p-len") } - for _, v := range []map[int64]int64{nil, map[int64]int64{}, map[int64]int64{10: 10}} { + for _, v := range []map[int64]int32{nil, {}, {33: 0, 44: 33}} { // fmt.Printf(">>>> running mammoth map v265: %v\n", v) - var v265v1, v265v2 map[int64]int64 + var v265v1, v265v2 map[int64]int32 v265v1 = v bs265 := testMarshalErr(v265v1, h, t, "enc-map-v265") - if v != nil { - v265v2 = make(map[int64]int64, len(v)) - } + if v == nil { + v265v2 = nil + } else { + v265v2 = make(map[int64]int32, len(v)) + } // reset map testUnmarshalErr(v265v2, bs265, h, t, "dec-map-v265") testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265") + if v == nil { + v265v2 = nil + } else { + v265v2 = make(map[int64]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v265v2), bs265, h, t, "dec-map-v265-noaddr") // decode into non-addressable map value + testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-noaddr") + if v == nil { + v265v2 = nil + } else { + v265v2 = make(map[int64]int32, len(v)) + } // reset map + testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-len") + testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-len") bs265 = testMarshalErr(&v265v1, h, t, "enc-map-v265-p") v265v2 = nil - testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p") - testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p") + testUnmarshalErr(&v265v2, bs265, h, t, "dec-map-v265-p-nil") + testDeepEqualErr(v265v1, v265v2, t, "equal-map-v265-p-nil") + // ... + if v == nil { + v265v2 = nil + } else { + v265v2 = make(map[int64]int32, len(v)) + } // reset map + var v265v3, v265v4 typMapMapInt64Int32 + v265v3 = typMapMapInt64Int32(v265v1) + v265v4 = typMapMapInt64Int32(v265v2) + bs265 = testMarshalErr(v265v3, h, t, "enc-map-v265-custom") + testUnmarshalErr(v265v4, bs265, h, t, "dec-map-v265-p-len") + testDeepEqualErr(v265v3, v265v4, t, "equal-map-v265-p-len") } - for _, v := range []map[int64]float32{nil, map[int64]float32{}, map[int64]float32{10: 10.1}} { + for _, v := range []map[int64]int64{nil, {}, {44: 0, 33: 44}} { // fmt.Printf(">>>> running mammoth map v266: %v\n", v) - var v266v1, v266v2 map[int64]float32 + var v266v1, v266v2 map[int64]int64 v266v1 = v bs266 := testMarshalErr(v266v1, h, t, "enc-map-v266") - if v != nil { - v266v2 = make(map[int64]float32, len(v)) - } + if v == nil { + v266v2 = nil + } else { + v266v2 = make(map[int64]int64, len(v)) + } // reset map testUnmarshalErr(v266v2, bs266, h, t, "dec-map-v266") testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266") + if v == nil { + v266v2 = nil + } else { + v266v2 = make(map[int64]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v266v2), bs266, h, t, "dec-map-v266-noaddr") // decode into non-addressable map value + testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-noaddr") + if v == nil { + v266v2 = nil + } else { + v266v2 = make(map[int64]int64, len(v)) + } // reset map + testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-len") + testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-len") bs266 = testMarshalErr(&v266v1, h, t, "enc-map-v266-p") v266v2 = nil - testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p") - testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p") + testUnmarshalErr(&v266v2, bs266, h, t, "dec-map-v266-p-nil") + testDeepEqualErr(v266v1, v266v2, t, "equal-map-v266-p-nil") + // ... + if v == nil { + v266v2 = nil + } else { + v266v2 = make(map[int64]int64, len(v)) + } // reset map + var v266v3, v266v4 typMapMapInt64Int64 + v266v3 = typMapMapInt64Int64(v266v1) + v266v4 = typMapMapInt64Int64(v266v2) + bs266 = testMarshalErr(v266v3, h, t, "enc-map-v266-custom") + testUnmarshalErr(v266v4, bs266, h, t, "dec-map-v266-p-len") + testDeepEqualErr(v266v3, v266v4, t, "equal-map-v266-p-len") } - for _, v := range []map[int64]float64{nil, map[int64]float64{}, map[int64]float64{10: 10.1}} { + for _, v := range []map[int64]float32{nil, {}, {33: 0, 44: 22.2}} { // fmt.Printf(">>>> running mammoth map v267: %v\n", v) - var v267v1, v267v2 map[int64]float64 + var v267v1, v267v2 map[int64]float32 v267v1 = v bs267 := testMarshalErr(v267v1, h, t, "enc-map-v267") - if v != nil { - v267v2 = make(map[int64]float64, len(v)) - } + if v == nil { + v267v2 = nil + } else { + v267v2 = make(map[int64]float32, len(v)) + } // reset map testUnmarshalErr(v267v2, bs267, h, t, "dec-map-v267") testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267") + if v == nil { + v267v2 = nil + } else { + v267v2 = make(map[int64]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v267v2), bs267, h, t, "dec-map-v267-noaddr") // decode into non-addressable map value + testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-noaddr") + if v == nil { + v267v2 = nil + } else { + v267v2 = make(map[int64]float32, len(v)) + } // reset map + testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-len") + testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-len") bs267 = testMarshalErr(&v267v1, h, t, "enc-map-v267-p") v267v2 = nil - testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p") - testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p") + testUnmarshalErr(&v267v2, bs267, h, t, "dec-map-v267-p-nil") + testDeepEqualErr(v267v1, v267v2, t, "equal-map-v267-p-nil") + // ... + if v == nil { + v267v2 = nil + } else { + v267v2 = make(map[int64]float32, len(v)) + } // reset map + var v267v3, v267v4 typMapMapInt64Float32 + v267v3 = typMapMapInt64Float32(v267v1) + v267v4 = typMapMapInt64Float32(v267v2) + bs267 = testMarshalErr(v267v3, h, t, "enc-map-v267-custom") + testUnmarshalErr(v267v4, bs267, h, t, "dec-map-v267-p-len") + testDeepEqualErr(v267v3, v267v4, t, "equal-map-v267-p-len") } - for _, v := range []map[int64]bool{nil, map[int64]bool{}, map[int64]bool{10: true}} { + for _, v := range []map[int64]float64{nil, {}, {33: 0, 44: 11.1}} { // fmt.Printf(">>>> running mammoth map v268: %v\n", v) - var v268v1, v268v2 map[int64]bool + var v268v1, v268v2 map[int64]float64 v268v1 = v bs268 := testMarshalErr(v268v1, h, t, "enc-map-v268") - if v != nil { - v268v2 = make(map[int64]bool, len(v)) - } + if v == nil { + v268v2 = nil + } else { + v268v2 = make(map[int64]float64, len(v)) + } // reset map testUnmarshalErr(v268v2, bs268, h, t, "dec-map-v268") testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268") + if v == nil { + v268v2 = nil + } else { + v268v2 = make(map[int64]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v268v2), bs268, h, t, "dec-map-v268-noaddr") // decode into non-addressable map value + testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-noaddr") + if v == nil { + v268v2 = nil + } else { + v268v2 = make(map[int64]float64, len(v)) + } // reset map + testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-len") + testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-len") bs268 = testMarshalErr(&v268v1, h, t, "enc-map-v268-p") v268v2 = nil - testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p") - testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p") + testUnmarshalErr(&v268v2, bs268, h, t, "dec-map-v268-p-nil") + testDeepEqualErr(v268v1, v268v2, t, "equal-map-v268-p-nil") + // ... + if v == nil { + v268v2 = nil + } else { + v268v2 = make(map[int64]float64, len(v)) + } // reset map + var v268v3, v268v4 typMapMapInt64Float64 + v268v3 = typMapMapInt64Float64(v268v1) + v268v4 = typMapMapInt64Float64(v268v2) + bs268 = testMarshalErr(v268v3, h, t, "enc-map-v268-custom") + testUnmarshalErr(v268v4, bs268, h, t, "dec-map-v268-p-len") + testDeepEqualErr(v268v3, v268v4, t, "equal-map-v268-p-len") } - for _, v := range []map[bool]interface{}{nil, map[bool]interface{}{}, map[bool]interface{}{true: "string-is-an-interface"}} { - // fmt.Printf(">>>> running mammoth map v271: %v\n", v) - var v271v1, v271v2 map[bool]interface{} - v271v1 = v - bs271 := testMarshalErr(v271v1, h, t, "enc-map-v271") - if v != nil { - v271v2 = make(map[bool]interface{}, len(v)) - } - testUnmarshalErr(v271v2, bs271, h, t, "dec-map-v271") - testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271") - bs271 = testMarshalErr(&v271v1, h, t, "enc-map-v271-p") - v271v2 = nil - testUnmarshalErr(&v271v2, bs271, h, t, "dec-map-v271-p") - testDeepEqualErr(v271v1, v271v2, t, "equal-map-v271-p") + for _, v := range []map[int64]bool{nil, {}, {33: false, 44: true}} { + // fmt.Printf(">>>> running mammoth map v269: %v\n", v) + var v269v1, v269v2 map[int64]bool + v269v1 = v + bs269 := testMarshalErr(v269v1, h, t, "enc-map-v269") + if v == nil { + v269v2 = nil + } else { + v269v2 = make(map[int64]bool, len(v)) + } // reset map + testUnmarshalErr(v269v2, bs269, h, t, "dec-map-v269") + testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269") + if v == nil { + v269v2 = nil + } else { + v269v2 = make(map[int64]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v269v2), bs269, h, t, "dec-map-v269-noaddr") // decode into non-addressable map value + testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-noaddr") + if v == nil { + v269v2 = nil + } else { + v269v2 = make(map[int64]bool, len(v)) + } // reset map + testUnmarshalErr(&v269v2, bs269, h, t, "dec-map-v269-p-len") + testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-p-len") + bs269 = testMarshalErr(&v269v1, h, t, "enc-map-v269-p") + v269v2 = nil + testUnmarshalErr(&v269v2, bs269, h, t, "dec-map-v269-p-nil") + testDeepEqualErr(v269v1, v269v2, t, "equal-map-v269-p-nil") + // ... + if v == nil { + v269v2 = nil + } else { + v269v2 = make(map[int64]bool, len(v)) + } // reset map + var v269v3, v269v4 typMapMapInt64Bool + v269v3 = typMapMapInt64Bool(v269v1) + v269v4 = typMapMapInt64Bool(v269v2) + bs269 = testMarshalErr(v269v3, h, t, "enc-map-v269-custom") + testUnmarshalErr(v269v4, bs269, h, t, "dec-map-v269-p-len") + testDeepEqualErr(v269v3, v269v4, t, "equal-map-v269-p-len") } - for _, v := range []map[bool]string{nil, map[bool]string{}, map[bool]string{true: "some-string"}} { + for _, v := range []map[bool]interface{}{nil, {}, {true: nil}} { // fmt.Printf(">>>> running mammoth map v272: %v\n", v) - var v272v1, v272v2 map[bool]string + var v272v1, v272v2 map[bool]interface{} v272v1 = v bs272 := testMarshalErr(v272v1, h, t, "enc-map-v272") - if v != nil { - v272v2 = make(map[bool]string, len(v)) - } + if v == nil { + v272v2 = nil + } else { + v272v2 = make(map[bool]interface{}, len(v)) + } // reset map testUnmarshalErr(v272v2, bs272, h, t, "dec-map-v272") testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272") + if v == nil { + v272v2 = nil + } else { + v272v2 = make(map[bool]interface{}, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v272v2), bs272, h, t, "dec-map-v272-noaddr") // decode into non-addressable map value + testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-noaddr") + if v == nil { + v272v2 = nil + } else { + v272v2 = make(map[bool]interface{}, len(v)) + } // reset map + testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-len") + testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-len") bs272 = testMarshalErr(&v272v1, h, t, "enc-map-v272-p") v272v2 = nil - testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p") - testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p") + testUnmarshalErr(&v272v2, bs272, h, t, "dec-map-v272-p-nil") + testDeepEqualErr(v272v1, v272v2, t, "equal-map-v272-p-nil") + // ... + if v == nil { + v272v2 = nil + } else { + v272v2 = make(map[bool]interface{}, len(v)) + } // reset map + var v272v3, v272v4 typMapMapBoolIntf + v272v3 = typMapMapBoolIntf(v272v1) + v272v4 = typMapMapBoolIntf(v272v2) + bs272 = testMarshalErr(v272v3, h, t, "enc-map-v272-custom") + testUnmarshalErr(v272v4, bs272, h, t, "dec-map-v272-p-len") + testDeepEqualErr(v272v3, v272v4, t, "equal-map-v272-p-len") } - for _, v := range []map[bool]uint{nil, map[bool]uint{}, map[bool]uint{true: 10}} { + for _, v := range []map[bool]string{nil, {}, {true: ""}} { // fmt.Printf(">>>> running mammoth map v273: %v\n", v) - var v273v1, v273v2 map[bool]uint + var v273v1, v273v2 map[bool]string v273v1 = v bs273 := testMarshalErr(v273v1, h, t, "enc-map-v273") - if v != nil { - v273v2 = make(map[bool]uint, len(v)) - } + if v == nil { + v273v2 = nil + } else { + v273v2 = make(map[bool]string, len(v)) + } // reset map testUnmarshalErr(v273v2, bs273, h, t, "dec-map-v273") testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273") + if v == nil { + v273v2 = nil + } else { + v273v2 = make(map[bool]string, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v273v2), bs273, h, t, "dec-map-v273-noaddr") // decode into non-addressable map value + testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-noaddr") + if v == nil { + v273v2 = nil + } else { + v273v2 = make(map[bool]string, len(v)) + } // reset map + testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-len") + testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-len") bs273 = testMarshalErr(&v273v1, h, t, "enc-map-v273-p") v273v2 = nil - testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p") - testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p") + testUnmarshalErr(&v273v2, bs273, h, t, "dec-map-v273-p-nil") + testDeepEqualErr(v273v1, v273v2, t, "equal-map-v273-p-nil") + // ... + if v == nil { + v273v2 = nil + } else { + v273v2 = make(map[bool]string, len(v)) + } // reset map + var v273v3, v273v4 typMapMapBoolString + v273v3 = typMapMapBoolString(v273v1) + v273v4 = typMapMapBoolString(v273v2) + bs273 = testMarshalErr(v273v3, h, t, "enc-map-v273-custom") + testUnmarshalErr(v273v4, bs273, h, t, "dec-map-v273-p-len") + testDeepEqualErr(v273v3, v273v4, t, "equal-map-v273-p-len") } - for _, v := range []map[bool]uint8{nil, map[bool]uint8{}, map[bool]uint8{true: 10}} { + for _, v := range []map[bool]uint{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v274: %v\n", v) - var v274v1, v274v2 map[bool]uint8 + var v274v1, v274v2 map[bool]uint v274v1 = v bs274 := testMarshalErr(v274v1, h, t, "enc-map-v274") - if v != nil { - v274v2 = make(map[bool]uint8, len(v)) - } + if v == nil { + v274v2 = nil + } else { + v274v2 = make(map[bool]uint, len(v)) + } // reset map testUnmarshalErr(v274v2, bs274, h, t, "dec-map-v274") testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274") + if v == nil { + v274v2 = nil + } else { + v274v2 = make(map[bool]uint, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v274v2), bs274, h, t, "dec-map-v274-noaddr") // decode into non-addressable map value + testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-noaddr") + if v == nil { + v274v2 = nil + } else { + v274v2 = make(map[bool]uint, len(v)) + } // reset map + testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-len") + testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-len") bs274 = testMarshalErr(&v274v1, h, t, "enc-map-v274-p") v274v2 = nil - testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p") - testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p") + testUnmarshalErr(&v274v2, bs274, h, t, "dec-map-v274-p-nil") + testDeepEqualErr(v274v1, v274v2, t, "equal-map-v274-p-nil") + // ... + if v == nil { + v274v2 = nil + } else { + v274v2 = make(map[bool]uint, len(v)) + } // reset map + var v274v3, v274v4 typMapMapBoolUint + v274v3 = typMapMapBoolUint(v274v1) + v274v4 = typMapMapBoolUint(v274v2) + bs274 = testMarshalErr(v274v3, h, t, "enc-map-v274-custom") + testUnmarshalErr(v274v4, bs274, h, t, "dec-map-v274-p-len") + testDeepEqualErr(v274v3, v274v4, t, "equal-map-v274-p-len") } - for _, v := range []map[bool]uint16{nil, map[bool]uint16{}, map[bool]uint16{true: 10}} { + for _, v := range []map[bool]uint8{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v275: %v\n", v) - var v275v1, v275v2 map[bool]uint16 + var v275v1, v275v2 map[bool]uint8 v275v1 = v bs275 := testMarshalErr(v275v1, h, t, "enc-map-v275") - if v != nil { - v275v2 = make(map[bool]uint16, len(v)) - } + if v == nil { + v275v2 = nil + } else { + v275v2 = make(map[bool]uint8, len(v)) + } // reset map testUnmarshalErr(v275v2, bs275, h, t, "dec-map-v275") testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275") + if v == nil { + v275v2 = nil + } else { + v275v2 = make(map[bool]uint8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v275v2), bs275, h, t, "dec-map-v275-noaddr") // decode into non-addressable map value + testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-noaddr") + if v == nil { + v275v2 = nil + } else { + v275v2 = make(map[bool]uint8, len(v)) + } // reset map + testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-len") + testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-len") bs275 = testMarshalErr(&v275v1, h, t, "enc-map-v275-p") v275v2 = nil - testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p") - testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p") + testUnmarshalErr(&v275v2, bs275, h, t, "dec-map-v275-p-nil") + testDeepEqualErr(v275v1, v275v2, t, "equal-map-v275-p-nil") + // ... + if v == nil { + v275v2 = nil + } else { + v275v2 = make(map[bool]uint8, len(v)) + } // reset map + var v275v3, v275v4 typMapMapBoolUint8 + v275v3 = typMapMapBoolUint8(v275v1) + v275v4 = typMapMapBoolUint8(v275v2) + bs275 = testMarshalErr(v275v3, h, t, "enc-map-v275-custom") + testUnmarshalErr(v275v4, bs275, h, t, "dec-map-v275-p-len") + testDeepEqualErr(v275v3, v275v4, t, "equal-map-v275-p-len") } - for _, v := range []map[bool]uint32{nil, map[bool]uint32{}, map[bool]uint32{true: 10}} { + for _, v := range []map[bool]uint16{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v276: %v\n", v) - var v276v1, v276v2 map[bool]uint32 + var v276v1, v276v2 map[bool]uint16 v276v1 = v bs276 := testMarshalErr(v276v1, h, t, "enc-map-v276") - if v != nil { - v276v2 = make(map[bool]uint32, len(v)) - } + if v == nil { + v276v2 = nil + } else { + v276v2 = make(map[bool]uint16, len(v)) + } // reset map testUnmarshalErr(v276v2, bs276, h, t, "dec-map-v276") testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276") + if v == nil { + v276v2 = nil + } else { + v276v2 = make(map[bool]uint16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v276v2), bs276, h, t, "dec-map-v276-noaddr") // decode into non-addressable map value + testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-noaddr") + if v == nil { + v276v2 = nil + } else { + v276v2 = make(map[bool]uint16, len(v)) + } // reset map + testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-len") + testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-len") bs276 = testMarshalErr(&v276v1, h, t, "enc-map-v276-p") v276v2 = nil - testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p") - testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p") + testUnmarshalErr(&v276v2, bs276, h, t, "dec-map-v276-p-nil") + testDeepEqualErr(v276v1, v276v2, t, "equal-map-v276-p-nil") + // ... + if v == nil { + v276v2 = nil + } else { + v276v2 = make(map[bool]uint16, len(v)) + } // reset map + var v276v3, v276v4 typMapMapBoolUint16 + v276v3 = typMapMapBoolUint16(v276v1) + v276v4 = typMapMapBoolUint16(v276v2) + bs276 = testMarshalErr(v276v3, h, t, "enc-map-v276-custom") + testUnmarshalErr(v276v4, bs276, h, t, "dec-map-v276-p-len") + testDeepEqualErr(v276v3, v276v4, t, "equal-map-v276-p-len") } - for _, v := range []map[bool]uint64{nil, map[bool]uint64{}, map[bool]uint64{true: 10}} { + for _, v := range []map[bool]uint32{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v277: %v\n", v) - var v277v1, v277v2 map[bool]uint64 + var v277v1, v277v2 map[bool]uint32 v277v1 = v bs277 := testMarshalErr(v277v1, h, t, "enc-map-v277") - if v != nil { - v277v2 = make(map[bool]uint64, len(v)) - } + if v == nil { + v277v2 = nil + } else { + v277v2 = make(map[bool]uint32, len(v)) + } // reset map testUnmarshalErr(v277v2, bs277, h, t, "dec-map-v277") testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277") + if v == nil { + v277v2 = nil + } else { + v277v2 = make(map[bool]uint32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v277v2), bs277, h, t, "dec-map-v277-noaddr") // decode into non-addressable map value + testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-noaddr") + if v == nil { + v277v2 = nil + } else { + v277v2 = make(map[bool]uint32, len(v)) + } // reset map + testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-len") + testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-len") bs277 = testMarshalErr(&v277v1, h, t, "enc-map-v277-p") v277v2 = nil - testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p") - testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p") + testUnmarshalErr(&v277v2, bs277, h, t, "dec-map-v277-p-nil") + testDeepEqualErr(v277v1, v277v2, t, "equal-map-v277-p-nil") + // ... + if v == nil { + v277v2 = nil + } else { + v277v2 = make(map[bool]uint32, len(v)) + } // reset map + var v277v3, v277v4 typMapMapBoolUint32 + v277v3 = typMapMapBoolUint32(v277v1) + v277v4 = typMapMapBoolUint32(v277v2) + bs277 = testMarshalErr(v277v3, h, t, "enc-map-v277-custom") + testUnmarshalErr(v277v4, bs277, h, t, "dec-map-v277-p-len") + testDeepEqualErr(v277v3, v277v4, t, "equal-map-v277-p-len") } - for _, v := range []map[bool]uintptr{nil, map[bool]uintptr{}, map[bool]uintptr{true: 10}} { + for _, v := range []map[bool]uint64{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v278: %v\n", v) - var v278v1, v278v2 map[bool]uintptr + var v278v1, v278v2 map[bool]uint64 v278v1 = v bs278 := testMarshalErr(v278v1, h, t, "enc-map-v278") - if v != nil { - v278v2 = make(map[bool]uintptr, len(v)) - } + if v == nil { + v278v2 = nil + } else { + v278v2 = make(map[bool]uint64, len(v)) + } // reset map testUnmarshalErr(v278v2, bs278, h, t, "dec-map-v278") testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278") + if v == nil { + v278v2 = nil + } else { + v278v2 = make(map[bool]uint64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v278v2), bs278, h, t, "dec-map-v278-noaddr") // decode into non-addressable map value + testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-noaddr") + if v == nil { + v278v2 = nil + } else { + v278v2 = make(map[bool]uint64, len(v)) + } // reset map + testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-len") + testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-len") bs278 = testMarshalErr(&v278v1, h, t, "enc-map-v278-p") v278v2 = nil - testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p") - testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p") + testUnmarshalErr(&v278v2, bs278, h, t, "dec-map-v278-p-nil") + testDeepEqualErr(v278v1, v278v2, t, "equal-map-v278-p-nil") + // ... + if v == nil { + v278v2 = nil + } else { + v278v2 = make(map[bool]uint64, len(v)) + } // reset map + var v278v3, v278v4 typMapMapBoolUint64 + v278v3 = typMapMapBoolUint64(v278v1) + v278v4 = typMapMapBoolUint64(v278v2) + bs278 = testMarshalErr(v278v3, h, t, "enc-map-v278-custom") + testUnmarshalErr(v278v4, bs278, h, t, "dec-map-v278-p-len") + testDeepEqualErr(v278v3, v278v4, t, "equal-map-v278-p-len") } - for _, v := range []map[bool]int{nil, map[bool]int{}, map[bool]int{true: 10}} { + for _, v := range []map[bool]uintptr{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v279: %v\n", v) - var v279v1, v279v2 map[bool]int + var v279v1, v279v2 map[bool]uintptr v279v1 = v bs279 := testMarshalErr(v279v1, h, t, "enc-map-v279") - if v != nil { - v279v2 = make(map[bool]int, len(v)) - } + if v == nil { + v279v2 = nil + } else { + v279v2 = make(map[bool]uintptr, len(v)) + } // reset map testUnmarshalErr(v279v2, bs279, h, t, "dec-map-v279") testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279") + if v == nil { + v279v2 = nil + } else { + v279v2 = make(map[bool]uintptr, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v279v2), bs279, h, t, "dec-map-v279-noaddr") // decode into non-addressable map value + testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-noaddr") + if v == nil { + v279v2 = nil + } else { + v279v2 = make(map[bool]uintptr, len(v)) + } // reset map + testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-len") + testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-len") bs279 = testMarshalErr(&v279v1, h, t, "enc-map-v279-p") v279v2 = nil - testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p") - testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p") + testUnmarshalErr(&v279v2, bs279, h, t, "dec-map-v279-p-nil") + testDeepEqualErr(v279v1, v279v2, t, "equal-map-v279-p-nil") + // ... + if v == nil { + v279v2 = nil + } else { + v279v2 = make(map[bool]uintptr, len(v)) + } // reset map + var v279v3, v279v4 typMapMapBoolUintptr + v279v3 = typMapMapBoolUintptr(v279v1) + v279v4 = typMapMapBoolUintptr(v279v2) + bs279 = testMarshalErr(v279v3, h, t, "enc-map-v279-custom") + testUnmarshalErr(v279v4, bs279, h, t, "dec-map-v279-p-len") + testDeepEqualErr(v279v3, v279v4, t, "equal-map-v279-p-len") } - for _, v := range []map[bool]int8{nil, map[bool]int8{}, map[bool]int8{true: 10}} { + for _, v := range []map[bool]int{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v280: %v\n", v) - var v280v1, v280v2 map[bool]int8 + var v280v1, v280v2 map[bool]int v280v1 = v bs280 := testMarshalErr(v280v1, h, t, "enc-map-v280") - if v != nil { - v280v2 = make(map[bool]int8, len(v)) - } + if v == nil { + v280v2 = nil + } else { + v280v2 = make(map[bool]int, len(v)) + } // reset map testUnmarshalErr(v280v2, bs280, h, t, "dec-map-v280") testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280") + if v == nil { + v280v2 = nil + } else { + v280v2 = make(map[bool]int, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v280v2), bs280, h, t, "dec-map-v280-noaddr") // decode into non-addressable map value + testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-noaddr") + if v == nil { + v280v2 = nil + } else { + v280v2 = make(map[bool]int, len(v)) + } // reset map + testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-len") + testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-len") bs280 = testMarshalErr(&v280v1, h, t, "enc-map-v280-p") v280v2 = nil - testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p") - testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p") + testUnmarshalErr(&v280v2, bs280, h, t, "dec-map-v280-p-nil") + testDeepEqualErr(v280v1, v280v2, t, "equal-map-v280-p-nil") + // ... + if v == nil { + v280v2 = nil + } else { + v280v2 = make(map[bool]int, len(v)) + } // reset map + var v280v3, v280v4 typMapMapBoolInt + v280v3 = typMapMapBoolInt(v280v1) + v280v4 = typMapMapBoolInt(v280v2) + bs280 = testMarshalErr(v280v3, h, t, "enc-map-v280-custom") + testUnmarshalErr(v280v4, bs280, h, t, "dec-map-v280-p-len") + testDeepEqualErr(v280v3, v280v4, t, "equal-map-v280-p-len") } - for _, v := range []map[bool]int16{nil, map[bool]int16{}, map[bool]int16{true: 10}} { + for _, v := range []map[bool]int8{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v281: %v\n", v) - var v281v1, v281v2 map[bool]int16 + var v281v1, v281v2 map[bool]int8 v281v1 = v bs281 := testMarshalErr(v281v1, h, t, "enc-map-v281") - if v != nil { - v281v2 = make(map[bool]int16, len(v)) - } + if v == nil { + v281v2 = nil + } else { + v281v2 = make(map[bool]int8, len(v)) + } // reset map testUnmarshalErr(v281v2, bs281, h, t, "dec-map-v281") testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281") + if v == nil { + v281v2 = nil + } else { + v281v2 = make(map[bool]int8, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v281v2), bs281, h, t, "dec-map-v281-noaddr") // decode into non-addressable map value + testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-noaddr") + if v == nil { + v281v2 = nil + } else { + v281v2 = make(map[bool]int8, len(v)) + } // reset map + testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-len") + testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-len") bs281 = testMarshalErr(&v281v1, h, t, "enc-map-v281-p") v281v2 = nil - testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p") - testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p") + testUnmarshalErr(&v281v2, bs281, h, t, "dec-map-v281-p-nil") + testDeepEqualErr(v281v1, v281v2, t, "equal-map-v281-p-nil") + // ... + if v == nil { + v281v2 = nil + } else { + v281v2 = make(map[bool]int8, len(v)) + } // reset map + var v281v3, v281v4 typMapMapBoolInt8 + v281v3 = typMapMapBoolInt8(v281v1) + v281v4 = typMapMapBoolInt8(v281v2) + bs281 = testMarshalErr(v281v3, h, t, "enc-map-v281-custom") + testUnmarshalErr(v281v4, bs281, h, t, "dec-map-v281-p-len") + testDeepEqualErr(v281v3, v281v4, t, "equal-map-v281-p-len") } - for _, v := range []map[bool]int32{nil, map[bool]int32{}, map[bool]int32{true: 10}} { + for _, v := range []map[bool]int16{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v282: %v\n", v) - var v282v1, v282v2 map[bool]int32 + var v282v1, v282v2 map[bool]int16 v282v1 = v bs282 := testMarshalErr(v282v1, h, t, "enc-map-v282") - if v != nil { - v282v2 = make(map[bool]int32, len(v)) - } + if v == nil { + v282v2 = nil + } else { + v282v2 = make(map[bool]int16, len(v)) + } // reset map testUnmarshalErr(v282v2, bs282, h, t, "dec-map-v282") testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282") + if v == nil { + v282v2 = nil + } else { + v282v2 = make(map[bool]int16, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v282v2), bs282, h, t, "dec-map-v282-noaddr") // decode into non-addressable map value + testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-noaddr") + if v == nil { + v282v2 = nil + } else { + v282v2 = make(map[bool]int16, len(v)) + } // reset map + testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-len") + testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-len") bs282 = testMarshalErr(&v282v1, h, t, "enc-map-v282-p") v282v2 = nil - testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p") - testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p") + testUnmarshalErr(&v282v2, bs282, h, t, "dec-map-v282-p-nil") + testDeepEqualErr(v282v1, v282v2, t, "equal-map-v282-p-nil") + // ... + if v == nil { + v282v2 = nil + } else { + v282v2 = make(map[bool]int16, len(v)) + } // reset map + var v282v3, v282v4 typMapMapBoolInt16 + v282v3 = typMapMapBoolInt16(v282v1) + v282v4 = typMapMapBoolInt16(v282v2) + bs282 = testMarshalErr(v282v3, h, t, "enc-map-v282-custom") + testUnmarshalErr(v282v4, bs282, h, t, "dec-map-v282-p-len") + testDeepEqualErr(v282v3, v282v4, t, "equal-map-v282-p-len") } - for _, v := range []map[bool]int64{nil, map[bool]int64{}, map[bool]int64{true: 10}} { + for _, v := range []map[bool]int32{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v283: %v\n", v) - var v283v1, v283v2 map[bool]int64 + var v283v1, v283v2 map[bool]int32 v283v1 = v bs283 := testMarshalErr(v283v1, h, t, "enc-map-v283") - if v != nil { - v283v2 = make(map[bool]int64, len(v)) - } + if v == nil { + v283v2 = nil + } else { + v283v2 = make(map[bool]int32, len(v)) + } // reset map testUnmarshalErr(v283v2, bs283, h, t, "dec-map-v283") testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283") + if v == nil { + v283v2 = nil + } else { + v283v2 = make(map[bool]int32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v283v2), bs283, h, t, "dec-map-v283-noaddr") // decode into non-addressable map value + testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-noaddr") + if v == nil { + v283v2 = nil + } else { + v283v2 = make(map[bool]int32, len(v)) + } // reset map + testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-len") + testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-len") bs283 = testMarshalErr(&v283v1, h, t, "enc-map-v283-p") v283v2 = nil - testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p") - testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p") + testUnmarshalErr(&v283v2, bs283, h, t, "dec-map-v283-p-nil") + testDeepEqualErr(v283v1, v283v2, t, "equal-map-v283-p-nil") + // ... + if v == nil { + v283v2 = nil + } else { + v283v2 = make(map[bool]int32, len(v)) + } // reset map + var v283v3, v283v4 typMapMapBoolInt32 + v283v3 = typMapMapBoolInt32(v283v1) + v283v4 = typMapMapBoolInt32(v283v2) + bs283 = testMarshalErr(v283v3, h, t, "enc-map-v283-custom") + testUnmarshalErr(v283v4, bs283, h, t, "dec-map-v283-p-len") + testDeepEqualErr(v283v3, v283v4, t, "equal-map-v283-p-len") } - for _, v := range []map[bool]float32{nil, map[bool]float32{}, map[bool]float32{true: 10.1}} { + for _, v := range []map[bool]int64{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v284: %v\n", v) - var v284v1, v284v2 map[bool]float32 + var v284v1, v284v2 map[bool]int64 v284v1 = v bs284 := testMarshalErr(v284v1, h, t, "enc-map-v284") - if v != nil { - v284v2 = make(map[bool]float32, len(v)) - } + if v == nil { + v284v2 = nil + } else { + v284v2 = make(map[bool]int64, len(v)) + } // reset map testUnmarshalErr(v284v2, bs284, h, t, "dec-map-v284") testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284") + if v == nil { + v284v2 = nil + } else { + v284v2 = make(map[bool]int64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v284v2), bs284, h, t, "dec-map-v284-noaddr") // decode into non-addressable map value + testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-noaddr") + if v == nil { + v284v2 = nil + } else { + v284v2 = make(map[bool]int64, len(v)) + } // reset map + testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-len") + testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-len") bs284 = testMarshalErr(&v284v1, h, t, "enc-map-v284-p") v284v2 = nil - testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p") - testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p") + testUnmarshalErr(&v284v2, bs284, h, t, "dec-map-v284-p-nil") + testDeepEqualErr(v284v1, v284v2, t, "equal-map-v284-p-nil") + // ... + if v == nil { + v284v2 = nil + } else { + v284v2 = make(map[bool]int64, len(v)) + } // reset map + var v284v3, v284v4 typMapMapBoolInt64 + v284v3 = typMapMapBoolInt64(v284v1) + v284v4 = typMapMapBoolInt64(v284v2) + bs284 = testMarshalErr(v284v3, h, t, "enc-map-v284-custom") + testUnmarshalErr(v284v4, bs284, h, t, "dec-map-v284-p-len") + testDeepEqualErr(v284v3, v284v4, t, "equal-map-v284-p-len") } - for _, v := range []map[bool]float64{nil, map[bool]float64{}, map[bool]float64{true: 10.1}} { + for _, v := range []map[bool]float32{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v285: %v\n", v) - var v285v1, v285v2 map[bool]float64 + var v285v1, v285v2 map[bool]float32 v285v1 = v bs285 := testMarshalErr(v285v1, h, t, "enc-map-v285") - if v != nil { - v285v2 = make(map[bool]float64, len(v)) - } + if v == nil { + v285v2 = nil + } else { + v285v2 = make(map[bool]float32, len(v)) + } // reset map testUnmarshalErr(v285v2, bs285, h, t, "dec-map-v285") testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285") + if v == nil { + v285v2 = nil + } else { + v285v2 = make(map[bool]float32, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v285v2), bs285, h, t, "dec-map-v285-noaddr") // decode into non-addressable map value + testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-noaddr") + if v == nil { + v285v2 = nil + } else { + v285v2 = make(map[bool]float32, len(v)) + } // reset map + testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-len") + testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-len") bs285 = testMarshalErr(&v285v1, h, t, "enc-map-v285-p") v285v2 = nil - testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p") - testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p") + testUnmarshalErr(&v285v2, bs285, h, t, "dec-map-v285-p-nil") + testDeepEqualErr(v285v1, v285v2, t, "equal-map-v285-p-nil") + // ... + if v == nil { + v285v2 = nil + } else { + v285v2 = make(map[bool]float32, len(v)) + } // reset map + var v285v3, v285v4 typMapMapBoolFloat32 + v285v3 = typMapMapBoolFloat32(v285v1) + v285v4 = typMapMapBoolFloat32(v285v2) + bs285 = testMarshalErr(v285v3, h, t, "enc-map-v285-custom") + testUnmarshalErr(v285v4, bs285, h, t, "dec-map-v285-p-len") + testDeepEqualErr(v285v3, v285v4, t, "equal-map-v285-p-len") } - for _, v := range []map[bool]bool{nil, map[bool]bool{}, map[bool]bool{true: true}} { + for _, v := range []map[bool]float64{nil, {}, {true: 0}} { // fmt.Printf(">>>> running mammoth map v286: %v\n", v) - var v286v1, v286v2 map[bool]bool + var v286v1, v286v2 map[bool]float64 v286v1 = v bs286 := testMarshalErr(v286v1, h, t, "enc-map-v286") - if v != nil { - v286v2 = make(map[bool]bool, len(v)) - } + if v == nil { + v286v2 = nil + } else { + v286v2 = make(map[bool]float64, len(v)) + } // reset map testUnmarshalErr(v286v2, bs286, h, t, "dec-map-v286") testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286") + if v == nil { + v286v2 = nil + } else { + v286v2 = make(map[bool]float64, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v286v2), bs286, h, t, "dec-map-v286-noaddr") // decode into non-addressable map value + testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-noaddr") + if v == nil { + v286v2 = nil + } else { + v286v2 = make(map[bool]float64, len(v)) + } // reset map + testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-len") + testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-len") bs286 = testMarshalErr(&v286v1, h, t, "enc-map-v286-p") v286v2 = nil - testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p") - testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p") + testUnmarshalErr(&v286v2, bs286, h, t, "dec-map-v286-p-nil") + testDeepEqualErr(v286v1, v286v2, t, "equal-map-v286-p-nil") + // ... + if v == nil { + v286v2 = nil + } else { + v286v2 = make(map[bool]float64, len(v)) + } // reset map + var v286v3, v286v4 typMapMapBoolFloat64 + v286v3 = typMapMapBoolFloat64(v286v1) + v286v4 = typMapMapBoolFloat64(v286v2) + bs286 = testMarshalErr(v286v3, h, t, "enc-map-v286-custom") + testUnmarshalErr(v286v4, bs286, h, t, "dec-map-v286-p-len") + testDeepEqualErr(v286v3, v286v4, t, "equal-map-v286-p-len") + } + + for _, v := range []map[bool]bool{nil, {}, {true: false}} { + // fmt.Printf(">>>> running mammoth map v287: %v\n", v) + var v287v1, v287v2 map[bool]bool + v287v1 = v + bs287 := testMarshalErr(v287v1, h, t, "enc-map-v287") + if v == nil { + v287v2 = nil + } else { + v287v2 = make(map[bool]bool, len(v)) + } // reset map + testUnmarshalErr(v287v2, bs287, h, t, "dec-map-v287") + testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287") + if v == nil { + v287v2 = nil + } else { + v287v2 = make(map[bool]bool, len(v)) + } // reset map + testUnmarshalErr(reflect.ValueOf(v287v2), bs287, h, t, "dec-map-v287-noaddr") // decode into non-addressable map value + testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-noaddr") + if v == nil { + v287v2 = nil + } else { + v287v2 = make(map[bool]bool, len(v)) + } // reset map + testUnmarshalErr(&v287v2, bs287, h, t, "dec-map-v287-p-len") + testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-p-len") + bs287 = testMarshalErr(&v287v1, h, t, "enc-map-v287-p") + v287v2 = nil + testUnmarshalErr(&v287v2, bs287, h, t, "dec-map-v287-p-nil") + testDeepEqualErr(v287v1, v287v2, t, "equal-map-v287-p-nil") + // ... + if v == nil { + v287v2 = nil + } else { + v287v2 = make(map[bool]bool, len(v)) + } // reset map + var v287v3, v287v4 typMapMapBoolBool + v287v3 = typMapMapBoolBool(v287v1) + v287v4 = typMapMapBoolBool(v287v2) + bs287 = testMarshalErr(v287v3, h, t, "enc-map-v287-custom") + testUnmarshalErr(v287v4, bs287, h, t, "dec-map-v287-p-len") + testDeepEqualErr(v287v3, v287v4, t, "equal-map-v287-p-len") } } diff --git a/vendor/github.com/ugorji/go/codec/msgpack.go b/vendor/github.com/ugorji/go/codec/msgpack.go index 7e8b996..31265cc 100644 --- a/vendor/github.com/ugorji/go/codec/msgpack.go +++ b/vendor/github.com/ugorji/go/codec/msgpack.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. /* @@ -15,8 +15,8 @@ For compatibility with behaviour of msgpack-c reference implementation: - Go intX (<0) IS ENCODED AS msgpack -ve fixnum, signed - */ + package codec import ( @@ -25,6 +25,7 @@ import ( "math" "net/rpc" "reflect" + "time" ) const ( @@ -78,6 +79,9 @@ const ( mpNegFixNumMax = 0xff ) +var mpTimeExtTag int8 = -1 +var mpTimeExtTagU = uint8(mpTimeExtTag) + // MsgpackSpecRpcMultiArgs is a special type which signifies to the MsgpackSpecRpcCodec // that the backend RPC service takes multiple arguments, which have been arranged // in sequence in the slice. @@ -94,10 +98,18 @@ type msgpackContainerType struct { } var ( - msgpackContainerStr = msgpackContainerType{32, mpFixStrMin, mpStr8, mpStr16, mpStr32, true, true, false} - msgpackContainerBin = msgpackContainerType{0, 0, mpBin8, mpBin16, mpBin32, false, true, true} - msgpackContainerList = msgpackContainerType{16, mpFixArrayMin, 0, mpArray16, mpArray32, true, false, false} - msgpackContainerMap = msgpackContainerType{16, mpFixMapMin, 0, mpMap16, mpMap32, true, false, false} + msgpackContainerStr = msgpackContainerType{ + 32, mpFixStrMin, mpStr8, mpStr16, mpStr32, true, true, false, + } + msgpackContainerBin = msgpackContainerType{ + 0, 0, mpBin8, mpBin16, mpBin32, false, true, true, + } + msgpackContainerList = msgpackContainerType{ + 16, mpFixArrayMin, 0, mpArray16, mpArray32, true, false, false, + } + msgpackContainerMap = msgpackContainerType{ + 16, mpFixMapMin, 0, mpMap16, mpMap32, true, false, false, + } ) //--------------------------------------------- @@ -110,6 +122,7 @@ type msgpackEncDriver struct { w encWriter h *MsgpackHandle x [8]byte + _ [3]uint64 // padding } func (e *msgpackEncDriver) EncodeNil() { @@ -190,6 +203,39 @@ func (e *msgpackEncDriver) EncodeFloat64(f float64) { bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) } +func (e *msgpackEncDriver) EncodeTime(t time.Time) { + if t.IsZero() { + e.EncodeNil() + return + } + t = t.UTC() + sec, nsec := t.Unix(), uint64(t.Nanosecond()) + var data64 uint64 + var l = 4 + if sec >= 0 && sec>>34 == 0 { + data64 = (nsec << 34) | uint64(sec) + if data64&0xffffffff00000000 != 0 { + l = 8 + } + } else { + l = 12 + } + if e.h.WriteExt { + e.encodeExtPreamble(mpTimeExtTagU, l) + } else { + e.writeContainerLen(msgpackContainerStr, l) + } + switch l { + case 4: + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(data64)) + case 8: + bigenHelper{e.x[:8], e.w}.writeUint64(data64) + case 12: + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(nsec)) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(sec)) + } +} + func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Encoder) { bs := ext.WriteExt(v) if bs == nil { @@ -200,7 +246,7 @@ func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Enc e.encodeExtPreamble(uint8(xtag), len(bs)) e.w.writeb(bs) } else { - e.EncodeStringBytes(c_RAW, bs) + e.EncodeStringBytes(cRAW, bs) } } @@ -244,7 +290,7 @@ func (e *msgpackEncDriver) WriteMapStart(length int) { func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { slen := len(s) - if c == c_RAW && e.h.WriteExt { + if c == cRAW && e.h.WriteExt { e.writeContainerLen(msgpackContainerBin, slen) } else { e.writeContainerLen(msgpackContainerStr, slen) @@ -254,13 +300,13 @@ func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { } } -func (e *msgpackEncDriver) EncodeSymbol(v string) { - e.EncodeString(c_UTF8, v) -} - func (e *msgpackEncDriver) EncodeStringBytes(c charEncoding, bs []byte) { + if bs == nil { + e.EncodeNil() + return + } slen := len(bs) - if c == c_RAW && e.h.WriteExt { + if c == cRAW && e.h.WriteExt { e.writeContainerLen(msgpackContainerBin, slen) } else { e.writeContainerLen(msgpackContainerStr, slen) @@ -287,10 +333,10 @@ func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) { //--------------------------------------------- type msgpackDecDriver struct { - d *Decoder - r decReader // *Decoder decReader decReaderT - h *MsgpackHandle - b [scratchByteArrayLen]byte + d *Decoder + r decReader // *Decoder decReader decReaderT + h *MsgpackHandle + // b [scratchByteArrayLen]byte bd byte bdRead bool br bool // bytes reader @@ -298,6 +344,7 @@ type msgpackDecDriver struct { // noStreamingCodec // decNoSeparator decDriverNoopContainerReader + _ [3]uint64 // padding } // Note: This returns either a primitive (int, bool, etc) for non-containers, @@ -388,7 +435,12 @@ func (d *msgpackDecDriver) DecodeNaked() { n.v = valueTypeExt clen := d.readExtLen() n.u = uint64(d.r.readn1()) - n.l = d.r.readx(clen) + if n.u == uint64(mpTimeExtTagU) { + n.v = valueTypeTime + n.t = d.decodeTime(clen) + } else { + n.l = d.r.readx(clen) + } default: d.d.errorf("Nil-Deciphered DecodeValue: %s: hex: %x, dec: %d", msgBadDesc, bd, bd) } @@ -404,7 +456,7 @@ func (d *msgpackDecDriver) DecodeNaked() { } // int can be decoded from msgpack type: intXXX or uintXXX -func (d *msgpackDecDriver) DecodeInt(bitsize uint8) (i int64) { +func (d *msgpackDecDriver) DecodeInt64() (i int64) { if !d.bdRead { d.readNextBd() } @@ -436,19 +488,12 @@ func (d *msgpackDecDriver) DecodeInt(bitsize uint8) (i int64) { return } } - // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() - if bitsize > 0 { - if trunc := (i << (64 - bitsize)) >> (64 - bitsize); i != trunc { - d.d.errorf("Overflow int value: %v", i) - return - } - } d.bdRead = false return } // uint can be decoded from msgpack type: intXXX or uintXXX -func (d *msgpackDecDriver) DecodeUint(bitsize uint8) (ui uint64) { +func (d *msgpackDecDriver) DecodeUint64() (ui uint64) { if !d.bdRead { d.readNextBd() } @@ -501,19 +546,12 @@ func (d *msgpackDecDriver) DecodeUint(bitsize uint8) (ui uint64) { return } } - // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() - if bitsize > 0 { - if trunc := (ui << (64 - bitsize)) >> (64 - bitsize); ui != trunc { - d.d.errorf("Overflow uint value: %v", ui) - return - } - } d.bdRead = false return } // float can either be decoded from msgpack type: float, double or intX -func (d *msgpackDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { +func (d *msgpackDecDriver) DecodeFloat64() (f float64) { if !d.bdRead { d.readNextBd() } @@ -522,11 +560,7 @@ func (d *msgpackDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { } else if d.bd == mpDouble { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) } else { - f = float64(d.DecodeInt(0)) - } - if chkOverflow32 && chkOvf.Float32(f) { - d.d.errorf("msgpack: float32 overflow: %v", f) - return + f = float64(d.DecodeInt64()) } d.bdRead = false return @@ -554,13 +588,15 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) d.readNextBd() } + // check if an "array" of uint8's (see ContainerType for how to infer if an array) + bd := d.bd // DecodeBytes could be from: bin str fixstr fixarray array ... var clen int vt := d.ContainerType() switch vt { case valueTypeBytes: // valueTypeBytes may be a mpBin or an mpStr container - if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { clen = d.readContainerLen(msgpackContainerBin) } else { clen = d.readContainerLen(msgpackContainerStr) @@ -568,28 +604,17 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) case valueTypeString: clen = d.readContainerLen(msgpackContainerStr) case valueTypeArray: - clen = d.readContainerLen(msgpackContainerList) - // ensure everything after is one byte each - for i := 0; i < clen; i++ { - d.readNextBd() - if d.bd == mpNil { - bs = append(bs, 0) - } else if d.bd == mpUint8 { - bs = append(bs, d.r.readn1()) - } else { - d.d.errorf("cannot read non-byte into a byte array") - return - } + if zerocopy && len(bs) == 0 { + bs = d.d.b[:] } - d.bdRead = false - return bs + bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + return default: - d.d.errorf("invalid container type: expecting bin|str|array") + d.d.errorf("invalid container type: expecting bin|str|array, got: 0x%x", uint8(vt)) return } // these are (bin|str)(8|16|32) - // println("DecodeBytes: clen: ", clen) d.bdRead = false // bytes may be nil, so handle it. if nil, clen=-1. if clen < 0 { @@ -599,18 +624,18 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) if d.br { return d.r.readx(clen) } else if len(bs) == 0 { - bs = d.b[:] + bs = d.d.b[:] } } - return decByteSlice(d.r, clen, d.d.h.MaxInitLen, bs) + return decByteSlice(d.r, clen, d.h.MaxInitLen, bs) } func (d *msgpackDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.b[:], true)) + return string(d.DecodeBytes(d.d.b[:], true)) } func (d *msgpackDecDriver) DecodeStringAsBytes() (s []byte) { - return d.DecodeBytes(d.b[:], true) + return d.DecodeBytes(d.d.b[:], true) } func (d *msgpackDecDriver) readNextBd() { @@ -643,9 +668,10 @@ func (d *msgpackDecDriver) ContainerType() (vt valueType) { return valueTypeArray } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { return valueTypeMap - } else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) } + // else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // } return valueTypeUnset } @@ -655,7 +681,7 @@ func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { } if d.bd == mpNil { d.bdRead = false - v = true + return true } return } @@ -721,6 +747,57 @@ func (d *msgpackDecDriver) readExtLen() (clen int) { return } +func (d *msgpackDecDriver) DecodeTime() (t time.Time) { + // decode time from string bytes or ext + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpNil { + d.bdRead = false + return + } + var clen int + switch d.ContainerType() { + case valueTypeBytes, valueTypeString: + clen = d.readContainerLen(msgpackContainerStr) + default: + // expect to see mpFixExt4,-1 OR mpFixExt8,-1 OR mpExt8,12,-1 + d.bdRead = false + b2 := d.r.readn1() + if d.bd == mpFixExt4 && b2 == mpTimeExtTagU { + clen = 4 + } else if d.bd == mpFixExt8 && b2 == mpTimeExtTagU { + clen = 8 + } else if d.bd == mpExt8 && b2 == 12 && d.r.readn1() == mpTimeExtTagU { + clen = 12 + } else { + d.d.errorf("invalid bytes for decoding time as extension: got 0x%x, 0x%x", d.bd, b2) + return + } + } + return d.decodeTime(clen) +} + +func (d *msgpackDecDriver) decodeTime(clen int) (t time.Time) { + // bs = d.r.readx(clen) + d.bdRead = false + switch clen { + case 4: + t = time.Unix(int64(bigen.Uint32(d.r.readx(4))), 0).UTC() + case 8: + tv := bigen.Uint64(d.r.readx(8)) + t = time.Unix(int64(tv&0x00000003ffffffff), int64(tv>>34)).UTC() + case 12: + nsec := bigen.Uint32(d.r.readx(4)) + sec := bigen.Uint64(d.r.readx(8)) + t = time.Unix(int64(sec), int64(nsec)).UTC() + default: + d.d.errorf("invalid length of bytes for decoding time - expecting 4 or 8 or 12, got %d", clen) + return + } + return +} + func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { if xtag > 0xff { d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) @@ -784,12 +861,19 @@ type MsgpackHandle struct { // type is provided (e.g. decoding into a nil interface{}), you get back // a []byte or string based on the setting of RawToString. WriteExt bool + binaryEncodingType noElemSeparators + + _ [1]uint64 // padding } +// Name returns the name of the handle: msgpack +func (h *MsgpackHandle) Name() string { return "msgpack" } + +// SetBytesExt sets an extension func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{b: ext}) + return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) } func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { @@ -827,7 +911,7 @@ func (c *msgpackSpecRpcCodec) WriteRequest(r *rpc.Request, body interface{}) err bodyArr = []interface{}{body} } r2 := []interface{}{0, uint32(r.Seq), r.ServiceMethod, bodyArr} - return c.write(r2, nil, false, true) + return c.write(r2, nil, false) } func (c *msgpackSpecRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { @@ -839,7 +923,7 @@ func (c *msgpackSpecRpcCodec) WriteResponse(r *rpc.Response, body interface{}) e body = nil } r2 := []interface{}{1, uint32(r.Seq), moe, body} - return c.write(r2, nil, false, true) + return c.write(r2, nil, false) } func (c *msgpackSpecRpcCodec) ReadResponseHeader(r *rpc.Response) error { @@ -887,21 +971,19 @@ func (c *msgpackSpecRpcCodec) parseCustomHeader(expectTypeByte byte, msgid *uint var b = ba[0] if b != fia { err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, b) - return - } - - if err = c.read(&b); err != nil { - return - } - if b != expectTypeByte { - err = fmt.Errorf("Unexpected byte descriptor in header. Expecting %v. Received %v", expectTypeByte, b) - return - } - if err = c.read(msgid); err != nil { - return - } - if err = c.read(methodOrError); err != nil { - return + } else { + err = c.read(&b) + if err == nil { + if b != expectTypeByte { + err = fmt.Errorf("Unexpected byte descriptor. Expecting %v; Received %v", + expectTypeByte, b) + } else { + err = c.read(msgid) + if err == nil { + err = c.read(methodOrError) + } + } + } } return } @@ -914,7 +996,8 @@ type msgpackSpecRpc struct{} // MsgpackSpecRpc implements Rpc using the communication protocol defined in // the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md . -// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +// +// See GoRpc documentation, for information on buffering for better performance. var MsgpackSpecRpc msgpackSpecRpc func (x msgpackSpecRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { diff --git a/vendor/github.com/ugorji/go/codec/noop.go b/vendor/github.com/ugorji/go/codec/noop.go index 015af58..424bd49 100644 --- a/vendor/github.com/ugorji/go/codec/noop.go +++ b/vendor/github.com/ugorji/go/codec/noop.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. // +build ignore @@ -91,8 +91,9 @@ func (h *noopDrv) EncodeArrayStart(length int) { h.start(true) } func (h *noopDrv) EncodeMapStart(length int) { h.start(false) } func (h *noopDrv) EncodeEnd() { h.end() } -func (h *noopDrv) EncodeString(c charEncoding, v string) {} -func (h *noopDrv) EncodeSymbol(v string) {} +func (h *noopDrv) EncodeString(c charEncoding, v string) {} + +// func (h *noopDrv) EncodeSymbol(v string) {} func (h *noopDrv) EncodeStringBytes(c charEncoding, v []byte) {} func (h *noopDrv) EncodeExt(rv interface{}, xtag uint64, ext Ext, e *Encoder) {} @@ -119,9 +120,12 @@ func (h *noopDrv) ReadArrayStart() int { h.start(false); return h.m(10) } func (h *noopDrv) ContainerType() (vt valueType) { // return h.m(2) == 0 - // handle kStruct, which will bomb is it calls this and doesn't get back a map or array. - // consequently, if the return value is not map or array, reset it to one of them based on h.m(7) % 2 - // for kstruct: at least one out of every 2 times, return one of valueTypeMap or Array (else kstruct bombs) + // handle kStruct, which will bomb is it calls this and + // doesn't get back a map or array. + // consequently, if the return value is not map or array, + // reset it to one of them based on h.m(7) % 2 + // for kstruct: at least one out of every 2 times, + // return one of valueTypeMap or Array (else kstruct bombs) // however, every 10th time it is called, we just return something else. var vals = [...]valueType{valueTypeArray, valueTypeMap} // ------------ TAKE ------------ @@ -150,7 +154,8 @@ func (h *noopDrv) ContainerType() (vt valueType) { // } // return valueTypeUnset // TODO: may need to tweak this so it works. - // if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { + // if h.ct == valueTypeMap && vt == valueTypeArray || + // h.ct == valueTypeArray && vt == valueTypeMap { // h.cb = !h.cb // h.ct = vt // return h.cb diff --git a/vendor/github.com/ugorji/go/codec/py_test.go b/vendor/github.com/ugorji/go/codec/py_test.go index a497cdf..d5ff6d2 100644 --- a/vendor/github.com/ugorji/go/codec/py_test.go +++ b/vendor/github.com/ugorji/go/codec/py_test.go @@ -1,6 +1,6 @@ // +build x -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec diff --git a/vendor/github.com/ugorji/go/codec/rpc.go b/vendor/github.com/ugorji/go/codec/rpc.go index 26860b6..7c3069e 100644 --- a/vendor/github.com/ugorji/go/codec/rpc.go +++ b/vendor/github.com/ugorji/go/codec/rpc.go @@ -1,9 +1,10 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec import ( + "bufio" "errors" "io" "net/rpc" @@ -16,19 +17,14 @@ type Rpc interface { ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec } -// // RpcCodecBuffered allows access to the underlying bufio.Reader/Writer -// // used by the rpc connection. It accommodates use-cases where the connection -// // should be used by rpc and non-rpc functions, e.g. streaming a file after -// // sending an rpc response. -// type RpcCodecBuffered interface { -// BufferedReader() *bufio.Reader -// BufferedWriter() *bufio.Writer -// } - -// ------------------------------------- - -type rpcFlusher interface { - Flush() error +// RPCOptions holds options specific to rpc functionality +type RPCOptions struct { + // RPCNoBuffer configures whether we attempt to buffer reads and writes during RPC calls. + // + // Set RPCNoBuffer=true to turn buffering off. + // Buffering can still be done if buffered connections are passed in, or + // buffering is configured on the handle. + RPCNoBuffer bool } // rpcCodec defines the struct members and common methods. @@ -36,7 +32,7 @@ type rpcCodec struct { c io.Closer r io.Reader w io.Writer - f rpcFlusher + f ioFlusher dec *Decoder enc *Encoder @@ -45,8 +41,9 @@ type rpcCodec struct { mu sync.Mutex h Handle - cls bool - clsmu sync.RWMutex + cls bool + clsmu sync.RWMutex + clsErr error } func newRPCCodec(conn io.ReadWriteCloser, h Handle) rpcCodec { @@ -59,7 +56,26 @@ func newRPCCodec2(r io.Reader, w io.Writer, c io.Closer, h Handle) rpcCodec { if jsonH, ok := h.(*JsonHandle); ok && !jsonH.TermWhitespace { panic(errors.New("rpc requires a JsonHandle with TermWhitespace set to true")) } - f, _ := w.(rpcFlusher) + // always ensure that we use a flusher, and always flush what was written to the connection. + // we lose nothing by using a buffered writer internally. + f, ok := w.(ioFlusher) + bh := h.getBasicHandle() + if !bh.RPCNoBuffer { + if bh.WriterBufferSize <= 0 { + if !ok { + bw := bufio.NewWriter(w) + f, w = bw, bw + } + } + if bh.ReaderBufferSize <= 0 { + if _, ok = w.(ioPeeker); !ok { + if _, ok = w.(ioBuffered); !ok { + br := bufio.NewReader(r) + r = br + } + } + } + } return rpcCodec{ c: c, w: w, @@ -71,66 +87,75 @@ func newRPCCodec2(r io.Reader, w io.Writer, c io.Closer, h Handle) rpcCodec { } } -// func (c *rpcCodec) BufferedReader() *bufio.Reader { -// return c.br -// } - -// func (c *rpcCodec) BufferedWriter() *bufio.Writer { -// return c.bw -// } - -func (c *rpcCodec) write(obj1, obj2 interface{}, writeObj2, doFlush bool) (err error) { +func (c *rpcCodec) write(obj1, obj2 interface{}, writeObj2 bool) (err error) { if c.isClosed() { - return io.EOF + return c.clsErr } - if err = c.enc.Encode(obj1); err != nil { - return - } - if writeObj2 { - if err = c.enc.Encode(obj2); err != nil { - return + err = c.enc.Encode(obj1) + if err == nil { + if writeObj2 { + err = c.enc.Encode(obj2) } + // if err == nil && c.f != nil { + // err = c.f.Flush() + // } } - if doFlush && c.f != nil { - return c.f.Flush() + if c.f != nil { + if err == nil { + err = c.f.Flush() + } else { + c.f.Flush() + } } return } +func (c *rpcCodec) swallow(err *error) { + defer panicToErr(c.dec, err) + c.dec.swallow() +} + func (c *rpcCodec) read(obj interface{}) (err error) { if c.isClosed() { - return io.EOF + return c.clsErr } - //If nil is passed in, we should still attempt to read content to nowhere. + //If nil is passed in, we should read and discard if obj == nil { - var obj2 interface{} - return c.dec.Decode(&obj2) + // var obj2 interface{} + // return c.dec.Decode(&obj2) + c.swallow(&err) + return } return c.dec.Decode(obj) } -func (c *rpcCodec) isClosed() bool { - if c.c == nil { - return false +func (c *rpcCodec) isClosed() (b bool) { + if c.c != nil { + c.clsmu.RLock() + b = c.cls + c.clsmu.RUnlock() } - c.clsmu.RLock() - x := c.cls - c.clsmu.RUnlock() - return x + return } func (c *rpcCodec) Close() error { - if c.c == nil { - return nil - } - if c.isClosed() { - return io.EOF + if c.c == nil || c.isClosed() { + return c.clsErr } c.clsmu.Lock() c.cls = true - err := c.c.Close() + // var fErr error + // if c.f != nil { + // fErr = c.f.Flush() + // } + // _ = fErr + // c.clsErr = c.c.Close() + // if c.clsErr == nil && fErr != nil { + // c.clsErr = fErr + // } + c.clsErr = c.c.Close() c.clsmu.Unlock() - return err + return c.clsErr } func (c *rpcCodec) ReadResponseBody(body interface{}) error { @@ -147,13 +172,13 @@ func (c *goRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error { // Must protect for concurrent access as per API c.mu.Lock() defer c.mu.Unlock() - return c.write(r, body, true, true) + return c.write(r, body, true) } func (c *goRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { c.mu.Lock() defer c.mu.Unlock() - return c.write(r, body, true, true) + return c.write(r, body, true) } func (c *goRpcCodec) ReadResponseHeader(r *rpc.Response) error { @@ -175,7 +200,36 @@ func (c *goRpcCodec) ReadRequestBody(body interface{}) error { type goRpc struct{} // GoRpc implements Rpc using the communication protocol defined in net/rpc package. -// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +// +// Note: network connection (from net.Dial, of type io.ReadWriteCloser) is not buffered. +// +// For performance, you should configure WriterBufferSize and ReaderBufferSize on the handle. +// This ensures we use an adequate buffer during reading and writing. +// If not configured, we will internally initialize and use a buffer during reads and writes. +// This can be turned off via the RPCNoBuffer option on the Handle. +// var handle codec.JsonHandle +// handle.RPCNoBuffer = true // turns off attempt by rpc module to initialize a buffer +// +// Example 1: one way of configuring buffering explicitly: +// var handle codec.JsonHandle // codec handle +// handle.ReaderBufferSize = 1024 +// handle.WriterBufferSize = 1024 +// var conn io.ReadWriteCloser // connection got from a socket +// var serverCodec = GoRpc.ServerCodec(conn, handle) +// var clientCodec = GoRpc.ClientCodec(conn, handle) +// +// Example 2: you can also explicitly create a buffered connection yourself, +// and not worry about configuring the buffer sizes in the Handle. +// var handle codec.Handle // codec handle +// var conn io.ReadWriteCloser // connection got from a socket +// var bufconn = struct { // bufconn here is a buffered io.ReadWriteCloser +// io.Closer +// *bufio.Reader +// *bufio.Writer +// }{conn, bufio.NewReader(conn), bufio.NewWriter(conn)} +// var serverCodec = GoRpc.ServerCodec(bufconn, handle) +// var clientCodec = GoRpc.ClientCodec(bufconn, handle) +// var GoRpc goRpc func (x goRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { @@ -185,11 +239,3 @@ func (x goRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { func (x goRpc) ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec { return &goRpcCodec{newRPCCodec(conn, h)} } - -// Use this method to allow you create wrapped versions of the reader, writer if desired. -// For example, to create a buffered implementation. -func (x goRpc) Codec(r io.Reader, w io.Writer, c io.Closer, h Handle) *goRpcCodec { - return &goRpcCodec{newRPCCodec2(r, w, c, h)} -} - -// var _ RpcCodecBuffered = (*rpcCodec)(nil) // ensure *rpcCodec implements RpcCodecBuffered diff --git a/vendor/github.com/ugorji/go/codec/shared_test.go b/vendor/github.com/ugorji/go/codec/shared_test.go index 97fb9f2..aa8c325 100644 --- a/vendor/github.com/ugorji/go/codec/shared_test.go +++ b/vendor/github.com/ugorji/go/codec/shared_test.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -45,6 +45,8 @@ import ( "flag" "fmt" "io" + "io/ioutil" + "log" "sync" "testing" ) @@ -110,6 +112,8 @@ var ( testMaxInitLen int testNumRepeatString int + + testRpcBufsize int ) // variables that are not flags, but which can configure the handles @@ -131,6 +135,7 @@ var ( ) func init() { + log.SetOutput(ioutil.Discard) // don't allow things log to standard out/err testHEDs = make([]testHED, 0, 32) testHandles = append(testHandles, // testNoopH, @@ -143,7 +148,7 @@ func init() { func testInitFlags() { // delete(testDecOpts.ExtFuncs, timeTyp) flag.IntVar(&testDepth, "tsd", 0, "Test Struc Depth") - flag.BoolVar(&testVerbose, "tv", false, "Test Verbose") + flag.BoolVar(&testVerbose, "tv", false, "Test Verbose (no longer used - here for compatibility)") flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug") flag.IntVar(&testUseIoEncDec, "ti", -1, "Use IO Reader/Writer for Marshal/Unmarshal ie >= 0") flag.BoolVar(&testUseIoWrapper, "tiw", false, "Wrap the IO Reader/Writer with a base pass-through reader/writer") @@ -272,7 +277,7 @@ func logT(x interface{}, format string, args ...interface{}) { t.Logf(format, args...) } else if b, ok := x.(*testing.B); ok && b != nil { b.Logf(format, args...) - } else if testVerbose { + } else { // if testing.Verbose() { // if testVerbose { if len(format) == 0 || format[len(format)-1] != '\n' { format = format + "\n" } diff --git a/vendor/github.com/ugorji/go/codec/simple.go b/vendor/github.com/ugorji/go/codec/simple.go index b69a15e..a839d81 100644 --- a/vendor/github.com/ugorji/go/codec/simple.go +++ b/vendor/github.com/ugorji/go/codec/simple.go @@ -1,4 +1,4 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec @@ -6,6 +6,7 @@ package codec import ( "math" "reflect" + "time" ) const ( @@ -20,6 +21,8 @@ const ( simpleVdPosInt = 8 simpleVdNegInt = 12 + simpleVdTime = 24 + // containers: each lasts for 4 (ie n, n+1, n+2, ... n+7) simpleVdString = 216 simpleVdByteArray = 224 @@ -30,12 +33,15 @@ const ( type simpleEncDriver struct { noBuiltInTypes - encDriverNoopContainerWriter // encNoSeparator e *Encoder h *SimpleHandle w encWriter b [8]byte + // c containerState + encDriverTrackContainerWriter + // encDriverNoopContainerWriter + _ [2]uint64 // padding } func (e *simpleEncDriver) EncodeNil() { @@ -43,6 +49,10 @@ func (e *simpleEncDriver) EncodeNil() { } func (e *simpleEncDriver) EncodeBool(b bool) { + if e.h.EncZeroValuesAsNil && e.c != containerMapKey && !b { + e.EncodeNil() + return + } if b { e.w.writen1(simpleVdTrue) } else { @@ -51,11 +61,19 @@ func (e *simpleEncDriver) EncodeBool(b bool) { } func (e *simpleEncDriver) EncodeFloat32(f float32) { + if e.h.EncZeroValuesAsNil && e.c != containerMapKey && f == 0.0 { + e.EncodeNil() + return + } e.w.writen1(simpleVdFloat32) bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) } func (e *simpleEncDriver) EncodeFloat64(f float64) { + if e.h.EncZeroValuesAsNil && e.c != containerMapKey && f == 0.0 { + e.EncodeNil() + return + } e.w.writen1(simpleVdFloat64) bigenHelper{e.b[:8], e.w}.writeUint64(math.Float64bits(f)) } @@ -73,6 +91,10 @@ func (e *simpleEncDriver) EncodeUint(v uint64) { } func (e *simpleEncDriver) encUint(v uint64, bd uint8) { + if e.h.EncZeroValuesAsNil && e.c != containerMapKey && v == 0 { + e.EncodeNil() + return + } if v <= math.MaxUint8 { e.w.writen2(bd, uint8(v)) } else if v <= math.MaxUint16 { @@ -126,27 +148,54 @@ func (e *simpleEncDriver) encodeExtPreamble(xtag byte, length int) { } func (e *simpleEncDriver) WriteArrayStart(length int) { + e.c = containerArrayStart e.encLen(simpleVdArray, length) } func (e *simpleEncDriver) WriteMapStart(length int) { + e.c = containerMapStart e.encLen(simpleVdMap, length) } func (e *simpleEncDriver) EncodeString(c charEncoding, v string) { + if false && e.h.EncZeroValuesAsNil && e.c != containerMapKey && v == "" { + e.EncodeNil() + return + } e.encLen(simpleVdString, len(v)) e.w.writestr(v) } -func (e *simpleEncDriver) EncodeSymbol(v string) { - e.EncodeString(c_UTF8, v) -} +// func (e *simpleEncDriver) EncodeSymbol(v string) { +// e.EncodeString(cUTF8, v) +// } func (e *simpleEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + // if e.h.EncZeroValuesAsNil && e.c != containerMapKey && v == nil { + if v == nil { + e.EncodeNil() + return + } e.encLen(simpleVdByteArray, len(v)) e.w.writeb(v) } +func (e *simpleEncDriver) EncodeTime(t time.Time) { + // if e.h.EncZeroValuesAsNil && e.c != containerMapKey && t.IsZero() { + if t.IsZero() { + e.EncodeNil() + return + } + v, err := t.MarshalBinary() + if err != nil { + e.e.errorv(err) + return + } + // time.Time marshalbinary takes about 14 bytes. + e.w.writen2(simpleVdTime, uint8(len(v))) + e.w.writeb(v) +} + //------------------------------------ type simpleDecDriver struct { @@ -155,11 +204,13 @@ type simpleDecDriver struct { r decReader bdRead bool bd byte - br bool // bytes reader - b [scratchByteArrayLen]byte + br bool // a bytes reader? + c containerState + // b [scratchByteArrayLen]byte noBuiltInTypes // noStreamingCodec decDriverNoopContainerReader + _ [3]uint64 // padding } func (d *simpleDecDriver) readNextBd() { @@ -178,23 +229,27 @@ func (d *simpleDecDriver) ContainerType() (vt valueType) { if !d.bdRead { d.readNextBd() } - if d.bd == simpleVdNil { + switch d.bd { + case simpleVdNil: return valueTypeNil - } else if d.bd == simpleVdByteArray || d.bd == simpleVdByteArray+1 || - d.bd == simpleVdByteArray+2 || d.bd == simpleVdByteArray+3 || d.bd == simpleVdByteArray+4 { + case simpleVdByteArray, simpleVdByteArray + 1, + simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: return valueTypeBytes - } else if d.bd == simpleVdString || d.bd == simpleVdString+1 || - d.bd == simpleVdString+2 || d.bd == simpleVdString+3 || d.bd == simpleVdString+4 { + case simpleVdString, simpleVdString + 1, + simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: return valueTypeString - } else if d.bd == simpleVdArray || d.bd == simpleVdArray+1 || - d.bd == simpleVdArray+2 || d.bd == simpleVdArray+3 || d.bd == simpleVdArray+4 { + case simpleVdArray, simpleVdArray + 1, + simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: return valueTypeArray - } else if d.bd == simpleVdMap || d.bd == simpleVdMap+1 || - d.bd == simpleVdMap+2 || d.bd == simpleVdMap+3 || d.bd == simpleVdMap+4 { + case simpleVdMap, simpleVdMap + 1, + simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: return valueTypeMap - } else { - // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // case simpleVdTime: + // return valueTypeTime } + // else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // } return valueTypeUnset } @@ -235,7 +290,7 @@ func (d *simpleDecDriver) decCheckInteger() (ui uint64, neg bool) { ui = uint64(bigen.Uint64(d.r.readx(8))) neg = true default: - d.d.errorf("decIntAny: Integer only valid from pos/neg integer1..8. Invalid descriptor: %v", d.bd) + d.d.errorf("Integer only valid from pos/neg integer1..8. Invalid descriptor: %v", d.bd) return } // don't do this check, because callers may only want the unsigned value. @@ -246,39 +301,27 @@ func (d *simpleDecDriver) decCheckInteger() (ui uint64, neg bool) { return } -func (d *simpleDecDriver) DecodeInt(bitsize uint8) (i int64) { +func (d *simpleDecDriver) DecodeInt64() (i int64) { ui, neg := d.decCheckInteger() - i, overflow := chkOvf.SignedInt(ui) - if overflow { - d.d.errorf("simple: overflow converting %v to signed integer", ui) - return - } + i = chkOvf.SignedIntV(ui) if neg { i = -i } - if chkOvf.Int(i, bitsize) { - d.d.errorf("simple: overflow integer: %v", i) - return - } d.bdRead = false return } -func (d *simpleDecDriver) DecodeUint(bitsize uint8) (ui uint64) { +func (d *simpleDecDriver) DecodeUint64() (ui uint64) { ui, neg := d.decCheckInteger() if neg { d.d.errorf("Assigning negative signed value to unsigned type") return } - if chkOvf.Uint(ui, bitsize) { - d.d.errorf("simple: overflow integer: %v", ui) - return - } d.bdRead = false return } -func (d *simpleDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { +func (d *simpleDecDriver) DecodeFloat64() (f float64) { if !d.bdRead { d.readNextBd() } @@ -288,16 +331,12 @@ func (d *simpleDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) } else { if d.bd >= simpleVdPosInt && d.bd <= simpleVdNegInt+3 { - f = float64(d.DecodeInt(64)) + f = float64(d.DecodeInt64()) } else { d.d.errorf("Float only valid from float32/64: Invalid descriptor: %v", d.bd) return } } - if chkOverflow32 && chkOvf.Float32(f) { - d.d.errorf("msgpack: float32 overflow: %v", f) - return - } d.bdRead = false return } @@ -323,6 +362,7 @@ func (d *simpleDecDriver) ReadMapStart() (length int) { d.readNextBd() } d.bdRead = false + d.c = containerMapStart return d.decLen() } @@ -331,9 +371,30 @@ func (d *simpleDecDriver) ReadArrayStart() (length int) { d.readNextBd() } d.bdRead = false + d.c = containerArrayStart return d.decLen() } +func (d *simpleDecDriver) ReadArrayElem() { + d.c = containerArrayElem +} + +func (d *simpleDecDriver) ReadArrayEnd() { + d.c = containerArrayEnd +} + +func (d *simpleDecDriver) ReadMapElemKey() { + d.c = containerMapKey +} + +func (d *simpleDecDriver) ReadMapElemValue() { + d.c = containerMapValue +} + +func (d *simpleDecDriver) ReadMapEnd() { + d.c = containerMapEnd +} + func (d *simpleDecDriver) decLen() int { switch d.bd % 8 { case 0: @@ -345,14 +406,14 @@ func (d *simpleDecDriver) decLen() int { case 3: ui := uint64(bigen.Uint32(d.r.readx(4))) if chkOvf.Uint(ui, intBitsize) { - d.d.errorf("simple: overflow integer: %v", ui) + d.d.errorf("overflow integer: %v", ui) return 0 } return int(ui) case 4: ui := bigen.Uint64(d.r.readx(8)) if chkOvf.Uint(ui, intBitsize) { - d.d.errorf("simple: overflow integer: %v", ui) + d.d.errorf("overflow integer: %v", ui) return 0 } return int(ui) @@ -362,11 +423,11 @@ func (d *simpleDecDriver) decLen() int { } func (d *simpleDecDriver) DecodeString() (s string) { - return string(d.DecodeBytes(d.b[:], true)) + return string(d.DecodeBytes(d.d.b[:], true)) } func (d *simpleDecDriver) DecodeStringAsBytes() (s []byte) { - return d.DecodeBytes(d.b[:], true) + return d.DecodeBytes(d.d.b[:], true) } func (d *simpleDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { @@ -377,18 +438,48 @@ func (d *simpleDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { d.bdRead = false return } + // check if an "array" of uint8's (see ContainerType for how to infer if an array) + if d.bd >= simpleVdArray && d.bd <= simpleVdMap+4 { + if len(bs) == 0 && zerocopy { + bs = d.d.b[:] + } + bsOut, _ = fastpathTV.DecSliceUint8V(bs, true, d.d) + return + } + clen := d.decLen() d.bdRead = false if zerocopy { if d.br { return d.r.readx(clen) } else if len(bs) == 0 { - bs = d.b[:] + bs = d.d.b[:] } } return decByteSlice(d.r, clen, d.d.h.MaxInitLen, bs) } +func (d *simpleDecDriver) DecodeTime() (t time.Time) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + return + } + if d.bd != simpleVdTime { + d.d.errorf("invalid descriptor for time.Time - expect 0x%x, received 0x%x", simpleVdTime, d.bd) + return + } + d.bdRead = false + clen := int(d.r.readn1()) + b := d.r.readx(clen) + if err := (&t).UnmarshalBinary(b); err != nil { + d.d.errorv(err) + } + return +} + func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { if xtag > 0xff { d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) @@ -419,10 +510,11 @@ func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs [ return } xbs = d.r.readx(l) - case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + case simpleVdByteArray, simpleVdByteArray + 1, + simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: xbs = d.DecodeBytes(nil, true) default: - d.d.errorf("Invalid d.bd for extensions (Expecting extensions or byte array). Got: 0x%x", d.bd) + d.d.errorf("Invalid descriptor - expecting extensions/bytearray, got: 0x%x", d.bd) return } d.bdRead = false @@ -449,24 +541,29 @@ func (d *simpleDecDriver) DecodeNaked() { case simpleVdPosInt, simpleVdPosInt + 1, simpleVdPosInt + 2, simpleVdPosInt + 3: if d.h.SignedInteger { n.v = valueTypeInt - n.i = d.DecodeInt(64) + n.i = d.DecodeInt64() } else { n.v = valueTypeUint - n.u = d.DecodeUint(64) + n.u = d.DecodeUint64() } case simpleVdNegInt, simpleVdNegInt + 1, simpleVdNegInt + 2, simpleVdNegInt + 3: n.v = valueTypeInt - n.i = d.DecodeInt(64) + n.i = d.DecodeInt64() case simpleVdFloat32: n.v = valueTypeFloat - n.f = d.DecodeFloat(true) + n.f = d.DecodeFloat64() case simpleVdFloat64: n.v = valueTypeFloat - n.f = d.DecodeFloat(false) - case simpleVdString, simpleVdString + 1, simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: + n.f = d.DecodeFloat64() + case simpleVdTime: + n.v = valueTypeTime + n.t = d.DecodeTime() + case simpleVdString, simpleVdString + 1, + simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: n.v = valueTypeString n.s = d.DecodeString() - case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + case simpleVdByteArray, simpleVdByteArray + 1, + simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: n.v = valueTypeBytes n.l = d.DecodeBytes(nil, false) case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: @@ -474,7 +571,8 @@ func (d *simpleDecDriver) DecodeNaked() { l := d.decLen() n.u = uint64(d.r.readn1()) n.l = d.r.readx(l) - case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: + case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, + simpleVdArray + 3, simpleVdArray + 4: n.v = valueTypeArray decodeFurther = true case simpleVdMap, simpleVdMap + 1, simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: @@ -500,7 +598,7 @@ func (d *simpleDecDriver) DecodeNaked() { // - Integers (intXXX, uintXXX) are encoded in 1, 2, 4 or 8 bytes (plus a descriptor byte). // There are positive (uintXXX and intXXX >= 0) and negative (intXXX < 0) integers. // - Floats are encoded in 4 or 8 bytes (plus a descriptor byte) -// - Lenght of containers (strings, bytes, array, map, extensions) +// - Length of containers (strings, bytes, array, map, extensions) // are encoded in 0, 1, 2, 4 or 8 bytes. // Zero-length containers have no length encoded. // For others, the number of bytes is given by pow(2, bd%3) @@ -508,18 +606,29 @@ func (d *simpleDecDriver) DecodeNaked() { // - arrays are encoded as [bd] [length] [value]... // - extensions are encoded as [bd] [length] [tag] [byte]... // - strings/bytearrays are encoded as [bd] [length] [byte]... +// - time.Time are encoded as [bd] [length] [byte]... // // The full spec will be published soon. type SimpleHandle struct { BasicHandle binaryEncodingType noElemSeparators + // EncZeroValuesAsNil says to encode zero values for numbers, bool, string, etc as nil + EncZeroValuesAsNil bool + + _ [1]uint64 // padding } +// Name returns the name of the handle: simple +func (h *SimpleHandle) Name() string { return "simple" } + +// SetBytesExt sets an extension func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{b: ext}) + return h.SetExt(rt, tag, &extWrapper{ext, interfaceExtFailer{}}) } +func (h *SimpleHandle) hasElemSeparators() bool { return true } // as it implements Write(Map|Array)XXX + func (h *SimpleHandle) newEncDriver(e *Encoder) encDriver { return &simpleEncDriver{e: e, w: e.w, h: h} } @@ -529,10 +638,12 @@ func (h *SimpleHandle) newDecDriver(d *Decoder) decDriver { } func (e *simpleEncDriver) reset() { + e.c = 0 e.w = e.e.w } func (d *simpleDecDriver) reset() { + d.c = 0 d.r, d.br = d.d.r, d.d.bytes d.bd, d.bdRead = 0, false } diff --git a/vendor/github.com/ugorji/go/codec/time.go b/vendor/github.com/ugorji/go/codec/time.go deleted file mode 100644 index 55841d4..0000000 --- a/vendor/github.com/ugorji/go/codec/time.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -import ( - "fmt" - "time" -) - -var timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} - -type timeExt struct{} - -func (x timeExt) WriteExt(v interface{}) (bs []byte) { - switch v2 := v.(type) { - case time.Time: - bs = encodeTime(v2) - case *time.Time: - bs = encodeTime(*v2) - default: - panic(fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)) - } - return -} -func (x timeExt) ReadExt(v interface{}, bs []byte) { - tt, err := decodeTime(bs) - if err != nil { - panic(err) - } - *(v.(*time.Time)) = tt -} - -func (x timeExt) ConvertExt(v interface{}) interface{} { - return x.WriteExt(v) -} -func (x timeExt) UpdateExt(v interface{}, src interface{}) { - x.ReadExt(v, src.([]byte)) -} - -// EncodeTime encodes a time.Time as a []byte, including -// information on the instant in time and UTC offset. -// -// Format Description -// -// A timestamp is composed of 3 components: -// -// - secs: signed integer representing seconds since unix epoch -// - nsces: unsigned integer representing fractional seconds as a -// nanosecond offset within secs, in the range 0 <= nsecs < 1e9 -// - tz: signed integer representing timezone offset in minutes east of UTC, -// and a dst (daylight savings time) flag -// -// When encoding a timestamp, the first byte is the descriptor, which -// defines which components are encoded and how many bytes are used to -// encode secs and nsecs components. *If secs/nsecs is 0 or tz is UTC, it -// is not encoded in the byte array explicitly*. -// -// Descriptor 8 bits are of the form `A B C DDD EE`: -// A: Is secs component encoded? 1 = true -// B: Is nsecs component encoded? 1 = true -// C: Is tz component encoded? 1 = true -// DDD: Number of extra bytes for secs (range 0-7). -// If A = 1, secs encoded in DDD+1 bytes. -// If A = 0, secs is not encoded, and is assumed to be 0. -// If A = 1, then we need at least 1 byte to encode secs. -// DDD says the number of extra bytes beyond that 1. -// E.g. if DDD=0, then secs is represented in 1 byte. -// if DDD=2, then secs is represented in 3 bytes. -// EE: Number of extra bytes for nsecs (range 0-3). -// If B = 1, nsecs encoded in EE+1 bytes (similar to secs/DDD above) -// -// Following the descriptor bytes, subsequent bytes are: -// -// secs component encoded in `DDD + 1` bytes (if A == 1) -// nsecs component encoded in `EE + 1` bytes (if B == 1) -// tz component encoded in 2 bytes (if C == 1) -// -// secs and nsecs components are integers encoded in a BigEndian -// 2-complement encoding format. -// -// tz component is encoded as 2 bytes (16 bits). Most significant bit 15 to -// Least significant bit 0 are described below: -// -// Timezone offset has a range of -12:00 to +14:00 (ie -720 to +840 minutes). -// Bit 15 = have\_dst: set to 1 if we set the dst flag. -// Bit 14 = dst\_on: set to 1 if dst is in effect at the time, or 0 if not. -// Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. -// -func encodeTime(t time.Time) []byte { - //t := rv.Interface().(time.Time) - tsecs, tnsecs := t.Unix(), t.Nanosecond() - var ( - bd byte - btmp [8]byte - bs [16]byte - i int = 1 - ) - l := t.Location() - if l == time.UTC { - l = nil - } - if tsecs != 0 { - bd = bd | 0x80 - bigen.PutUint64(btmp[:], uint64(tsecs)) - f := pruneSignExt(btmp[:], tsecs >= 0) - bd = bd | (byte(7-f) << 2) - copy(bs[i:], btmp[f:]) - i = i + (8 - f) - } - if tnsecs != 0 { - bd = bd | 0x40 - bigen.PutUint32(btmp[:4], uint32(tnsecs)) - f := pruneSignExt(btmp[:4], true) - bd = bd | byte(3-f) - copy(bs[i:], btmp[f:4]) - i = i + (4 - f) - } - if l != nil { - bd = bd | 0x20 - // Note that Go Libs do not give access to dst flag. - _, zoneOffset := t.Zone() - //zoneName, zoneOffset := t.Zone() - zoneOffset /= 60 - z := uint16(zoneOffset) - bigen.PutUint16(btmp[:2], z) - // clear dst flags - bs[i] = btmp[0] & 0x3f - bs[i+1] = btmp[1] - i = i + 2 - } - bs[0] = bd - return bs[0:i] -} - -// DecodeTime decodes a []byte into a time.Time. -func decodeTime(bs []byte) (tt time.Time, err error) { - bd := bs[0] - var ( - tsec int64 - tnsec uint32 - tz uint16 - i byte = 1 - i2 byte - n byte - ) - if bd&(1<<7) != 0 { - var btmp [8]byte - n = ((bd >> 2) & 0x7) + 1 - i2 = i + n - copy(btmp[8-n:], bs[i:i2]) - //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) - if bs[i]&(1<<7) != 0 { - copy(btmp[0:8-n], bsAll0xff) - //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } - } - i = i2 - tsec = int64(bigen.Uint64(btmp[:])) - } - if bd&(1<<6) != 0 { - var btmp [4]byte - n = (bd & 0x3) + 1 - i2 = i + n - copy(btmp[4-n:], bs[i:i2]) - i = i2 - tnsec = bigen.Uint32(btmp[:]) - } - if bd&(1<<5) == 0 { - tt = time.Unix(tsec, int64(tnsec)).UTC() - return - } - // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. - // However, we need name here, so it can be shown when time is printed. - // Zone name is in form: UTC-08:00. - // Note that Go Libs do not give access to dst flag, so we ignore dst bits - - i2 = i + 2 - tz = bigen.Uint16(bs[i:i2]) - i = i2 - // sign extend sign bit into top 2 MSB (which were dst bits): - if tz&(1<<13) == 0 { // positive - tz = tz & 0x3fff //clear 2 MSBs: dst bits - } else { // negative - tz = tz | 0xc000 //set 2 MSBs: dst bits - //tzname[3] = '-' (TODO: verify. this works here) - } - tzint := int16(tz) - if tzint == 0 { - tt = time.Unix(tsec, int64(tnsec)).UTC() - } else { - // For Go Time, do not use a descriptive timezone. - // It's unnecessary, and makes it harder to do a reflect.DeepEqual. - // The Offset already tells what the offset should be, if not on UTC and unknown zone name. - // var zoneName = timeLocUTCName(tzint) - tt = time.Unix(tsec, int64(tnsec)).In(time.FixedZone("", int(tzint)*60)) - } - return -} - -// func timeLocUTCName(tzint int16) string { -// if tzint == 0 { -// return "UTC" -// } -// var tzname = []byte("UTC+00:00") -// //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. -// //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first -// var tzhr, tzmin int16 -// if tzint < 0 { -// tzname[3] = '-' // (TODO: verify. this works here) -// tzhr, tzmin = -tzint/60, (-tzint)%60 -// } else { -// tzhr, tzmin = tzint/60, tzint%60 -// } -// tzname[4] = timeDigits[tzhr/10] -// tzname[5] = timeDigits[tzhr%10] -// tzname[7] = timeDigits[tzmin/10] -// tzname[8] = timeDigits[tzmin%10] -// return string(tzname) -// //return time.FixedZone(string(tzname), int(tzint)*60) -// } diff --git a/vendor/github.com/ugorji/go/codec/values_flex_test.go b/vendor/github.com/ugorji/go/codec/values_flex_test.go index b2b2a50..3b7da27 100644 --- a/vendor/github.com/ugorji/go/codec/values_flex_test.go +++ b/vendor/github.com/ugorji/go/codec/values_flex_test.go @@ -1,15 +1,83 @@ /* // +build testing */ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec -// This file contains values used by tests and benchmarks. +import "time" + +// This file contains values used by tests alone. +// This is where we may try out different things, +// that other engines may not support or may barf upon +// e.g. custom extensions for wrapped types, maps with non-string keys, etc. + +// Some unused types just stored here +type Bbool bool +type Sstring string +type Sstructsmall struct { + A int +} + +type Sstructbig struct { + A int + B bool + c string + // Sval Sstruct + Ssmallptr *Sstructsmall + Ssmall *Sstructsmall + Sptr *Sstructbig +} + +type SstructbigMapBySlice struct { + _struct struct{} `codec:",toarray"` + A int + B bool + c string + // Sval Sstruct + Ssmallptr *Sstructsmall + Ssmall *Sstructsmall + Sptr *Sstructbig +} + +type Sinterface interface { + Noop() +} + +// small struct for testing that codecgen works for unexported types +type tLowerFirstLetter struct { + I int + u uint64 + S string + b []byte +} + +// Some used types +type wrapInt64 int64 +type wrapUint8 uint8 +type wrapBytes []uint8 + +type AnonInTestStrucIntf struct { + Islice []interface{} + Ms map[string]interface{} + Nintf interface{} //don't set this, so we can test for nil + T time.Time +} + +var testWRepeated512 wrapBytes +var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() + +func init() { + var testARepeated512 [512]byte + for i := range testARepeated512 { + testARepeated512[i] = 'A' + } + testWRepeated512 = wrapBytes(testARepeated512[:]) +} type TestStrucFlex struct { _struct struct{} `codec:",omitempty"` //set omitempty for every field - testStrucCommon + TestStrucCommon Mis map[int]string Mbu64 map[bool]struct{} @@ -19,6 +87,20 @@ type TestStrucFlex struct { Mui2wss map[uint64]wrapStringSlice Msu2wss map[stringUint64T]wrapStringSlice + Ci64 wrapInt64 + Swrapbytes []wrapBytes + Swrapuint8 []wrapUint8 + + ArrStrUi64T [4]stringUint64T + + Ui64array [4]uint64 + Ui64slicearray []*[4]uint64 + + // make this a ptr, so that it could be set or not. + // for comparison (e.g. with msgp), give it a struct tag (so it is not inlined), + // make this one omitempty (so it is excluded if nil). + *AnonInTestStrucIntf `json:",omitempty"` + //M map[interface{}]interface{} `json:"-",bson:"-"` Mtsptr map[string]*TestStrucFlex Mts map[string]TestStrucFlex @@ -52,9 +134,42 @@ func newTestStrucFlex(depth, n int, bench, useInterface, useStringKeyOnly bool) 22: "twenty two", -44: "minus forty four", }, - Mbu64: map[bool]struct{}{false: struct{}{}, true: struct{}{}}, + Mbu64: map[bool]struct{}{false: {}, true: {}}, + + Ci64: -22, + Swrapbytes: []wrapBytes{ // lengths of 1, 2, 4, 8, 16, 32, 64, 128, 256, + testWRepeated512[:1], + testWRepeated512[:2], + testWRepeated512[:4], + testWRepeated512[:8], + testWRepeated512[:16], + testWRepeated512[:32], + testWRepeated512[:64], + testWRepeated512[:128], + testWRepeated512[:256], + testWRepeated512[:512], + }, + Swrapuint8: []wrapUint8{ + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + }, + Ui64array: [4]uint64{4, 16, 64, 256}, + ArrStrUi64T: [4]stringUint64T{{"4", 4}, {"3", 3}, {"2", 2}, {"1", 1}}, } - populateTestStrucCommon(&ts.testStrucCommon, n, bench, useInterface, useStringKeyOnly) + + ts.Ui64slicearray = []*[4]uint64{&ts.Ui64array, &ts.Ui64array} + + if useInterface { + ts.AnonInTestStrucIntf = &AnonInTestStrucIntf{ + Islice: []interface{}{strRpt(n, "true"), true, strRpt(n, "no"), false, uint64(288), float64(0.4)}, + Ms: map[string]interface{}{ + strRpt(n, "true"): strRpt(n, "true"), + strRpt(n, "int64(9)"): false, + }, + T: testStrucTime, + } + } + + populateTestStrucCommon(&ts.TestStrucCommon, n, bench, useInterface, useStringKeyOnly) if depth > 0 { depth-- if ts.Mtsptr == nil { diff --git a/vendor/github.com/ugorji/go/codec/values_test.go b/vendor/github.com/ugorji/go/codec/values_test.go index 878c88a..7eaec80 100644 --- a/vendor/github.com/ugorji/go/codec/values_test.go +++ b/vendor/github.com/ugorji/go/codec/values_test.go @@ -1,20 +1,31 @@ /* // +build testing */ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. package codec // This file contains values used by tests and benchmarks. -// JSON/BSON do not like maps with keys that are not strings, -// so we only use maps with string keys here. +// The benchmarks will test performance against other libraries +// (encoding/json, json-iterator, bson, gob, etc). +// Consequently, we only use values that will parse well in all engines, +// and only leverage features that work across multiple libraries for a truer comparison. +// For example, +// - JSON/BSON do not like maps with keys that are not strings, +// so we only use maps with string keys here. +// - _struct options are not honored by other libraries, +// so we don't use them in this file. import ( "math" "strings" - "time" ) +// func init() { +// rt := reflect.TypeOf((*TestStruc)(nil)).Elem() +// defTypeInfos.get(rt2id(rt), rt) +// } + type wrapSliceUint64 []uint64 type wrapSliceString []string type wrapUint64 uint64 @@ -50,59 +61,36 @@ type AnonInTestStruc struct { AMSU16E map[string]uint16 } -type AnonInTestStrucIntf struct { - Islice []interface{} - Ms map[string]interface{} - Nintf interface{} //don't set this, so we can test for nil - T time.Time -} - +// testSimpleFields is a sub-set of TestStrucCommon type testSimpleFields struct { S string I64 int64 - I32 int32 - I16 int16 I8 int8 - I64n int64 - I32n int32 - I16n int16 - I8n int8 - Ui64 uint64 - Ui32 uint32 - Ui16 uint16 Ui8 uint8 F64 float64 F32 float32 - B bool - By uint8 // byte: msgp doesn't like byte + B bool Sslice []string - I64slice []int64 I16slice []int16 Ui64slice []uint64 Ui8slice []uint8 Bslice []bool - Byslice []byte Iptrslice []*int64 - // TODO: test these separately, specifically for reflection and codecgen. - // Unfortunately, ffjson doesn't support these. Its compilation even fails. - - Ui64array [4]uint64 - Ui64slicearray []*[4]uint64 WrapSliceInt64 wrapSliceUint64 WrapSliceString wrapSliceString Msi64 map[string]int64 } -type testStrucCommon struct { +type TestStrucCommon struct { S string I64 int64 @@ -136,11 +124,6 @@ type testStrucCommon struct { Iptrslice []*int64 - // TODO: test these separately, specifically for reflection and codecgen. - // Unfortunately, ffjson doesn't support these. Its compilation even fails. - - Ui64array [4]uint64 - Ui64slicearray []*[4]uint64 WrapSliceInt64 wrapSliceUint64 WrapSliceString wrapSliceString @@ -148,14 +131,14 @@ type testStrucCommon struct { Simplef testSimpleFields + SstrUi64T []stringUint64T + AnonInTestStruc NotAnon AnonInTestStruc - // make this a ptr, so that it could be set or not. - // for comparison (e.g. with msgp), give it a struct tag (so it is not inlined), - // make this one omitempty (so it is excluded if nil). - *AnonInTestStrucIntf `codec:",omitempty"` + // R Raw // Testing Raw must be explicitly turned on, so use standalone test + // Rext RawExt // Testing RawExt is tricky, so use standalone test Nmap map[string]bool //don't set this, so we can test for nil Nslice []byte //don't set this, so we can test for nil @@ -163,9 +146,9 @@ type testStrucCommon struct { } type TestStruc struct { - _struct struct{} `codec:",omitempty"` //set omitempty for every field + // _struct struct{} `json:",omitempty"` //set omitempty for every field - testStrucCommon + TestStrucCommon Mtsptr map[string]*TestStruc Mts map[string]TestStruc @@ -173,52 +156,11 @@ type TestStruc struct { Nteststruc *TestStruc } -// small struct for testing that codecgen works for unexported types -type tLowerFirstLetter struct { - I int - u uint64 - S string - b []byte -} - -// Some other types - -type Sstring string -type Bbool bool -type Sstructsmall struct { - A int -} - -type Sstructbig struct { - A int - B bool - c string - // Sval Sstruct - Ssmallptr *Sstructsmall - Ssmall *Sstructsmall - Sptr *Sstructbig -} - -type SstructbigMapBySlice struct { - _struct struct{} `codec:",toarray"` - A int - B bool - c string - // Sval Sstruct - Ssmallptr *Sstructsmall - Ssmall *Sstructsmall - Sptr *Sstructbig -} - -type Sinterface interface { - Noop() -} - -var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() - -func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, useStringKeyOnly bool) { +func populateTestStrucCommon(ts *TestStrucCommon, n int, bench, useInterface, useStringKeyOnly bool) { var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464 + // if bench, do not use uint64 values > math.MaxInt64, as bson, etc cannot decode them + var a = AnonInTestStruc{ // There's more leeway in altering this. AS: strRpt(n, "A-String"), @@ -255,7 +197,6 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us math.MaxUint8, math.MaxUint8 + 4, math.MaxUint8 - 4, math.MaxUint16, math.MaxUint16 + 4, math.MaxUint16 - 4, math.MaxUint32, math.MaxUint32 + 4, math.MaxUint32 - 4, - math.MaxUint64, math.MaxUint64 - 4, }, AMSU16: map[string]uint16{strRpt(n, "1"): 1, strRpt(n, "22"): 2, strRpt(n, "333"): 3, strRpt(n, "4444"): 4}, @@ -300,7 +241,10 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us AMSU16E: map[string]uint16{}, } - *ts = testStrucCommon{ + if !bench { + a.AUi64slice = append(a.AUi64slice, math.MaxUint64, math.MaxUint64-4) + } + *ts = TestStrucCommon{ S: strRpt(n, `some really really cool names that are nigerian and american like "ugorji melody nwoke" - get it? `), // set the numbers close to the limits @@ -338,11 +282,12 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us strRpt(n, "\"three\""): 3, }, - Ui64array: [4]uint64{4, 16, 64, 256}, - WrapSliceInt64: []uint64{4, 16, 64, 256}, WrapSliceString: []string{strRpt(n, "4"), strRpt(n, "16"), strRpt(n, "64"), strRpt(n, "256")}, + // R: Raw([]byte("goodbye")), + // Rext: RawExt{ 120, []byte("hello"), }, // TODO: don't set this - it's hard to test + // DecodeNaked bombs here, because the stringUint64T is decoded as a map, // and a map cannot be the key type of a map. // Thus, don't initialize this here. @@ -352,37 +297,27 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us // }, // make Simplef same as top-level + // TODO: should this have slightly different values??? Simplef: testSimpleFields{ S: strRpt(n, `some really really cool names that are nigerian and american like "ugorji melody nwoke" - get it? `), // set the numbers close to the limits - I8: math.MaxInt8 * 2 / 3, // 8, - I8n: math.MinInt8 * 2 / 3, // 8, - I16: math.MaxInt16 * 2 / 3, // 16, - I16n: math.MinInt16 * 2 / 3, // 16, - I32: math.MaxInt32 * 2 / 3, // 32, - I32n: math.MinInt32 * 2 / 3, // 32, - I64: math.MaxInt64 * 2 / 3, // 64, - I64n: math.MinInt64 * 2 / 3, // 64, + I8: math.MaxInt8 * 2 / 3, // 8, + I64: math.MaxInt64 * 2 / 3, // 64, Ui64: math.MaxUint64 * 2 / 3, // 64 - Ui32: math.MaxUint32 * 2 / 3, // 32 - Ui16: math.MaxUint16 * 2 / 3, // 16 Ui8: math.MaxUint8 * 2 / 3, // 8 F32: 3.402823e+38, // max representable float32 without losing precision F64: 3.40281991833838838338e+53, - B: true, - By: 5, + B: true, Sslice: []string{strRpt(n, "one"), strRpt(n, "two"), strRpt(n, "three")}, - I64slice: []int64{1111, 2222, 3333}, I16slice: []int16{44, 55, 66}, Ui64slice: []uint64{12121212, 34343434, 56565656}, Ui8slice: []uint8{210, 211, 212}, Bslice: []bool{true, false, true, false}, - Byslice: []byte{13, 14, 15}, Msi64: map[string]int64{ strRpt(n, "one"): 1, @@ -390,27 +325,18 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us strRpt(n, "\"three\""): 3, }, - Ui64array: [4]uint64{4, 16, 64, 256}, - WrapSliceInt64: []uint64{4, 16, 64, 256}, WrapSliceString: []string{strRpt(n, "4"), strRpt(n, "16"), strRpt(n, "64"), strRpt(n, "256")}, }, + SstrUi64T: []stringUint64T{{"1", 1}, {"2", 2}, {"3", 3}, {"4", 4}}, AnonInTestStruc: a, NotAnon: a, } - ts.Ui64slicearray = []*[4]uint64{&ts.Ui64array, &ts.Ui64array} - - if useInterface { - ts.AnonInTestStrucIntf = &AnonInTestStrucIntf{ - Islice: []interface{}{strRpt(n, "true"), true, strRpt(n, "no"), false, uint64(288), float64(0.4)}, - Ms: map[string]interface{}{ - strRpt(n, "true"): strRpt(n, "true"), - strRpt(n, "int64(9)"): false, - }, - T: testStrucTime, - } + if bench { + ts.Ui64 = math.MaxInt64 * 2 / 3 + ts.Simplef.Ui64 = ts.Ui64 } //For benchmarks, some things will not work. @@ -431,7 +357,7 @@ func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, us func newTestStruc(depth, n int, bench, useInterface, useStringKeyOnly bool) (ts *TestStruc) { ts = &TestStruc{} - populateTestStrucCommon(&ts.testStrucCommon, n, bench, useInterface, useStringKeyOnly) + populateTestStrucCommon(&ts.TestStrucCommon, n, bench, useInterface, useStringKeyOnly) if depth > 0 { depth-- if ts.Mtsptr == nil { @@ -447,6 +373,28 @@ func newTestStruc(depth, n int, bench, useInterface, useStringKeyOnly bool) (ts return } +var testStrRptMap = make(map[int]map[string]string) + func strRpt(n int, s string) string { - return strings.Repeat(s, n) + if false { + // fmt.Printf(">>>> calling strings.Repeat on n: %d, key: %s\n", n, s) + return strings.Repeat(s, n) + } + m1, ok := testStrRptMap[n] + if !ok { + // fmt.Printf(">>>> making new map for n: %v\n", n) + m1 = make(map[string]string) + testStrRptMap[n] = m1 + } + v1, ok := m1[s] + if !ok { + // fmt.Printf(">>>> creating new entry for key: %s\n", s) + v1 = strings.Repeat(s, n) + m1[s] = v1 + } + return v1 } + +// func wstrRpt(n int, s string) wrapBytes { +// return wrapBytes(bytes.Repeat([]byte(s), n)) +// } diff --git a/vendor/github.com/ugorji/go/codec/x_bench_gen_test.go b/vendor/github.com/ugorji/go/codec/x_bench_gen_test.go deleted file mode 100644 index e7c5276..0000000 --- a/vendor/github.com/ugorji/go/codec/x_bench_gen_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// +build x -// +build generated - -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -import ( - "bytes" - "errors" - "fmt" - "testing" - - "github.com/mailru/easyjson" - "github.com/pquerna/ffjson/ffjson" - "github.com/tinylib/msgp/msgp" -) - -/* - To update all these, use: - go get -u github.com/tinylib/msgp/msgp github.com/tinylib/msgp \ - github.com/pquerna/ffjson/ffjson github.com/pquerna/ffjson \ - github.com/mailru/easyjson/... - - Known Issues with external libraries: - - msgp io.R/W support doesn't work. It throws error - -*/ - -func init() { - testPreInitFns = append(testPreInitFns, benchXGenPreInit) -} - -func benchXGenPreInit() { - benchCheckers = append(benchCheckers, - benchChecker{"msgp", fnMsgpEncodeFn, fnMsgpDecodeFn}, - benchChecker{"easyjson", fnEasyjsonEncodeFn, fnEasyjsonDecodeFn}, - benchChecker{"ffjson", fnFfjsonEncodeFn, fnFfjsonDecodeFn}, - ) -} - -func fnEasyjsonEncodeFn(ts interface{}, bsIn []byte) ([]byte, error) { - if _, ok := ts.(easyjson.Marshaler); !ok { - return nil, errors.New("easyjson: input is not a easyjson.Marshaler") - } - if testUseIoEncDec >= 0 { - buf := new(bytes.Buffer) - _, err := easyjson.MarshalToWriter(ts.(easyjson.Marshaler), buf) - return buf.Bytes(), err - } - return easyjson.Marshal(ts.(easyjson.Marshaler)) - // return ts.(json.Marshaler).MarshalJSON() -} - -func fnEasyjsonDecodeFn(buf []byte, ts interface{}) error { - if _, ok := ts.(easyjson.Unmarshaler); !ok { - return errors.New("easyjson: input is not a easyjson.Unmarshaler") - } - if testUseIoEncDec >= 0 { - return easyjson.UnmarshalFromReader(bytes.NewReader(buf), ts.(easyjson.Unmarshaler)) - } - return easyjson.Unmarshal(buf, ts.(easyjson.Unmarshaler)) - // return ts.(json.Unmarshaler).UnmarshalJSON(buf) -} - -func fnFfjsonEncodeFn(ts interface{}, bsIn []byte) ([]byte, error) { - return ffjson.Marshal(ts) - // return ts.(json.Marshaler).MarshalJSON() -} - -func fnFfjsonDecodeFn(buf []byte, ts interface{}) error { - return ffjson.Unmarshal(buf, ts) - // return ts.(json.Unmarshaler).UnmarshalJSON(buf) -} - -func fnMsgpEncodeFn(ts interface{}, bsIn []byte) ([]byte, error) { - if _, ok := ts.(msgp.Encodable); !ok { - return nil, fmt.Errorf("msgp: input of type %T is not a msgp.Encodable", ts) - } - if testUseIoEncDec >= 0 { - buf := fnBenchmarkByteBuf(bsIn) - err := ts.(msgp.Encodable).EncodeMsg(msgp.NewWriter(buf)) - return buf.Bytes(), err - } - return ts.(msgp.Marshaler).MarshalMsg(bsIn[:0]) // msgp appends to slice. -} - -func fnMsgpDecodeFn(buf []byte, ts interface{}) (err error) { - if _, ok := ts.(msgp.Decodable); !ok { - return fmt.Errorf("msgp: input of type %T is not a msgp.Decodable", ts) - } - if testUseIoEncDec >= 0 { - err = ts.(msgp.Decodable).DecodeMsg(msgp.NewReader(bytes.NewReader(buf))) - return - } - _, err = ts.(msgp.Unmarshaler).UnmarshalMsg(buf) - return -} - -func Benchmark__Msgp_______Encode(b *testing.B) { - fnBenchmarkEncode(b, "msgp", benchTs, fnMsgpEncodeFn) -} - -func Benchmark__Msgp_______Decode(b *testing.B) { - fnBenchmarkDecode(b, "msgp", benchTs, fnMsgpEncodeFn, fnMsgpDecodeFn, fnBenchNewTs) -} - -func Benchmark__Easyjson___Encode(b *testing.B) { - fnBenchmarkEncode(b, "easyjson", benchTs, fnEasyjsonEncodeFn) -} - -func Benchmark__Easyjson___Decode(b *testing.B) { - fnBenchmarkDecode(b, "easyjson", benchTs, fnEasyjsonEncodeFn, fnEasyjsonDecodeFn, fnBenchNewTs) -} - -func Benchmark__Ffjson_____Encode(b *testing.B) { - fnBenchmarkEncode(b, "ffjson", benchTs, fnFfjsonEncodeFn) -} - -func Benchmark__Ffjson_____Decode(b *testing.B) { - fnBenchmarkDecode(b, "ffjson", benchTs, fnFfjsonEncodeFn, fnFfjsonDecodeFn, fnBenchNewTs) -} diff --git a/vendor/github.com/ugorji/go/codec/xml.go b/vendor/github.com/ugorji/go/codec/xml.go index 9386775..19fc36c 100644 --- a/vendor/github.com/ugorji/go/codec/xml.go +++ b/vendor/github.com/ugorji/go/codec/xml.go @@ -1,3 +1,6 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + // +build ignore package codec @@ -24,7 +27,6 @@ It is a replacement, based on the simplicity and performance of codec. Look at it like JAXB for Go. Challenges: - - Need to output XML preamble, with all namespaces at the right location in the output. - Each "end" block is dynamic, so we need to maintain a context-aware stack - How to decide when to use an attribute VS an element @@ -34,24 +36,26 @@ Challenges: Extend the struct tag. See representative example: type X struct { - ID uint8 codec:"xid|http://ugorji.net/x-namespace id,omitempty,toarray,attr,cdata" + ID uint8 `codec:"http://ugorji.net/x-namespace xid id,omitempty,toarray,attr,cdata"` + // format: [namespace-uri ][namespace-prefix ]local-name, ... } Based on this, we encode - - fields as elements, BUT encode as attributes if struct tag contains ",attr". + - fields as elements, BUT + encode as attributes if struct tag contains ",attr" and is a scalar (bool, number or string) - text as entity-escaped text, BUT encode as CDATA if struct tag contains ",cdata". -In this mode, we only encode as attribute if ",attr" is found, and only encode as CDATA -if ",cdata" is found in the struct tag. - To handle namespaces: - XMLHandle is denoted as being namespace-aware. Consequently, we WILL use the ns:name pair to encode and decode if defined, else use the plain name. - *Encoder and *Decoder know whether the Handle "prefers" namespaces. - add *Encoder.getEncName(*structFieldInfo). No one calls *structFieldInfo.indexForEncName directly anymore + - OR better yet: indexForEncName is namespace-aware, and helper.go is all namespace-aware + indexForEncName takes a parameter of the form namespace:local-name OR local-name - add *Decoder.getStructFieldInfo(encName string) // encName here is either like abc, or h1:nsabc - No one accesses .encName anymore except in + by being a method on *Decoder, or maybe a method on the Handle itself. + No one accesses .encName anymore - let encode.go and decode.go use these (for consistency) - only problem exists for gen.go, where we create a big switch on encName. Now, we also have to add a switch on strings.endsWith(kName, encNsName) @@ -62,13 +66,14 @@ To handle namespaces: default { switch { case !nsAware: panic(...) - case strings.endsWith("nsabc"): x.abc() + case strings.endsWith(":abc"): x.abc() + case strings.endsWith(":def"): x.def() default: panic(...) } } } -The structure below accomodates this: +The structure below accommodates this: type typeInfo struct { sfi []*structFieldInfo // sorted by encName @@ -88,7 +93,10 @@ indexForEncName is now an internal helper function that takes a sorted array (one of ti.sfins or ti.sfi). It is only used by *Encoder.getStructFieldInfo(...) There will be a separate parser from the builder. -The parser will have a method: next() xmlToken method. +The parser will have a method: next() xmlToken method. It has lookahead support, +so you can pop multiple tokens, make a determination, and push them back in the order popped. +This will be needed to determine whether we are "nakedly" decoding a container or not. +The stack will be implemented using a slice and push/pop happens at the [0] element. xmlToken has fields: - type uint8: 0 | ElementStart | ElementEnd | AttrKey | AttrVal | Text @@ -132,7 +140,7 @@ At decode time, a structure containing the following is kept - all internal entities (<>&"' and others written in the document) When decode starts, it parses XML namespace declarations and creates a map in the -xmlDecDriver. While parsing, that map continously gets updated. +xmlDecDriver. While parsing, that map continuously gets updated. The only problem happens when a namespace declaration happens on the node that it defines. e.g. To handle this, each Element must be fully parsed at a time, @@ -144,7 +152,7 @@ xmlns is a special attribute name. *We may decide later to allow user to use it e.g. you want to parse the xmlns mappings into a field.* Number, bool, null, mapKey, etc can all be decoded from any xmlToken. -This accomodates map[int]string for example. +This accommodates map[int]string for example. It should be possible to create a schema from the types, or vice versa (generate types from schema with appropriate tags). @@ -178,8 +186,8 @@ An XML document is a name, a map of attributes and a list of children. Consequently, we cannot "DecodeNaked" into a map[string]interface{} (for example). We have to "DecodeNaked" into something that resembles XML data. -To support DecodeNaked (decode into nil interface{}) we have to define some "supporting" types: - type Name struct { // Prefered. Less allocations due to conversions. +To support DecodeNaked (decode into nil interface{}), we have to define some "supporting" types: + type Name struct { // Preferred. Less allocations due to conversions. Local string Space string } @@ -190,6 +198,8 @@ To support DecodeNaked (decode into nil interface{}) we have to define some "sup } Only two "supporting" types are exposed for XML: Name and Element. +// ------------------ + We considered 'type Name string' where Name is like "Space Local" (space-separated). We decided against it, because each creation of a name would lead to double allocation (first convert []byte to string, then concatenate them into a string). @@ -215,16 +225,16 @@ intelligent accessor methods to extract information and for performance. } func (x *Element) child(i) interface{} // returns string or *Element -Per XML spec and our default handling, white space is insignificant between elements, -specifically between parent-child or siblings. White space occuring alone between start -and end element IS significant. However, if xml:space='preserve', then we 'preserve' -all whitespace. This is more critical when doing a DecodeNaked, but MAY not be as critical -when decoding into a typed value. +// ------------------ + +Per XML spec and our default handling, white space is always treated as +insignificant between elements, except in a text node. The xml:space='preserve' +attribute is ignored. **Note: there is no xml: namespace. The xml: attributes were defined before namespaces.** **So treat them as just "directives" that should be interpreted to mean something**. -On encoding, we don't add any prettifying markup (indenting, etc). +On encoding, we support indenting aka prettifying markup in the same way we support it for json. A document or element can only be encoded/decoded from/to a struct. In this mode: - struct name maps to element name (or tag-info from _struct field) @@ -258,15 +268,14 @@ the struct tag signifying it should be attr, then all its fields are encoded as e.g. type X struct { - M map[string]int `codec:"m,attr"` // encode as attributes + M map[string]int `codec:"m,attr"` // encode keys as attributes named } Question: - if encoding a map, what if map keys have spaces in them??? Then they cannot be attributes or child elements. Error. -Misc: - +Options to consider adding later: - For attribute values, normalize by trimming beginning and ending white space, and converting every white space sequence to a single space. - ATTLIST restrictions are enforced. @@ -284,6 +293,8 @@ Misc: CheckName bool } +Misc: + ROADMAP (1 weeks): - build encoder (1 day) - build decoder (based off xmlParser) (1 day) @@ -292,7 +303,78 @@ ROADMAP (1 weeks): - integrate and TEST (1 days) - write article and post it (1 day) +// ---------- MORE NOTES FROM 2017-11-30 ------------ +when parsing +- parse the attributes first +- then parse the nodes + +basically: +- if encoding a field: we use the field name for the wrapper +- if encoding a non-field, then just use the element type name + + map[string]string ==> abcval... or + val... OR + val1val2... <- PREFERED + []string ==> v1v2... + string v1 ==> v1 + bool true ==> true + float 1.0 ==> 1.0 + ... + + F1 map[string]string ==> abcval... OR + val... OR + val... <- PREFERED + F2 []string ==> v1v2... + F3 bool ==> true + ... + +- a scalar is encoded as: + (value) of type T ==> + (value) of field F ==> +- A kv-pair is encoded as: + (key,value) ==> OR + (key,value) of field F ==> OR +- A map or struct is just a list of kv-pairs +- A list is encoded as sequences of same node e.g. + + + value21 + value22 +- we may have to singularize the field name, when entering into xml, + and pluralize them when encoding. +- bi-directional encode->decode->encode is not a MUST. + even encoding/xml cannot decode correctly what was encoded: + + see https://play.golang.org/p/224V_nyhMS + func main() { + fmt.Println("Hello, playground") + v := []interface{}{"hello", 1, true, nil, time.Now()} + s, err := xml.Marshal(v) + fmt.Printf("err: %v, \ns: %s\n", err, s) + var v2 []interface{} + err = xml.Unmarshal(s, &v2) + fmt.Printf("err: %v, \nv2: %v\n", err, v2) + type T struct { + V []interface{} + } + v3 := T{V: v} + s, err = xml.Marshal(v3) + fmt.Printf("err: %v, \ns: %s\n", err, s) + var v4 T + err = xml.Unmarshal(s, &v4) + fmt.Printf("err: %v, \nv4: %v\n", err, v4) + } + Output: + err: , + s: hello1true + err: , + v2: [] + err: , + s: hello1true2009-11-10T23:00:00Z + err: , + v4: {[ ]} +- */ // ----------- PARSER ------------------- @@ -419,7 +501,7 @@ func (h *XMLHandle) newDecDriver(d *Decoder) decDriver { } func (h *XMLHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { - return h.SetExt(rt, tag, &setExtWrapper{i: ext}) + return h.SetExt(rt, tag, &extWrapper{bytesExtFailer{}, ext}) } var _ decDriver = (*xmlDecDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/z_all_test.go b/vendor/github.com/ugorji/go/codec/z_all_test.go index f20f81c..58a3aa0 100644 --- a/vendor/github.com/ugorji/go/codec/z_all_test.go +++ b/vendor/github.com/ugorji/go/codec/z_all_test.go @@ -1,3 +1,6 @@ +// Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + // +build alltests // +build go1.7 @@ -41,11 +44,15 @@ func testGroupResetFlags() { testMaxInitLen = 0 testUseIoWrapper = false testNumRepeatString = 8 + testEncodeOptions.RecursiveEmptyCheck = false + testDecodeOptions.MapValueReset = false + testUseIoEncDec = -1 + testDepth = 0 } func testSuite(t *testing.T, f func(t *testing.T)) { // find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test' - // Disregard the following: testVerbose, testInitDebug, testSkipIntf, testJsonIndent (Need a test for it) + // Disregard the following: testInitDebug, testSkipIntf, testJsonIndent (Need a test for it) testReinit() // so flag.Parse() is called first, and never called again @@ -65,20 +72,22 @@ func testSuite(t *testing.T, f func(t *testing.T)) { testCheckCircRef = true testUseReset = true testDecodeOptions.MapValueReset = true + testEncodeOptions.RecursiveEmptyCheck = true testReinit() t.Run("optionsTrue", f) - testEncodeOptions.AsSymbols = AsSymbolAll + testDepth = 6 + testReinit() + t.Run("optionsTrue-deepstruct", f) + testDepth = 0 + + // testEncodeOptions.AsSymbols = AsSymbolAll testUseIoWrapper = true testReinit() t.Run("optionsTrue-ioWrapper", f) testUseIoEncDec = -1 - testDepth = 6 - testReinit() - t.Run("optionsTrue-deepstruct", f) - // make buffer small enough so that we have to re-fill multiple times. testSkipRPCTests = true testUseIoEncDec = 128 @@ -110,8 +119,7 @@ func testSuite(t *testing.T, f func(t *testing.T)) { } /* -z='codec_test.go' -find . -name "$z" | xargs grep -e '^func Test' | \ +find . -name "codec_test.go" | xargs grep -e '^func Test' | \ cut -d '(' -f 1 | cut -d ' ' -f 2 | \ while read f; do echo "t.Run(\"$f\", $f)"; done */ @@ -211,6 +219,21 @@ func testCodecGroup(t *testing.T) { t.Run("TestMsgpackUintToInt", TestMsgpackUintToInt) t.Run("TestBincUintToInt", TestBincUintToInt) t.Run("TestSimpleUintToInt", TestSimpleUintToInt) + t.Run("TestJsonDifferentMapOrSliceType", TestJsonDifferentMapOrSliceType) + t.Run("TestCborDifferentMapOrSliceType", TestCborDifferentMapOrSliceType) + t.Run("TestMsgpackDifferentMapOrSliceType", TestMsgpackDifferentMapOrSliceType) + t.Run("TestBincDifferentMapOrSliceType", TestBincDifferentMapOrSliceType) + t.Run("TestSimpleDifferentMapOrSliceType", TestSimpleDifferentMapOrSliceType) + t.Run("TestJsonScalars", TestJsonScalars) + t.Run("TestCborScalars", TestCborScalars) + t.Run("TestMsgpackScalars", TestMsgpackScalars) + t.Run("TestBincScalars", TestBincScalars) + t.Run("TestSimpleScalars", TestSimpleScalars) + t.Run("TestJsonIntfMapping", TestJsonIntfMapping) + t.Run("TestCborIntfMapping", TestCborIntfMapping) + t.Run("TestMsgpackIntfMapping", TestMsgpackIntfMapping) + t.Run("TestBincIntfMapping", TestBincIntfMapping) + t.Run("TestSimpleIntfMapping", TestSimpleIntfMapping) t.Run("TestJsonInvalidUnicode", TestJsonInvalidUnicode) t.Run("TestCborHalfFloat", TestCborHalfFloat) @@ -240,6 +263,9 @@ func testJsonGroup(t *testing.T) { t.Run("TestJsonInvalidUnicode", TestJsonInvalidUnicode) t.Run("TestJsonTime", TestJsonTime) t.Run("TestJsonUintToInt", TestJsonUintToInt) + t.Run("TestJsonDifferentMapOrSliceType", TestJsonDifferentMapOrSliceType) + t.Run("TestJsonScalars", TestJsonScalars) + t.Run("TestJsonIntfMapping", TestJsonIntfMapping) } func testBincGroup(t *testing.T) { @@ -261,6 +287,8 @@ func testBincGroup(t *testing.T) { t.Run("TestBincMammothMapsAndSlices", TestBincMammothMapsAndSlices) t.Run("TestBincTime", TestBincTime) t.Run("TestBincUintToInt", TestBincUintToInt) + t.Run("TestBincDifferentMapOrSliceType", TestBincDifferentMapOrSliceType) + t.Run("TestBincScalars", TestBincScalars) } func testCborGroup(t *testing.T) { @@ -283,6 +311,8 @@ func testCborGroup(t *testing.T) { t.Run("TestCborMammothMapsAndSlices", TestCborMammothMapsAndSlices) t.Run("TestCborTime", TestCborTime) t.Run("TestCborUintToInt", TestCborUintToInt) + t.Run("TestCborDifferentMapOrSliceType", TestCborDifferentMapOrSliceType) + t.Run("TestCborScalars", TestCborScalars) t.Run("TestCborHalfFloat", TestCborHalfFloat) } @@ -305,6 +335,42 @@ func testMsgpackGroup(t *testing.T) { t.Run("TestMsgpackMammothMapsAndSlices", TestMsgpackMammothMapsAndSlices) t.Run("TestMsgpackTime", TestMsgpackTime) t.Run("TestMsgpackUintToInt", TestMsgpackUintToInt) + t.Run("TestMsgpackDifferentMapOrSliceType", TestMsgpackDifferentMapOrSliceType) + t.Run("TestMsgpackScalars", TestMsgpackScalars) +} + +func testSimpleGroup(t *testing.T) { + t.Run("TestSimpleCodecsTable", TestSimpleCodecsTable) + t.Run("TestSimpleCodecsMisc", TestSimpleCodecsMisc) + t.Run("TestSimpleCodecsEmbeddedPointer", TestSimpleCodecsEmbeddedPointer) + t.Run("TestSimpleStdEncIntf", TestSimpleStdEncIntf) + t.Run("TestSimpleMammoth", TestSimpleMammoth) + t.Run("TestSimpleRaw", TestSimpleRaw) + t.Run("TestSimpleRpcGo", TestSimpleRpcGo) + t.Run("TestSimpleSwallowAndZero", TestSimpleSwallowAndZero) + t.Run("TestSimpleRawExt", TestSimpleRawExt) + t.Run("TestSimpleMapStructKey", TestSimpleMapStructKey) + t.Run("TestSimpleDecodeNilMapValue", TestSimpleDecodeNilMapValue) + t.Run("TestSimpleEmbeddedFieldPrecedence", TestSimpleEmbeddedFieldPrecedence) + t.Run("TestSimpleLargeContainerLen", TestSimpleLargeContainerLen) + t.Run("TestSimpleMammothMapsAndSlices", TestSimpleMammothMapsAndSlices) + t.Run("TestSimpleTime", TestSimpleTime) + t.Run("TestSimpleUintToInt", TestSimpleUintToInt) + t.Run("TestSimpleDifferentMapOrSliceType", TestSimpleDifferentMapOrSliceType) + t.Run("TestSimpleScalars", TestSimpleScalars) +} + +func testSimpleMammothGroup(t *testing.T) { + t.Run("TestSimpleMammothMapsAndSlices", TestSimpleMammothMapsAndSlices) +} + +func testRpcGroup(t *testing.T) { + t.Run("TestBincRpcGo", TestBincRpcGo) + t.Run("TestSimpleRpcGo", TestSimpleRpcGo) + t.Run("TestMsgpackRpcGo", TestMsgpackRpcGo) + t.Run("TestCborRpcGo", TestCborRpcGo) + t.Run("TestJsonRpcGo", TestJsonRpcGo) + t.Run("TestMsgpackRpcSpec", TestMsgpackRpcSpec) } func TestCodecSuite(t *testing.T) { @@ -342,17 +408,23 @@ func TestCodecSuite(t *testing.T) { testCborH.IndefiniteLength = oldIndefLen - oldSymbols := testBincH.getBasicHandle().AsSymbols + oldTimeRFC3339 := testCborH.TimeRFC3339 + testCborH.TimeRFC3339 = !testCborH.TimeRFC3339 + testReinit() + t.Run("cbor-rfc3339", testCborGroup) + testCborH.TimeRFC3339 = oldTimeRFC3339 - testBincH.getBasicHandle().AsSymbols = AsSymbolNone + oldSymbols := testBincH.AsSymbols + + testBincH.AsSymbols = 2 // AsSymbolNone testReinit() t.Run("binc-no-symbols", testBincGroup) - testBincH.getBasicHandle().AsSymbols = AsSymbolAll + testBincH.AsSymbols = 1 // AsSymbolAll testReinit() t.Run("binc-all-symbols", testBincGroup) - testBincH.getBasicHandle().AsSymbols = oldSymbols + testBincH.AsSymbols = oldSymbols oldWriteExt := testMsgpackH.WriteExt oldNoFixedNum := testMsgpackH.NoFixedNum @@ -369,6 +441,26 @@ func TestCodecSuite(t *testing.T) { testMsgpackH.NoFixedNum = oldNoFixedNum + oldEncZeroValuesAsNil := testSimpleH.EncZeroValuesAsNil + testSimpleH.EncZeroValuesAsNil = !testSimpleH.EncZeroValuesAsNil + testUseMust = true + testReinit() + t.Run("simple-enczeroasnil", testSimpleMammothGroup) // testSimpleGroup + testSimpleH.EncZeroValuesAsNil = oldEncZeroValuesAsNil + + oldRpcBufsize := testRpcBufsize + testRpcBufsize = 0 + t.Run("rpc-buf-0", testRpcGroup) + testRpcBufsize = 0 + t.Run("rpc-buf-00", testRpcGroup) + testRpcBufsize = 0 + t.Run("rpc-buf-000", testRpcGroup) + testRpcBufsize = 16 + t.Run("rpc-buf-16", testRpcGroup) + testRpcBufsize = 2048 + t.Run("rpc-buf-2048", testRpcGroup) + testRpcBufsize = oldRpcBufsize + testGroupResetFlags() } diff --git a/vendor/github.com/ugorji/go/codec/z_all_x_bench_gen_test.go b/vendor/github.com/ugorji/go/codec/z_all_x_bench_gen_test.go deleted file mode 100644 index 0ad4e79..0000000 --- a/vendor/github.com/ugorji/go/codec/z_all_x_bench_gen_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// +build alltests -// +build x -// +build go1.7 -// +build generated - -package codec - -// see notes in z_all_bench_test.go - -import "testing" - -func benchmarkCodecXGenGroup(t *testing.B) { - logT(nil, "\n-------------------------------\n") - t.Run("Benchmark__Msgpack____Encode", Benchmark__Msgpack____Encode) - t.Run("Benchmark__Binc_______Encode", Benchmark__Binc_______Encode) - t.Run("Benchmark__Simple_____Encode", Benchmark__Simple_____Encode) - t.Run("Benchmark__Cbor_______Encode", Benchmark__Cbor_______Encode) - t.Run("Benchmark__Json_______Encode", Benchmark__Json_______Encode) - t.Run("Benchmark__Std_Json___Encode", Benchmark__Std_Json___Encode) - t.Run("Benchmark__Gob________Encode", Benchmark__Gob________Encode) - t.Run("Benchmark__JsonIter___Encode", Benchmark__JsonIter___Encode) - t.Run("Benchmark__Bson_______Encode", Benchmark__Bson_______Encode) - t.Run("Benchmark__VMsgpack___Encode", Benchmark__VMsgpack___Encode) - t.Run("Benchmark__Msgp_______Encode", Benchmark__Msgp_______Encode) - t.Run("Benchmark__Easyjson___Encode", Benchmark__Easyjson___Encode) - t.Run("Benchmark__Ffjson_____Encode", Benchmark__Ffjson_____Encode) - t.Run("Benchmark__Gcbor______Encode", Benchmark__Gcbor______Encode) - t.Run("Benchmark__Xdr________Encode", Benchmark__Xdr________Encode) - t.Run("Benchmark__Sereal_____Encode", Benchmark__Sereal_____Encode) - - t.Run("Benchmark__Msgpack____Decode", Benchmark__Msgpack____Decode) - t.Run("Benchmark__Binc_______Decode", Benchmark__Binc_______Decode) - t.Run("Benchmark__Simple_____Decode", Benchmark__Simple_____Decode) - t.Run("Benchmark__Cbor_______Decode", Benchmark__Cbor_______Decode) - t.Run("Benchmark__Json_______Decode", Benchmark__Json_______Decode) - t.Run("Benchmark__Std_Json___Decode", Benchmark__Std_Json___Decode) - t.Run("Benchmark__Gob________Decode", Benchmark__Gob________Decode) - t.Run("Benchmark__JsonIter___Decode", Benchmark__JsonIter___Decode) - t.Run("Benchmark__Bson_______Decode", Benchmark__Bson_______Decode) - t.Run("Benchmark__VMsgpack___Decode", Benchmark__VMsgpack___Decode) - t.Run("Benchmark__Msgp_______Decode", Benchmark__Msgp_______Decode) - t.Run("Benchmark__Easyjson___Decode", Benchmark__Easyjson___Decode) - t.Run("Benchmark__Ffjson_____Decode", Benchmark__Ffjson_____Decode) - t.Run("Benchmark__Gcbor______Decode", Benchmark__Gcbor______Decode) - t.Run("Benchmark__Xdr________Decode", Benchmark__Xdr________Decode) - t.Run("Benchmark__Sereal_____Decode", Benchmark__Sereal_____Decode) -} - -func BenchmarkCodecXGenSuite(t *testing.B) { benchmarkSuite(t, benchmarkCodecXGenGroup) } diff --git a/vendor/golang.org/x/crypto/acme/acme_test.go b/vendor/golang.org/x/crypto/acme/acme_test.go index b44af59..89f2efa 100644 --- a/vendor/golang.org/x/crypto/acme/acme_test.go +++ b/vendor/golang.org/x/crypto/acme/acme_test.go @@ -946,7 +946,7 @@ func TestNonce_add(t *testing.T) { c.addNonce(http.Header{"Replay-Nonce": {}}) c.addNonce(http.Header{"Replay-Nonce": {"nonce"}}) - nonces := map[string]struct{}{"nonce": struct{}{}} + nonces := map[string]struct{}{"nonce": {}} if !reflect.DeepEqual(c.nonces, nonces) { t.Errorf("c.nonces = %q; want %q", c.nonces, nonces) } diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/golang.org/x/crypto/acme/autocert/autocert.go index 94edba9..453e722 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/autocert.go +++ b/vendor/golang.org/x/crypto/acme/autocert/autocert.go @@ -24,7 +24,9 @@ import ( "fmt" "io" mathrand "math/rand" + "net" "net/http" + "path" "strconv" "strings" "sync" @@ -80,8 +82,9 @@ func defaultHostPolicy(context.Context, string) error { } // Manager is a stateful certificate manager built on top of acme.Client. -// It obtains and refreshes certificates automatically, -// as well as providing them to a TLS server via tls.Config. +// It obtains and refreshes certificates automatically using "tls-sni-01", +// "tls-sni-02" and "http-01" challenge types, as well as providing them +// to a TLS server via tls.Config. // // You must specify a cache implementation, such as DirCache, // to reuse obtained certificates across program restarts. @@ -150,15 +153,26 @@ type Manager struct { stateMu sync.Mutex state map[string]*certState // keyed by domain name - // tokenCert is keyed by token domain name, which matches server name - // of ClientHello. Keys always have ".acme.invalid" suffix. - tokenCertMu sync.RWMutex - tokenCert map[string]*tls.Certificate - // renewal tracks the set of domains currently running renewal timers. // It is keyed by domain name. renewalMu sync.Mutex renewal map[string]*domainRenewal + + // tokensMu guards the rest of the fields: tryHTTP01, certTokens and httpTokens. + tokensMu sync.RWMutex + // tryHTTP01 indicates whether the Manager should try "http-01" challenge type + // during the authorization flow. + tryHTTP01 bool + // httpTokens contains response body values for http-01 challenges + // and is keyed by the URL path at which a challenge response is expected + // to be provisioned. + // The entries are stored for the duration of the authorization flow. + httpTokens map[string][]byte + // certTokens contains temporary certificates for tls-sni challenges + // and is keyed by token domain name, which matches server name of ClientHello. + // Keys always have ".acme.invalid" suffix. + // The entries are stored for the duration of the authorization flow. + certTokens map[string]*tls.Certificate } // GetCertificate implements the tls.Config.GetCertificate hook. @@ -185,14 +199,16 @@ func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, return nil, errors.New("acme/autocert: server name contains invalid character") } + // In the worst-case scenario, the timeout needs to account for caching, host policy, + // domain ownership verification and certificate issuance. ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) defer cancel() // check whether this is a token cert requested for TLS-SNI challenge if strings.HasSuffix(name, ".acme.invalid") { - m.tokenCertMu.RLock() - defer m.tokenCertMu.RUnlock() - if cert := m.tokenCert[name]; cert != nil { + m.tokensMu.RLock() + defer m.tokensMu.RUnlock() + if cert := m.certTokens[name]; cert != nil { return cert, nil } if cert, err := m.cacheGet(ctx, name); err == nil { @@ -224,6 +240,68 @@ func (m *Manager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, return cert, nil } +// HTTPHandler configures the Manager to provision ACME "http-01" challenge responses. +// It returns an http.Handler that responds to the challenges and must be +// running on port 80. If it receives a request that is not an ACME challenge, +// it delegates the request to the optional fallback handler. +// +// If fallback is nil, the returned handler redirects all GET and HEAD requests +// to the default TLS port 443 with 302 Found status code, preserving the original +// request path and query. It responds with 400 Bad Request to all other HTTP methods. +// The fallback is not protected by the optional HostPolicy. +// +// Because the fallback handler is run with unencrypted port 80 requests, +// the fallback should not serve TLS-only requests. +// +// If HTTPHandler is never called, the Manager will only use TLS SNI +// challenges for domain verification. +func (m *Manager) HTTPHandler(fallback http.Handler) http.Handler { + m.tokensMu.Lock() + defer m.tokensMu.Unlock() + m.tryHTTP01 = true + + if fallback == nil { + fallback = http.HandlerFunc(handleHTTPRedirect) + } + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if !strings.HasPrefix(r.URL.Path, "/.well-known/acme-challenge/") { + fallback.ServeHTTP(w, r) + return + } + // A reasonable context timeout for cache and host policy only, + // because we don't wait for a new certificate issuance here. + ctx, cancel := context.WithTimeout(r.Context(), time.Minute) + defer cancel() + if err := m.hostPolicy()(ctx, r.Host); err != nil { + http.Error(w, err.Error(), http.StatusForbidden) + return + } + data, err := m.httpToken(ctx, r.URL.Path) + if err != nil { + http.Error(w, err.Error(), http.StatusNotFound) + return + } + w.Write(data) + }) +} + +func handleHTTPRedirect(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" && r.Method != "HEAD" { + http.Error(w, "Use HTTPS", http.StatusBadRequest) + return + } + target := "https://" + stripPort(r.Host) + r.URL.RequestURI() + http.Redirect(w, r, target, http.StatusFound) +} + +func stripPort(hostport string) string { + host, _, err := net.SplitHostPort(hostport) + if err != nil { + return hostport + } + return net.JoinHostPort(host, "443") +} + // cert returns an existing certificate either from m.state or cache. // If a certificate is found in cache but not in m.state, the latter will be filled // with the cached value. @@ -442,13 +520,14 @@ func (m *Manager) certState(domain string) (*certState, error) { // authorizedCert starts the domain ownership verification process and requests a new cert upon success. // The key argument is the certificate private key. func (m *Manager) authorizedCert(ctx context.Context, key crypto.Signer, domain string) (der [][]byte, leaf *x509.Certificate, err error) { - if err := m.verify(ctx, domain); err != nil { - return nil, nil, err - } client, err := m.acmeClient(ctx) if err != nil { return nil, nil, err } + + if err := m.verify(ctx, client, domain); err != nil { + return nil, nil, err + } csr, err := certRequest(key, domain) if err != nil { return nil, nil, err @@ -464,98 +543,171 @@ func (m *Manager) authorizedCert(ctx context.Context, key crypto.Signer, domain return der, leaf, nil } -// verify starts a new identifier (domain) authorization flow. -// It prepares a challenge response and then blocks until the authorization -// is marked as "completed" by the CA (either succeeded or failed). -// -// verify returns nil iff the verification was successful. -func (m *Manager) verify(ctx context.Context, domain string) error { - client, err := m.acmeClient(ctx) - if err != nil { - return err +// verify runs the identifier (domain) authorization flow +// using each applicable ACME challenge type. +func (m *Manager) verify(ctx context.Context, client *acme.Client, domain string) error { + // The list of challenge types we'll try to fulfill + // in this specific order. + challengeTypes := []string{"tls-sni-02", "tls-sni-01"} + m.tokensMu.RLock() + if m.tryHTTP01 { + challengeTypes = append(challengeTypes, "http-01") } + m.tokensMu.RUnlock() - // start domain authorization and get the challenge - authz, err := client.Authorize(ctx, domain) - if err != nil { - return err - } - // maybe don't need to at all - if authz.Status == acme.StatusValid { - return nil - } - - // pick a challenge: prefer tls-sni-02 over tls-sni-01 - // TODO: consider authz.Combinations - var chal *acme.Challenge - for _, c := range authz.Challenges { - if c.Type == "tls-sni-02" { - chal = c - break + var nextTyp int // challengeType index of the next challenge type to try + for { + // Start domain authorization and get the challenge. + authz, err := client.Authorize(ctx, domain) + if err != nil { + return err } - if c.Type == "tls-sni-01" { - chal = c + // No point in accepting challenges if the authorization status + // is in a final state. + switch authz.Status { + case acme.StatusValid: + return nil // already authorized + case acme.StatusInvalid: + return fmt.Errorf("acme/autocert: invalid authorization %q", authz.URI) + } + + // Pick the next preferred challenge. + var chal *acme.Challenge + for chal == nil && nextTyp < len(challengeTypes) { + chal = pickChallenge(challengeTypes[nextTyp], authz.Challenges) + nextTyp++ + } + if chal == nil { + return fmt.Errorf("acme/autocert: unable to authorize %q; tried %q", domain, challengeTypes) + } + cleanup, err := m.fulfill(ctx, client, chal) + if err != nil { + continue + } + defer cleanup() + if _, err := client.Accept(ctx, chal); err != nil { + continue + } + + // A challenge is fulfilled and accepted: wait for the CA to validate. + if _, err := client.WaitAuthorization(ctx, authz.URI); err == nil { + return nil } } - if chal == nil { - return errors.New("acme/autocert: no supported challenge type found") - } - - // create a token cert for the challenge response - var ( - cert tls.Certificate - name string - ) - switch chal.Type { - case "tls-sni-01": - cert, name, err = client.TLSSNI01ChallengeCert(chal.Token) - case "tls-sni-02": - cert, name, err = client.TLSSNI02ChallengeCert(chal.Token) - default: - err = fmt.Errorf("acme/autocert: unknown challenge type %q", chal.Type) - } - if err != nil { - return err - } - m.putTokenCert(ctx, name, &cert) - defer func() { - // verification has ended at this point - // don't need token cert anymore - go m.deleteTokenCert(name) - }() - - // ready to fulfill the challenge - if _, err := client.Accept(ctx, chal); err != nil { - return err - } - // wait for the CA to validate - _, err = client.WaitAuthorization(ctx, authz.URI) - return err } -// putTokenCert stores the cert under the named key in both m.tokenCert map -// and m.Cache. -func (m *Manager) putTokenCert(ctx context.Context, name string, cert *tls.Certificate) { - m.tokenCertMu.Lock() - defer m.tokenCertMu.Unlock() - if m.tokenCert == nil { - m.tokenCert = make(map[string]*tls.Certificate) +// fulfill provisions a response to the challenge chal. +// The cleanup is non-nil only if provisioning succeeded. +func (m *Manager) fulfill(ctx context.Context, client *acme.Client, chal *acme.Challenge) (cleanup func(), err error) { + switch chal.Type { + case "tls-sni-01": + cert, name, err := client.TLSSNI01ChallengeCert(chal.Token) + if err != nil { + return nil, err + } + m.putCertToken(ctx, name, &cert) + return func() { go m.deleteCertToken(name) }, nil + case "tls-sni-02": + cert, name, err := client.TLSSNI02ChallengeCert(chal.Token) + if err != nil { + return nil, err + } + m.putCertToken(ctx, name, &cert) + return func() { go m.deleteCertToken(name) }, nil + case "http-01": + resp, err := client.HTTP01ChallengeResponse(chal.Token) + if err != nil { + return nil, err + } + p := client.HTTP01ChallengePath(chal.Token) + m.putHTTPToken(ctx, p, resp) + return func() { go m.deleteHTTPToken(p) }, nil } - m.tokenCert[name] = cert + return nil, fmt.Errorf("acme/autocert: unknown challenge type %q", chal.Type) +} + +func pickChallenge(typ string, chal []*acme.Challenge) *acme.Challenge { + for _, c := range chal { + if c.Type == typ { + return c + } + } + return nil +} + +// putCertToken stores the cert under the named key in both m.certTokens map +// and m.Cache. +func (m *Manager) putCertToken(ctx context.Context, name string, cert *tls.Certificate) { + m.tokensMu.Lock() + defer m.tokensMu.Unlock() + if m.certTokens == nil { + m.certTokens = make(map[string]*tls.Certificate) + } + m.certTokens[name] = cert m.cachePut(ctx, name, cert) } -// deleteTokenCert removes the token certificate for the specified domain name -// from both m.tokenCert map and m.Cache. -func (m *Manager) deleteTokenCert(name string) { - m.tokenCertMu.Lock() - defer m.tokenCertMu.Unlock() - delete(m.tokenCert, name) +// deleteCertToken removes the token certificate for the specified domain name +// from both m.certTokens map and m.Cache. +func (m *Manager) deleteCertToken(name string) { + m.tokensMu.Lock() + defer m.tokensMu.Unlock() + delete(m.certTokens, name) if m.Cache != nil { m.Cache.Delete(context.Background(), name) } } +// httpToken retrieves an existing http-01 token value from an in-memory map +// or the optional cache. +func (m *Manager) httpToken(ctx context.Context, tokenPath string) ([]byte, error) { + m.tokensMu.RLock() + defer m.tokensMu.RUnlock() + if v, ok := m.httpTokens[tokenPath]; ok { + return v, nil + } + if m.Cache == nil { + return nil, fmt.Errorf("acme/autocert: no token at %q", tokenPath) + } + return m.Cache.Get(ctx, httpTokenCacheKey(tokenPath)) +} + +// putHTTPToken stores an http-01 token value using tokenPath as key +// in both in-memory map and the optional Cache. +// +// It ignores any error returned from Cache.Put. +func (m *Manager) putHTTPToken(ctx context.Context, tokenPath, val string) { + m.tokensMu.Lock() + defer m.tokensMu.Unlock() + if m.httpTokens == nil { + m.httpTokens = make(map[string][]byte) + } + b := []byte(val) + m.httpTokens[tokenPath] = b + if m.Cache != nil { + m.Cache.Put(ctx, httpTokenCacheKey(tokenPath), b) + } +} + +// deleteHTTPToken removes an http-01 token value from both in-memory map +// and the optional Cache, ignoring any error returned from the latter. +// +// If m.Cache is non-nil, it blocks until Cache.Delete returns without a timeout. +func (m *Manager) deleteHTTPToken(tokenPath string) { + m.tokensMu.Lock() + defer m.tokensMu.Unlock() + delete(m.httpTokens, tokenPath) + if m.Cache != nil { + m.Cache.Delete(context.Background(), httpTokenCacheKey(tokenPath)) + } +} + +// httpTokenCacheKey returns a key at which an http-01 token value may be stored +// in the Manager's optional Cache. +func httpTokenCacheKey(tokenPath string) string { + return "http-01-" + path.Base(tokenPath) +} + // renew starts a cert renewal timer loop, one per domain. // // The loop is scheduled in two cases: diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go b/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go index 43a6201..2da1912 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go +++ b/vendor/golang.org/x/crypto/acme/autocert/autocert_test.go @@ -23,6 +23,7 @@ import ( "net/http" "net/http/httptest" "reflect" + "strings" "sync" "testing" "time" @@ -48,6 +49,16 @@ var authzTmpl = template.Must(template.New("authz").Parse(`{ "uri": "{{.}}/challenge/2", "type": "tls-sni-02", "token": "token-02" + }, + { + "uri": "{{.}}/challenge/dns-01", + "type": "dns-01", + "token": "token-dns-01" + }, + { + "uri": "{{.}}/challenge/http-01", + "type": "http-01", + "token": "token-http-01" } ] }`)) @@ -419,6 +430,146 @@ func testGetCertificate(t *testing.T, man *Manager, domain string, hello *tls.Cl } +func TestVerifyHTTP01(t *testing.T) { + var ( + http01 http.Handler + + authzCount int // num. of created authorizations + didAcceptHTTP01 bool + ) + + verifyHTTPToken := func() { + r := httptest.NewRequest("GET", "/.well-known/acme-challenge/token-http-01", nil) + w := httptest.NewRecorder() + http01.ServeHTTP(w, r) + if w.Code != http.StatusOK { + t.Errorf("http token: w.Code = %d; want %d", w.Code, http.StatusOK) + } + if v := string(w.Body.Bytes()); !strings.HasPrefix(v, "token-http-01.") { + t.Errorf("http token value = %q; want 'token-http-01.' prefix", v) + } + } + + // ACME CA server stub, only the needed bits. + // TODO: Merge this with startACMEServerStub, making it a configurable CA for testing. + var ca *httptest.Server + ca = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Replay-Nonce", "nonce") + if r.Method == "HEAD" { + // a nonce request + return + } + + switch r.URL.Path { + // Discovery. + case "/": + if err := discoTmpl.Execute(w, ca.URL); err != nil { + t.Errorf("discoTmpl: %v", err) + } + // Client key registration. + case "/new-reg": + w.Write([]byte("{}")) + // New domain authorization. + case "/new-authz": + authzCount++ + w.Header().Set("Location", fmt.Sprintf("%s/authz/%d", ca.URL, authzCount)) + w.WriteHeader(http.StatusCreated) + if err := authzTmpl.Execute(w, ca.URL); err != nil { + t.Errorf("authzTmpl: %v", err) + } + // Accept tls-sni-02. + case "/challenge/2": + w.Write([]byte("{}")) + // Reject tls-sni-01. + case "/challenge/1": + http.Error(w, "won't accept tls-sni-01", http.StatusBadRequest) + // Should not accept dns-01. + case "/challenge/dns-01": + t.Errorf("dns-01 challenge was accepted") + http.Error(w, "won't accept dns-01", http.StatusBadRequest) + // Accept http-01. + case "/challenge/http-01": + didAcceptHTTP01 = true + verifyHTTPToken() + w.Write([]byte("{}")) + // Authorization statuses. + // Make tls-sni-xxx invalid. + case "/authz/1", "/authz/2": + w.Write([]byte(`{"status": "invalid"}`)) + case "/authz/3", "/authz/4": + w.Write([]byte(`{"status": "valid"}`)) + default: + http.NotFound(w, r) + t.Errorf("unrecognized r.URL.Path: %s", r.URL.Path) + } + })) + defer ca.Close() + + key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatal(err) + } + m := &Manager{ + Client: &acme.Client{ + Key: key, + DirectoryURL: ca.URL, + }, + } + http01 = m.HTTPHandler(nil) + if err := m.verify(context.Background(), m.Client, "example.org"); err != nil { + t.Errorf("m.verify: %v", err) + } + // Only tls-sni-01, tls-sni-02 and http-01 must be accepted + // The dns-01 challenge is unsupported. + if authzCount != 3 { + t.Errorf("authzCount = %d; want 3", authzCount) + } + if !didAcceptHTTP01 { + t.Error("did not accept http-01 challenge") + } +} + +func TestHTTPHandlerDefaultFallback(t *testing.T) { + tt := []struct { + method, url string + wantCode int + wantLocation string + }{ + {"GET", "http://example.org", 302, "https://example.org/"}, + {"GET", "http://example.org/foo", 302, "https://example.org/foo"}, + {"GET", "http://example.org/foo/bar/", 302, "https://example.org/foo/bar/"}, + {"GET", "http://example.org/?a=b", 302, "https://example.org/?a=b"}, + {"GET", "http://example.org/foo?a=b", 302, "https://example.org/foo?a=b"}, + {"GET", "http://example.org:80/foo?a=b", 302, "https://example.org:443/foo?a=b"}, + {"GET", "http://example.org:80/foo%20bar", 302, "https://example.org:443/foo%20bar"}, + {"GET", "http://[2602:d1:xxxx::c60a]:1234", 302, "https://[2602:d1:xxxx::c60a]:443/"}, + {"GET", "http://[2602:d1:xxxx::c60a]", 302, "https://[2602:d1:xxxx::c60a]/"}, + {"GET", "http://[2602:d1:xxxx::c60a]/foo?a=b", 302, "https://[2602:d1:xxxx::c60a]/foo?a=b"}, + {"HEAD", "http://example.org", 302, "https://example.org/"}, + {"HEAD", "http://example.org/foo", 302, "https://example.org/foo"}, + {"HEAD", "http://example.org/foo/bar/", 302, "https://example.org/foo/bar/"}, + {"HEAD", "http://example.org/?a=b", 302, "https://example.org/?a=b"}, + {"HEAD", "http://example.org/foo?a=b", 302, "https://example.org/foo?a=b"}, + {"POST", "http://example.org", 400, ""}, + {"PUT", "http://example.org", 400, ""}, + {"GET", "http://example.org/.well-known/acme-challenge/x", 404, ""}, + } + var m Manager + h := m.HTTPHandler(nil) + for i, test := range tt { + r := httptest.NewRequest(test.method, test.url, nil) + w := httptest.NewRecorder() + h.ServeHTTP(w, r) + if w.Code != test.wantCode { + t.Errorf("%d: w.Code = %d; want %d", i, w.Code, test.wantCode) + t.Errorf("%d: body: %s", i, w.Body.Bytes()) + } + if v := w.Header().Get("Location"); v != test.wantLocation { + t.Errorf("%d: Location = %q; want %q", i, v, test.wantLocation) + } + } +} + func TestAccountKeyCache(t *testing.T) { m := Manager{Cache: newMemCache()} ctx := context.Background() diff --git a/vendor/golang.org/x/crypto/acme/autocert/example_test.go b/vendor/golang.org/x/crypto/acme/autocert/example_test.go index 71d61eb..552a625 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/example_test.go +++ b/vendor/golang.org/x/crypto/acme/autocert/example_test.go @@ -22,11 +22,12 @@ func ExampleNewListener() { } func ExampleManager() { - m := autocert.Manager{ + m := &autocert.Manager{ Cache: autocert.DirCache("secret-dir"), Prompt: autocert.AcceptTOS, HostPolicy: autocert.HostWhitelist("example.org"), } + go http.ListenAndServe(":http", m.HTTPHandler(nil)) s := &http.Server{ Addr: ":https", TLSConfig: &tls.Config{GetCertificate: m.GetCertificate}, diff --git a/vendor/golang.org/x/crypto/argon2/argon2.go b/vendor/golang.org/x/crypto/argon2/argon2.go new file mode 100644 index 0000000..71cf8c5 --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/argon2.go @@ -0,0 +1,228 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package argon2 implements the key derivation function Argon2. +// Argon2 was selected as the winner of the Password Hashing Competition and can +// be used to derive cryptographic keys from passwords. +// Argon2 is specfifed at https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf +package argon2 + +import ( + "encoding/binary" + "sync" + + "golang.org/x/crypto/blake2b" +) + +// The Argon2 version implemented by this package. +const Version = 0x13 + +const ( + argon2d = iota + argon2i + argon2id +) + +// Key derives a key from the password, salt, and cost parameters using Argon2i +// returning a byte slice of length keyLen that can be used as cryptographic key. +// The CPU cost and parallism degree must be greater than zero. +// +// For example, you can get a derived key for e.g. AES-256 (which needs a 32-byte key) by doing: +// `key := argon2.Key([]byte("some password"), salt, 4, 32*1024, 4, 32)` +// +// The recommended parameters for interactive logins as of 2017 are time=4, memory=32*1024. +// The number of threads can be adjusted to the numbers of available CPUs. +// The time parameter specifies the number of passes over the memory and the memory +// parameter specifies the size of the memory in KiB. For example memory=32*1024 sets the +// memory cost to ~32 MB. +// The cost parameters should be increased as memory latency and CPU parallelism increases. +// Remember to get a good random salt. +func Key(password, salt []byte, time, memory uint32, threads uint8, keyLen uint32) []byte { + return deriveKey(argon2i, password, salt, nil, nil, time, memory, threads, keyLen) +} + +func deriveKey(mode int, password, salt, secret, data []byte, time, memory uint32, threads uint8, keyLen uint32) []byte { + if time < 1 { + panic("argon2: number of rounds too small") + } + if threads < 1 { + panic("argon2: parallelism degree too low") + } + h0 := initHash(password, salt, secret, data, time, memory, uint32(threads), keyLen, mode) + + memory = memory / (syncPoints * uint32(threads)) * (syncPoints * uint32(threads)) + if memory < 2*syncPoints*uint32(threads) { + memory = 2 * syncPoints * uint32(threads) + } + B := initBlocks(&h0, memory, uint32(threads)) + processBlocks(B, time, memory, uint32(threads), mode) + return extractKey(B, memory, uint32(threads), keyLen) +} + +const ( + blockLength = 128 + syncPoints = 4 +) + +type block [blockLength]uint64 + +func initHash(password, salt, key, data []byte, time, memory, threads, keyLen uint32, mode int) [blake2b.Size + 8]byte { + var ( + h0 [blake2b.Size + 8]byte + params [24]byte + tmp [4]byte + ) + + b2, _ := blake2b.New512(nil) + binary.LittleEndian.PutUint32(params[0:4], threads) + binary.LittleEndian.PutUint32(params[4:8], keyLen) + binary.LittleEndian.PutUint32(params[8:12], memory) + binary.LittleEndian.PutUint32(params[12:16], time) + binary.LittleEndian.PutUint32(params[16:20], uint32(Version)) + binary.LittleEndian.PutUint32(params[20:24], uint32(mode)) + b2.Write(params[:]) + binary.LittleEndian.PutUint32(tmp[:], uint32(len(password))) + b2.Write(tmp[:]) + b2.Write(password) + binary.LittleEndian.PutUint32(tmp[:], uint32(len(salt))) + b2.Write(tmp[:]) + b2.Write(salt) + binary.LittleEndian.PutUint32(tmp[:], uint32(len(key))) + b2.Write(tmp[:]) + b2.Write(key) + binary.LittleEndian.PutUint32(tmp[:], uint32(len(data))) + b2.Write(tmp[:]) + b2.Write(data) + b2.Sum(h0[:0]) + return h0 +} + +func initBlocks(h0 *[blake2b.Size + 8]byte, memory, threads uint32) []block { + var block0 [1024]byte + B := make([]block, memory) + for lane := uint32(0); lane < threads; lane++ { + j := lane * (memory / threads) + binary.LittleEndian.PutUint32(h0[blake2b.Size+4:], lane) + + binary.LittleEndian.PutUint32(h0[blake2b.Size:], 0) + blake2bHash(block0[:], h0[:]) + for i := range B[j+0] { + B[j+0][i] = binary.LittleEndian.Uint64(block0[i*8:]) + } + + binary.LittleEndian.PutUint32(h0[blake2b.Size:], 1) + blake2bHash(block0[:], h0[:]) + for i := range B[j+1] { + B[j+1][i] = binary.LittleEndian.Uint64(block0[i*8:]) + } + } + return B +} + +func processBlocks(B []block, time, memory, threads uint32, mode int) { + lanes := memory / threads + segments := lanes / syncPoints + + processSegment := func(n, slice, lane uint32, wg *sync.WaitGroup) { + var addresses, in, zero block + if mode == argon2i || (mode == argon2id && n == 0 && slice < syncPoints/2) { + in[0] = uint64(n) + in[1] = uint64(lane) + in[2] = uint64(slice) + in[3] = uint64(memory) + in[4] = uint64(time) + in[5] = uint64(mode) + } + + index := uint32(0) + if n == 0 && slice == 0 { + index = 2 // we have already generated the first two blocks + if mode == argon2i || mode == argon2id { + in[6]++ + processBlock(&addresses, &in, &zero) + processBlock(&addresses, &addresses, &zero) + } + } + + offset := lane*lanes + slice*segments + index + var random uint64 + for index < segments { + prev := offset - 1 + if index == 0 && slice == 0 { + prev += lanes // last block in lane + } + if mode == argon2i || (mode == argon2id && n == 0 && slice < syncPoints/2) { + if index%blockLength == 0 { + in[6]++ + processBlock(&addresses, &in, &zero) + processBlock(&addresses, &addresses, &zero) + } + random = addresses[index%blockLength] + } else { + random = B[prev][0] + } + newOffset := indexAlpha(random, lanes, segments, threads, n, slice, lane, index) + processBlockXOR(&B[offset], &B[prev], &B[newOffset]) + index, offset = index+1, offset+1 + } + wg.Done() + } + + for n := uint32(0); n < time; n++ { + for slice := uint32(0); slice < syncPoints; slice++ { + var wg sync.WaitGroup + for lane := uint32(0); lane < threads; lane++ { + wg.Add(1) + go processSegment(n, slice, lane, &wg) + } + wg.Wait() + } + } + +} + +func extractKey(B []block, memory, threads, keyLen uint32) []byte { + lanes := memory / threads + for lane := uint32(0); lane < threads-1; lane++ { + for i, v := range B[(lane*lanes)+lanes-1] { + B[memory-1][i] ^= v + } + } + + var block [1024]byte + for i, v := range B[memory-1] { + binary.LittleEndian.PutUint64(block[i*8:], v) + } + key := make([]byte, keyLen) + blake2bHash(key, block[:]) + return key +} + +func indexAlpha(rand uint64, lanes, segments, threads, n, slice, lane, index uint32) uint32 { + refLane := uint32(rand>>32) % threads + if n == 0 && slice == 0 { + refLane = lane + } + m, s := 3*segments, ((slice+1)%syncPoints)*segments + if lane == refLane { + m += index + } + if n == 0 { + m, s = slice*segments, 0 + if slice == 0 || lane == refLane { + m += index + } + } + if index == 0 || lane == refLane { + m-- + } + return phi(rand, uint64(m), uint64(s), refLane, lanes) +} + +func phi(rand, m, s uint64, lane, lanes uint32) uint32 { + p := rand & 0xFFFFFFFF + p = (p * p) >> 32 + p = (p * m) >> 32 + return lane*lanes + uint32((s+m-(p+1))%uint64(lanes)) +} diff --git a/vendor/golang.org/x/crypto/argon2/argon2_test.go b/vendor/golang.org/x/crypto/argon2/argon2_test.go new file mode 100644 index 0000000..775b97a --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/argon2_test.go @@ -0,0 +1,233 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package argon2 + +import ( + "bytes" + "encoding/hex" + "testing" +) + +var ( + genKatPassword = []byte{ + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + } + genKatSalt = []byte{0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02} + genKatSecret = []byte{0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03} + genKatAAD = []byte{0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04} +) + +func TestArgon2(t *testing.T) { + defer func(sse4 bool) { useSSE4 = sse4 }(useSSE4) + + if useSSE4 { + t.Log("SSE4.1 version") + testArgon2i(t) + testArgon2d(t) + testArgon2id(t) + useSSE4 = false + } + t.Log("generic version") + testArgon2i(t) + testArgon2d(t) + testArgon2id(t) +} + +func testArgon2d(t *testing.T) { + want := []byte{ + 0x51, 0x2b, 0x39, 0x1b, 0x6f, 0x11, 0x62, 0x97, + 0x53, 0x71, 0xd3, 0x09, 0x19, 0x73, 0x42, 0x94, + 0xf8, 0x68, 0xe3, 0xbe, 0x39, 0x84, 0xf3, 0xc1, + 0xa1, 0x3a, 0x4d, 0xb9, 0xfa, 0xbe, 0x4a, 0xcb, + } + hash := deriveKey(argon2d, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) + if !bytes.Equal(hash, want) { + t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) + } +} + +func testArgon2i(t *testing.T) { + want := []byte{ + 0xc8, 0x14, 0xd9, 0xd1, 0xdc, 0x7f, 0x37, 0xaa, + 0x13, 0xf0, 0xd7, 0x7f, 0x24, 0x94, 0xbd, 0xa1, + 0xc8, 0xde, 0x6b, 0x01, 0x6d, 0xd3, 0x88, 0xd2, + 0x99, 0x52, 0xa4, 0xc4, 0x67, 0x2b, 0x6c, 0xe8, + } + hash := deriveKey(argon2i, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) + if !bytes.Equal(hash, want) { + t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) + } +} + +func testArgon2id(t *testing.T) { + want := []byte{ + 0x0d, 0x64, 0x0d, 0xf5, 0x8d, 0x78, 0x76, 0x6c, + 0x08, 0xc0, 0x37, 0xa3, 0x4a, 0x8b, 0x53, 0xc9, + 0xd0, 0x1e, 0xf0, 0x45, 0x2d, 0x75, 0xb6, 0x5e, + 0xb5, 0x25, 0x20, 0xe9, 0x6b, 0x01, 0xe6, 0x59, + } + hash := deriveKey(argon2id, genKatPassword, genKatSalt, genKatSecret, genKatAAD, 3, 32, 4, 32) + if !bytes.Equal(hash, want) { + t.Errorf("derived key does not match - got: %s , want: %s", hex.EncodeToString(hash), hex.EncodeToString(want)) + } +} + +func TestVectors(t *testing.T) { + password, salt := []byte("password"), []byte("somesalt") + for i, v := range testVectors { + want, err := hex.DecodeString(v.hash) + if err != nil { + t.Fatalf("Test %d: failed to decode hash: %v", i, err) + } + hash := deriveKey(v.mode, password, salt, nil, nil, v.time, v.memory, v.threads, uint32(len(want))) + if !bytes.Equal(hash, want) { + t.Errorf("Test %d - got: %s want: %s", i, hex.EncodeToString(hash), hex.EncodeToString(want)) + } + } +} + +func benchmarkArgon2(mode int, time, memory uint32, threads uint8, keyLen uint32, b *testing.B) { + password := []byte("password") + salt := []byte("choosing random salts is hard") + b.ReportAllocs() + for i := 0; i < b.N; i++ { + deriveKey(mode, password, salt, nil, nil, time, memory, threads, keyLen) + } +} + +func BenchmarkArgon2i(b *testing.B) { + b.Run(" Time: 3 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 3, 32*1024, 1, 32, b) }) + b.Run(" Time: 4 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 4, 32*1024, 1, 32, b) }) + b.Run(" Time: 5 Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2i, 5, 32*1024, 1, 32, b) }) + b.Run(" Time: 3 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 3, 64*1024, 4, 32, b) }) + b.Run(" Time: 4 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 4, 64*1024, 4, 32, b) }) + b.Run(" Time: 5 Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2i, 5, 64*1024, 4, 32, b) }) +} + +func BenchmarkArgon2d(b *testing.B) { + b.Run(" Time: 3, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 3, 32*1024, 1, 32, b) }) + b.Run(" Time: 4, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 4, 32*1024, 1, 32, b) }) + b.Run(" Time: 5, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2d, 5, 32*1024, 1, 32, b) }) + b.Run(" Time: 3, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 3, 64*1024, 4, 32, b) }) + b.Run(" Time: 4, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 4, 64*1024, 4, 32, b) }) + b.Run(" Time: 5, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2d, 5, 64*1024, 4, 32, b) }) +} + +func BenchmarkArgon2id(b *testing.B) { + b.Run(" Time: 3, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 3, 32*1024, 1, 32, b) }) + b.Run(" Time: 4, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 4, 32*1024, 1, 32, b) }) + b.Run(" Time: 5, Memory: 32 MB, Threads: 1", func(b *testing.B) { benchmarkArgon2(argon2id, 5, 32*1024, 1, 32, b) }) + b.Run(" Time: 3, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 3, 64*1024, 4, 32, b) }) + b.Run(" Time: 4, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 4, 64*1024, 4, 32, b) }) + b.Run(" Time: 5, Memory: 64 MB, Threads: 4", func(b *testing.B) { benchmarkArgon2(argon2id, 5, 64*1024, 4, 32, b) }) +} + +// Generated with the CLI of https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf +var testVectors = []struct { + mode int + time, memory uint32 + threads uint8 + hash string +}{ + { + mode: argon2i, time: 1, memory: 64, threads: 1, + hash: "b9c401d1844a67d50eae3967dc28870b22e508092e861a37", + }, + { + mode: argon2d, time: 1, memory: 64, threads: 1, + hash: "8727405fd07c32c78d64f547f24150d3f2e703a89f981a19", + }, + { + mode: argon2id, time: 1, memory: 64, threads: 1, + hash: "655ad15eac652dc59f7170a7332bf49b8469be1fdb9c28bb", + }, + { + mode: argon2i, time: 2, memory: 64, threads: 1, + hash: "8cf3d8f76a6617afe35fac48eb0b7433a9a670ca4a07ed64", + }, + { + mode: argon2d, time: 2, memory: 64, threads: 1, + hash: "3be9ec79a69b75d3752acb59a1fbb8b295a46529c48fbb75", + }, + { + mode: argon2id, time: 2, memory: 64, threads: 1, + hash: "068d62b26455936aa6ebe60060b0a65870dbfa3ddf8d41f7", + }, + { + mode: argon2i, time: 2, memory: 64, threads: 2, + hash: "2089f3e78a799720f80af806553128f29b132cafe40d059f", + }, + { + mode: argon2d, time: 2, memory: 64, threads: 2, + hash: "68e2462c98b8bc6bb60ec68db418ae2c9ed24fc6748a40e9", + }, + { + mode: argon2id, time: 2, memory: 64, threads: 2, + hash: "350ac37222f436ccb5c0972f1ebd3bf6b958bf2071841362", + }, + { + mode: argon2i, time: 3, memory: 256, threads: 2, + hash: "f5bbf5d4c3836af13193053155b73ec7476a6a2eb93fd5e6", + }, + { + mode: argon2d, time: 3, memory: 256, threads: 2, + hash: "f4f0669218eaf3641f39cc97efb915721102f4b128211ef2", + }, + { + mode: argon2id, time: 3, memory: 256, threads: 2, + hash: "4668d30ac4187e6878eedeacf0fd83c5a0a30db2cc16ef0b", + }, + { + mode: argon2i, time: 4, memory: 4096, threads: 4, + hash: "a11f7b7f3f93f02ad4bddb59ab62d121e278369288a0d0e7", + }, + { + mode: argon2d, time: 4, memory: 4096, threads: 4, + hash: "935598181aa8dc2b720914aa6435ac8d3e3a4210c5b0fb2d", + }, + { + mode: argon2id, time: 4, memory: 4096, threads: 4, + hash: "145db9733a9f4ee43edf33c509be96b934d505a4efb33c5a", + }, + { + mode: argon2i, time: 4, memory: 1024, threads: 8, + hash: "0cdd3956aa35e6b475a7b0c63488822f774f15b43f6e6e17", + }, + { + mode: argon2d, time: 4, memory: 1024, threads: 8, + hash: "83604fc2ad0589b9d055578f4d3cc55bc616df3578a896e9", + }, + { + mode: argon2id, time: 4, memory: 1024, threads: 8, + hash: "8dafa8e004f8ea96bf7c0f93eecf67a6047476143d15577f", + }, + { + mode: argon2i, time: 2, memory: 64, threads: 3, + hash: "5cab452fe6b8479c8661def8cd703b611a3905a6d5477fe6", + }, + { + mode: argon2d, time: 2, memory: 64, threads: 3, + hash: "22474a423bda2ccd36ec9afd5119e5c8949798cadf659f51", + }, + { + mode: argon2id, time: 2, memory: 64, threads: 3, + hash: "4a15b31aec7c2590b87d1f520be7d96f56658172deaa3079", + }, + { + mode: argon2i, time: 3, memory: 1024, threads: 6, + hash: "d236b29c2b2a09babee842b0dec6aa1e83ccbdea8023dced", + }, + { + mode: argon2d, time: 3, memory: 1024, threads: 6, + hash: "a3351b0319a53229152023d9206902f4ef59661cdca89481", + }, + { + mode: argon2id, time: 3, memory: 1024, threads: 6, + hash: "1640b932f4b60e272f5d2207b9a9c626ffa1bd88d2349016", + }, +} diff --git a/vendor/golang.org/x/crypto/argon2/blake2b.go b/vendor/golang.org/x/crypto/argon2/blake2b.go new file mode 100644 index 0000000..10f4694 --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/blake2b.go @@ -0,0 +1,53 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package argon2 + +import ( + "encoding/binary" + "hash" + + "golang.org/x/crypto/blake2b" +) + +// blake2bHash computes an arbitrary long hash value of in +// and writes the hash to out. +func blake2bHash(out []byte, in []byte) { + var b2 hash.Hash + if n := len(out); n < blake2b.Size { + b2, _ = blake2b.New(n, nil) + } else { + b2, _ = blake2b.New512(nil) + } + + var buffer [blake2b.Size]byte + binary.LittleEndian.PutUint32(buffer[:4], uint32(len(out))) + b2.Write(buffer[:4]) + b2.Write(in) + + if len(out) <= blake2b.Size { + b2.Sum(out[:0]) + return + } + + outLen := len(out) + b2.Sum(buffer[:0]) + b2.Reset() + copy(out, buffer[:32]) + out = out[32:] + for len(out) > blake2b.Size { + b2.Write(buffer[:]) + b2.Sum(buffer[:0]) + copy(out, buffer[:32]) + out = out[32:] + b2.Reset() + } + + if outLen%blake2b.Size > 0 { // outLen > 64 + r := ((outLen + 31) / 32) - 2 // ⌈τ /32⌉-2 + b2, _ = blake2b.New(outLen-32*r, nil) + } + b2.Write(buffer[:]) + b2.Sum(out[:0]) +} diff --git a/vendor/golang.org/x/crypto/argon2/blamka_amd64.go b/vendor/golang.org/x/crypto/argon2/blamka_amd64.go new file mode 100644 index 0000000..bb2b0d8 --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/blamka_amd64.go @@ -0,0 +1,61 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,!gccgo,!appengine + +package argon2 + +func init() { + useSSE4 = supportsSSE4() +} + +//go:noescape +func supportsSSE4() bool + +//go:noescape +func mixBlocksSSE2(out, a, b, c *block) + +//go:noescape +func xorBlocksSSE2(out, a, b, c *block) + +//go:noescape +func blamkaSSE4(b *block) + +func processBlockSSE(out, in1, in2 *block, xor bool) { + var t block + mixBlocksSSE2(&t, in1, in2, &t) + if useSSE4 { + blamkaSSE4(&t) + } else { + for i := 0; i < blockLength; i += 16 { + blamkaGeneric( + &t[i+0], &t[i+1], &t[i+2], &t[i+3], + &t[i+4], &t[i+5], &t[i+6], &t[i+7], + &t[i+8], &t[i+9], &t[i+10], &t[i+11], + &t[i+12], &t[i+13], &t[i+14], &t[i+15], + ) + } + for i := 0; i < blockLength/8; i += 2 { + blamkaGeneric( + &t[i], &t[i+1], &t[16+i], &t[16+i+1], + &t[32+i], &t[32+i+1], &t[48+i], &t[48+i+1], + &t[64+i], &t[64+i+1], &t[80+i], &t[80+i+1], + &t[96+i], &t[96+i+1], &t[112+i], &t[112+i+1], + ) + } + } + if xor { + xorBlocksSSE2(out, in1, in2, &t) + } else { + mixBlocksSSE2(out, in1, in2, &t) + } +} + +func processBlock(out, in1, in2 *block) { + processBlockSSE(out, in1, in2, false) +} + +func processBlockXOR(out, in1, in2 *block) { + processBlockSSE(out, in1, in2, true) +} diff --git a/vendor/golang.org/x/crypto/argon2/blamka_amd64.s b/vendor/golang.org/x/crypto/argon2/blamka_amd64.s new file mode 100644 index 0000000..8a83f7c --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/blamka_amd64.s @@ -0,0 +1,252 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,!gccgo,!appengine + +#include "textflag.h" + +DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 +DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 + +DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 +DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 + +#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ + MOVO v4, t1; \ + MOVO v5, v4; \ + MOVO t1, v5; \ + MOVO v6, t1; \ + PUNPCKLQDQ v6, t2; \ + PUNPCKHQDQ v7, v6; \ + PUNPCKHQDQ t2, v6; \ + PUNPCKLQDQ v7, t2; \ + MOVO t1, v7; \ + MOVO v2, t1; \ + PUNPCKHQDQ t2, v7; \ + PUNPCKLQDQ v3, t2; \ + PUNPCKHQDQ t2, v2; \ + PUNPCKLQDQ t1, t2; \ + PUNPCKHQDQ t2, v3 + +#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ + MOVO v4, t1; \ + MOVO v5, v4; \ + MOVO t1, v5; \ + MOVO v2, t1; \ + PUNPCKLQDQ v2, t2; \ + PUNPCKHQDQ v3, v2; \ + PUNPCKHQDQ t2, v2; \ + PUNPCKLQDQ v3, t2; \ + MOVO t1, v3; \ + MOVO v6, t1; \ + PUNPCKHQDQ t2, v3; \ + PUNPCKLQDQ v7, t2; \ + PUNPCKHQDQ t2, v6; \ + PUNPCKLQDQ t1, t2; \ + PUNPCKHQDQ t2, v7 + +#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, t0, c40, c48) \ + MOVO v0, t0; \ + PMULULQ v2, t0; \ + PADDQ v2, v0; \ + PADDQ t0, v0; \ + PADDQ t0, v0; \ + PXOR v0, v6; \ + PSHUFD $0xB1, v6, v6; \ + MOVO v4, t0; \ + PMULULQ v6, t0; \ + PADDQ v6, v4; \ + PADDQ t0, v4; \ + PADDQ t0, v4; \ + PXOR v4, v2; \ + PSHUFB c40, v2; \ + MOVO v0, t0; \ + PMULULQ v2, t0; \ + PADDQ v2, v0; \ + PADDQ t0, v0; \ + PADDQ t0, v0; \ + PXOR v0, v6; \ + PSHUFB c48, v6; \ + MOVO v4, t0; \ + PMULULQ v6, t0; \ + PADDQ v6, v4; \ + PADDQ t0, v4; \ + PADDQ t0, v4; \ + PXOR v4, v2; \ + MOVO v2, t0; \ + PADDQ v2, t0; \ + PSRLQ $63, v2; \ + PXOR t0, v2; \ + MOVO v1, t0; \ + PMULULQ v3, t0; \ + PADDQ v3, v1; \ + PADDQ t0, v1; \ + PADDQ t0, v1; \ + PXOR v1, v7; \ + PSHUFD $0xB1, v7, v7; \ + MOVO v5, t0; \ + PMULULQ v7, t0; \ + PADDQ v7, v5; \ + PADDQ t0, v5; \ + PADDQ t0, v5; \ + PXOR v5, v3; \ + PSHUFB c40, v3; \ + MOVO v1, t0; \ + PMULULQ v3, t0; \ + PADDQ v3, v1; \ + PADDQ t0, v1; \ + PADDQ t0, v1; \ + PXOR v1, v7; \ + PSHUFB c48, v7; \ + MOVO v5, t0; \ + PMULULQ v7, t0; \ + PADDQ v7, v5; \ + PADDQ t0, v5; \ + PADDQ t0, v5; \ + PXOR v5, v3; \ + MOVO v3, t0; \ + PADDQ v3, t0; \ + PSRLQ $63, v3; \ + PXOR t0, v3 + +#define LOAD_MSG_0(block, off) \ + MOVOU 8*(off+0)(block), X0; \ + MOVOU 8*(off+2)(block), X1; \ + MOVOU 8*(off+4)(block), X2; \ + MOVOU 8*(off+6)(block), X3; \ + MOVOU 8*(off+8)(block), X4; \ + MOVOU 8*(off+10)(block), X5; \ + MOVOU 8*(off+12)(block), X6; \ + MOVOU 8*(off+14)(block), X7 + +#define STORE_MSG_0(block, off) \ + MOVOU X0, 8*(off+0)(block); \ + MOVOU X1, 8*(off+2)(block); \ + MOVOU X2, 8*(off+4)(block); \ + MOVOU X3, 8*(off+6)(block); \ + MOVOU X4, 8*(off+8)(block); \ + MOVOU X5, 8*(off+10)(block); \ + MOVOU X6, 8*(off+12)(block); \ + MOVOU X7, 8*(off+14)(block) + +#define LOAD_MSG_1(block, off) \ + MOVOU 8*off+0*8(block), X0; \ + MOVOU 8*off+16*8(block), X1; \ + MOVOU 8*off+32*8(block), X2; \ + MOVOU 8*off+48*8(block), X3; \ + MOVOU 8*off+64*8(block), X4; \ + MOVOU 8*off+80*8(block), X5; \ + MOVOU 8*off+96*8(block), X6; \ + MOVOU 8*off+112*8(block), X7 + +#define STORE_MSG_1(block, off) \ + MOVOU X0, 8*off+0*8(block); \ + MOVOU X1, 8*off+16*8(block); \ + MOVOU X2, 8*off+32*8(block); \ + MOVOU X3, 8*off+48*8(block); \ + MOVOU X4, 8*off+64*8(block); \ + MOVOU X5, 8*off+80*8(block); \ + MOVOU X6, 8*off+96*8(block); \ + MOVOU X7, 8*off+112*8(block) + +#define BLAMKA_ROUND_0(block, off, t0, t1, c40, c48) \ + LOAD_MSG_0(block, off); \ + HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ + SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ + HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ + SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ + STORE_MSG_0(block, off) + +#define BLAMKA_ROUND_1(block, off, t0, t1, c40, c48) \ + LOAD_MSG_1(block, off); \ + HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ + SHUFFLE(X2, X3, X4, X5, X6, X7, t0, t1); \ + HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, t0, c40, c48); \ + SHUFFLE_INV(X2, X3, X4, X5, X6, X7, t0, t1); \ + STORE_MSG_1(block, off) + +// func blamkaSSE4(b *block) +TEXT ·blamkaSSE4(SB), 4, $0-8 + MOVQ b+0(FP), AX + + MOVOU ·c40<>(SB), X10 + MOVOU ·c48<>(SB), X11 + + BLAMKA_ROUND_0(AX, 0, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 16, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 32, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 48, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 64, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 80, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 96, X8, X9, X10, X11) + BLAMKA_ROUND_0(AX, 112, X8, X9, X10, X11) + + BLAMKA_ROUND_1(AX, 0, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 2, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 4, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 6, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 8, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 10, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 12, X8, X9, X10, X11) + BLAMKA_ROUND_1(AX, 14, X8, X9, X10, X11) + RET + +// func mixBlocksSSE2(out, a, b, c *block) +TEXT ·mixBlocksSSE2(SB), 4, $0-32 + MOVQ out+0(FP), DX + MOVQ a+8(FP), AX + MOVQ b+16(FP), BX + MOVQ a+24(FP), CX + MOVQ $128, BP + +loop: + MOVOU 0(AX), X0 + MOVOU 0(BX), X1 + MOVOU 0(CX), X2 + PXOR X1, X0 + PXOR X2, X0 + MOVOU X0, 0(DX) + ADDQ $16, AX + ADDQ $16, BX + ADDQ $16, CX + ADDQ $16, DX + SUBQ $2, BP + JA loop + RET + +// func xorBlocksSSE2(out, a, b, c *block) +TEXT ·xorBlocksSSE2(SB), 4, $0-32 + MOVQ out+0(FP), DX + MOVQ a+8(FP), AX + MOVQ b+16(FP), BX + MOVQ a+24(FP), CX + MOVQ $128, BP + +loop: + MOVOU 0(AX), X0 + MOVOU 0(BX), X1 + MOVOU 0(CX), X2 + MOVOU 0(DX), X3 + PXOR X1, X0 + PXOR X2, X0 + PXOR X3, X0 + MOVOU X0, 0(DX) + ADDQ $16, AX + ADDQ $16, BX + ADDQ $16, CX + ADDQ $16, DX + SUBQ $2, BP + JA loop + RET + +// func supportsSSE4() bool +TEXT ·supportsSSE4(SB), 4, $0-1 + MOVL $1, AX + CPUID + SHRL $19, CX // Bit 19 indicates SSE4 support + ANDL $1, CX // CX != 0 if support SSE4 + MOVB CX, ret+0(FP) + RET diff --git a/vendor/golang.org/x/crypto/argon2/blamka_generic.go b/vendor/golang.org/x/crypto/argon2/blamka_generic.go new file mode 100644 index 0000000..a481b22 --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/blamka_generic.go @@ -0,0 +1,163 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package argon2 + +var useSSE4 bool + +func processBlockGeneric(out, in1, in2 *block, xor bool) { + var t block + for i := range t { + t[i] = in1[i] ^ in2[i] + } + for i := 0; i < blockLength; i += 16 { + blamkaGeneric( + &t[i+0], &t[i+1], &t[i+2], &t[i+3], + &t[i+4], &t[i+5], &t[i+6], &t[i+7], + &t[i+8], &t[i+9], &t[i+10], &t[i+11], + &t[i+12], &t[i+13], &t[i+14], &t[i+15], + ) + } + for i := 0; i < blockLength/8; i += 2 { + blamkaGeneric( + &t[i], &t[i+1], &t[16+i], &t[16+i+1], + &t[32+i], &t[32+i+1], &t[48+i], &t[48+i+1], + &t[64+i], &t[64+i+1], &t[80+i], &t[80+i+1], + &t[96+i], &t[96+i+1], &t[112+i], &t[112+i+1], + ) + } + if xor { + for i := range t { + out[i] ^= in1[i] ^ in2[i] ^ t[i] + } + } else { + for i := range t { + out[i] = in1[i] ^ in2[i] ^ t[i] + } + } +} + +func blamkaGeneric(t00, t01, t02, t03, t04, t05, t06, t07, t08, t09, t10, t11, t12, t13, t14, t15 *uint64) { + v00, v01, v02, v03 := *t00, *t01, *t02, *t03 + v04, v05, v06, v07 := *t04, *t05, *t06, *t07 + v08, v09, v10, v11 := *t08, *t09, *t10, *t11 + v12, v13, v14, v15 := *t12, *t13, *t14, *t15 + + v00 += v04 + 2*uint64(uint32(v00))*uint64(uint32(v04)) + v12 ^= v00 + v12 = v12>>32 | v12<<32 + v08 += v12 + 2*uint64(uint32(v08))*uint64(uint32(v12)) + v04 ^= v08 + v04 = v04>>24 | v04<<40 + + v00 += v04 + 2*uint64(uint32(v00))*uint64(uint32(v04)) + v12 ^= v00 + v12 = v12>>16 | v12<<48 + v08 += v12 + 2*uint64(uint32(v08))*uint64(uint32(v12)) + v04 ^= v08 + v04 = v04>>63 | v04<<1 + + v01 += v05 + 2*uint64(uint32(v01))*uint64(uint32(v05)) + v13 ^= v01 + v13 = v13>>32 | v13<<32 + v09 += v13 + 2*uint64(uint32(v09))*uint64(uint32(v13)) + v05 ^= v09 + v05 = v05>>24 | v05<<40 + + v01 += v05 + 2*uint64(uint32(v01))*uint64(uint32(v05)) + v13 ^= v01 + v13 = v13>>16 | v13<<48 + v09 += v13 + 2*uint64(uint32(v09))*uint64(uint32(v13)) + v05 ^= v09 + v05 = v05>>63 | v05<<1 + + v02 += v06 + 2*uint64(uint32(v02))*uint64(uint32(v06)) + v14 ^= v02 + v14 = v14>>32 | v14<<32 + v10 += v14 + 2*uint64(uint32(v10))*uint64(uint32(v14)) + v06 ^= v10 + v06 = v06>>24 | v06<<40 + + v02 += v06 + 2*uint64(uint32(v02))*uint64(uint32(v06)) + v14 ^= v02 + v14 = v14>>16 | v14<<48 + v10 += v14 + 2*uint64(uint32(v10))*uint64(uint32(v14)) + v06 ^= v10 + v06 = v06>>63 | v06<<1 + + v03 += v07 + 2*uint64(uint32(v03))*uint64(uint32(v07)) + v15 ^= v03 + v15 = v15>>32 | v15<<32 + v11 += v15 + 2*uint64(uint32(v11))*uint64(uint32(v15)) + v07 ^= v11 + v07 = v07>>24 | v07<<40 + + v03 += v07 + 2*uint64(uint32(v03))*uint64(uint32(v07)) + v15 ^= v03 + v15 = v15>>16 | v15<<48 + v11 += v15 + 2*uint64(uint32(v11))*uint64(uint32(v15)) + v07 ^= v11 + v07 = v07>>63 | v07<<1 + + v00 += v05 + 2*uint64(uint32(v00))*uint64(uint32(v05)) + v15 ^= v00 + v15 = v15>>32 | v15<<32 + v10 += v15 + 2*uint64(uint32(v10))*uint64(uint32(v15)) + v05 ^= v10 + v05 = v05>>24 | v05<<40 + + v00 += v05 + 2*uint64(uint32(v00))*uint64(uint32(v05)) + v15 ^= v00 + v15 = v15>>16 | v15<<48 + v10 += v15 + 2*uint64(uint32(v10))*uint64(uint32(v15)) + v05 ^= v10 + v05 = v05>>63 | v05<<1 + + v01 += v06 + 2*uint64(uint32(v01))*uint64(uint32(v06)) + v12 ^= v01 + v12 = v12>>32 | v12<<32 + v11 += v12 + 2*uint64(uint32(v11))*uint64(uint32(v12)) + v06 ^= v11 + v06 = v06>>24 | v06<<40 + + v01 += v06 + 2*uint64(uint32(v01))*uint64(uint32(v06)) + v12 ^= v01 + v12 = v12>>16 | v12<<48 + v11 += v12 + 2*uint64(uint32(v11))*uint64(uint32(v12)) + v06 ^= v11 + v06 = v06>>63 | v06<<1 + + v02 += v07 + 2*uint64(uint32(v02))*uint64(uint32(v07)) + v13 ^= v02 + v13 = v13>>32 | v13<<32 + v08 += v13 + 2*uint64(uint32(v08))*uint64(uint32(v13)) + v07 ^= v08 + v07 = v07>>24 | v07<<40 + + v02 += v07 + 2*uint64(uint32(v02))*uint64(uint32(v07)) + v13 ^= v02 + v13 = v13>>16 | v13<<48 + v08 += v13 + 2*uint64(uint32(v08))*uint64(uint32(v13)) + v07 ^= v08 + v07 = v07>>63 | v07<<1 + + v03 += v04 + 2*uint64(uint32(v03))*uint64(uint32(v04)) + v14 ^= v03 + v14 = v14>>32 | v14<<32 + v09 += v14 + 2*uint64(uint32(v09))*uint64(uint32(v14)) + v04 ^= v09 + v04 = v04>>24 | v04<<40 + + v03 += v04 + 2*uint64(uint32(v03))*uint64(uint32(v04)) + v14 ^= v03 + v14 = v14>>16 | v14<<48 + v09 += v14 + 2*uint64(uint32(v09))*uint64(uint32(v14)) + v04 ^= v09 + v04 = v04>>63 | v04<<1 + + *t00, *t01, *t02, *t03 = v00, v01, v02, v03 + *t04, *t05, *t06, *t07 = v04, v05, v06, v07 + *t08, *t09, *t10, *t11 = v08, v09, v10, v11 + *t12, *t13, *t14, *t15 = v12, v13, v14, v15 +} diff --git a/vendor/golang.org/x/crypto/argon2/blamka_ref.go b/vendor/golang.org/x/crypto/argon2/blamka_ref.go new file mode 100644 index 0000000..baf7b55 --- /dev/null +++ b/vendor/golang.org/x/crypto/argon2/blamka_ref.go @@ -0,0 +1,15 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !amd64 appengine gccgo + +package argon2 + +func processBlock(out, in1, in2 *block) { + processBlockGeneric(out, in1, in2, false) +} + +func processBlockXOR(out, in1, in2 *block) { + processBlockGeneric(out, in1, in2, true) +} diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index 202fa8a..aeb73f8 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -241,11 +241,11 @@ func (p *hashed) Hash() []byte { n = 3 } arr[n] = '$' - n += 1 + n++ copy(arr[n:], []byte(fmt.Sprintf("%02d", p.cost))) n += 2 arr[n] = '$' - n += 1 + n++ copy(arr[n:], p.salt) n += encodedSaltSize copy(arr[n:], p.hash) diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b.go b/vendor/golang.org/x/crypto/blake2b/blake2b.go index 7f0a86e..6dedb89 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2b.go +++ b/vendor/golang.org/x/crypto/blake2b/blake2b.go @@ -39,7 +39,10 @@ var ( useSSE4 bool ) -var errKeySize = errors.New("blake2b: invalid key size") +var ( + errKeySize = errors.New("blake2b: invalid key size") + errHashSize = errors.New("blake2b: invalid hash size") +) var iv = [8]uint64{ 0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, @@ -83,7 +86,18 @@ func New384(key []byte) (hash.Hash, error) { return newDigest(Size384, key) } // key turns the hash into a MAC. The key must between zero and 64 bytes long. func New256(key []byte) (hash.Hash, error) { return newDigest(Size256, key) } +// New returns a new hash.Hash computing the BLAKE2b checksum with a custom length. +// A non-nil key turns the hash into a MAC. The key must between zero and 64 bytes long. +// The hash size can be a value between 1 and 64 but it is highly recommended to use +// values equal or greater than: +// - 32 if BLAKE2b is used as a hash function (The key is zero bytes long). +// - 16 if BLAKE2b is used as a MAC function (The key is at least 16 bytes long). +func New(size int, key []byte) (hash.Hash, error) { return newDigest(size, key) } + func newDigest(hashSize int, key []byte) (*digest, error) { + if hashSize < 1 || hashSize > Size { + return nil, errHashSize + } if len(key) > Size { return nil, errKeySize } diff --git a/vendor/golang.org/x/crypto/blake2s/blake2s_test.go b/vendor/golang.org/x/crypto/blake2s/blake2s_test.go index 938fef3..cfeb18b 100644 --- a/vendor/golang.org/x/crypto/blake2s/blake2s_test.go +++ b/vendor/golang.org/x/crypto/blake2s/blake2s_test.go @@ -185,7 +185,7 @@ func testHashes2X(t *testing.T) { if n, err := h.Read(result[:]); err != nil { t.Fatalf("#unknown length: error from Read: %v", err) } else if n != len(result) { - t.Fatalf("#unknown length: Read returned %d bytes, want %d: %v", n, len(result)) + t.Fatalf("#unknown length: Read returned %d bytes, want %d", n, len(result)) } const expected = "2a9a6977d915a2c4dd07dbcafe1918bf1682e56d9c8e567ecd19bfd7cd93528833c764d12b34a5e2a219c9fd463dab45e972c5574d73f45de5b2e23af72530d8" diff --git a/vendor/golang.org/x/crypto/bn256/bn256.go b/vendor/golang.org/x/crypto/bn256/bn256.go index 014f8b3..f88f3fc 100644 --- a/vendor/golang.org/x/crypto/bn256/bn256.go +++ b/vendor/golang.org/x/crypto/bn256/bn256.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package bn256 implements a particular bilinear group at the 128-bit security level. +// Package bn256 implements a particular bilinear group. // // Bilinear groups are the basis of many of the new cryptographic protocols // that have been proposed over the past decade. They consist of a triplet of @@ -14,6 +14,10 @@ // Barreto-Naehrig curve as described in // http://cryptojedi.org/papers/dclxvi-20100714.pdf. Its output is compatible // with the implementation described in that paper. +// +// (This package previously claimed to operate at a 128-bit security level. +// However, recent improvements in attacks mean that is no longer true. See +// https://moderncrypto.org/mail-archive/curves/2016/000740.html.) package bn256 // import "golang.org/x/crypto/bn256" import ( @@ -49,8 +53,8 @@ func RandomG1(r io.Reader) (*big.Int, *G1, error) { return k, new(G1).ScalarBaseMult(k), nil } -func (g *G1) String() string { - return "bn256.G1" + g.p.String() +func (e *G1) String() string { + return "bn256.G1" + e.p.String() } // ScalarBaseMult sets e to g*k where g is the generator of the group and @@ -92,11 +96,11 @@ func (e *G1) Neg(a *G1) *G1 { } // Marshal converts n to a byte slice. -func (n *G1) Marshal() []byte { - n.p.MakeAffine(nil) +func (e *G1) Marshal() []byte { + e.p.MakeAffine(nil) - xBytes := new(big.Int).Mod(n.p.x, p).Bytes() - yBytes := new(big.Int).Mod(n.p.y, p).Bytes() + xBytes := new(big.Int).Mod(e.p.x, p).Bytes() + yBytes := new(big.Int).Mod(e.p.y, p).Bytes() // Each value is a 256-bit number. const numBytes = 256 / 8 @@ -166,8 +170,8 @@ func RandomG2(r io.Reader) (*big.Int, *G2, error) { return k, new(G2).ScalarBaseMult(k), nil } -func (g *G2) String() string { - return "bn256.G2" + g.p.String() +func (e *G2) String() string { + return "bn256.G2" + e.p.String() } // ScalarBaseMult sets e to g*k where g is the generator of the group and diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go index f7e4bfb..4ac014f 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go +++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_generic.go @@ -7,7 +7,7 @@ package chacha20poly1305 import ( "encoding/binary" - "golang.org/x/crypto/chacha20poly1305/internal/chacha20" + "golang.org/x/crypto/internal/chacha20" "golang.org/x/crypto/poly1305" ) diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go b/vendor/golang.org/x/crypto/internal/chacha20/chacha_generic.go similarity index 100% rename from vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go rename to vendor/golang.org/x/crypto/internal/chacha20/chacha_generic.go diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go b/vendor/golang.org/x/crypto/internal/chacha20/chacha_test.go similarity index 100% rename from vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_test.go rename to vendor/golang.org/x/crypto/internal/chacha20/chacha_test.go diff --git a/vendor/golang.org/x/crypto/nacl/auth/auth.go b/vendor/golang.org/x/crypto/nacl/auth/auth.go index 0835d3b..ec1d6eb 100644 --- a/vendor/golang.org/x/crypto/nacl/auth/auth.go +++ b/vendor/golang.org/x/crypto/nacl/auth/auth.go @@ -47,7 +47,7 @@ func Sum(m []byte, key *[KeySize]byte) *[Size]byte { // Verify checks that digest is a valid authenticator of message m under the // given secret key. Verify does not leak timing information. -func Verify(digest []byte, m []byte, key *[32]byte) bool { +func Verify(digest []byte, m []byte, key *[KeySize]byte) bool { if len(digest) != Size { return false } diff --git a/vendor/golang.org/x/crypto/ocsp/ocsp.go b/vendor/golang.org/x/crypto/ocsp/ocsp.go index 5e73146..589dfd3 100644 --- a/vendor/golang.org/x/crypto/ocsp/ocsp.go +++ b/vendor/golang.org/x/crypto/ocsp/ocsp.go @@ -760,7 +760,7 @@ func CreateResponse(issuer, responderCert *x509.Certificate, template Response, } if template.Certificate != nil { response.Certificates = []asn1.RawValue{ - asn1.RawValue{FullBytes: template.Certificate.Raw}, + {FullBytes: template.Certificate.Raw}, } } responseDER, err := asn1.Marshal(response) diff --git a/vendor/golang.org/x/crypto/ocsp/ocsp_test.go b/vendor/golang.org/x/crypto/ocsp/ocsp_test.go index df674b3..70b1976 100644 --- a/vendor/golang.org/x/crypto/ocsp/ocsp_test.go +++ b/vendor/golang.org/x/crypto/ocsp/ocsp_test.go @@ -43,11 +43,11 @@ func TestOCSPDecode(t *testing.T) { } if !reflect.DeepEqual(resp.ThisUpdate, expected.ThisUpdate) { - t.Errorf("resp.ThisUpdate: got %d, want %d", resp.ThisUpdate, expected.ThisUpdate) + t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, expected.ThisUpdate) } if !reflect.DeepEqual(resp.NextUpdate, expected.NextUpdate) { - t.Errorf("resp.NextUpdate: got %d, want %d", resp.NextUpdate, expected.NextUpdate) + t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, expected.NextUpdate) } if resp.Status != expected.Status { @@ -218,7 +218,7 @@ func TestOCSPResponse(t *testing.T) { extensionBytes, _ := hex.DecodeString(ocspExtensionValueHex) extensions := []pkix.Extension{ - pkix.Extension{ + { Id: ocspExtensionOID, Critical: false, Value: extensionBytes, @@ -268,15 +268,15 @@ func TestOCSPResponse(t *testing.T) { } if !reflect.DeepEqual(resp.ThisUpdate, template.ThisUpdate) { - t.Errorf("resp.ThisUpdate: got %d, want %d", resp.ThisUpdate, template.ThisUpdate) + t.Errorf("resp.ThisUpdate: got %v, want %v", resp.ThisUpdate, template.ThisUpdate) } if !reflect.DeepEqual(resp.NextUpdate, template.NextUpdate) { - t.Errorf("resp.NextUpdate: got %d, want %d", resp.NextUpdate, template.NextUpdate) + t.Errorf("resp.NextUpdate: got %v, want %v", resp.NextUpdate, template.NextUpdate) } if !reflect.DeepEqual(resp.RevokedAt, template.RevokedAt) { - t.Errorf("resp.RevokedAt: got %d, want %d", resp.RevokedAt, template.RevokedAt) + t.Errorf("resp.RevokedAt: got %v, want %v", resp.RevokedAt, template.RevokedAt) } if !reflect.DeepEqual(resp.Extensions, template.ExtraExtensions) { diff --git a/vendor/golang.org/x/crypto/openpgp/keys.go b/vendor/golang.org/x/crypto/openpgp/keys.go index 68b14c6..744e293 100644 --- a/vendor/golang.org/x/crypto/openpgp/keys.go +++ b/vendor/golang.org/x/crypto/openpgp/keys.go @@ -325,9 +325,8 @@ func ReadEntity(packets *packet.Reader) (*Entity, error) { if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok { packets.Unread(p) return nil, errors.StructuralError("first packet was not a public/private key") - } else { - e.PrimaryKey = &e.PrivateKey.PublicKey } + e.PrimaryKey = &e.PrivateKey.PublicKey } if !e.PrimaryKey.PubKeyAlgo.CanSign() { diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go index 1379240..f83cb69 100644 --- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go @@ -155,3 +155,22 @@ func TestWithHMACSHA1(t *testing.T) { func TestWithHMACSHA256(t *testing.T) { testHash(t, sha256.New, "SHA256", sha256TestVectors) } + +var sink uint8 + +func benchmark(b *testing.B, h func() hash.Hash) { + password := make([]byte, h().Size()) + salt := make([]byte, 8) + for i := 0; i < b.N; i++ { + password = Key(password, salt, 4096, len(password), h) + } + sink += password[0] +} + +func BenchmarkHMACSHA1(b *testing.B) { + benchmark(b, sha1.New) +} + +func BenchmarkHMACSHA256(b *testing.B) { + benchmark(b, sha256.New) +} diff --git a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go index 8c70902..7499e3f 100644 --- a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go +++ b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go @@ -122,7 +122,6 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) { r3 = r3 + c.k[r2&63] for j <= 40 { - // mix r0 r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) r0 = rotl16(r0, 1) @@ -151,7 +150,6 @@ func (c *rc2Cipher) Encrypt(dst, src []byte) { r3 = r3 + c.k[r2&63] for j <= 60 { - // mix r0 r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) r0 = rotl16(r0, 1) @@ -244,7 +242,6 @@ func (c *rc2Cipher) Decrypt(dst, src []byte) { r0 = r0 - c.k[r3&63] for j >= 0 { - // unmix r3 r3 = rotl16(r3, 16-5) r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) diff --git a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go index 8a49dfa..51a7efe 100644 --- a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go +++ b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2_test.go @@ -11,7 +11,6 @@ import ( ) func TestEncryptDecrypt(t *testing.T) { - // TODO(dgryski): add the rest of the test vectors from the RFC var tests = []struct { key string diff --git a/vendor/golang.org/x/crypto/sha3/sha3_test.go b/vendor/golang.org/x/crypto/sha3/sha3_test.go index 312e8f9..2c8719b 100644 --- a/vendor/golang.org/x/crypto/sha3/sha3_test.go +++ b/vendor/golang.org/x/crypto/sha3/sha3_test.go @@ -202,7 +202,7 @@ func TestSqueezing(t *testing.T) { d1 := newShakeHash() d1.Write([]byte(testString)) var multiple []byte - for _ = range ref { + for range ref { one := make([]byte, 1) d1.Read(one) multiple = append(multiple, one...) diff --git a/vendor/golang.org/x/crypto/ssh/agent/client.go b/vendor/golang.org/x/crypto/ssh/agent/client.go index dce7682..acb5ad8 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/client.go +++ b/vendor/golang.org/x/crypto/ssh/agent/client.go @@ -98,7 +98,7 @@ const ( agentAddIdentity = 17 agentRemoveIdentity = 18 agentRemoveAllIdentities = 19 - agentAddIdConstrained = 25 + agentAddIDConstrained = 25 // 3.3 Key-type independent requests from client to agent agentAddSmartcardKey = 20 @@ -515,7 +515,7 @@ func (c *client) insertKey(s interface{}, comment string, constraints []byte) er // if constraints are present then the message type needs to be changed. if len(constraints) != 0 { - req[0] = agentAddIdConstrained + req[0] = agentAddIDConstrained } resp, err := c.call(req) @@ -577,11 +577,11 @@ func (c *client) Add(key AddedKey) error { constraints = append(constraints, agentConstrainConfirm) } - if cert := key.Certificate; cert == nil { + cert := key.Certificate + if cert == nil { return c.insertKey(key.PrivateKey, key.Comment, constraints) - } else { - return c.insertCert(key.PrivateKey, cert, key.Comment, constraints) } + return c.insertCert(key.PrivateKey, cert, key.Comment, constraints) } func (c *client) insertCert(s interface{}, cert *ssh.Certificate, comment string, constraints []byte) error { @@ -633,7 +633,7 @@ func (c *client) insertCert(s interface{}, cert *ssh.Certificate, comment string // if constraints are present then the message type needs to be changed. if len(constraints) != 0 { - req[0] = agentAddIdConstrained + req[0] = agentAddIDConstrained } signer, err := ssh.NewSignerFromKey(s) diff --git a/vendor/golang.org/x/crypto/ssh/agent/server.go b/vendor/golang.org/x/crypto/ssh/agent/server.go index 321e48a..2e4692c 100644 --- a/vendor/golang.org/x/crypto/ssh/agent/server.go +++ b/vendor/golang.org/x/crypto/ssh/agent/server.go @@ -148,7 +148,7 @@ func (s *server) processRequest(data []byte) (interface{}, error) { } return rep, nil - case agentAddIdConstrained, agentAddIdentity: + case agentAddIDConstrained, agentAddIdentity: return nil, s.insertIdentity(data) } diff --git a/vendor/golang.org/x/crypto/ssh/benchmark_test.go b/vendor/golang.org/x/crypto/ssh/benchmark_test.go index d9f7eb9..20c3307 100644 --- a/vendor/golang.org/x/crypto/ssh/benchmark_test.go +++ b/vendor/golang.org/x/crypto/ssh/benchmark_test.go @@ -40,7 +40,8 @@ func sshPipe() (Conn, *server, error) { } clientConf := ClientConfig{ - User: "user", + User: "user", + HostKeyCallback: InsecureIgnoreHostKey(), } serverConf := ServerConfig{ NoClientAuth: true, diff --git a/vendor/golang.org/x/crypto/ssh/certs.go b/vendor/golang.org/x/crypto/ssh/certs.go index b1f0220..cfc8ead 100644 --- a/vendor/golang.org/x/crypto/ssh/certs.go +++ b/vendor/golang.org/x/crypto/ssh/certs.go @@ -340,10 +340,10 @@ func (c *CertChecker) Authenticate(conn ConnMetadata, pubKey PublicKey) (*Permis // the signature of the certificate. func (c *CertChecker) CheckCert(principal string, cert *Certificate) error { if c.IsRevoked != nil && c.IsRevoked(cert) { - return fmt.Errorf("ssh: certicate serial %d revoked", cert.Serial) + return fmt.Errorf("ssh: certificate serial %d revoked", cert.Serial) } - for opt, _ := range cert.CriticalOptions { + for opt := range cert.CriticalOptions { // sourceAddressCriticalOption will be enforced by // serverAuthenticate if opt == sourceAddressCriticalOption { diff --git a/vendor/golang.org/x/crypto/ssh/certs_test.go b/vendor/golang.org/x/crypto/ssh/certs_test.go index 0200531..c8e7cf5 100644 --- a/vendor/golang.org/x/crypto/ssh/certs_test.go +++ b/vendor/golang.org/x/crypto/ssh/certs_test.go @@ -6,10 +6,15 @@ package ssh import ( "bytes" + "crypto/ecdsa" + "crypto/elliptic" "crypto/rand" + "net" "reflect" "testing" "time" + + "golang.org/x/crypto/ssh/testdata" ) // Cert generated by ssh-keygen 6.0p1 Debian-4. @@ -220,3 +225,111 @@ func TestHostKeyCert(t *testing.T) { } } } + +func TestCertTypes(t *testing.T) { + var testVars = []struct { + name string + keys func() Signer + }{ + { + name: CertAlgoECDSA256v01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap256"]) + return s + }, + }, + { + name: CertAlgoECDSA384v01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap384"]) + return s + }, + }, + { + name: CertAlgoECDSA521v01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["ecdsap521"]) + return s + }, + }, + { + name: CertAlgoED25519v01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["ed25519"]) + return s + }, + }, + { + name: CertAlgoRSAv01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["rsa"]) + return s + }, + }, + { + name: CertAlgoDSAv01, + keys: func() Signer { + s, _ := ParsePrivateKey(testdata.PEMBytes["dsa"]) + return s + }, + }, + } + + k, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + if err != nil { + t.Fatalf("error generating host key: %v", err) + } + + signer, err := NewSignerFromKey(k) + if err != nil { + t.Fatalf("error generating signer for ssh listener: %v", err) + } + + conf := &ServerConfig{ + PublicKeyCallback: func(c ConnMetadata, k PublicKey) (*Permissions, error) { + return new(Permissions), nil + }, + } + conf.AddHostKey(signer) + + for _, m := range testVars { + t.Run(m.name, func(t *testing.T) { + + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + go NewServerConn(c1, conf) + + priv := m.keys() + if err != nil { + t.Fatalf("error generating ssh pubkey: %v", err) + } + + cert := &Certificate{ + CertType: UserCert, + Key: priv.PublicKey(), + } + cert.SignCert(rand.Reader, priv) + + certSigner, err := NewCertSigner(cert, priv) + if err != nil { + t.Fatalf("error generating cert signer: %v", err) + } + + config := &ClientConfig{ + User: "user", + HostKeyCallback: func(h string, r net.Addr, k PublicKey) error { return nil }, + Auth: []AuthMethod{PublicKeys(certSigner)}, + } + + _, _, _, err = NewClientConn(c2, "", config) + if err != nil { + t.Fatalf("error connecting: %v", err) + } + }) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/channel.go b/vendor/golang.org/x/crypto/ssh/channel.go index 195530e..c0834c0 100644 --- a/vendor/golang.org/x/crypto/ssh/channel.go +++ b/vendor/golang.org/x/crypto/ssh/channel.go @@ -205,32 +205,32 @@ type channel struct { // writePacket sends a packet. If the packet is a channel close, it updates // sentClose. This method takes the lock c.writeMu. -func (c *channel) writePacket(packet []byte) error { - c.writeMu.Lock() - if c.sentClose { - c.writeMu.Unlock() +func (ch *channel) writePacket(packet []byte) error { + ch.writeMu.Lock() + if ch.sentClose { + ch.writeMu.Unlock() return io.EOF } - c.sentClose = (packet[0] == msgChannelClose) - err := c.mux.conn.writePacket(packet) - c.writeMu.Unlock() + ch.sentClose = (packet[0] == msgChannelClose) + err := ch.mux.conn.writePacket(packet) + ch.writeMu.Unlock() return err } -func (c *channel) sendMessage(msg interface{}) error { +func (ch *channel) sendMessage(msg interface{}) error { if debugMux { - log.Printf("send(%d): %#v", c.mux.chanList.offset, msg) + log.Printf("send(%d): %#v", ch.mux.chanList.offset, msg) } p := Marshal(msg) - binary.BigEndian.PutUint32(p[1:], c.remoteId) - return c.writePacket(p) + binary.BigEndian.PutUint32(p[1:], ch.remoteId) + return ch.writePacket(p) } // WriteExtended writes data to a specific extended stream. These streams are // used, for example, for stderr. -func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) { - if c.sentEOF { +func (ch *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err error) { + if ch.sentEOF { return 0, io.EOF } // 1 byte message type, 4 bytes remoteId, 4 bytes data length @@ -241,16 +241,16 @@ func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err er opCode = msgChannelExtendedData } - c.writeMu.Lock() - packet := c.packetPool[extendedCode] + ch.writeMu.Lock() + packet := ch.packetPool[extendedCode] // We don't remove the buffer from packetPool, so // WriteExtended calls from different goroutines will be // flagged as errors by the race detector. - c.writeMu.Unlock() + ch.writeMu.Unlock() for len(data) > 0 { - space := min(c.maxRemotePayload, len(data)) - if space, err = c.remoteWin.reserve(space); err != nil { + space := min(ch.maxRemotePayload, len(data)) + if space, err = ch.remoteWin.reserve(space); err != nil { return n, err } if want := headerLength + space; uint32(cap(packet)) < want { @@ -262,13 +262,13 @@ func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err er todo := data[:space] packet[0] = opCode - binary.BigEndian.PutUint32(packet[1:], c.remoteId) + binary.BigEndian.PutUint32(packet[1:], ch.remoteId) if extendedCode > 0 { binary.BigEndian.PutUint32(packet[5:], uint32(extendedCode)) } binary.BigEndian.PutUint32(packet[headerLength-4:], uint32(len(todo))) copy(packet[headerLength:], todo) - if err = c.writePacket(packet); err != nil { + if err = ch.writePacket(packet); err != nil { return n, err } @@ -276,14 +276,14 @@ func (c *channel) WriteExtended(data []byte, extendedCode uint32) (n int, err er data = data[len(todo):] } - c.writeMu.Lock() - c.packetPool[extendedCode] = packet - c.writeMu.Unlock() + ch.writeMu.Lock() + ch.packetPool[extendedCode] = packet + ch.writeMu.Unlock() return n, err } -func (c *channel) handleData(packet []byte) error { +func (ch *channel) handleData(packet []byte) error { headerLen := 9 isExtendedData := packet[0] == msgChannelExtendedData if isExtendedData { @@ -303,7 +303,7 @@ func (c *channel) handleData(packet []byte) error { if length == 0 { return nil } - if length > c.maxIncomingPayload { + if length > ch.maxIncomingPayload { // TODO(hanwen): should send Disconnect? return errors.New("ssh: incoming packet exceeds maximum payload size") } @@ -313,21 +313,21 @@ func (c *channel) handleData(packet []byte) error { return errors.New("ssh: wrong packet length") } - c.windowMu.Lock() - if c.myWindow < length { - c.windowMu.Unlock() + ch.windowMu.Lock() + if ch.myWindow < length { + ch.windowMu.Unlock() // TODO(hanwen): should send Disconnect with reason? return errors.New("ssh: remote side wrote too much") } - c.myWindow -= length - c.windowMu.Unlock() + ch.myWindow -= length + ch.windowMu.Unlock() if extended == 1 { - c.extPending.write(data) + ch.extPending.write(data) } else if extended > 0 { // discard other extended data. } else { - c.pending.write(data) + ch.pending.write(data) } return nil } @@ -384,31 +384,31 @@ func (c *channel) close() { // responseMessageReceived is called when a success or failure message is // received on a channel to check that such a message is reasonable for the // given channel. -func (c *channel) responseMessageReceived() error { - if c.direction == channelInbound { +func (ch *channel) responseMessageReceived() error { + if ch.direction == channelInbound { return errors.New("ssh: channel response message received on inbound channel") } - if c.decided { + if ch.decided { return errors.New("ssh: duplicate response received for channel") } - c.decided = true + ch.decided = true return nil } -func (c *channel) handlePacket(packet []byte) error { +func (ch *channel) handlePacket(packet []byte) error { switch packet[0] { case msgChannelData, msgChannelExtendedData: - return c.handleData(packet) + return ch.handleData(packet) case msgChannelClose: - c.sendMessage(channelCloseMsg{PeersId: c.remoteId}) - c.mux.chanList.remove(c.localId) - c.close() + ch.sendMessage(channelCloseMsg{PeersID: ch.remoteId}) + ch.mux.chanList.remove(ch.localId) + ch.close() return nil case msgChannelEOF: // RFC 4254 is mute on how EOF affects dataExt messages but // it is logical to signal EOF at the same time. - c.extPending.eof() - c.pending.eof() + ch.extPending.eof() + ch.pending.eof() return nil } @@ -419,24 +419,24 @@ func (c *channel) handlePacket(packet []byte) error { switch msg := decoded.(type) { case *channelOpenFailureMsg: - if err := c.responseMessageReceived(); err != nil { + if err := ch.responseMessageReceived(); err != nil { return err } - c.mux.chanList.remove(msg.PeersId) - c.msg <- msg + ch.mux.chanList.remove(msg.PeersID) + ch.msg <- msg case *channelOpenConfirmMsg: - if err := c.responseMessageReceived(); err != nil { + if err := ch.responseMessageReceived(); err != nil { return err } if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { return fmt.Errorf("ssh: invalid MaxPacketSize %d from peer", msg.MaxPacketSize) } - c.remoteId = msg.MyId - c.maxRemotePayload = msg.MaxPacketSize - c.remoteWin.add(msg.MyWindow) - c.msg <- msg + ch.remoteId = msg.MyID + ch.maxRemotePayload = msg.MaxPacketSize + ch.remoteWin.add(msg.MyWindow) + ch.msg <- msg case *windowAdjustMsg: - if !c.remoteWin.add(msg.AdditionalBytes) { + if !ch.remoteWin.add(msg.AdditionalBytes) { return fmt.Errorf("ssh: invalid window update for %d bytes", msg.AdditionalBytes) } case *channelRequestMsg: @@ -444,12 +444,12 @@ func (c *channel) handlePacket(packet []byte) error { Type: msg.Request, WantReply: msg.WantReply, Payload: msg.RequestSpecificData, - ch: c, + ch: ch, } - c.incomingRequests <- &req + ch.incomingRequests <- &req default: - c.msg <- msg + ch.msg <- msg } return nil } @@ -488,23 +488,23 @@ func (e *extChannel) Read(data []byte) (n int, err error) { return e.ch.ReadExtended(data, e.code) } -func (c *channel) Accept() (Channel, <-chan *Request, error) { - if c.decided { +func (ch *channel) Accept() (Channel, <-chan *Request, error) { + if ch.decided { return nil, nil, errDecidedAlready } - c.maxIncomingPayload = channelMaxPacket + ch.maxIncomingPayload = channelMaxPacket confirm := channelOpenConfirmMsg{ - PeersId: c.remoteId, - MyId: c.localId, - MyWindow: c.myWindow, - MaxPacketSize: c.maxIncomingPayload, + PeersID: ch.remoteId, + MyID: ch.localId, + MyWindow: ch.myWindow, + MaxPacketSize: ch.maxIncomingPayload, } - c.decided = true - if err := c.sendMessage(confirm); err != nil { + ch.decided = true + if err := ch.sendMessage(confirm); err != nil { return nil, nil, err } - return c, c.incomingRequests, nil + return ch, ch.incomingRequests, nil } func (ch *channel) Reject(reason RejectionReason, message string) error { @@ -512,7 +512,7 @@ func (ch *channel) Reject(reason RejectionReason, message string) error { return errDecidedAlready } reject := channelOpenFailureMsg{ - PeersId: ch.remoteId, + PeersID: ch.remoteId, Reason: reason, Message: message, Language: "en", @@ -541,7 +541,7 @@ func (ch *channel) CloseWrite() error { } ch.sentEOF = true return ch.sendMessage(channelEOFMsg{ - PeersId: ch.remoteId}) + PeersID: ch.remoteId}) } func (ch *channel) Close() error { @@ -550,7 +550,7 @@ func (ch *channel) Close() error { } return ch.sendMessage(channelCloseMsg{ - PeersId: ch.remoteId}) + PeersID: ch.remoteId}) } // Extended returns an io.ReadWriter that sends and receives data on the given, @@ -577,7 +577,7 @@ func (ch *channel) SendRequest(name string, wantReply bool, payload []byte) (boo } msg := channelRequestMsg{ - PeersId: ch.remoteId, + PeersID: ch.remoteId, Request: name, WantReply: wantReply, RequestSpecificData: payload, @@ -614,11 +614,11 @@ func (ch *channel) ackRequest(ok bool) error { var msg interface{} if !ok { msg = channelRequestFailureMsg{ - PeersId: ch.remoteId, + PeersID: ch.remoteId, } } else { msg = channelRequestSuccessMsg{ - PeersId: ch.remoteId, + PeersID: ch.remoteId, } } return ch.sendMessage(msg) diff --git a/vendor/golang.org/x/crypto/ssh/cipher.go b/vendor/golang.org/x/crypto/ssh/cipher.go index 22bb30c..f2ba117 100644 --- a/vendor/golang.org/x/crypto/ssh/cipher.go +++ b/vendor/golang.org/x/crypto/ssh/cipher.go @@ -16,6 +16,9 @@ import ( "hash" "io" "io/ioutil" + + "golang.org/x/crypto/internal/chacha20" + "golang.org/x/crypto/poly1305" ) const ( @@ -53,78 +56,78 @@ func newRC4(key, iv []byte) (cipher.Stream, error) { return rc4.NewCipher(key) } -type streamCipherMode struct { - keySize int - ivSize int - skip int - createFunc func(key, iv []byte) (cipher.Stream, error) +type cipherMode struct { + keySize int + ivSize int + create func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) } -func (c *streamCipherMode) createStream(key, iv []byte) (cipher.Stream, error) { - if len(key) < c.keySize { - panic("ssh: key length too small for cipher") - } - if len(iv) < c.ivSize { - panic("ssh: iv too small for cipher") - } - - stream, err := c.createFunc(key[:c.keySize], iv[:c.ivSize]) - if err != nil { - return nil, err - } - - var streamDump []byte - if c.skip > 0 { - streamDump = make([]byte, 512) - } - - for remainingToDump := c.skip; remainingToDump > 0; { - dumpThisTime := remainingToDump - if dumpThisTime > len(streamDump) { - dumpThisTime = len(streamDump) +func streamCipherMode(skip int, createFunc func(key, iv []byte) (cipher.Stream, error)) func(key, iv []byte, macKey []byte, algs directionAlgorithms) (packetCipher, error) { + return func(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { + stream, err := createFunc(key, iv) + if err != nil { + return nil, err } - stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime]) - remainingToDump -= dumpThisTime - } - return stream, nil + var streamDump []byte + if skip > 0 { + streamDump = make([]byte, 512) + } + + for remainingToDump := skip; remainingToDump > 0; { + dumpThisTime := remainingToDump + if dumpThisTime > len(streamDump) { + dumpThisTime = len(streamDump) + } + stream.XORKeyStream(streamDump[:dumpThisTime], streamDump[:dumpThisTime]) + remainingToDump -= dumpThisTime + } + + mac := macModes[algs.MAC].new(macKey) + return &streamPacketCipher{ + mac: mac, + etm: macModes[algs.MAC].etm, + macResult: make([]byte, mac.Size()), + cipher: stream, + }, nil + } } // cipherModes documents properties of supported ciphers. Ciphers not included // are not supported and will not be negotiated, even if explicitly requested in // ClientConfig.Crypto.Ciphers. -var cipherModes = map[string]*streamCipherMode{ +var cipherModes = map[string]*cipherMode{ // Ciphers from RFC4344, which introduced many CTR-based ciphers. Algorithms // are defined in the order specified in the RFC. - "aes128-ctr": {16, aes.BlockSize, 0, newAESCTR}, - "aes192-ctr": {24, aes.BlockSize, 0, newAESCTR}, - "aes256-ctr": {32, aes.BlockSize, 0, newAESCTR}, + "aes128-ctr": {16, aes.BlockSize, streamCipherMode(0, newAESCTR)}, + "aes192-ctr": {24, aes.BlockSize, streamCipherMode(0, newAESCTR)}, + "aes256-ctr": {32, aes.BlockSize, streamCipherMode(0, newAESCTR)}, // Ciphers from RFC4345, which introduces security-improved arcfour ciphers. // They are defined in the order specified in the RFC. - "arcfour128": {16, 0, 1536, newRC4}, - "arcfour256": {32, 0, 1536, newRC4}, + "arcfour128": {16, 0, streamCipherMode(1536, newRC4)}, + "arcfour256": {32, 0, streamCipherMode(1536, newRC4)}, // Cipher defined in RFC 4253, which describes SSH Transport Layer Protocol. // Note that this cipher is not safe, as stated in RFC 4253: "Arcfour (and // RC4) has problems with weak keys, and should be used with caution." // RFC4345 introduces improved versions of Arcfour. - "arcfour": {16, 0, 0, newRC4}, + "arcfour": {16, 0, streamCipherMode(0, newRC4)}, - // AES-GCM is not a stream cipher, so it is constructed with a - // special case. If we add any more non-stream ciphers, we - // should invest a cleaner way to do this. - gcmCipherID: {16, 12, 0, nil}, + // AEAD ciphers + gcmCipherID: {16, 12, newGCMCipher}, + chacha20Poly1305ID: {64, 0, newChaCha20Cipher}, // CBC mode is insecure and so is not included in the default config. // (See http://www.isg.rhul.ac.uk/~kp/SandPfinal.pdf). If absolutely // needed, it's possible to specify a custom Config to enable it. // You should expect that an active attacker can recover plaintext if // you do. - aes128cbcID: {16, aes.BlockSize, 0, nil}, + aes128cbcID: {16, aes.BlockSize, newAESCBCCipher}, - // 3des-cbc is insecure and is disabled by default. - tripledescbcID: {24, des.BlockSize, 0, nil}, + // 3des-cbc is insecure and is not included in the default + // config. + tripledescbcID: {24, des.BlockSize, newTripleDESCBCCipher}, } // prefixLen is the length of the packet prefix that contains the packet length @@ -304,7 +307,7 @@ type gcmCipher struct { buf []byte } -func newGCMCipher(iv, key, macKey []byte) (packetCipher, error) { +func newGCMCipher(key, iv, unusedMacKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { c, err := aes.NewCipher(key) if err != nil { return nil, err @@ -372,7 +375,7 @@ func (c *gcmCipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { } length := binary.BigEndian.Uint32(c.prefix[:]) if length > maxPacket { - return nil, errors.New("ssh: max packet length exceeded.") + return nil, errors.New("ssh: max packet length exceeded") } if cap(c.buf) < int(length+gcmTagSize) { @@ -422,7 +425,7 @@ type cbcCipher struct { oracleCamouflage uint32 } -func newCBCCipher(c cipher.Block, iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { +func newCBCCipher(c cipher.Block, key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { cbc := &cbcCipher{ mac: macModes[algs.MAC].new(macKey), decrypter: cipher.NewCBCDecrypter(c, iv), @@ -436,13 +439,13 @@ func newCBCCipher(c cipher.Block, iv, key, macKey []byte, algs directionAlgorith return cbc, nil } -func newAESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { +func newAESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { c, err := aes.NewCipher(key) if err != nil { return nil, err } - cbc, err := newCBCCipher(c, iv, key, macKey, algs) + cbc, err := newCBCCipher(c, key, iv, macKey, algs) if err != nil { return nil, err } @@ -450,13 +453,13 @@ func newAESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCi return cbc, nil } -func newTripleDESCBCCipher(iv, key, macKey []byte, algs directionAlgorithms) (packetCipher, error) { +func newTripleDESCBCCipher(key, iv, macKey []byte, algs directionAlgorithms) (packetCipher, error) { c, err := des.NewTripleDESCipher(key) if err != nil { return nil, err } - cbc, err := newCBCCipher(c, iv, key, macKey, algs) + cbc, err := newCBCCipher(c, key, iv, macKey, algs) if err != nil { return nil, err } @@ -548,11 +551,11 @@ func (c *cbcCipher) readPacketLeaky(seqNum uint32, r io.Reader) ([]byte, error) c.packetData = c.packetData[:entirePacketSize] } - if n, err := io.ReadFull(r, c.packetData[firstBlockLength:]); err != nil { + n, err := io.ReadFull(r, c.packetData[firstBlockLength:]) + if err != nil { return nil, err - } else { - c.oracleCamouflage -= uint32(n) } + c.oracleCamouflage -= uint32(n) remainingCrypted := c.packetData[firstBlockLength:macStart] c.decrypter.CryptBlocks(remainingCrypted, remainingCrypted) @@ -627,3 +630,142 @@ func (c *cbcCipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, pack return nil } + +const chacha20Poly1305ID = "chacha20-poly1305@openssh.com" + +// chacha20Poly1305Cipher implements the chacha20-poly1305@openssh.com +// AEAD, which is described here: +// +// https://tools.ietf.org/html/draft-josefsson-ssh-chacha20-poly1305-openssh-00 +// +// the methods here also implement padding, which RFC4253 Section 6 +// also requires of stream ciphers. +type chacha20Poly1305Cipher struct { + lengthKey [32]byte + contentKey [32]byte + buf []byte +} + +func newChaCha20Cipher(key, unusedIV, unusedMACKey []byte, unusedAlgs directionAlgorithms) (packetCipher, error) { + if len(key) != 64 { + panic(len(key)) + } + + c := &chacha20Poly1305Cipher{ + buf: make([]byte, 256), + } + + copy(c.contentKey[:], key[:32]) + copy(c.lengthKey[:], key[32:]) + return c, nil +} + +// The Poly1305 key is obtained by encrypting 32 0-bytes. +var chacha20PolyKeyInput [32]byte + +func (c *chacha20Poly1305Cipher) readPacket(seqNum uint32, r io.Reader) ([]byte, error) { + var counter [16]byte + binary.BigEndian.PutUint64(counter[8:], uint64(seqNum)) + + var polyKey [32]byte + chacha20.XORKeyStream(polyKey[:], chacha20PolyKeyInput[:], &counter, &c.contentKey) + + encryptedLength := c.buf[:4] + if _, err := r.Read(encryptedLength); err != nil { + return nil, err + } + + var lenBytes [4]byte + chacha20.XORKeyStream(lenBytes[:], encryptedLength, &counter, &c.lengthKey) + + length := binary.BigEndian.Uint32(lenBytes[:]) + if length > maxPacket { + return nil, errors.New("ssh: invalid packet length, packet too large") + } + + contentEnd := 4 + length + packetEnd := contentEnd + poly1305.TagSize + if uint32(cap(c.buf)) < packetEnd { + c.buf = make([]byte, packetEnd) + copy(c.buf[:], encryptedLength) + } else { + c.buf = c.buf[:packetEnd] + } + + if _, err := r.Read(c.buf[4:packetEnd]); err != nil { + return nil, err + } + + var mac [poly1305.TagSize]byte + copy(mac[:], c.buf[contentEnd:packetEnd]) + + if !poly1305.Verify(&mac, c.buf[:contentEnd], &polyKey) { + return nil, errors.New("ssh: MAC failure") + } + + counter[0] = 1 + + plain := c.buf[4:contentEnd] + chacha20.XORKeyStream(plain, plain, &counter, &c.contentKey) + + padding := plain[0] + if padding < 4 { + // padding is a byte, so it automatically satisfies + // the maximum size, which is 255. + return nil, fmt.Errorf("ssh: illegal padding %d", padding) + } + + if int(padding)+1 >= len(plain) { + return nil, fmt.Errorf("ssh: padding %d too large", padding) + } + + plain = plain[1 : len(plain)-int(padding)] + return plain, nil +} + +func (c *chacha20Poly1305Cipher) writePacket(seqNum uint32, w io.Writer, rand io.Reader, payload []byte) error { + var counter [16]byte + binary.BigEndian.PutUint64(counter[8:], uint64(seqNum)) + + var polyKey [32]byte + chacha20.XORKeyStream(polyKey[:], chacha20PolyKeyInput[:], &counter, &c.contentKey) + + // There is no blocksize, so fall back to multiple of 8 byte + // padding, as described in RFC 4253, Sec 6. + const packetSizeMultiple = 8 + + padding := packetSizeMultiple - (1+len(payload))%packetSizeMultiple + if padding < 4 { + padding += packetSizeMultiple + } + + // size (4 bytes), padding (1), payload, padding, tag. + totalLength := 4 + 1 + len(payload) + padding + poly1305.TagSize + if cap(c.buf) < totalLength { + c.buf = make([]byte, totalLength) + } else { + c.buf = c.buf[:totalLength] + } + + binary.BigEndian.PutUint32(c.buf, uint32(1+len(payload)+padding)) + chacha20.XORKeyStream(c.buf, c.buf[:4], &counter, &c.lengthKey) + c.buf[4] = byte(padding) + copy(c.buf[5:], payload) + packetEnd := 5 + len(payload) + padding + if _, err := io.ReadFull(rand, c.buf[5+len(payload):packetEnd]); err != nil { + return err + } + + counter[0] = 1 + chacha20.XORKeyStream(c.buf[4:], c.buf[4:packetEnd], &counter, &c.contentKey) + + var mac [poly1305.TagSize]byte + poly1305.Sum(&mac, c.buf[:packetEnd], &polyKey) + + copy(c.buf[packetEnd:], mac[:]) + + if _, err := w.Write(c.buf); err != nil { + return err + } + return nil +} diff --git a/vendor/golang.org/x/crypto/ssh/cipher_test.go b/vendor/golang.org/x/crypto/ssh/cipher_test.go index 5cfa17a..a52d6e4 100644 --- a/vendor/golang.org/x/crypto/ssh/cipher_test.go +++ b/vendor/golang.org/x/crypto/ssh/cipher_test.go @@ -7,7 +7,6 @@ package ssh import ( "bytes" "crypto" - "crypto/aes" "crypto/rand" "testing" ) @@ -15,60 +14,63 @@ import ( func TestDefaultCiphersExist(t *testing.T) { for _, cipherAlgo := range supportedCiphers { if _, ok := cipherModes[cipherAlgo]; !ok { - t.Errorf("default cipher %q is unknown", cipherAlgo) + t.Errorf("supported cipher %q is unknown", cipherAlgo) + } + } + for _, cipherAlgo := range preferredCiphers { + if _, ok := cipherModes[cipherAlgo]; !ok { + t.Errorf("preferred cipher %q is unknown", cipherAlgo) } } } func TestPacketCiphers(t *testing.T) { - // Still test aes128cbc cipher although it's commented out. - cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil} - defer delete(cipherModes, aes128cbcID) - + defaultMac := "hmac-sha2-256" + defaultCipher := "aes128-ctr" for cipher := range cipherModes { - for mac := range macModes { - kr := &kexResult{Hash: crypto.SHA1} - algs := directionAlgorithms{ - Cipher: cipher, - MAC: mac, - Compression: "none", - } - client, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - continue - } - server, err := newPacketCipher(clientKeys, algs, kr) - if err != nil { - t.Errorf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) - continue - } + t.Run("cipher="+cipher, + func(t *testing.T) { testPacketCipher(t, cipher, defaultMac) }) + } + for mac := range macModes { + t.Run("mac="+mac, + func(t *testing.T) { testPacketCipher(t, defaultCipher, mac) }) + } +} - want := "bla bla" - input := []byte(want) - buf := &bytes.Buffer{} - if err := client.writePacket(0, buf, rand.Reader, input); err != nil { - t.Errorf("writePacket(%q, %q): %v", cipher, mac, err) - continue - } +func testPacketCipher(t *testing.T, cipher, mac string) { + kr := &kexResult{Hash: crypto.SHA1} + algs := directionAlgorithms{ + Cipher: cipher, + MAC: mac, + Compression: "none", + } + client, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) + } + server, err := newPacketCipher(clientKeys, algs, kr) + if err != nil { + t.Fatalf("newPacketCipher(client, %q, %q): %v", cipher, mac, err) + } - packet, err := server.readPacket(0, buf) - if err != nil { - t.Errorf("readPacket(%q, %q): %v", cipher, mac, err) - continue - } + want := "bla bla" + input := []byte(want) + buf := &bytes.Buffer{} + if err := client.writePacket(0, buf, rand.Reader, input); err != nil { + t.Fatalf("writePacket(%q, %q): %v", cipher, mac, err) + } - if string(packet) != want { - t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want) - } - } + packet, err := server.readPacket(0, buf) + if err != nil { + t.Fatalf("readPacket(%q, %q): %v", cipher, mac, err) + } + + if string(packet) != want { + t.Errorf("roundtrip(%q, %q): got %q, want %q", cipher, mac, packet, want) } } func TestCBCOracleCounterMeasure(t *testing.T) { - cipherModes[aes128cbcID] = &streamCipherMode{16, aes.BlockSize, 0, nil} - defer delete(cipherModes, aes128cbcID) - kr := &kexResult{Hash: crypto.SHA1} algs := directionAlgorithms{ Cipher: aes128cbcID, diff --git a/vendor/golang.org/x/crypto/ssh/client.go b/vendor/golang.org/x/crypto/ssh/client.go index a7e3263..6fd1994 100644 --- a/vendor/golang.org/x/crypto/ssh/client.go +++ b/vendor/golang.org/x/crypto/ssh/client.go @@ -9,6 +9,7 @@ import ( "errors" "fmt" "net" + "os" "sync" "time" ) @@ -187,6 +188,10 @@ func Dial(network, addr string, config *ClientConfig) (*Client, error) { // net.Conn underlying the the SSH connection. type HostKeyCallback func(hostname string, remote net.Addr, key PublicKey) error +// BannerCallback is the function type used for treat the banner sent by +// the server. A BannerCallback receives the message sent by the remote server. +type BannerCallback func(message string) error + // A ClientConfig structure is used to configure a Client. It must not be // modified after having been passed to an SSH function. type ClientConfig struct { @@ -209,6 +214,12 @@ type ClientConfig struct { // FixedHostKey can be used for simplistic host key checks. HostKeyCallback HostKeyCallback + // BannerCallback is called during the SSH dance to display a custom + // server's message. The client configuration can supply this callback to + // handle it as wished. The function BannerDisplayStderr can be used for + // simplistic display on Stderr. + BannerCallback BannerCallback + // ClientVersion contains the version identification string that will // be used for the connection. If empty, a reasonable default is used. ClientVersion string @@ -255,3 +266,13 @@ func FixedHostKey(key PublicKey) HostKeyCallback { hk := &fixedHostKey{key} return hk.check } + +// BannerDisplayStderr returns a function that can be used for +// ClientConfig.BannerCallback to display banners on os.Stderr. +func BannerDisplayStderr() BannerCallback { + return func(banner string) error { + _, err := os.Stderr.WriteString(banner) + + return err + } +} diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go index 3acd8d4..a1252cb 100644 --- a/vendor/golang.org/x/crypto/ssh/client_auth.go +++ b/vendor/golang.org/x/crypto/ssh/client_auth.go @@ -283,7 +283,9 @@ func confirmKeyAck(key PublicKey, c packetConn) (bool, error) { } switch packet[0] { case msgUserAuthBanner: - // TODO(gpaul): add callback to present the banner to the user + if err := handleBannerResponse(c, packet); err != nil { + return false, err + } case msgUserAuthPubKeyOk: var msg userAuthPubKeyOkMsg if err := Unmarshal(packet, &msg); err != nil { @@ -325,7 +327,9 @@ func handleAuthResponse(c packetConn) (bool, []string, error) { switch packet[0] { case msgUserAuthBanner: - // TODO: add callback to present the banner to the user + if err := handleBannerResponse(c, packet); err != nil { + return false, nil, err + } case msgUserAuthFailure: var msg userAuthFailureMsg if err := Unmarshal(packet, &msg); err != nil { @@ -340,6 +344,24 @@ func handleAuthResponse(c packetConn) (bool, []string, error) { } } +func handleBannerResponse(c packetConn, packet []byte) error { + var msg userAuthBannerMsg + if err := Unmarshal(packet, &msg); err != nil { + return err + } + + transport, ok := c.(*handshakeTransport) + if !ok { + return nil + } + + if transport.bannerCallback != nil { + return transport.bannerCallback(msg.Message) + } + + return nil +} + // KeyboardInteractiveChallenge should print questions, optionally // disabling echoing (e.g. for passwords), and return all the answers. // Challenge may be called multiple times in a single session. After @@ -385,7 +407,9 @@ func (cb KeyboardInteractiveChallenge) auth(session []byte, user string, c packe // like handleAuthResponse, but with less options. switch packet[0] { case msgUserAuthBanner: - // TODO: Print banners during userauth. + if err := handleBannerResponse(c, packet); err != nil { + return false, nil, err + } continue case msgUserAuthInfoRequest: // OK diff --git a/vendor/golang.org/x/crypto/ssh/client_test.go b/vendor/golang.org/x/crypto/ssh/client_test.go index ccf5607..81f9599 100644 --- a/vendor/golang.org/x/crypto/ssh/client_test.go +++ b/vendor/golang.org/x/crypto/ssh/client_test.go @@ -5,41 +5,77 @@ package ssh import ( - "net" "strings" "testing" ) -func testClientVersion(t *testing.T, config *ClientConfig, expected string) { - clientConn, serverConn := net.Pipe() - defer clientConn.Close() - receivedVersion := make(chan string, 1) - config.HostKeyCallback = InsecureIgnoreHostKey() - go func() { - version, err := readVersion(serverConn) - if err != nil { - receivedVersion <- "" - } else { - receivedVersion <- string(version) - } - serverConn.Close() - }() - NewClientConn(clientConn, "", config) - actual := <-receivedVersion - if actual != expected { - t.Fatalf("got %s; want %s", actual, expected) +func TestClientVersion(t *testing.T) { + for _, tt := range []struct { + name string + version string + multiLine string + wantErr bool + }{ + { + name: "default version", + version: packageVersion, + }, + { + name: "custom version", + version: "SSH-2.0-CustomClientVersionString", + }, + { + name: "good multi line version", + version: packageVersion, + multiLine: strings.Repeat("ignored\r\n", 20), + }, + { + name: "bad multi line version", + version: packageVersion, + multiLine: "bad multi line version", + wantErr: true, + }, + { + name: "long multi line version", + version: packageVersion, + multiLine: strings.Repeat("long multi line version\r\n", 50)[:256], + wantErr: true, + }, + } { + t.Run(tt.name, func(t *testing.T) { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + go func() { + if tt.multiLine != "" { + c1.Write([]byte(tt.multiLine)) + } + NewClientConn(c1, "", &ClientConfig{ + ClientVersion: tt.version, + HostKeyCallback: InsecureIgnoreHostKey(), + }) + c1.Close() + }() + conf := &ServerConfig{NoClientAuth: true} + conf.AddHostKey(testSigners["rsa"]) + conn, _, _, err := NewServerConn(c2, conf) + if err == nil == tt.wantErr { + t.Fatalf("got err %v; wantErr %t", err, tt.wantErr) + } + if tt.wantErr { + // Don't verify the version on an expected error. + return + } + if got := string(conn.ClientVersion()); got != tt.version { + t.Fatalf("got %q; want %q", got, tt.version) + } + }) } } -func TestCustomClientVersion(t *testing.T) { - version := "Test-Client-Version-0.0" - testClientVersion(t, &ClientConfig{ClientVersion: version}, version) -} - -func TestDefaultClientVersion(t *testing.T) { - testClientVersion(t, &ClientConfig{}, packageVersion) -} - func TestHostKeyCheck(t *testing.T) { for _, tt := range []struct { name string @@ -79,3 +115,52 @@ func TestHostKeyCheck(t *testing.T) { } } } + +func TestBannerCallback(t *testing.T) { + c1, c2, err := netPipe() + if err != nil { + t.Fatalf("netPipe: %v", err) + } + defer c1.Close() + defer c2.Close() + + serverConf := &ServerConfig{ + PasswordCallback: func(conn ConnMetadata, password []byte) (*Permissions, error) { + return &Permissions{}, nil + }, + BannerCallback: func(conn ConnMetadata) string { + return "Hello World" + }, + } + serverConf.AddHostKey(testSigners["rsa"]) + go NewServerConn(c1, serverConf) + + var receivedBanner string + var bannerCount int + clientConf := ClientConfig{ + Auth: []AuthMethod{ + Password("123"), + }, + User: "user", + HostKeyCallback: InsecureIgnoreHostKey(), + BannerCallback: func(message string) error { + bannerCount++ + receivedBanner = message + return nil + }, + } + + _, _, _, err = NewClientConn(c2, "", &clientConf) + if err != nil { + t.Fatal(err) + } + + if bannerCount != 1 { + t.Errorf("got %d banners; want 1", bannerCount) + } + + expected := "Hello World" + if receivedBanner != expected { + t.Fatalf("got %s; want %s", receivedBanner, expected) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/common.go b/vendor/golang.org/x/crypto/ssh/common.go index dc39e4d..ffdc01f 100644 --- a/vendor/golang.org/x/crypto/ssh/common.go +++ b/vendor/golang.org/x/crypto/ssh/common.go @@ -24,11 +24,21 @@ const ( serviceSSH = "ssh-connection" ) -// supportedCiphers specifies the supported ciphers in preference order. +// supportedCiphers lists ciphers we support but might not recommend. var supportedCiphers = []string{ "aes128-ctr", "aes192-ctr", "aes256-ctr", "aes128-gcm@openssh.com", - "arcfour256", "arcfour128", + chacha20Poly1305ID, + "arcfour256", "arcfour128", "arcfour", + aes128cbcID, + tripledescbcID, +} + +// preferredCiphers specifies the default preference for ciphers. +var preferredCiphers = []string{ + "aes128-ctr", "aes192-ctr", "aes256-ctr", + "aes128-gcm@openssh.com", + chacha20Poly1305ID, } // supportedKexAlgos specifies the supported key-exchange algorithms in @@ -211,7 +221,7 @@ func (c *Config) SetDefaults() { c.Rand = rand.Reader } if c.Ciphers == nil { - c.Ciphers = supportedCiphers + c.Ciphers = preferredCiphers } var ciphers []string for _, c := range c.Ciphers { @@ -242,7 +252,7 @@ func (c *Config) SetDefaults() { // buildDataSignedForAuth returns the data that is signed in order to prove // possession of a private key. See RFC 4252, section 7. -func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { +func buildDataSignedForAuth(sessionID []byte, req userAuthRequestMsg, algo, pubKey []byte) []byte { data := struct { Session []byte Type byte @@ -253,7 +263,7 @@ func buildDataSignedForAuth(sessionId []byte, req userAuthRequestMsg, algo, pubK Algo []byte PubKey []byte }{ - sessionId, + sessionID, msgUserAuthRequest, req.User, req.Service, diff --git a/vendor/golang.org/x/crypto/ssh/handshake.go b/vendor/golang.org/x/crypto/ssh/handshake.go index 932ce83..4f7912e 100644 --- a/vendor/golang.org/x/crypto/ssh/handshake.go +++ b/vendor/golang.org/x/crypto/ssh/handshake.go @@ -78,6 +78,11 @@ type handshakeTransport struct { dialAddress string remoteAddr net.Addr + // bannerCallback is non-empty if we are the client and it has been set in + // ClientConfig. In that case it is called during the user authentication + // dance to handle a custom server's message. + bannerCallback BannerCallback + // Algorithms agreed in the last key exchange. algorithms *algorithms @@ -120,6 +125,7 @@ func newClientTransport(conn keyingTransport, clientVersion, serverVersion []byt t.dialAddress = dialAddr t.remoteAddr = addr t.hostKeyCallback = config.HostKeyCallback + t.bannerCallback = config.BannerCallback if config.HostKeyAlgorithms != nil { t.hostKeyAlgorithms = config.HostKeyAlgorithms } else { diff --git a/vendor/golang.org/x/crypto/ssh/kex.go b/vendor/golang.org/x/crypto/ssh/kex.go index f91c277..f34bcc0 100644 --- a/vendor/golang.org/x/crypto/ssh/kex.go +++ b/vendor/golang.org/x/crypto/ssh/kex.go @@ -119,7 +119,7 @@ func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handsha return nil, err } - kInt, err := group.diffieHellman(kexDHReply.Y, x) + ki, err := group.diffieHellman(kexDHReply.Y, x) if err != nil { return nil, err } @@ -129,8 +129,8 @@ func (group *dhGroup) Client(c packetConn, randSource io.Reader, magics *handsha writeString(h, kexDHReply.HostKey) writeInt(h, X) writeInt(h, kexDHReply.Y) - K := make([]byte, intLength(kInt)) - marshalInt(K, kInt) + K := make([]byte, intLength(ki)) + marshalInt(K, ki) h.Write(K) return &kexResult{ @@ -164,7 +164,7 @@ func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handsha } Y := new(big.Int).Exp(group.g, y, group.p) - kInt, err := group.diffieHellman(kexDHInit.X, y) + ki, err := group.diffieHellman(kexDHInit.X, y) if err != nil { return nil, err } @@ -177,8 +177,8 @@ func (group *dhGroup) Server(c packetConn, randSource io.Reader, magics *handsha writeInt(h, kexDHInit.X) writeInt(h, Y) - K := make([]byte, intLength(kInt)) - marshalInt(K, kInt) + K := make([]byte, intLength(ki)) + marshalInt(K, ki) h.Write(K) H := h.Sum(nil) @@ -462,9 +462,9 @@ func (kex *curve25519sha256) Client(c packetConn, rand io.Reader, magics *handsh writeString(h, kp.pub[:]) writeString(h, reply.EphemeralPubKey) - kInt := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(kInt)) - marshalInt(K, kInt) + ki := new(big.Int).SetBytes(secret[:]) + K := make([]byte, intLength(ki)) + marshalInt(K, ki) h.Write(K) return &kexResult{ @@ -510,9 +510,9 @@ func (kex *curve25519sha256) Server(c packetConn, rand io.Reader, magics *handsh writeString(h, kexInit.ClientPubKey) writeString(h, kp.pub[:]) - kInt := new(big.Int).SetBytes(secret[:]) - K := make([]byte, intLength(kInt)) - marshalInt(K, kInt) + ki := new(big.Int).SetBytes(secret[:]) + K := make([]byte, intLength(ki)) + marshalInt(K, ki) h.Write(K) H := h.Sum(nil) diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go index b682c17..dadf41a 100644 --- a/vendor/golang.org/x/crypto/ssh/keys.go +++ b/vendor/golang.org/x/crypto/ssh/keys.go @@ -363,7 +363,7 @@ func (r *rsaPublicKey) CryptoPublicKey() crypto.PublicKey { type dsaPublicKey dsa.PublicKey -func (r *dsaPublicKey) Type() string { +func (k *dsaPublicKey) Type() string { return "ssh-dss" } @@ -481,12 +481,12 @@ func (k *dsaPrivateKey) Sign(rand io.Reader, data []byte) (*Signature, error) { type ecdsaPublicKey ecdsa.PublicKey -func (key *ecdsaPublicKey) Type() string { - return "ecdsa-sha2-" + key.nistID() +func (k *ecdsaPublicKey) Type() string { + return "ecdsa-sha2-" + k.nistID() } -func (key *ecdsaPublicKey) nistID() string { - switch key.Params().BitSize { +func (k *ecdsaPublicKey) nistID() string { + switch k.Params().BitSize { case 256: return "nistp256" case 384: @@ -499,7 +499,7 @@ func (key *ecdsaPublicKey) nistID() string { type ed25519PublicKey ed25519.PublicKey -func (key ed25519PublicKey) Type() string { +func (k ed25519PublicKey) Type() string { return KeyAlgoED25519 } @@ -518,23 +518,23 @@ func parseED25519(in []byte) (out PublicKey, rest []byte, err error) { return (ed25519PublicKey)(key), w.Rest, nil } -func (key ed25519PublicKey) Marshal() []byte { +func (k ed25519PublicKey) Marshal() []byte { w := struct { Name string KeyBytes []byte }{ KeyAlgoED25519, - []byte(key), + []byte(k), } return Marshal(&w) } -func (key ed25519PublicKey) Verify(b []byte, sig *Signature) error { - if sig.Format != key.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type()) +func (k ed25519PublicKey) Verify(b []byte, sig *Signature) error { + if sig.Format != k.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) } - edKey := (ed25519.PublicKey)(key) + edKey := (ed25519.PublicKey)(k) if ok := ed25519.Verify(edKey, b, sig.Blob); !ok { return errors.New("ssh: signature did not verify") } @@ -595,9 +595,9 @@ func parseECDSA(in []byte) (out PublicKey, rest []byte, err error) { return (*ecdsaPublicKey)(key), w.Rest, nil } -func (key *ecdsaPublicKey) Marshal() []byte { +func (k *ecdsaPublicKey) Marshal() []byte { // See RFC 5656, section 3.1. - keyBytes := elliptic.Marshal(key.Curve, key.X, key.Y) + keyBytes := elliptic.Marshal(k.Curve, k.X, k.Y) // ECDSA publickey struct layout should match the struct used by // parseECDSACert in the x/crypto/ssh/agent package. w := struct { @@ -605,20 +605,20 @@ func (key *ecdsaPublicKey) Marshal() []byte { ID string Key []byte }{ - key.Type(), - key.nistID(), + k.Type(), + k.nistID(), keyBytes, } return Marshal(&w) } -func (key *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { - if sig.Format != key.Type() { - return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, key.Type()) +func (k *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { + if sig.Format != k.Type() { + return fmt.Errorf("ssh: signature type %s for key type %s", sig.Format, k.Type()) } - h := ecHash(key.Curve).New() + h := ecHash(k.Curve).New() h.Write(data) digest := h.Sum(nil) @@ -635,7 +635,7 @@ func (key *ecdsaPublicKey) Verify(data []byte, sig *Signature) error { return err } - if ecdsa.Verify((*ecdsa.PublicKey)(key), digest, ecSig.R, ecSig.S) { + if ecdsa.Verify((*ecdsa.PublicKey)(k), digest, ecSig.R, ecSig.S) { return nil } return errors.New("ssh: signature did not verify") @@ -758,7 +758,7 @@ func NewPublicKey(key interface{}) (PublicKey, error) { return (*rsaPublicKey)(key), nil case *ecdsa.PublicKey: if !supportedEllipticCurve(key.Curve) { - return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported.") + return nil, errors.New("ssh: only P-256, P-384 and P-521 EC keys are supported") } return (*ecdsaPublicKey)(key), nil case *dsa.PublicKey: diff --git a/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go b/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go index ea92b29..448fc07 100644 --- a/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go +++ b/vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go @@ -108,8 +108,8 @@ func wildcardMatch(pat []byte, str []byte) bool { } } -func (l *hostPattern) match(a addr) bool { - return wildcardMatch([]byte(l.addr.host), []byte(a.host)) && l.addr.port == a.port +func (p *hostPattern) match(a addr) bool { + return wildcardMatch([]byte(p.addr.host), []byte(a.host)) && p.addr.port == a.port } type keyDBLine struct { diff --git a/vendor/golang.org/x/crypto/ssh/messages.go b/vendor/golang.org/x/crypto/ssh/messages.go index e6ecd3a..08d2811 100644 --- a/vendor/golang.org/x/crypto/ssh/messages.go +++ b/vendor/golang.org/x/crypto/ssh/messages.go @@ -23,10 +23,6 @@ const ( msgUnimplemented = 3 msgDebug = 4 msgNewKeys = 21 - - // Standard authentication messages - msgUserAuthSuccess = 52 - msgUserAuthBanner = 53 ) // SSH messages: @@ -137,6 +133,18 @@ type userAuthFailureMsg struct { PartialSuccess bool } +// See RFC 4252, section 5.1 +const msgUserAuthSuccess = 52 + +// See RFC 4252, section 5.4 +const msgUserAuthBanner = 53 + +type userAuthBannerMsg struct { + Message string `sshtype:"53"` + // unused, but required to allow message parsing + Language string +} + // See RFC 4256, section 3.2 const msgUserAuthInfoRequest = 60 const msgUserAuthInfoResponse = 61 @@ -154,7 +162,7 @@ const msgChannelOpen = 90 type channelOpenMsg struct { ChanType string `sshtype:"90"` - PeersId uint32 + PeersID uint32 PeersWindow uint32 MaxPacketSize uint32 TypeSpecificData []byte `ssh:"rest"` @@ -165,7 +173,7 @@ const msgChannelData = 94 // Used for debug print outs of packets. type channelDataMsg struct { - PeersId uint32 `sshtype:"94"` + PeersID uint32 `sshtype:"94"` Length uint32 Rest []byte `ssh:"rest"` } @@ -174,8 +182,8 @@ type channelDataMsg struct { const msgChannelOpenConfirm = 91 type channelOpenConfirmMsg struct { - PeersId uint32 `sshtype:"91"` - MyId uint32 + PeersID uint32 `sshtype:"91"` + MyID uint32 MyWindow uint32 MaxPacketSize uint32 TypeSpecificData []byte `ssh:"rest"` @@ -185,7 +193,7 @@ type channelOpenConfirmMsg struct { const msgChannelOpenFailure = 92 type channelOpenFailureMsg struct { - PeersId uint32 `sshtype:"92"` + PeersID uint32 `sshtype:"92"` Reason RejectionReason Message string Language string @@ -194,7 +202,7 @@ type channelOpenFailureMsg struct { const msgChannelRequest = 98 type channelRequestMsg struct { - PeersId uint32 `sshtype:"98"` + PeersID uint32 `sshtype:"98"` Request string WantReply bool RequestSpecificData []byte `ssh:"rest"` @@ -204,28 +212,28 @@ type channelRequestMsg struct { const msgChannelSuccess = 99 type channelRequestSuccessMsg struct { - PeersId uint32 `sshtype:"99"` + PeersID uint32 `sshtype:"99"` } // See RFC 4254, section 5.4. const msgChannelFailure = 100 type channelRequestFailureMsg struct { - PeersId uint32 `sshtype:"100"` + PeersID uint32 `sshtype:"100"` } // See RFC 4254, section 5.3 const msgChannelClose = 97 type channelCloseMsg struct { - PeersId uint32 `sshtype:"97"` + PeersID uint32 `sshtype:"97"` } // See RFC 4254, section 5.3 const msgChannelEOF = 96 type channelEOFMsg struct { - PeersId uint32 `sshtype:"96"` + PeersID uint32 `sshtype:"96"` } // See RFC 4254, section 4 @@ -255,7 +263,7 @@ type globalRequestFailureMsg struct { const msgChannelWindowAdjust = 93 type windowAdjustMsg struct { - PeersId uint32 `sshtype:"93"` + PeersID uint32 `sshtype:"93"` AdditionalBytes uint32 } diff --git a/vendor/golang.org/x/crypto/ssh/mux.go b/vendor/golang.org/x/crypto/ssh/mux.go index 27a527c..f190162 100644 --- a/vendor/golang.org/x/crypto/ssh/mux.go +++ b/vendor/golang.org/x/crypto/ssh/mux.go @@ -278,7 +278,7 @@ func (m *mux) handleChannelOpen(packet []byte) error { if msg.MaxPacketSize < minPacketLength || msg.MaxPacketSize > 1<<31 { failMsg := channelOpenFailureMsg{ - PeersId: msg.PeersId, + PeersID: msg.PeersID, Reason: ConnectionFailed, Message: "invalid request", Language: "en_US.UTF-8", @@ -287,7 +287,7 @@ func (m *mux) handleChannelOpen(packet []byte) error { } c := m.newChannel(msg.ChanType, channelInbound, msg.TypeSpecificData) - c.remoteId = msg.PeersId + c.remoteId = msg.PeersID c.maxRemotePayload = msg.MaxPacketSize c.remoteWin.add(msg.PeersWindow) m.incomingChannels <- c @@ -313,7 +313,7 @@ func (m *mux) openChannel(chanType string, extra []byte) (*channel, error) { PeersWindow: ch.myWindow, MaxPacketSize: ch.maxIncomingPayload, TypeSpecificData: extra, - PeersId: ch.localId, + PeersID: ch.localId, } if err := m.sendMessage(open); err != nil { return nil, err diff --git a/vendor/golang.org/x/crypto/ssh/server.go b/vendor/golang.org/x/crypto/ssh/server.go index 8a78b7c..b83d473 100644 --- a/vendor/golang.org/x/crypto/ssh/server.go +++ b/vendor/golang.org/x/crypto/ssh/server.go @@ -95,6 +95,10 @@ type ServerConfig struct { // Note that RFC 4253 section 4.2 requires that this string start with // "SSH-2.0-". ServerVersion string + + // BannerCallback, if present, is called and the return string is sent to + // the client after key exchange completed but before authentication. + BannerCallback func(conn ConnMetadata) string } // AddHostKey adds a private key as a host key. If an existing host @@ -252,7 +256,7 @@ func (s *connection) serverHandshake(config *ServerConfig) (*Permissions, error) func isAcceptableAlgo(algo string) bool { switch algo { case KeyAlgoRSA, KeyAlgoDSA, KeyAlgoECDSA256, KeyAlgoECDSA384, KeyAlgoECDSA521, KeyAlgoED25519, - CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01: + CertAlgoRSAv01, CertAlgoDSAv01, CertAlgoECDSA256v01, CertAlgoECDSA384v01, CertAlgoECDSA521v01, CertAlgoED25519v01: return true } return false @@ -312,6 +316,7 @@ func (s *connection) serverAuthenticate(config *ServerConfig) (*Permissions, err authFailures := 0 var authErrs []error + var displayedBanner bool userAuthLoop: for { @@ -343,6 +348,20 @@ userAuthLoop: } s.user = userAuthReq.User + + if !displayedBanner && config.BannerCallback != nil { + displayedBanner = true + msg := config.BannerCallback(s) + if msg != "" { + bannerMsg := &userAuthBannerMsg{ + Message: msg, + } + if err := s.transport.writePacket(Marshal(bannerMsg)); err != nil { + return nil, err + } + } + } + perms = nil authErr := errors.New("no auth passed yet") diff --git a/vendor/golang.org/x/crypto/ssh/session.go b/vendor/golang.org/x/crypto/ssh/session.go index cc06e03..d3321f6 100644 --- a/vendor/golang.org/x/crypto/ssh/session.go +++ b/vendor/golang.org/x/crypto/ssh/session.go @@ -406,7 +406,7 @@ func (s *Session) Wait() error { s.stdinPipeWriter.Close() } var copyError error - for _ = range s.copyFuncs { + for range s.copyFuncs { if err := <-s.errors; err != nil && copyError == nil { copyError = err } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index 18379a9..9a88759 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -617,7 +617,7 @@ func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) { if _, err = w.Write(crlf); err != nil { return n, err } - n += 1 + n++ buf = buf[1:] } } diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go index e7404ff..02dad48 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util.go @@ -17,44 +17,41 @@ package terminal // import "golang.org/x/crypto/ssh/terminal" import ( - "syscall" - "unsafe" - "golang.org/x/sys/unix" ) // State contains the state of a terminal. type State struct { - termios syscall.Termios + termios unix.Termios } // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd int) bool { - var termios syscall.Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil } // MakeRaw put the terminal connected to the given file descriptor into raw // mode and returns the previous state of the terminal so that it can be // restored. func MakeRaw(fd int) (*State, error) { - var oldState State - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { return nil, err } - newState := oldState.termios + oldState := State{termios: *termios} + // This attempts to replicate the behaviour documented for cfmakeraw in // the termios(3) manpage. - newState.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON - newState.Oflag &^= syscall.OPOST - newState.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN - newState.Cflag &^= syscall.CSIZE | syscall.PARENB - newState.Cflag |= syscall.CS8 - newState.Cc[unix.VMIN] = 1 - newState.Cc[unix.VTIME] = 0 - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 { + termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON + termios.Oflag &^= unix.OPOST + termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN + termios.Cflag &^= unix.CSIZE | unix.PARENB + termios.Cflag |= unix.CS8 + termios.Cc[unix.VMIN] = 1 + termios.Cc[unix.VTIME] = 0 + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil { return nil, err } @@ -64,59 +61,55 @@ func MakeRaw(fd int) (*State, error) { // GetState returns the current state of a terminal which may be useful to // restore the terminal after a signal. func GetState(fd int) (*State, error) { - var oldState State - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState.termios)), 0, 0, 0); err != 0 { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { return nil, err } - return &oldState, nil + return &State{termios: *termios}, nil } // Restore restores the terminal connected to the given file descriptor to a // previous state. func Restore(fd int, state *State) error { - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&state.termios)), 0, 0, 0); err != 0 { - return err - } - return nil + return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios) } // GetSize returns the dimensions of the given terminal. func GetSize(fd int) (width, height int, err error) { - var dimensions [4]uint16 - - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&dimensions)), 0, 0, 0); err != 0 { + ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) + if err != nil { return -1, -1, err } - return int(dimensions[1]), int(dimensions[0]), nil + return int(ws.Col), int(ws.Row), nil } // passwordReader is an io.Reader that reads from a specific file descriptor. type passwordReader int func (r passwordReader) Read(buf []byte) (int, error) { - return syscall.Read(int(r), buf) + return unix.Read(int(r), buf) } // ReadPassword reads a line of input from a terminal without local echo. This // is commonly used for inputting passwords and other sensitive data. The slice // returned does not include the \n. func ReadPassword(fd int) ([]byte, error) { - var oldState syscall.Termios - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0); err != 0 { + termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + if err != nil { return nil, err } - newState := oldState - newState.Lflag &^= syscall.ECHO - newState.Lflag |= syscall.ICANON | syscall.ISIG - newState.Iflag |= syscall.ICRNL - if _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&newState)), 0, 0, 0); err != 0 { + newState := *termios + newState.Lflag &^= unix.ECHO + newState.Lflag |= unix.ICANON | unix.ISIG + newState.Iflag |= unix.ICRNL + if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil { return nil, err } defer func() { - syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlWriteTermios, uintptr(unsafe.Pointer(&oldState)), 0, 0, 0) + unix.IoctlSetTermios(fd, ioctlWriteTermios, termios) }() return readPasswordLine(passwordReader(fd)) diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go index 60979cc..92944f3 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go @@ -17,6 +17,8 @@ package terminal import ( + "os" + "golang.org/x/sys/windows" ) @@ -71,13 +73,6 @@ func GetSize(fd int) (width, height int, err error) { return int(info.Size.X), int(info.Size.Y), nil } -// passwordReader is an io.Reader that reads from a specific Windows HANDLE. -type passwordReader int - -func (r passwordReader) Read(buf []byte) (int, error) { - return windows.Read(windows.Handle(r), buf) -} - // ReadPassword reads a line of input from a terminal without local echo. This // is commonly used for inputting passwords and other sensitive data. The slice // returned does not include the \n. @@ -98,5 +93,5 @@ func ReadPassword(fd int) ([]byte, error) { windows.SetConsoleMode(windows.Handle(fd), old) }() - return readPasswordLine(passwordReader(fd)) + return readPasswordLine(os.NewFile(uintptr(fd), "stdin")) } diff --git a/vendor/golang.org/x/crypto/ssh/test/banner_test.go b/vendor/golang.org/x/crypto/ssh/test/banner_test.go new file mode 100644 index 0000000..d3b21ac --- /dev/null +++ b/vendor/golang.org/x/crypto/ssh/test/banner_test.go @@ -0,0 +1,32 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package test + +import ( + "testing" +) + +func TestBannerCallbackAgainstOpenSSH(t *testing.T) { + server := newServer(t) + defer server.Shutdown() + + clientConf := clientConfig() + + var receivedBanner string + clientConf.BannerCallback = func(message string) error { + receivedBanner = message + return nil + } + + conn := server.Dial(clientConf) + defer conn.Close() + + expected := "Server Banner" + if receivedBanner != expected { + t.Fatalf("got %v; want %v", receivedBanner, expected) + } +} diff --git a/vendor/golang.org/x/crypto/ssh/test/doc.go b/vendor/golang.org/x/crypto/ssh/test/doc.go index 3f9b334..198f0ca 100644 --- a/vendor/golang.org/x/crypto/ssh/test/doc.go +++ b/vendor/golang.org/x/crypto/ssh/test/doc.go @@ -2,6 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// This package contains integration tests for the +// Package test contains integration tests for the // golang.org/x/crypto/ssh package. package test // import "golang.org/x/crypto/ssh/test" diff --git a/vendor/golang.org/x/crypto/ssh/test/session_test.go b/vendor/golang.org/x/crypto/ssh/test/session_test.go index 8238d9d..7588b0c 100644 --- a/vendor/golang.org/x/crypto/ssh/test/session_test.go +++ b/vendor/golang.org/x/crypto/ssh/test/session_test.go @@ -324,30 +324,33 @@ func TestWindowChange(t *testing.T) { } } +var deprecatedCiphers = []string{ + "aes128-cbc", "3des-cbc", + "arcfour128", "arcfour256", +} + func TestCiphers(t *testing.T) { var config ssh.Config config.SetDefaults() - cipherOrder := config.Ciphers - // These ciphers will not be tested when commented out in cipher.go it will - // fallback to the next available as per line 292. - cipherOrder = append(cipherOrder, "aes128-cbc", "3des-cbc") + cipherOrder := append(config.Ciphers, deprecatedCiphers...) for _, ciph := range cipherOrder { - server := newServer(t) - defer server.Shutdown() - conf := clientConfig() - conf.Ciphers = []string{ciph} - // Don't fail if sshd doesn't have the cipher. - conf.Ciphers = append(conf.Ciphers, cipherOrder...) - conn, err := server.TryDial(conf) - if err == nil { - conn.Close() - } else { - t.Fatalf("failed for cipher %q", ciph) - } + t.Run(ciph, func(t *testing.T) { + server := newServer(t) + defer server.Shutdown() + conf := clientConfig() + conf.Ciphers = []string{ciph} + // Don't fail if sshd doesn't have the cipher. + conf.Ciphers = append(conf.Ciphers, cipherOrder...) + conn, err := server.TryDial(conf) + if err == nil { + conn.Close() + } else { + t.Fatalf("failed for cipher %q", ciph) + } + }) } } - func TestMACs(t *testing.T) { var config ssh.Config config.SetDefaults() diff --git a/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go b/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go index e673536..15b879d 100644 --- a/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go +++ b/vendor/golang.org/x/crypto/ssh/test/test_unix_test.go @@ -25,8 +25,9 @@ import ( "golang.org/x/crypto/ssh/testdata" ) -const sshd_config = ` +const sshdConfig = ` Protocol 2 +Banner {{.Dir}}/banner HostKey {{.Dir}}/id_rsa HostKey {{.Dir}}/id_dsa HostKey {{.Dir}}/id_ecdsa @@ -50,7 +51,7 @@ HostbasedAuthentication no PubkeyAcceptedKeyTypes=* ` -var configTmpl = template.Must(template.New("").Parse(sshd_config)) +var configTmpl = template.Must(template.New("").Parse(sshdConfig)) type server struct { t *testing.T @@ -256,6 +257,8 @@ func newServer(t *testing.T) *server { } f.Close() + writeFile(filepath.Join(dir, "banner"), []byte("Server Banner")) + for k, v := range testdata.PEMBytes { filename := "id_" + k writeFile(filepath.Join(dir, filename), v) @@ -268,7 +271,7 @@ func newServer(t *testing.T) *server { } var authkeys bytes.Buffer - for k, _ := range testdata.PEMBytes { + for k := range testdata.PEMBytes { authkeys.Write(ssh.MarshalAuthorizedKey(testPublicKeys[k])) } writeFile(filepath.Join(dir, "authorized_keys"), authkeys.Bytes()) diff --git a/vendor/golang.org/x/crypto/ssh/testdata/keys.go b/vendor/golang.org/x/crypto/ssh/testdata/keys.go index 3b3d26c..521b6be 100644 --- a/vendor/golang.org/x/crypto/ssh/testdata/keys.go +++ b/vendor/golang.org/x/crypto/ssh/testdata/keys.go @@ -23,6 +23,27 @@ MHcCAQEEINGWx0zo6fhJ/0EAfrPzVFyFC9s18lBt3cRoEDhS3ARooAoGCCqGSM49 AwEHoUQDQgAEi9Hdw6KvZcWxfg2IDhA7UkpDtzzt6ZqJXSsFdLd+Kx4S3Sx4cVO+ 6/ZOXRnPmNAlLUqjShUsUBBngG0u2fqEqA== -----END EC PRIVATE KEY----- +`), + "ecdsap256": []byte(`-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIAPCE25zK0PQSnsgVcEbM1mbKTASH4pqb5QJajplDwDZoAoGCCqGSM49 +AwEHoUQDQgAEWy8TxGcIHRh5XGpO4dFVfDjeNY+VkgubQrf/eyFJZHxAn1SKraXU +qJUjTKj1z622OxYtJ5P7s9CfAEVsTzLCzg== +-----END EC PRIVATE KEY----- +`), + "ecdsap384": []byte(`-----BEGIN EC PRIVATE KEY----- +MIGkAgEBBDBWfSnMuNKq8J9rQLzzEkx3KAoEohSXqhE/4CdjEYtoU2i22HW80DDS +qQhYNHRAduygBwYFK4EEACKhZANiAAQWaDMAd0HUd8ZiXCX7mYDDnC54gwH/nG43 +VhCUEYmF7HMZm/B9Yn3GjFk3qYEDEvuF/52+NvUKBKKaLbh32AWxMv0ibcoba4cz +hL9+hWYhUD9XIUlzMWiZ2y6eBE9PdRI= +-----END EC PRIVATE KEY----- +`), + "ecdsap521": []byte(`-----BEGIN EC PRIVATE KEY----- +MIHcAgEBBEIBrkYpQcy8KTVHNiAkjlFZwee90224Bu6wz94R4OBo+Ts0eoAQG7SF +iaygEDMUbx6kTgXTBcKZ0jrWPKakayNZ/kigBwYFK4EEACOhgYkDgYYABADFuvLV +UoaCDGHcw5uNfdRIsvaLKuWSpLsl48eWGZAwdNG432GDVKduO+pceuE+8XzcyJb+ +uMv+D2b11Q/LQUcHJwE6fqbm8m3EtDKPsoKs0u/XUJb0JsH4J8lkZzbUTjvGYamn +FFlRjzoB3Oxu8UQgb+MWPedtH9XYBbg9biz4jJLkXQ== +-----END EC PRIVATE KEY----- `), "rsa": []byte(`-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQC8A6FGHDiWCSREAXCq6yBfNVr0xCVG2CzvktFNRpue+RXrGs/2 diff --git a/vendor/golang.org/x/crypto/ssh/transport.go b/vendor/golang.org/x/crypto/ssh/transport.go index f9780e0..f6fae1d 100644 --- a/vendor/golang.org/x/crypto/ssh/transport.go +++ b/vendor/golang.org/x/crypto/ssh/transport.go @@ -6,6 +6,7 @@ package ssh import ( "bufio" + "bytes" "errors" "io" "log" @@ -76,17 +77,17 @@ type connectionState struct { // both directions are triggered by reading and writing a msgNewKey packet // respectively. func (t *transport) prepareKeyChange(algs *algorithms, kexResult *kexResult) error { - if ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult); err != nil { + ciph, err := newPacketCipher(t.reader.dir, algs.r, kexResult) + if err != nil { return err - } else { - t.reader.pendingKeyChange <- ciph } + t.reader.pendingKeyChange <- ciph - if ciph, err := newPacketCipher(t.writer.dir, algs.w, kexResult); err != nil { + ciph, err = newPacketCipher(t.writer.dir, algs.w, kexResult) + if err != nil { return err - } else { - t.writer.pendingKeyChange <- ciph } + t.writer.pendingKeyChange <- ciph return nil } @@ -139,7 +140,7 @@ func (s *connectionState) readPacket(r *bufio.Reader) ([]byte, error) { case cipher := <-s.pendingKeyChange: s.packetCipher = cipher default: - return nil, errors.New("ssh: got bogus newkeys message.") + return nil, errors.New("ssh: got bogus newkeys message") } case msgDisconnect: @@ -232,52 +233,22 @@ var ( clientKeys = direction{[]byte{'A'}, []byte{'C'}, []byte{'E'}} ) -// generateKeys generates key material for IV, MAC and encryption. -func generateKeys(d direction, algs directionAlgorithms, kex *kexResult) (iv, key, macKey []byte) { - cipherMode := cipherModes[algs.Cipher] - macMode := macModes[algs.MAC] - - iv = make([]byte, cipherMode.ivSize) - key = make([]byte, cipherMode.keySize) - macKey = make([]byte, macMode.keySize) - - generateKeyMaterial(iv, d.ivTag, kex) - generateKeyMaterial(key, d.keyTag, kex) - generateKeyMaterial(macKey, d.macKeyTag, kex) - return -} - // setupKeys sets the cipher and MAC keys from kex.K, kex.H and sessionId, as // described in RFC 4253, section 6.4. direction should either be serverKeys // (to setup server->client keys) or clientKeys (for client->server keys). func newPacketCipher(d direction, algs directionAlgorithms, kex *kexResult) (packetCipher, error) { - iv, key, macKey := generateKeys(d, algs, kex) + cipherMode := cipherModes[algs.Cipher] + macMode := macModes[algs.MAC] - if algs.Cipher == gcmCipherID { - return newGCMCipher(iv, key, macKey) - } + iv := make([]byte, cipherMode.ivSize) + key := make([]byte, cipherMode.keySize) + macKey := make([]byte, macMode.keySize) - if algs.Cipher == aes128cbcID { - return newAESCBCCipher(iv, key, macKey, algs) - } + generateKeyMaterial(iv, d.ivTag, kex) + generateKeyMaterial(key, d.keyTag, kex) + generateKeyMaterial(macKey, d.macKeyTag, kex) - if algs.Cipher == tripledescbcID { - return newTripleDESCBCCipher(iv, key, macKey, algs) - } - - c := &streamPacketCipher{ - mac: macModes[algs.MAC].new(macKey), - etm: macModes[algs.MAC].etm, - } - c.macResult = make([]byte, c.mac.Size()) - - var err error - c.cipher, err = cipherModes[algs.Cipher].createStream(key, iv) - if err != nil { - return nil, err - } - - return c, nil + return cipherModes[algs.Cipher].create(key, iv, macKey, algs) } // generateKeyMaterial fills out with key material generated from tag, K, H @@ -342,7 +313,7 @@ func readVersion(r io.Reader) ([]byte, error) { var ok bool var buf [1]byte - for len(versionString) < maxVersionStringBytes { + for length := 0; length < maxVersionStringBytes; length++ { _, err := io.ReadFull(r, buf[:]) if err != nil { return nil, err @@ -350,6 +321,13 @@ func readVersion(r io.Reader) ([]byte, error) { // The RFC says that the version should be terminated with \r\n // but several SSH servers actually only send a \n. if buf[0] == '\n' { + if !bytes.HasPrefix(versionString, []byte("SSH-")) { + // RFC 4253 says we need to ignore all version string lines + // except the one containing the SSH version (provided that + // all the lines do not exceed 255 bytes in total). + versionString = versionString[:0] + continue + } ok = true break } diff --git a/vendor/golang.org/x/crypto/ssh/transport_test.go b/vendor/golang.org/x/crypto/ssh/transport_test.go index 92d83ab..8445e1e 100644 --- a/vendor/golang.org/x/crypto/ssh/transport_test.go +++ b/vendor/golang.org/x/crypto/ssh/transport_test.go @@ -13,11 +13,13 @@ import ( ) func TestReadVersion(t *testing.T) { - longversion := strings.Repeat("SSH-2.0-bla", 50)[:253] + longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] + multiLineVersion := strings.Repeat("ignored\r\n", 20) + "SSH-2.0-bla\r\n" cases := map[string]string{ "SSH-2.0-bla\r\n": "SSH-2.0-bla", "SSH-2.0-bla\n": "SSH-2.0-bla", - longversion + "\r\n": longversion, + multiLineVersion: "SSH-2.0-bla", + longVersion + "\r\n": longVersion, } for in, want := range cases { @@ -33,9 +35,11 @@ func TestReadVersion(t *testing.T) { } func TestReadVersionError(t *testing.T) { - longversion := strings.Repeat("SSH-2.0-bla", 50)[:253] + longVersion := strings.Repeat("SSH-2.0-bla", 50)[:253] + multiLineVersion := strings.Repeat("ignored\r\n", 50) + "SSH-2.0-bla\r\n" cases := []string{ - longversion + "too-long\r\n", + longVersion + "too-long\r\n", + multiLineVersion, } for _, in := range cases { if _, err := readVersion(bytes.NewBufferString(in)); err == nil { @@ -60,7 +64,7 @@ func TestExchangeVersionsBasic(t *testing.T) { func TestExchangeVersions(t *testing.T) { cases := []string{ "not\x000allowed", - "not allowed\n", + "not allowed\x01\r\n", } for _, c := range cases { buf := bytes.NewBufferString("SSH-2.0-bla\r\n") diff --git a/vendor/golang.org/x/crypto/tea/cipher.go b/vendor/golang.org/x/crypto/tea/cipher.go index 9c13d12..ce223b2 100644 --- a/vendor/golang.org/x/crypto/tea/cipher.go +++ b/vendor/golang.org/x/crypto/tea/cipher.go @@ -5,7 +5,6 @@ // Package tea implements the TEA algorithm, as defined in Needham and // Wheeler's 1994 technical report, “TEA, a Tiny Encryption Algorithm”. See // http://www.cix.co.uk/~klockstone/tea.pdf for details. - package tea import ( diff --git a/vendor/golang.org/x/crypto/xtea/cipher.go b/vendor/golang.org/x/crypto/xtea/cipher.go index 108b426..66ea0df 100644 --- a/vendor/golang.org/x/crypto/xtea/cipher.go +++ b/vendor/golang.org/x/crypto/xtea/cipher.go @@ -69,7 +69,7 @@ func initCipher(c *Cipher, key []byte) { // Precalculate the table const delta = 0x9E3779B9 - var sum uint32 = 0 + var sum uint32 // Two rounds of XTEA applied per loop for i := 0; i < numRounds; { diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message.go b/vendor/golang.org/x/net/dns/dnsmessage/message.go index c7244b7..ea94bd4 100644 --- a/vendor/golang.org/x/net/dns/dnsmessage/message.go +++ b/vendor/golang.org/x/net/dns/dnsmessage/message.go @@ -13,7 +13,7 @@ import ( "errors" ) -// Packet formats +// Message formats // A Type is a type of DNS request and response. type Type uint16 @@ -826,8 +826,8 @@ func (m *Message) AppendPack(b []byte) ([]byte, error) { // unconditionally enabling it is fine. // // DNS lookups are typically done over UDP, and RFC 1035 states that UDP - // DNS packets can be a maximum of 512 bytes long. Without compression, - // many DNS response packets are over this limit, so enabling + // DNS messages can be a maximum of 512 bytes long. Without compression, + // many DNS response messages are over this limit, so enabling // compression will help ensure compliance. compression := map[string]int{} @@ -1207,7 +1207,7 @@ func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error { return nil } -// Finish ends message building and generates a binary packet. +// Finish ends message building and generates a binary message. func (b *Builder) Finish() ([]byte, error) { if b.section < sectionHeader { return nil, ErrNotStarted diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go index 94f4968..822ed42 100644 --- a/vendor/golang.org/x/net/html/doc.go +++ b/vendor/golang.org/x/net/html/doc.go @@ -49,18 +49,18 @@ call to Next. For example, to extract an HTML page's anchor text: for { tt := z.Next() switch tt { - case ErrorToken: + case html.ErrorToken: return z.Err() - case TextToken: + case html.TextToken: if depth > 0 { // emitBytes should copy the []byte it receives, // if it doesn't process it immediately. emitBytes(z.Text()) } - case StartTagToken, EndTagToken: + case html.StartTagToken, html.EndTagToken: tn, _ := z.TagName() if len(tn) == 1 && tn[0] == 'a' { - if tt == StartTagToken { + if tt == html.StartTagToken { depth++ } else { depth-- diff --git a/vendor/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go index 893e272..e3c01d7 100644 --- a/vendor/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -1161,8 +1161,8 @@ func (z *Tokenizer) TagAttr() (key, val []byte, moreAttr bool) { return nil, nil, false } -// Token returns the next Token. The result's Data and Attr values remain valid -// after subsequent Next calls. +// Token returns the current Token. The result's Data and Attr values remain +// valid after subsequent Next calls. func (z *Tokenizer) Token() Token { t := Token{Type: z.tt} switch z.tt { diff --git a/vendor/golang.org/x/net/http/httpproxy/export_test.go b/vendor/golang.org/x/net/http/httpproxy/export_test.go new file mode 100644 index 0000000..36b29d2 --- /dev/null +++ b/vendor/golang.org/x/net/http/httpproxy/export_test.go @@ -0,0 +1,7 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package httpproxy + +var ExportUseProxy = (*Config).useProxy diff --git a/vendor/golang.org/x/net/http/httpproxy/go19_test.go b/vendor/golang.org/x/net/http/httpproxy/go19_test.go new file mode 100644 index 0000000..2117ca5 --- /dev/null +++ b/vendor/golang.org/x/net/http/httpproxy/go19_test.go @@ -0,0 +1,13 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package httpproxy_test + +import "testing" + +func init() { + setHelper = func(t *testing.T) { t.Helper() } +} diff --git a/vendor/golang.org/x/net/http/httpproxy/proxy.go b/vendor/golang.org/x/net/http/httpproxy/proxy.go new file mode 100644 index 0000000..cbe1d2a --- /dev/null +++ b/vendor/golang.org/x/net/http/httpproxy/proxy.go @@ -0,0 +1,239 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package httpproxy provides support for HTTP proxy determination +// based on environment variables, as provided by net/http's +// ProxyFromEnvironment function. +// +// The API is not subject to the Go 1 compatibility promise and may change at +// any time. +package httpproxy + +import ( + "errors" + "fmt" + "net" + "net/url" + "os" + "strings" + "unicode/utf8" + + "golang.org/x/net/idna" +) + +// Config holds configuration for HTTP proxy settings. See +// FromEnvironment for details. +type Config struct { + // HTTPProxy represents the value of the HTTP_PROXY or + // http_proxy environment variable. It will be used as the proxy + // URL for HTTP requests and HTTPS requests unless overridden by + // HTTPSProxy or NoProxy. + HTTPProxy string + + // HTTPSProxy represents the HTTPS_PROXY or https_proxy + // environment variable. It will be used as the proxy URL for + // HTTPS requests unless overridden by NoProxy. + HTTPSProxy string + + // NoProxy represents the NO_PROXY or no_proxy environment + // variable. It specifies URLs that should be excluded from + // proxying as a comma-separated list of domain names or a + // single asterisk (*) to indicate that no proxying should be + // done. A domain name matches that name and all subdomains. A + // domain name with a leading "." matches subdomains only. For + // example "foo.com" matches "foo.com" and "bar.foo.com"; + // ".y.com" matches "x.y.com" but not "y.com". + NoProxy string + + // CGI holds whether the current process is running + // as a CGI handler (FromEnvironment infers this from the + // presence of a REQUEST_METHOD environment variable). + // When this is set, ProxyForURL will return an error + // when HTTPProxy applies, because a client could be + // setting HTTP_PROXY maliciously. See https://golang.org/s/cgihttpproxy. + CGI bool +} + +// FromEnvironment returns a Config instance populated from the +// environment variables HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the +// lowercase versions thereof). HTTPS_PROXY takes precedence over +// HTTP_PROXY for https requests. +// +// The environment values may be either a complete URL or a +// "host[:port]", in which case the "http" scheme is assumed. An error +// is returned if the value is a different form. +func FromEnvironment() *Config { + return &Config{ + HTTPProxy: getEnvAny("HTTP_PROXY", "http_proxy"), + HTTPSProxy: getEnvAny("HTTPS_PROXY", "https_proxy"), + NoProxy: getEnvAny("NO_PROXY", "no_proxy"), + CGI: os.Getenv("REQUEST_METHOD") != "", + } +} + +func getEnvAny(names ...string) string { + for _, n := range names { + if val := os.Getenv(n); val != "" { + return val + } + } + return "" +} + +// ProxyFunc returns a function that determines the proxy URL to use for +// a given request URL. Changing the contents of cfg will not affect +// proxy functions created earlier. +// +// A nil URL and nil error are returned if no proxy is defined in the +// environment, or a proxy should not be used for the given request, as +// defined by NO_PROXY. +// +// As a special case, if req.URL.Host is "localhost" (with or without a +// port number), then a nil URL and nil error will be returned. +func (cfg *Config) ProxyFunc() func(reqURL *url.URL) (*url.URL, error) { + // Prevent Config changes from affecting the function calculation. + // TODO Preprocess proxy settings for more efficient evaluation. + cfg1 := *cfg + return cfg1.proxyForURL +} + +func (cfg *Config) proxyForURL(reqURL *url.URL) (*url.URL, error) { + var proxy string + if reqURL.Scheme == "https" { + proxy = cfg.HTTPSProxy + } + if proxy == "" { + proxy = cfg.HTTPProxy + if proxy != "" && cfg.CGI { + return nil, errors.New("refusing to use HTTP_PROXY value in CGI environment; see golang.org/s/cgihttpproxy") + } + } + if proxy == "" { + return nil, nil + } + if !cfg.useProxy(canonicalAddr(reqURL)) { + return nil, nil + } + proxyURL, err := url.Parse(proxy) + if err != nil || + (proxyURL.Scheme != "http" && + proxyURL.Scheme != "https" && + proxyURL.Scheme != "socks5") { + // proxy was bogus. Try prepending "http://" to it and + // see if that parses correctly. If not, we fall + // through and complain about the original one. + if proxyURL, err := url.Parse("http://" + proxy); err == nil { + return proxyURL, nil + } + } + if err != nil { + return nil, fmt.Errorf("invalid proxy address %q: %v", proxy, err) + } + return proxyURL, nil +} + +// useProxy reports whether requests to addr should use a proxy, +// according to the NO_PROXY or no_proxy environment variable. +// addr is always a canonicalAddr with a host and port. +func (cfg *Config) useProxy(addr string) bool { + if len(addr) == 0 { + return true + } + host, _, err := net.SplitHostPort(addr) + if err != nil { + return false + } + if host == "localhost" { + return false + } + if ip := net.ParseIP(host); ip != nil { + if ip.IsLoopback() { + return false + } + } + + noProxy := cfg.NoProxy + if noProxy == "*" { + return false + } + + addr = strings.ToLower(strings.TrimSpace(addr)) + if hasPort(addr) { + addr = addr[:strings.LastIndex(addr, ":")] + } + + for _, p := range strings.Split(noProxy, ",") { + p = strings.ToLower(strings.TrimSpace(p)) + if len(p) == 0 { + continue + } + if hasPort(p) { + p = p[:strings.LastIndex(p, ":")] + } + if addr == p { + return false + } + if len(p) == 0 { + // There is no host part, likely the entry is malformed; ignore. + continue + } + if p[0] == '.' && (strings.HasSuffix(addr, p) || addr == p[1:]) { + // no_proxy ".foo.com" matches "bar.foo.com" or "foo.com" + return false + } + if p[0] != '.' && strings.HasSuffix(addr, p) && addr[len(addr)-len(p)-1] == '.' { + // no_proxy "foo.com" matches "bar.foo.com" + return false + } + } + return true +} + +var portMap = map[string]string{ + "http": "80", + "https": "443", + "socks5": "1080", +} + +// canonicalAddr returns url.Host but always with a ":port" suffix +func canonicalAddr(url *url.URL) string { + addr := url.Hostname() + if v, err := idnaASCII(addr); err == nil { + addr = v + } + port := url.Port() + if port == "" { + port = portMap[url.Scheme] + } + return net.JoinHostPort(addr, port) +} + +// Given a string of the form "host", "host:port", or "[ipv6::address]:port", +// return true if the string includes a port. +func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } + +func idnaASCII(v string) (string, error) { + // TODO: Consider removing this check after verifying performance is okay. + // Right now punycode verification, length checks, context checks, and the + // permissible character tests are all omitted. It also prevents the ToASCII + // call from salvaging an invalid IDN, when possible. As a result it may be + // possible to have two IDNs that appear identical to the user where the + // ASCII-only version causes an error downstream whereas the non-ASCII + // version does not. + // Note that for correct ASCII IDNs ToASCII will only do considerably more + // work, but it will not cause an allocation. + if isASCII(v) { + return v, nil + } + return idna.Lookup.ToASCII(v) +} + +func isASCII(s string) bool { + for i := 0; i < len(s); i++ { + if s[i] >= utf8.RuneSelf { + return false + } + } + return true +} diff --git a/vendor/golang.org/x/net/http/httpproxy/proxy_test.go b/vendor/golang.org/x/net/http/httpproxy/proxy_test.go new file mode 100644 index 0000000..e4af199 --- /dev/null +++ b/vendor/golang.org/x/net/http/httpproxy/proxy_test.go @@ -0,0 +1,301 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package httpproxy_test + +import ( + "bytes" + "errors" + "fmt" + "net/url" + "os" + "strings" + "testing" + + "golang.org/x/net/http/httpproxy" +) + +// setHelper calls t.Helper() for Go 1.9+ (see go19_test.go) and does nothing otherwise. +var setHelper = func(t *testing.T) {} + +type proxyForURLTest struct { + cfg httpproxy.Config + req string // URL to fetch; blank means "http://example.com" + want string + wanterr error +} + +func (t proxyForURLTest) String() string { + var buf bytes.Buffer + space := func() { + if buf.Len() > 0 { + buf.WriteByte(' ') + } + } + if t.cfg.HTTPProxy != "" { + fmt.Fprintf(&buf, "http_proxy=%q", t.cfg.HTTPProxy) + } + if t.cfg.HTTPSProxy != "" { + space() + fmt.Fprintf(&buf, "https_proxy=%q", t.cfg.HTTPSProxy) + } + if t.cfg.NoProxy != "" { + space() + fmt.Fprintf(&buf, "no_proxy=%q", t.cfg.NoProxy) + } + req := "http://example.com" + if t.req != "" { + req = t.req + } + space() + fmt.Fprintf(&buf, "req=%q", req) + return strings.TrimSpace(buf.String()) +} + +var proxyForURLTests = []proxyForURLTest{{ + cfg: httpproxy.Config{ + HTTPProxy: "127.0.0.1:8080", + }, + want: "http://127.0.0.1:8080", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "cache.corp.example.com:1234", + }, + want: "http://cache.corp.example.com:1234", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "cache.corp.example.com", + }, + want: "http://cache.corp.example.com", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "https://cache.corp.example.com", + }, + want: "https://cache.corp.example.com", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "http://127.0.0.1:8080", + }, + want: "http://127.0.0.1:8080", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "https://127.0.0.1:8080", + }, + want: "https://127.0.0.1:8080", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "socks5://127.0.0.1", + }, + want: "socks5://127.0.0.1", +}, { + // Don't use secure for http + cfg: httpproxy.Config{ + HTTPProxy: "http.proxy.tld", + HTTPSProxy: "secure.proxy.tld", + }, + req: "http://insecure.tld/", + want: "http://http.proxy.tld", +}, { + // Use secure for https. + cfg: httpproxy.Config{ + HTTPProxy: "http.proxy.tld", + HTTPSProxy: "secure.proxy.tld", + }, + req: "https://secure.tld/", + want: "http://secure.proxy.tld", +}, { + cfg: httpproxy.Config{ + HTTPProxy: "http.proxy.tld", + HTTPSProxy: "https://secure.proxy.tld", + }, + req: "https://secure.tld/", + want: "https://secure.proxy.tld", +}, { + // Issue 16405: don't use HTTP_PROXY in a CGI environment, + // where HTTP_PROXY can be attacker-controlled. + cfg: httpproxy.Config{ + HTTPProxy: "http://10.1.2.3:8080", + CGI: true, + }, + want: "", + wanterr: errors.New("refusing to use HTTP_PROXY value in CGI environment; see golang.org/s/cgihttpproxy"), +}, { + // HTTPS proxy is still used even in CGI environment. + // (perhaps dubious but it's the historical behaviour). + cfg: httpproxy.Config{ + HTTPSProxy: "https://secure.proxy.tld", + CGI: true, + }, + req: "https://secure.tld/", + want: "https://secure.proxy.tld", +}, { + want: "", +}, { + cfg: httpproxy.Config{ + NoProxy: "example.com", + HTTPProxy: "proxy", + }, + req: "http://example.com/", + want: "", +}, { + cfg: httpproxy.Config{ + NoProxy: ".example.com", + HTTPProxy: "proxy", + }, + req: "http://example.com/", + want: "", +}, { + cfg: httpproxy.Config{ + NoProxy: "ample.com", + HTTPProxy: "proxy", + }, + req: "http://example.com/", + want: "http://proxy", +}, { + cfg: httpproxy.Config{ + NoProxy: "example.com", + HTTPProxy: "proxy", + }, + req: "http://foo.example.com/", + want: "", +}, { + cfg: httpproxy.Config{ + NoProxy: ".foo.com", + HTTPProxy: "proxy", + }, + req: "http://example.com/", + want: "http://proxy", +}} + +func testProxyForURL(t *testing.T, tt proxyForURLTest) { + setHelper(t) + reqURLStr := tt.req + if reqURLStr == "" { + reqURLStr = "http://example.com" + } + reqURL, err := url.Parse(reqURLStr) + if err != nil { + t.Errorf("invalid URL %q", reqURLStr) + return + } + cfg := tt.cfg + proxyForURL := cfg.ProxyFunc() + url, err := proxyForURL(reqURL) + if g, e := fmt.Sprintf("%v", err), fmt.Sprintf("%v", tt.wanterr); g != e { + t.Errorf("%v: got error = %q, want %q", tt, g, e) + return + } + if got := fmt.Sprintf("%s", url); got != tt.want { + t.Errorf("%v: got URL = %q, want %q", tt, url, tt.want) + } + + // Check that changing the Config doesn't change the results + // of the functuon. + cfg = httpproxy.Config{} + url, err = proxyForURL(reqURL) + if g, e := fmt.Sprintf("%v", err), fmt.Sprintf("%v", tt.wanterr); g != e { + t.Errorf("(after mutating config) %v: got error = %q, want %q", tt, g, e) + return + } + if got := fmt.Sprintf("%s", url); got != tt.want { + t.Errorf("(after mutating config) %v: got URL = %q, want %q", tt, url, tt.want) + } +} + +func TestProxyForURL(t *testing.T) { + for _, tt := range proxyForURLTests { + testProxyForURL(t, tt) + } +} + +func TestFromEnvironment(t *testing.T) { + os.Setenv("HTTP_PROXY", "httpproxy") + os.Setenv("HTTPS_PROXY", "httpsproxy") + os.Setenv("NO_PROXY", "noproxy") + os.Setenv("REQUEST_METHOD", "") + got := httpproxy.FromEnvironment() + want := httpproxy.Config{ + HTTPProxy: "httpproxy", + HTTPSProxy: "httpsproxy", + NoProxy: "noproxy", + } + if *got != want { + t.Errorf("unexpected proxy config, got %#v want %#v", got, want) + } +} + +func TestFromEnvironmentWithRequestMethod(t *testing.T) { + os.Setenv("HTTP_PROXY", "httpproxy") + os.Setenv("HTTPS_PROXY", "httpsproxy") + os.Setenv("NO_PROXY", "noproxy") + os.Setenv("REQUEST_METHOD", "PUT") + got := httpproxy.FromEnvironment() + want := httpproxy.Config{ + HTTPProxy: "httpproxy", + HTTPSProxy: "httpsproxy", + NoProxy: "noproxy", + CGI: true, + } + if *got != want { + t.Errorf("unexpected proxy config, got %#v want %#v", got, want) + } +} + +func TestFromEnvironmentLowerCase(t *testing.T) { + os.Setenv("http_proxy", "httpproxy") + os.Setenv("https_proxy", "httpsproxy") + os.Setenv("no_proxy", "noproxy") + os.Setenv("REQUEST_METHOD", "") + got := httpproxy.FromEnvironment() + want := httpproxy.Config{ + HTTPProxy: "httpproxy", + HTTPSProxy: "httpsproxy", + NoProxy: "noproxy", + } + if *got != want { + t.Errorf("unexpected proxy config, got %#v want %#v", got, want) + } +} + +var UseProxyTests = []struct { + host string + match bool +}{ + // Never proxy localhost: + {"localhost", false}, + {"127.0.0.1", false}, + {"127.0.0.2", false}, + {"[::1]", false}, + {"[::2]", true}, // not a loopback address + + {"barbaz.net", false}, // match as .barbaz.net + {"foobar.com", false}, // have a port but match + {"foofoobar.com", true}, // not match as a part of foobar.com + {"baz.com", true}, // not match as a part of barbaz.com + {"localhost.net", true}, // not match as suffix of address + {"local.localhost", true}, // not match as prefix as address + {"barbarbaz.net", true}, // not match because NO_PROXY have a '.' + {"www.foobar.com", false}, // match because NO_PROXY includes "foobar.com" +} + +func TestUseProxy(t *testing.T) { + cfg := &httpproxy.Config{ + NoProxy: "foobar.com, .barbaz.net", + } + for _, test := range UseProxyTests { + if httpproxy.ExportUseProxy(cfg, test.host+":80") != test.match { + t.Errorf("useProxy(%v) = %v, want %v", test.host, !test.match, test.match) + } + } +} + +func TestInvalidNoProxy(t *testing.T) { + cfg := &httpproxy.Config{ + NoProxy: ":1", + } + ok := httpproxy.ExportUseProxy(cfg, "example.com:80") // should not panic + if !ok { + t.Errorf("useProxy unexpected return; got false; want true") + } +} diff --git a/vendor/golang.org/x/net/http2/configure_transport.go b/vendor/golang.org/x/net/http2/configure_transport.go index b65fc6d..088d6e2 100644 --- a/vendor/golang.org/x/net/http2/configure_transport.go +++ b/vendor/golang.org/x/net/http2/configure_transport.go @@ -73,7 +73,7 @@ type noDialH2RoundTripper struct{ t *Transport } func (rt noDialH2RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { res, err := rt.t.RoundTrip(req) - if err == ErrNoCachedConn { + if isNoCachedConnError(err) { return nil, http.ErrSkipAltProtocol } return res, err diff --git a/vendor/golang.org/x/net/http2/go19_test.go b/vendor/golang.org/x/net/http2/go19_test.go index 1675d24..22b0006 100644 --- a/vendor/golang.org/x/net/http2/go19_test.go +++ b/vendor/golang.org/x/net/http2/go19_test.go @@ -46,7 +46,6 @@ func TestServerGracefulShutdown(t *testing.T) { wanth := [][2]string{ {":status", "200"}, {"x-foo", "bar"}, - {"content-type", "text/plain; charset=utf-8"}, {"content-length", "0"}, } if !reflect.DeepEqual(goth, wanth) { diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index d790c3b..460ede0 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -220,12 +220,15 @@ func ConfigureServer(s *http.Server, conf *Server) error { } else if s.TLSConfig.CipherSuites != nil { // If they already provided a CipherSuite list, return // an error if it has a bad order or is missing - // ECDHE_RSA_WITH_AES_128_GCM_SHA256. - const requiredCipher = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + // ECDHE_RSA_WITH_AES_128_GCM_SHA256 or ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. haveRequired := false sawBad := false for i, cs := range s.TLSConfig.CipherSuites { - if cs == requiredCipher { + switch cs { + case tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + // Alternative MTI cipher to not discourage ECDSA-only servers. + // See http://golang.org/cl/30721 for further information. + tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: haveRequired = true } if isBadCipher(cs) { @@ -235,7 +238,7 @@ func ConfigureServer(s *http.Server, conf *Server) error { } } if !haveRequired { - return fmt.Errorf("http2: TLSConfig.CipherSuites is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256") + return fmt.Errorf("http2: TLSConfig.CipherSuites is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.") } } @@ -649,7 +652,7 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { if err == nil { return } - if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) { + if err == io.EOF || err == io.ErrUnexpectedEOF || isClosedConnError(err) || err == errPrefaceTimeout { // Boring, expected errors. sc.vlogf(format, args...) } else { @@ -894,8 +897,11 @@ func (sc *serverConn) sendServeMsg(msg interface{}) { } } -// readPreface reads the ClientPreface greeting from the peer -// or returns an error on timeout or an invalid greeting. +var errPrefaceTimeout = errors.New("timeout waiting for client preface") + +// readPreface reads the ClientPreface greeting from the peer or +// returns errPrefaceTimeout on timeout, or an error if the greeting +// is invalid. func (sc *serverConn) readPreface() error { errc := make(chan error, 1) go func() { @@ -913,7 +919,7 @@ func (sc *serverConn) readPreface() error { defer timer.Stop() select { case <-timer.C: - return errors.New("timeout waiting for client preface") + return errPrefaceTimeout case err := <-errc: if err == nil { if VerboseLogs { @@ -2316,7 +2322,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { clen = strconv.Itoa(len(p)) } _, hasContentType := rws.snapHeader["Content-Type"] - if !hasContentType && bodyAllowedForStatus(rws.status) { + if !hasContentType && bodyAllowedForStatus(rws.status) && len(p) > 0 { ctype = http.DetectContentType(p) } var date string @@ -2484,6 +2490,24 @@ func (w *responseWriter) Header() http.Header { return rws.handlerHeader } +// checkWriteHeaderCode is a copy of net/http's checkWriteHeaderCode. +func checkWriteHeaderCode(code int) { + // Issue 22880: require valid WriteHeader status codes. + // For now we only enforce that it's three digits. + // In the future we might block things over 599 (600 and above aren't defined + // at http://httpwg.org/specs/rfc7231.html#status.codes) + // and we might block under 200 (once we have more mature 1xx support). + // But for now any three digits. + // + // We used to send "HTTP/1.1 000 0" on the wire in responses but there's + // no equivalent bogus thing we can realistically send in HTTP/2, + // so we'll consistently panic instead and help people find their bugs + // early. (We can't return an error from WriteHeader even if we wanted to.) + if code < 100 || code > 999 { + panic(fmt.Sprintf("invalid WriteHeader code %v", code)) + } +} + func (w *responseWriter) WriteHeader(code int) { rws := w.rws if rws == nil { @@ -2494,6 +2518,7 @@ func (w *responseWriter) WriteHeader(code int) { func (rws *responseWriterState) writeHeader(code int) { if !rws.wroteHeader { + checkWriteHeaderCode(code) rws.wroteHeader = true rws.status = code if len(rws.handlerHeader) > 0 { diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go index d06fdea..bd1ba20 100644 --- a/vendor/golang.org/x/net/http2/server_test.go +++ b/vendor/golang.org/x/net/http2/server_test.go @@ -1718,7 +1718,6 @@ func TestServer_Response_NoData_Header_FooBar(t *testing.T) { wanth := [][2]string{ {":status", "200"}, {"foo-bar", "some-value"}, - {"content-type", "text/plain; charset=utf-8"}, {"content-length", "0"}, } if !reflect.DeepEqual(goth, wanth) { @@ -2953,7 +2952,6 @@ func TestServerDoesntWriteInvalidHeaders(t *testing.T) { wanth := [][2]string{ {":status", "200"}, {"ok1", "x"}, - {"content-type", "text/plain; charset=utf-8"}, {"content-length", "0"}, } if !reflect.DeepEqual(goth, wanth) { @@ -3189,12 +3187,18 @@ func TestConfigureServer(t *testing.T) { CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, }, }, + { + name: "just the alternative required cipher suite", + tlsConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256}, + }, + }, { name: "missing required cipher suite", tlsConfig: &tls.Config{ CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, }, - wantErr: "is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + wantErr: "is missing an HTTP/2-required AES_128_GCM_SHA256 cipher.", }, { name: "required after bad", @@ -3260,7 +3264,6 @@ func TestServerNoAutoContentLengthOnHead(t *testing.T) { headers := st.decodeHeader(h.HeaderBlockFragment()) want := [][2]string{ {":status", "200"}, - {"content-type", "text/plain; charset=utf-8"}, } if !reflect.DeepEqual(headers, want) { t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 4392a09..e6b321f 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -306,7 +306,26 @@ func (sew stickyErrWriter) Write(p []byte) (n int, err error) { return } -var ErrNoCachedConn = errors.New("http2: no cached connection was available") +// noCachedConnError is the concrete type of ErrNoCachedConn, which +// needs to be detected by net/http regardless of whether it's its +// bundled version (in h2_bundle.go with a rewritten type name) or +// from a user's x/net/http2. As such, as it has a unique method name +// (IsHTTP2NoCachedConnError) that net/http sniffs for via func +// isNoCachedConnError. +type noCachedConnError struct{} + +func (noCachedConnError) IsHTTP2NoCachedConnError() {} +func (noCachedConnError) Error() string { return "http2: no cached connection was available" } + +// isNoCachedConnError reports whether err is of type noCachedConnError +// or its equivalent renamed type in net/http2's h2_bundle.go. Both types +// may coexist in the same running program. +func isNoCachedConnError(err error) bool { + _, ok := err.(interface{ IsHTTP2NoCachedConnError() }) + return ok +} + +var ErrNoCachedConn error = noCachedConnError{} // RoundTripOpt are options for the Transport.RoundTripOpt method. type RoundTripOpt struct { @@ -811,7 +830,7 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf cc.wmu.Lock() endStream := !hasBody && !hasTrailers - werr := cc.writeHeaders(cs.ID, endStream, hdrs) + werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs) cc.wmu.Unlock() traceWroteHeaders(cs.trace) cc.mu.Unlock() @@ -964,13 +983,12 @@ func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error { } // requires cc.wmu be held -func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, hdrs []byte) error { +func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize int, hdrs []byte) error { first := true // first frame written (HEADERS is first, then CONTINUATION) - frameSize := int(cc.maxFrameSize) for len(hdrs) > 0 && cc.werr == nil { chunk := hdrs - if len(chunk) > frameSize { - chunk = chunk[:frameSize] + if len(chunk) > maxFrameSize { + chunk = chunk[:maxFrameSize] } hdrs = hdrs[len(chunk):] endHeaders := len(hdrs) == 0 @@ -1087,13 +1105,17 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) ( } } + cc.mu.Lock() + maxFrameSize := int(cc.maxFrameSize) + cc.mu.Unlock() + cc.wmu.Lock() defer cc.wmu.Unlock() // Two ways to send END_STREAM: either with trailers, or // with an empty DATA frame. if len(trls) > 0 { - err = cc.writeHeaders(cs.ID, true, trls) + err = cc.writeHeaders(cs.ID, true, maxFrameSize, trls) } else { err = cc.fr.WriteData(cs.ID, true, nil) } @@ -1373,17 +1395,12 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { // clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. type clientConnReadLoop struct { cc *ClientConn - activeRes map[uint32]*clientStream // keyed by streamID closeWhenIdle bool } // readLoop runs in its own goroutine and reads and dispatches frames. func (cc *ClientConn) readLoop() { - rl := &clientConnReadLoop{ - cc: cc, - activeRes: make(map[uint32]*clientStream), - } - + rl := &clientConnReadLoop{cc: cc} defer rl.cleanup() cc.readerErr = rl.run() if ce, ok := cc.readerErr.(ConnectionError); ok { @@ -1438,10 +1455,8 @@ func (rl *clientConnReadLoop) cleanup() { } else if err == io.EOF { err = io.ErrUnexpectedEOF } - for _, cs := range rl.activeRes { - cs.bufPipe.CloseWithError(err) - } for _, cs := range cc.streams { + cs.bufPipe.CloseWithError(err) // no-op if already closed select { case cs.resc <- resAndError{err: err}: default: @@ -1519,7 +1534,7 @@ func (rl *clientConnReadLoop) run() error { } return err } - if rl.closeWhenIdle && gotReply && maybeIdle && len(rl.activeRes) == 0 { + if rl.closeWhenIdle && gotReply && maybeIdle { cc.closeIfIdle() } } @@ -1527,6 +1542,13 @@ func (rl *clientConnReadLoop) run() error { func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { cc := rl.cc + cs := cc.streamByID(f.StreamID, false) + if cs == nil { + // We'd get here if we canceled a request while the + // server had its response still in flight. So if this + // was just something we canceled, ignore it. + return nil + } if f.StreamEnded() { // Issue 20521: If the stream has ended, streamByID() causes // clientStream.done to be closed, which causes the request's bodyWriter @@ -1535,14 +1557,15 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { // Deferring stream closure allows the header processing to occur first. // clientConn.RoundTrip may still receive the bodyWriter error first, but // the fix for issue 16102 prioritises any response. - defer cc.streamByID(f.StreamID, true) - } - cs := cc.streamByID(f.StreamID, false) - if cs == nil { - // We'd get here if we canceled a request while the - // server had its response still in flight. So if this - // was just something we canceled, ignore it. - return nil + // + // Issue 22413: If there is no request body, we should close the + // stream before writing to cs.resc so that the stream is closed + // immediately once RoundTrip returns. + if cs.req.Body != nil { + defer cc.forgetStreamID(f.StreamID) + } else { + cc.forgetStreamID(f.StreamID) + } } if !cs.firstByte { if cs.trace != nil { @@ -1567,6 +1590,7 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { } // Any other error type is a stream error. cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err) + cc.forgetStreamID(cs.ID) cs.resc <- resAndError{err: err} return nil // return nil from process* funcs to keep conn alive } @@ -1574,9 +1598,6 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error { // (nil, nil) special case. See handleResponse docs. return nil } - if res.Body != noBody { - rl.activeRes[cs.ID] = cs - } cs.resTrailer = &res.Trailer cs.resc <- resAndError{res: res} return nil @@ -1596,11 +1617,11 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra status := f.PseudoValue("status") if status == "" { - return nil, errors.New("missing status pseudo header") + return nil, errors.New("malformed response from server: missing status pseudo header") } statusCode, err := strconv.Atoi(status) if err != nil { - return nil, errors.New("malformed non-numeric status pseudo header") + return nil, errors.New("malformed response from server: malformed non-numeric status pseudo header") } if statusCode == 100 { @@ -1915,7 +1936,6 @@ func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) { rl.closeWhenIdle = true } cs.bufPipe.closeWithErrorAndCode(err, code) - delete(rl.activeRes, cs.ID) select { case cs.resc <- resAndError{err: err}: @@ -2042,7 +2062,6 @@ func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { cs.bufPipe.CloseWithError(err) cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl } - delete(rl.activeRes, cs.ID) return nil } diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go index 30d7b5d..adee48c 100644 --- a/vendor/golang.org/x/net/http2/transport_test.go +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -13,6 +13,7 @@ import ( "fmt" "io" "io/ioutil" + "log" "math/rand" "net" "net/http" @@ -2291,6 +2292,11 @@ func TestTransportReadHeadResponse(t *testing.T) { } func TestTransportReadHeadResponseWithBody(t *testing.T) { + // This test use not valid response format. + // Discarding logger output to not spam tests output. + log.SetOutput(ioutil.Discard) + defer log.SetOutput(os.Stderr) + response := "redirecting to /elsewhere" ct := newClientTester(t) clientDone := make(chan struct{}) @@ -3383,6 +3389,11 @@ func TestTransportRetryHasLimit(t *testing.T) { } func TestTransportResponseDataBeforeHeaders(t *testing.T) { + // This test use not valid response format. + // Discarding logger output to not spam tests output. + log.SetOutput(ioutil.Discard) + defer log.SetOutput(os.Stderr) + ct := newClientTester(t) ct.client = func() error { defer ct.cc.(*net.TCPConn).CloseWrite() @@ -3788,6 +3799,46 @@ func TestTransportResponseAndResetWithoutConsumingBodyRace(t *testing.T) { } } +// Verify transport doesn't crash when receiving bogus response lacking a :status header. +// Issue 22880. +func TestTransportHandlesInvalidStatuslessResponse(t *testing.T) { + ct := newClientTester(t) + ct.client = func() error { + req, _ := http.NewRequest("GET", "https://dummy.tld/", nil) + _, err := ct.tr.RoundTrip(req) + const substr = "malformed response from server: missing status pseudo header" + if !strings.Contains(fmt.Sprint(err), substr) { + return fmt.Errorf("RoundTrip error = %v; want substring %q", err, substr) + } + return nil + } + ct.server = func() error { + ct.greet() + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + + for { + f, err := ct.fr.ReadFrame() + if err != nil { + return err + } + switch f := f.(type) { + case *HeadersFrame: + enc.WriteField(hpack.HeaderField{Name: "content-type", Value: "text/html"}) // no :status header + ct.fr.WriteHeaders(HeadersFrameParam{ + StreamID: f.StreamID, + EndHeaders: true, + EndStream: false, // we'll send some DATA to try to crash the transport + BlockFragment: buf.Bytes(), + }) + ct.fr.WriteData(f.StreamID, true, []byte("payload")) + return nil + } + } + } + ct.run() +} + func BenchmarkClientRequestHeaders(b *testing.B) { b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) }) b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) }) diff --git a/vendor/golang.org/x/net/internal/nettest/stack.go b/vendor/golang.org/x/net/internal/nettest/stack.go index cc92c03..06f4e09 100644 --- a/vendor/golang.org/x/net/internal/nettest/stack.go +++ b/vendor/golang.org/x/net/internal/nettest/stack.go @@ -74,6 +74,11 @@ func TestableNetwork(network string) bool { switch runtime.GOOS { case "android", "darwin", "freebsd", "nacl", "plan9", "windows": return false + case "netbsd": + // It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown. + if runtime.GOARCH == "386" { + return false + } } } return true diff --git a/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/golang.org/x/net/internal/socket/socket.go index 729dea1..5f9730e 100644 --- a/vendor/golang.org/x/net/internal/socket/socket.go +++ b/vendor/golang.org/x/net/internal/socket/socket.go @@ -110,7 +110,7 @@ func ControlMessageSpace(dataLen int) int { type ControlMessage []byte // Data returns the data field of the control message at the head on -// w. +// m. func (m ControlMessage) Data(dataLen int) []byte { l := controlHeaderLen() if len(m) < l || len(m) < l+dataLen { @@ -119,7 +119,7 @@ func (m ControlMessage) Data(dataLen int) []byte { return m[l : l+dataLen] } -// Next returns the control message at the next on w. +// Next returns the control message at the next on m. // // Next works only for standard control messages. func (m ControlMessage) Next(dataLen int) ControlMessage { @@ -131,7 +131,7 @@ func (m ControlMessage) Next(dataLen int) ControlMessage { } // MarshalHeader marshals the header fields of the control message at -// the head on w. +// the head on m. func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error { if len(m) < controlHeaderLen() { return errors.New("short message") @@ -142,7 +142,7 @@ func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error { } // ParseHeader parses and returns the header fields of the control -// message at the head on w. +// message at the head on m. func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) { l := controlHeaderLen() if len(m) < l { @@ -152,7 +152,7 @@ func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) { return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil } -// Marshal marshals the control message at the head on w, and returns +// Marshal marshals the control message at the head on m, and returns // the next control message. func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) { l := len(data) @@ -167,7 +167,7 @@ func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, erro return m.Next(l), nil } -// Parse parses w as a single or multiple control messages. +// Parse parses m as a single or multiple control messages. // // Parse works for both standard and compatible messages. func (m ControlMessage) Parse() ([]ControlMessage, error) { diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go new file mode 100644 index 0000000..e2987f7 --- /dev/null +++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go @@ -0,0 +1,61 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_darwin.go + +package socket + +const ( + sysAF_UNSPEC = 0x0 + sysAF_INET = 0x2 + sysAF_INET6 = 0x1e + + sysSOCK_RAW = 0x3 +) + +type iovec struct { + Base *byte + Len uint64 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type sockaddrInet struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type sockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +const ( + sizeofIovec = 0x10 + sizeofMsghdr = 0x30 + sizeofCmsghdr = 0xc + + sizeofSockaddrInet = 0x10 + sizeofSockaddrInet6 = 0x1c +) diff --git a/vendor/golang.org/x/sys/plan9/env_plan9.go b/vendor/golang.org/x/sys/plan9/env_plan9.go index 7ef9b18..8f19180 100644 --- a/vendor/golang.org/x/sys/plan9/env_plan9.go +++ b/vendor/golang.org/x/sys/plan9/env_plan9.go @@ -25,3 +25,7 @@ func Clearenv() { func Environ() []string { return syscall.Environ() } + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/plan9/env_unset.go b/vendor/golang.org/x/sys/plan9/env_unset.go deleted file mode 100644 index ce4ab25..0000000 --- a/vendor/golang.org/x/sys/plan9/env_unset.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.4 - -package plan9 - -import "syscall" - -func Unsetenv(key string) error { - // This was added in Go 1.4. - return syscall.Unsetenv(key) -} diff --git a/vendor/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore index e482715..e3e0fc6 100644 --- a/vendor/golang.org/x/sys/unix/.gitignore +++ b/vendor/golang.org/x/sys/unix/.gitignore @@ -1 +1,2 @@ _obj/ +unix.test diff --git a/vendor/golang.org/x/sys/unix/affinity_linux.go b/vendor/golang.org/x/sys/unix/affinity_linux.go new file mode 100644 index 0000000..d81fbb5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/affinity_linux.go @@ -0,0 +1,124 @@ +// Copyright 2018 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// CPU affinity functions + +package unix + +import ( + "unsafe" +) + +const cpuSetSize = _CPU_SETSIZE / _NCPUBITS + +// CPUSet represents a CPU affinity mask. +type CPUSet [cpuSetSize]cpuMask + +func schedAffinity(trap uintptr, pid int, set *CPUSet) error { + _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(set)), uintptr(unsafe.Pointer(set))) + if e != 0 { + return errnoErr(e) + } + return nil +} + +// SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. +// If pid is 0 the calling thread is used. +func SchedGetaffinity(pid int, set *CPUSet) error { + return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set) +} + +// SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. +// If pid is 0 the calling thread is used. +func SchedSetaffinity(pid int, set *CPUSet) error { + return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set) +} + +// Zero clears the set s, so that it contains no CPUs. +func (s *CPUSet) Zero() { + for i := range s { + s[i] = 0 + } +} + +func cpuBitsIndex(cpu int) int { + return cpu / _NCPUBITS +} + +func cpuBitsMask(cpu int) cpuMask { + return cpuMask(1 << (uint(cpu) % _NCPUBITS)) +} + +// Set adds cpu to the set s. +func (s *CPUSet) Set(cpu int) { + i := cpuBitsIndex(cpu) + if i < len(s) { + s[i] |= cpuBitsMask(cpu) + } +} + +// Clear removes cpu from the set s. +func (s *CPUSet) Clear(cpu int) { + i := cpuBitsIndex(cpu) + if i < len(s) { + s[i] &^= cpuBitsMask(cpu) + } +} + +// IsSet reports whether cpu is in the set s. +func (s *CPUSet) IsSet(cpu int) bool { + i := cpuBitsIndex(cpu) + if i < len(s) { + return s[i]&cpuBitsMask(cpu) != 0 + } + return false +} + +// Count returns the number of CPUs in the set s. +func (s *CPUSet) Count() int { + c := 0 + for _, b := range s { + c += onesCount64(uint64(b)) + } + return c +} + +// onesCount64 is a copy of Go 1.9's math/bits.OnesCount64. +// Once this package can require Go 1.9, we can delete this +// and update the caller to use bits.OnesCount64. +func onesCount64(x uint64) int { + const m0 = 0x5555555555555555 // 01010101 ... + const m1 = 0x3333333333333333 // 00110011 ... + const m2 = 0x0f0f0f0f0f0f0f0f // 00001111 ... + const m3 = 0x00ff00ff00ff00ff // etc. + const m4 = 0x0000ffff0000ffff + + // Implementation: Parallel summing of adjacent bits. + // See "Hacker's Delight", Chap. 5: Counting Bits. + // The following pattern shows the general approach: + // + // x = x>>1&(m0&m) + x&(m0&m) + // x = x>>2&(m1&m) + x&(m1&m) + // x = x>>4&(m2&m) + x&(m2&m) + // x = x>>8&(m3&m) + x&(m3&m) + // x = x>>16&(m4&m) + x&(m4&m) + // x = x>>32&(m5&m) + x&(m5&m) + // return int(x) + // + // Masking (& operations) can be left away when there's no + // danger that a field's sum will carry over into the next + // field: Since the result cannot be > 64, 8 bits is enough + // and we can ignore the masks for the shifts by 8 and up. + // Per "Hacker's Delight", the first line can be simplified + // more, but it saves at best one instruction, so we leave + // it alone for clarity. + const m = 1<<64 - 1 + x = x>>1&(m0&m) + x&(m0&m) + x = x>>2&(m1&m) + x&(m1&m) + x = (x>>4 + x) & (m2 & m) + x += x >> 8 + x += x >> 16 + x += x >> 32 + return int(x) & (1<<7 - 1) +} diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s index 4db2909..448bebb 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_386.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s @@ -10,21 +10,51 @@ // System calls for 386, Linux // +// See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 +// instead of the glibc-specific "CALL 0x10(GS)". +#define INVOKE_SYSCALL INT $0x80 + // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-28 +TEXT ·Syscall(SB),NOSPLIT,$0-28 JMP syscall·Syscall(SB) -TEXT ·Syscall6(SB),NOSPLIT,$0-40 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 JMP syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 + CALL runtime·entersyscall(SB) + MOVL trap+0(FP), AX // syscall entry + MOVL a1+4(FP), BX + MOVL a2+8(FP), CX + MOVL a3+12(FP), DX + MOVL $0, SI + MOVL $0, DI + INVOKE_SYSCALL + MOVL AX, r1+16(FP) + MOVL DX, r2+20(FP) + CALL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-28 JMP syscall·RawSyscall(SB) -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 JMP syscall·RawSyscall6(SB) +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 + MOVL trap+0(FP), AX // syscall entry + MOVL a1+4(FP), BX + MOVL a2+8(FP), CX + MOVL a3+12(FP), DX + MOVL $0, SI + MOVL $0, DI + INVOKE_SYSCALL + MOVL AX, r1+16(FP) + MOVL DX, r2+20(FP) + RET + TEXT ·socketcall(SB),NOSPLIT,$0-36 JMP syscall·socketcall(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s index 44e25c6..c6468a9 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s @@ -13,17 +13,45 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-56 +TEXT ·Syscall(SB),NOSPLIT,$0-56 JMP syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 JMP syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 + CALL runtime·entersyscall(SB) + MOVQ a1+8(FP), DI + MOVQ a2+16(FP), SI + MOVQ a3+24(FP), DX + MOVQ $0, R10 + MOVQ $0, R8 + MOVQ $0, R9 + MOVQ trap+0(FP), AX // syscall entry + SYSCALL + MOVQ AX, r1+32(FP) + MOVQ DX, r2+40(FP) + CALL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 + MOVQ a1+8(FP), DI + MOVQ a2+16(FP), SI + MOVQ a3+24(FP), DX + MOVQ $0, R10 + MOVQ $0, R8 + MOVQ $0, R9 + MOVQ trap+0(FP), AX // syscall entry + SYSCALL + MOVQ AX, r1+32(FP) + MOVQ DX, r2+40(FP) + RET + TEXT ·gettimeofday(SB),NOSPLIT,$0-16 JMP syscall·gettimeofday(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s index cf0b574..cf0f357 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_arm.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s @@ -13,17 +13,44 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-28 +TEXT ·Syscall(SB),NOSPLIT,$0-28 B syscall·Syscall(SB) -TEXT ·Syscall6(SB),NOSPLIT,$0-40 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 B syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 + BL runtime·entersyscall(SB) + MOVW trap+0(FP), R7 + MOVW a1+4(FP), R0 + MOVW a2+8(FP), R1 + MOVW a3+12(FP), R2 + MOVW $0, R3 + MOVW $0, R4 + MOVW $0, R5 + SWI $0 + MOVW R0, r1+16(FP) + MOVW $0, R0 + MOVW R0, r2+20(FP) + BL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-28 B syscall·RawSyscall(SB) -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 B syscall·RawSyscall6(SB) -TEXT ·seek(SB),NOSPLIT,$0-32 +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 + MOVW trap+0(FP), R7 // syscall entry + MOVW a1+4(FP), R0 + MOVW a2+8(FP), R1 + MOVW a3+12(FP), R2 + SWI $0 + MOVW R0, r1+16(FP) + MOVW $0, R0 + MOVW R0, r2+20(FP) + RET + +TEXT ·seek(SB),NOSPLIT,$0-28 B syscall·seek(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s index 4be9bfe..afe6fdf 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s @@ -11,14 +11,42 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-56 +TEXT ·Syscall(SB),NOSPLIT,$0-56 B syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 B syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R0 + MOVD a2+16(FP), R1 + MOVD a3+24(FP), R2 + MOVD $0, R3 + MOVD $0, R4 + MOVD $0, R5 + MOVD trap+0(FP), R8 // syscall entry + SVC + MOVD R0, r1+32(FP) // r1 + MOVD R1, r2+40(FP) // r2 + BL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-56 B syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 B syscall·RawSyscall6(SB) + +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 + MOVD a1+8(FP), R0 + MOVD a2+16(FP), R1 + MOVD a3+24(FP), R2 + MOVD $0, R3 + MOVD $0, R4 + MOVD $0, R5 + MOVD trap+0(FP), R8 // syscall entry + SVC + MOVD R0, r1+32(FP) + MOVD R1, r2+40(FP) + RET diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s index 724e580..ab9d638 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s @@ -15,14 +15,42 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-56 +TEXT ·Syscall(SB),NOSPLIT,$0-56 JMP syscall·Syscall(SB) -TEXT ·Syscall6(SB),NOSPLIT,$0-80 +TEXT ·Syscall6(SB),NOSPLIT,$0-80 JMP syscall·Syscall6(SB) -TEXT ·RawSyscall(SB),NOSPLIT,$0-56 +TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 + JAL runtime·entersyscall(SB) + MOVV a1+8(FP), R4 + MOVV a2+16(FP), R5 + MOVV a3+24(FP), R6 + MOVV R0, R7 + MOVV R0, R8 + MOVV R0, R9 + MOVV trap+0(FP), R2 // syscall entry + SYSCALL + MOVV R2, r1+32(FP) + MOVV R3, r2+40(FP) + JAL runtime·exitsyscall(SB) + RET + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) -TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) + +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 + MOVV a1+8(FP), R4 + MOVV a2+16(FP), R5 + MOVV a3+24(FP), R6 + MOVV R0, R7 + MOVV R0, R8 + MOVV R0, R9 + MOVV trap+0(FP), R2 // syscall entry + SYSCALL + MOVV R2, r1+32(FP) + MOVV R3, r2+40(FP) + RET diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s index 2ea4257..99e5399 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s @@ -15,17 +15,40 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-28 +TEXT ·Syscall(SB),NOSPLIT,$0-28 JMP syscall·Syscall(SB) -TEXT ·Syscall6(SB),NOSPLIT,$0-40 +TEXT ·Syscall6(SB),NOSPLIT,$0-40 JMP syscall·Syscall6(SB) -TEXT ·Syscall9(SB),NOSPLIT,$0-52 +TEXT ·Syscall9(SB),NOSPLIT,$0-52 JMP syscall·Syscall9(SB) -TEXT ·RawSyscall(SB),NOSPLIT,$0-28 +TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 + JAL runtime·entersyscall(SB) + MOVW a1+4(FP), R4 + MOVW a2+8(FP), R5 + MOVW a3+12(FP), R6 + MOVW R0, R7 + MOVW trap+0(FP), R2 // syscall entry + SYSCALL + MOVW R2, r1+16(FP) // r1 + MOVW R3, r2+20(FP) // r2 + JAL runtime·exitsyscall(SB) + RET + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 JMP syscall·RawSyscall(SB) -TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 JMP syscall·RawSyscall6(SB) + +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 + MOVW a1+4(FP), R4 + MOVW a2+8(FP), R5 + MOVW a3+12(FP), R6 + MOVW trap+0(FP), R2 // syscall entry + SYSCALL + MOVW R2, r1+16(FP) + MOVW R3, r2+20(FP) + RET diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s index 8d231fe..649e587 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s @@ -15,14 +15,42 @@ // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. -TEXT ·Syscall(SB),NOSPLIT,$0-56 +TEXT ·Syscall(SB),NOSPLIT,$0-56 BR syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 BR syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R3 + MOVD a2+16(FP), R4 + MOVD a3+24(FP), R5 + MOVD R0, R6 + MOVD R0, R7 + MOVD R0, R8 + MOVD trap+0(FP), R9 // syscall entry + SYSCALL R9 + MOVD R3, r1+32(FP) + MOVD R4, r2+40(FP) + BL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-56 BR syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 BR syscall·RawSyscall6(SB) + +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 + MOVD a1+8(FP), R3 + MOVD a2+16(FP), R4 + MOVD a3+24(FP), R5 + MOVD R0, R6 + MOVD R0, R7 + MOVD R0, R8 + MOVD trap+0(FP), R9 // syscall entry + SYSCALL R9 + MOVD R3, r1+32(FP) + MOVD R4, r2+40(FP) + RET diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s index 1188985..a5a863c 100644 --- a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s +++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s @@ -21,8 +21,36 @@ TEXT ·Syscall(SB),NOSPLIT,$0-56 TEXT ·Syscall6(SB),NOSPLIT,$0-80 BR syscall·Syscall6(SB) +TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 + BL runtime·entersyscall(SB) + MOVD a1+8(FP), R2 + MOVD a2+16(FP), R3 + MOVD a3+24(FP), R4 + MOVD $0, R5 + MOVD $0, R6 + MOVD $0, R7 + MOVD trap+0(FP), R1 // syscall entry + SYSCALL + MOVD R2, r1+32(FP) + MOVD R3, r2+40(FP) + BL runtime·exitsyscall(SB) + RET + TEXT ·RawSyscall(SB),NOSPLIT,$0-56 BR syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 BR syscall·RawSyscall6(SB) + +TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 + MOVD a1+8(FP), R2 + MOVD a2+16(FP), R3 + MOVD a3+24(FP), R4 + MOVD $0, R5 + MOVD $0, R6 + MOVD $0, R7 + MOVD trap+0(FP), R1 // syscall entry + SYSCALL + MOVD R2, r1+32(FP) + MOVD R3, r2+40(FP) + RET diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go index 4557ea4..6b292b1 100644 --- a/vendor/golang.org/x/sys/unix/creds_test.go +++ b/vendor/golang.org/x/sys/unix/creds_test.go @@ -8,6 +8,7 @@ package unix_test import ( "bytes" + "go/build" "net" "os" "syscall" @@ -35,6 +36,11 @@ func TestSCMCredentials(t *testing.T) { } for _, tt := range socketTypeTests { + if tt.socketType == unix.SOCK_DGRAM && !atLeast1p10() { + t.Log("skipping DGRAM test on pre-1.10") + continue + } + fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0) if err != nil { t.Fatalf("Socketpair: %v", err) @@ -134,3 +140,13 @@ func TestSCMCredentials(t *testing.T) { } } } + +// atLeast1p10 reports whether we are running on Go 1.10 or later. +func atLeast1p10() bool { + for _, ver := range build.Default.ReleaseTags { + if ver == "go1.10" { + return true + } + } + return false +} diff --git a/vendor/golang.org/x/sys/unix/dev_darwin_test.go b/vendor/golang.org/x/sys/unix/dev_darwin_test.go index 48d0448..bf1adf3 100644 --- a/vendor/golang.org/x/sys/unix/dev_darwin_test.go +++ b/vendor/golang.org/x/sys/unix/dev_darwin_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go index 2caba08..9add376 100644 --- a/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go +++ b/vendor/golang.org/x/sys/unix/dev_dragonfly_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/golang.org/x/sys/unix/dev_linux_test.go index 6e001f3..2fd3ead 100644 --- a/vendor/golang.org/x/sys/unix/dev_linux_test.go +++ b/vendor/golang.org/x/sys/unix/dev_linux_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go index c39a80a..441058a 100644 --- a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go +++ b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( @@ -18,11 +20,9 @@ func TestDevices(t *testing.T) { minor uint32 }{ // well known major/minor numbers according to /dev/MAKEDEV on - // NetBSD 7.0 + // NetBSD 8.0 {"/dev/null", 2, 2}, {"/dev/zero", 2, 12}, - {"/dev/ttyp0", 5, 0}, - {"/dev/ttyp1", 5, 1}, {"/dev/random", 46, 0}, {"/dev/urandom", 46, 1}, } diff --git a/vendor/golang.org/x/sys/unix/dev_openbsd_test.go b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go index 5635d27..e6cb64f 100644 --- a/vendor/golang.org/x/sys/unix/dev_openbsd_test.go +++ b/vendor/golang.org/x/sys/unix/dev_openbsd_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/vendor/golang.org/x/sys/unix/dev_solaris_test.go b/vendor/golang.org/x/sys/unix/dev_solaris_test.go index db58c0d..656508c 100644 --- a/vendor/golang.org/x/sys/unix/dev_solaris_test.go +++ b/vendor/golang.org/x/sys/unix/dev_solaris_test.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build go1.7 + package unix_test import ( diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go index bd47581..95fd353 100644 --- a/vendor/golang.org/x/sys/unix/dirent.go +++ b/vendor/golang.org/x/sys/unix/dirent.go @@ -6,97 +6,12 @@ package unix -import "unsafe" - -// readInt returns the size-bytes unsigned integer in native byte order at offset off. -func readInt(b []byte, off, size uintptr) (u uint64, ok bool) { - if len(b) < int(off+size) { - return 0, false - } - if isBigEndian { - return readIntBE(b[off:], size), true - } - return readIntLE(b[off:], size), true -} - -func readIntBE(b []byte, size uintptr) uint64 { - switch size { - case 1: - return uint64(b[0]) - case 2: - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[1]) | uint64(b[0])<<8 - case 4: - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24 - case 8: - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 - default: - panic("syscall: readInt with unsupported size") - } -} - -func readIntLE(b []byte, size uintptr) uint64 { - switch size { - case 1: - return uint64(b[0]) - case 2: - _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 - case 4: - _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 - case 8: - _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 - default: - panic("syscall: readInt with unsupported size") - } -} +import "syscall" // ParseDirent parses up to max directory entries in buf, // appending the names to names. It returns the number of // bytes consumed from buf, the number of entries added // to names, and the new names slice. func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { - origlen := len(buf) - count = 0 - for max != 0 && len(buf) > 0 { - reclen, ok := direntReclen(buf) - if !ok || reclen > uint64(len(buf)) { - return origlen, count, names - } - rec := buf[:reclen] - buf = buf[reclen:] - ino, ok := direntIno(rec) - if !ok { - break - } - if ino == 0 { // File absent in directory. - continue - } - const namoff = uint64(unsafe.Offsetof(Dirent{}.Name)) - namlen, ok := direntNamlen(rec) - if !ok || namoff+namlen > uint64(len(rec)) { - break - } - name := rec[namoff : namoff+namlen] - for i, c := range name { - if c == 0 { - name = name[:i] - break - } - } - // Check for useless names before allocating a string. - if string(name) == "." || string(name) == ".." { - continue - } - max-- - count++ - names = append(names, string(name)) - } - return origlen - len(buf), count, names + return syscall.ParseDirent(buf, max, names) } diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go index 2e06b33..706b3cd 100644 --- a/vendor/golang.org/x/sys/unix/env_unix.go +++ b/vendor/golang.org/x/sys/unix/env_unix.go @@ -25,3 +25,7 @@ func Clearenv() { func Environ() []string { return syscall.Environ() } + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/unix/env_unset.go b/vendor/golang.org/x/sys/unix/env_unset.go deleted file mode 100644 index c44fdc4..0000000 --- a/vendor/golang.org/x/sys/unix/env_unset.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.4 - -package unix - -import "syscall" - -func Unsetenv(key string) error { - // This was added in Go 1.4. - return syscall.Unsetenv(key) -} diff --git a/vendor/golang.org/x/sys/unix/file_unix.go b/vendor/golang.org/x/sys/unix/file_unix.go deleted file mode 100644 index 47f6a83..0000000 --- a/vendor/golang.org/x/sys/unix/file_unix.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package unix - -import ( - "os" - "syscall" -) - -// FIXME: unexported function from os -// syscallMode returns the syscall-specific mode bits from Go's portable mode bits. -func syscallMode(i os.FileMode) (o uint32) { - o |= uint32(i.Perm()) - if i&os.ModeSetuid != 0 { - o |= syscall.S_ISUID - } - if i&os.ModeSetgid != 0 { - o |= syscall.S_ISGID - } - if i&os.ModeSticky != 0 { - o |= syscall.S_ISVTX - } - // No mapping for Go's ModeTemporary (plan9 only). - return -} diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go index 40bed3f..50062e3 100644 --- a/vendor/golang.org/x/sys/unix/gccgo.go +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -11,9 +11,19 @@ import "syscall" // We can't use the gc-syntax .s files for gccgo. On the plus side // much of the functionality can be written directly in Go. +//extern gccgoRealSyscallNoError +func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr) + //extern gccgoRealSyscall func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) +func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { + syscall.Entersyscall() + r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + syscall.Exitsyscall() + return r, 0 +} + func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { syscall.Entersyscall() r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) @@ -35,6 +45,11 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, return r, 0, syscall.Errno(errno) } +func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { + r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + return r, 0 +} + func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) return r, 0, syscall.Errno(errno) diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c index 99a774f..24e96b1 100644 --- a/vendor/golang.org/x/sys/unix/gccgo_c.c +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -31,6 +31,12 @@ gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintp return r; } +uintptr_t +gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) +{ + return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); +} + // Define the use function in C so that it is not inlined. extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); diff --git a/vendor/golang.org/x/sys/unix/linux/types.go b/vendor/golang.org/x/sys/unix/linux/types.go index 426be5e..1217fd8 100644 --- a/vendor/golang.org/x/sys/unix/linux/types.go +++ b/vendor/golang.org/x/sys/unix/linux/types.go @@ -24,6 +24,7 @@ package unix #include #include #include +#include #include #include #include @@ -46,11 +47,12 @@ package unix #include #include #include +#include #include #include #include #include -#include +#include #include #include #include @@ -63,6 +65,7 @@ package unix #include #include #include +#include #include // On mips64, the glibc stat and kernel stat do not agree @@ -114,6 +117,21 @@ struct stat { #endif +// These are defined in linux/fcntl.h, but including it globally causes +// conflicts with fcntl.h +#ifndef AT_STATX_SYNC_TYPE +# define AT_STATX_SYNC_TYPE 0x6000 // Type of synchronisation required from statx() +#endif +#ifndef AT_STATX_SYNC_AS_STAT +# define AT_STATX_SYNC_AS_STAT 0x0000 // - Do whatever stat() does +#endif +#ifndef AT_STATX_FORCE_SYNC +# define AT_STATX_FORCE_SYNC 0x2000 // - Force the attributes to be sync'd with the server +#endif +#ifndef AT_STATX_DONT_SYNC +# define AT_STATX_DONT_SYNC 0x4000 // - Don't sync attributes with the server +#endif + #ifdef TCSETS2 // On systems that have "struct termios2" use this as type Termios. typedef struct termios2 termios_t; @@ -247,6 +265,10 @@ type Stat_t C.struct_stat type Statfs_t C.struct_statfs +type StatxTimestamp C.struct_statx_timestamp + +type Statx_t C.struct_statx + type Dirent C.struct_dirent type Fsid C.fsid_t @@ -511,8 +533,15 @@ type Ustat_t C.struct_ustat type EpollEvent C.struct_my_epoll_event const ( - AT_FDCWD = C.AT_FDCWD - AT_REMOVEDIR = C.AT_REMOVEDIR + AT_EMPTY_PATH = C.AT_EMPTY_PATH + AT_FDCWD = C.AT_FDCWD + AT_NO_AUTOMOUNT = C.AT_NO_AUTOMOUNT + AT_REMOVEDIR = C.AT_REMOVEDIR + + AT_STATX_SYNC_AS_STAT = C.AT_STATX_SYNC_AS_STAT + AT_STATX_FORCE_SYNC = C.AT_STATX_FORCE_SYNC + AT_STATX_DONT_SYNC = C.AT_STATX_DONT_SYNC + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW ) @@ -541,7 +570,7 @@ type Termios C.termios_t type Winsize C.struct_winsize -// Taskstats +// Taskstats and cgroup stats. type Taskstats C.struct_taskstats @@ -563,6 +592,18 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK ) +type CGroupStats C.struct_cgroupstats + +const ( + CGROUPSTATS_CMD_UNSPEC = C.__TASKSTATS_CMD_MAX + CGROUPSTATS_CMD_GET = C.CGROUPSTATS_CMD_GET + CGROUPSTATS_CMD_NEW = C.CGROUPSTATS_CMD_NEW + CGROUPSTATS_TYPE_UNSPEC = C.CGROUPSTATS_TYPE_UNSPEC + CGROUPSTATS_TYPE_CGROUP_STATS = C.CGROUPSTATS_TYPE_CGROUP_STATS + CGROUPSTATS_CMD_ATTR_UNSPEC = C.CGROUPSTATS_CMD_ATTR_UNSPEC + CGROUPSTATS_CMD_ATTR_FD = C.CGROUPSTATS_CMD_ATTR_FD +) + // Generic netlink type Genlmsghdr C.struct_genlmsghdr @@ -593,3 +634,12 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = C.CTRL_ATTR_MCAST_GRP_NAME CTRL_ATTR_MCAST_GRP_ID = C.CTRL_ATTR_MCAST_GRP_ID ) + +// CPU affinity + +type cpuMask C.__cpu_mask + +const ( + _CPU_SETSIZE = C.__CPU_SETSIZE + _NCPUBITS = C.__NCPUBITS +) diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh index 00b7ce7..1715122 100755 --- a/vendor/golang.org/x/sys/unix/mkall.sh +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -80,12 +80,6 @@ darwin_arm64) mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; -dragonfly_386) - mkerrors="$mkerrors -m32" - mksyscall="./mksyscall.pl -l32 -dragonfly" - mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" - mktypes="GOARCH=$GOARCH go tool cgo -godefs" - ;; dragonfly_amd64) mkerrors="$mkerrors -m64" mksyscall="./mksyscall.pl -dragonfly" diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 4ddd4ff..4dd40c1 100755 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -48,6 +48,7 @@ includes_Darwin=' #include #include #include +#include #include #include #include @@ -186,6 +187,7 @@ struct ltchars { #include #include #include +#include #include #include #include @@ -386,7 +388,9 @@ ccflags="$@" $2 == "SOMAXCONN" || $2 == "NAME_MAX" || $2 == "IFNAMSIZ" || - $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || + $2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ || + $2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ || + $2 ~ /^HW_MACHINE$/ || $2 ~ /^SYSCTL_VERS/ || $2 ~ /^(MS|MNT|UMOUNT)_/ || $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || @@ -421,8 +425,11 @@ ccflags="$@" $2 ~ /^SECCOMP_MODE_/ || $2 ~ /^SPLICE_/ || $2 ~ /^(VM|VMADDR)_/ || + $2 ~ /^IOCTL_VM_SOCKETS_/ || $2 ~ /^(TASKSTATS|TS)_/ || + $2 ~ /^CGROUPSTATS_/ || $2 ~ /^GENL_/ || + $2 ~ /^STATX_/ || $2 ~ /^UTIME_/ || $2 ~ /^XATTR_(CREATE|REPLACE)/ || $2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ || diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go index dbdfd0a..ca6b431 100644 --- a/vendor/golang.org/x/sys/unix/mkpost.go +++ b/vendor/golang.org/x/sys/unix/mkpost.go @@ -61,6 +61,10 @@ func main() { convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`) b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte")) + // Remove spare fields (e.g. in Statx_t) + spareFieldsRegex := regexp.MustCompile(`X__spare\S*`) + b = spareFieldsRegex.ReplaceAll(b, []byte("_")) + // We refuse to export private fields on s390x if goarch == "s390x" && goos == "linux" { // Remove cgo padding fields @@ -68,7 +72,7 @@ func main() { b = removeFieldsRegex.ReplaceAll(b, []byte("_")) // Remove padding, hidden, or unused fields - removeFieldsRegex = regexp.MustCompile(`X_\S+`) + removeFieldsRegex = regexp.MustCompile(`\bX_\S+`) b = removeFieldsRegex.ReplaceAll(b, []byte("_")) } diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl index fb929b4..73e26ca 100755 --- a/vendor/golang.org/x/sys/unix/mksyscall.pl +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl @@ -210,7 +210,15 @@ while(<>) { # Determine which form to use; pad args with zeros. my $asm = "Syscall"; if ($nonblock) { - $asm = "RawSyscall"; + if ($errvar ne "") { + $asm = "RawSyscall"; + } else { + $asm = "RawSyscallNoError"; + } + } else { + if ($errvar eq "") { + $asm = "SyscallNoError"; + } } if(@args <= 3) { while(@args < 3) { @@ -284,7 +292,11 @@ while(<>) { if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { $text .= "\t$call\n"; } else { - $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + if ($errvar ne "") { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } else { + $text .= "\t$ret[0], $ret[1] := $call\n"; + } } $text .= $body; diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 47b0598..d3903ed 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -352,6 +352,18 @@ func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { return &value, err } +// GetsockoptString returns the string value of the socket option opt for the +// socket associated with fd at the given socket level. +func GetsockoptString(fd, level, opt int) (string, error) { + buf := make([]byte, 256) + vallen := _Socklen(len(buf)) + err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) + if err != nil { + return "", err + } + return string(buf[:vallen-1]), nil +} + //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go index d8085a0..6c4e2ac 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go @@ -10,6 +10,7 @@ import ( "os/exec" "runtime" "testing" + "time" "golang.org/x/sys/unix" ) @@ -50,6 +51,28 @@ func TestGetfsstat(t *testing.T) { } } +func TestSelect(t *testing.T) { + err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0}) + if err != nil { + t.Fatalf("Select: %v", err) + } + + dur := 250 * time.Millisecond + tv := unix.NsecToTimeval(int64(dur)) + start := time.Now() + err = unix.Select(0, nil, nil, nil, &tv) + took := time.Since(start) + if err != nil { + t.Fatalf("Select: %v", err) + } + + // On some BSDs the actual timeout might also be slightly less than the requested. + // Add an acceptable margin to avoid flaky tests. + if took < dur*2/3 { + t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) + } +} + func TestSysctlRaw(t *testing.T) { if runtime.GOOS == "openbsd" { t.Skip("kern.proc.pid does not exist on OpenBSD") @@ -60,3 +83,11 @@ func TestSysctlRaw(t *testing.T) { t.Fatal(err) } } + +func TestSysctlUint32(t *testing.T) { + maxproc, err := unix.SysctlUint32("kern.maxproc") + if err != nil { + t.Fatal(err) + } + t.Logf("kern.maxproc: %v", maxproc) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 9a6783e..1eea356 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -76,18 +76,6 @@ func nametomib(name string) (mib []_C_int, err error) { return buf[0 : n/siz], nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) -} - //sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } @@ -270,6 +258,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { return &value, err } +func Uname(uname *Utsname) error { + mib := []_C_int{CTL_KERN, KERN_OSTYPE} + n := unsafe.Sizeof(uname.Sysname) + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_HOSTNAME} + n = unsafe.Sizeof(uname.Nodename) + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_OSRELEASE} + n = unsafe.Sizeof(uname.Release) + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_VERSION} + n = unsafe.Sizeof(uname.Version) + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + return err + } + + // The version might have newlines or tabs in it, convert them to + // spaces. + for i, b := range uname.Version { + if b == '\n' || b == '\t' { + if i == len(uname.Version)-1 { + uname.Version[i] = 0 + } else { + uname.Version[i] = ' ' + } + } + } + + mib = []_C_int{CTL_HW, HW_MACHINE} + n = unsafe.Sizeof(uname.Machine) + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + return err + } + + return nil +} + /* * Exposed directly */ diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go index 47ab664..faae207 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -60,3 +60,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/arm the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go index 25eeada..17256ec 100644 --- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -56,22 +56,6 @@ func nametomib(name string) (mib []_C_int, err error) { return buf[0 : n/siz], nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - namlen, ok := direntNamlen(buf) - if !ok { - return 0, false - } - return (16 + namlen + 1 + 7) &^ 7, true -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) -} - //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { @@ -110,6 +94,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { return } +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD + +func Getwd() (string, error) { + var buf [PathMax]byte + _, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { var _p0 unsafe.Pointer var bufsize uintptr @@ -130,6 +131,108 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { return ENOSYS } +//sys ioctl(fd int, req uint, arg uintptr) (err error) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req uint, value *Termios) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error { + err := sysctl(mib, old, oldlen, nil, 0) + if err != nil { + // Utsname members on Dragonfly are only 32 bytes and + // the syscall returns ENOMEM in case the actual value + // is longer. + if err == ENOMEM { + err = nil + } + } + return err +} + +func Uname(uname *Utsname) error { + mib := []_C_int{CTL_KERN, KERN_OSTYPE} + n := unsafe.Sizeof(uname.Sysname) + if err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil { + return err + } + uname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0 + + mib = []_C_int{CTL_KERN, KERN_HOSTNAME} + n = unsafe.Sizeof(uname.Nodename) + if err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil { + return err + } + uname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0 + + mib = []_C_int{CTL_KERN, KERN_OSRELEASE} + n = unsafe.Sizeof(uname.Release) + if err := sysctlUname(mib, &uname.Release[0], &n); err != nil { + return err + } + uname.Release[unsafe.Sizeof(uname.Release)-1] = 0 + + mib = []_C_int{CTL_KERN, KERN_VERSION} + n = unsafe.Sizeof(uname.Version) + if err := sysctlUname(mib, &uname.Version[0], &n); err != nil { + return err + } + + // The version might have newlines or tabs in it, convert them to + // spaces. + for i, b := range uname.Version { + if b == '\n' || b == '\t' { + if i == len(uname.Version)-1 { + uname.Version[i] = 0 + } else { + uname.Version[i] = ' ' + } + } + } + + mib = []_C_int{CTL_HW, HW_MACHINE} + n = unsafe.Sizeof(uname.Machine) + if err := sysctlUname(mib, &uname.Machine[0], &n); err != nil { + return err + } + uname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0 + + return nil +} + /* * Exposed directly */ @@ -230,7 +333,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { // Getlogin // Sigpending // Sigaltstack -// Ioctl // Reboot // Execve // Vfork diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go index a82ce12..4446275 100644 --- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -54,18 +54,6 @@ func nametomib(name string) (mib []_C_int, err error) { return buf[0 : n/siz], nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) -} - //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { @@ -105,6 +93,23 @@ func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { return } +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD + +func Getwd() (string, error) { + var buf [PathMax]byte + _, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { var _p0 unsafe.Pointer var bufsize uintptr @@ -276,7 +281,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) { // FreeBSD won't allow you to list xattrs from multiple namespaces s := 0 - var e error for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) @@ -288,7 +292,6 @@ func Listxattr(file string, dest []byte) (sz int, err error) { * we don't have read permissions on, so don't ignore those errors */ if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { - e = nil continue } else if e != nil { return s, e @@ -302,7 +305,7 @@ func Listxattr(file string, dest []byte) (sz int, err error) { d = initxattrdest(dest, s) } - return s, e + return s, nil } func Flistxattr(fd int, dest []byte) (sz int, err error) { @@ -310,11 +313,9 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) { destsiz := len(dest) s := 0 - var e error for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { - e = nil continue } else if e != nil { return s, e @@ -328,7 +329,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) { d = initxattrdest(dest, s) } - return s, e + return s, nil } func Llistxattr(link string, dest []byte) (sz int, err error) { @@ -336,11 +337,9 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { destsiz := len(dest) s := 0 - var e error for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { - e = nil continue } else if e != nil { return s, e @@ -354,7 +353,7 @@ func Llistxattr(link string, dest []byte) (sz int, err error) { d = initxattrdest(dest, s) } - return s, e + return s, nil } //sys ioctl(fd int, req uint, arg uintptr) (err error) @@ -396,6 +395,52 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { return &value, err } +func Uname(uname *Utsname) error { + mib := []_C_int{CTL_KERN, KERN_OSTYPE} + n := unsafe.Sizeof(uname.Sysname) + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_HOSTNAME} + n = unsafe.Sizeof(uname.Nodename) + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_OSRELEASE} + n = unsafe.Sizeof(uname.Release) + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_VERSION} + n = unsafe.Sizeof(uname.Version) + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + return err + } + + // The version might have newlines or tabs in it, convert them to + // spaces. + for i, b := range uname.Version { + if b == '\n' || b == '\t' { + if i == len(uname.Version)-1 { + uname.Version[i] = 0 + } else { + uname.Version[i] = ' ' + } + } + } + + mib = []_C_int{CTL_HW, HW_MACHINE} + n = unsafe.Sizeof(uname.Machine) + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + return err + } + + return nil +} + /* * Exposed directly */ @@ -439,6 +484,7 @@ func IoctlGetTermios(fd int, req uint) (*Termios, error) { //sys Fstatfs(fd int, stat *Statfs_t) (err error) //sys Fsync(fd int) (err error) //sys Ftruncate(fd int, length int64) (err error) +//sys Getdents(fd int, buf []byte) (n int, err error) //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) //sys Getdtablesize() (size int) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index b98a7e1..839f1d5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -16,6 +16,13 @@ import ( "unsafe" ) +// SyscallNoError may be used instead of Syscall for syscalls that don't fail. +func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) + +// RawSyscallNoError may be used instead of RawSyscall for syscalls that don't +// fail. +func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) + /* * Wrapped */ @@ -808,6 +815,24 @@ func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { return &value, err } +// GetsockoptString returns the string value of the socket option opt for the +// socket associated with fd at the given socket level. +func GetsockoptString(fd, level, opt int) (string, error) { + buf := make([]byte, 256) + vallen := _Socklen(len(buf)) + err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) + if err != nil { + if err == ERANGE { + buf = make([]byte, vallen) + err = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) + } + if err != nil { + return "", err + } + } + return string(buf[:vallen-1]), nil +} + func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) } @@ -1125,6 +1150,10 @@ func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data) } +func PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) { + return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data) +} + func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) } @@ -1168,22 +1197,6 @@ func ReadDirent(fd int, buf []byte) (n int, err error) { return Getdents(fd, buf) } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - reclen, ok := direntReclen(buf) - if !ok { - return 0, false - } - return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true -} - //sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { @@ -1289,6 +1302,7 @@ func Setgid(uid int) (err error) { //sys Setpriority(which int, who int, prio int) (err error) //sys Setxattr(path string, attr string, data []byte, flags int) (err error) +//sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) //sys Sync() //sys Syncfs(fd int) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error) @@ -1406,7 +1420,6 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { // Msgget // Msgrcv // Msgsnd -// Newfstatat // Nfsservctl // Personality // Pselect6 @@ -1427,11 +1440,9 @@ func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { // RtSigtimedwait // SchedGetPriorityMax // SchedGetPriorityMin -// SchedGetaffinity // SchedGetparam // SchedGetscheduler // SchedRrGetInterval -// SchedSetaffinity // SchedSetparam // SchedYield // Security diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go index 4774fa3..bb8e4fb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -54,6 +54,7 @@ func Pipe2(p []int, flags int) (err error) { //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64 //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 //sysnb Getegid() (egid int) = SYS_GETEGID32 //sysnb Geteuid() (euid int) = SYS_GETEUID32 diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go index 3707f6b..53d38a5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -11,6 +11,7 @@ package unix //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //sys Fstatfs(fd int, buf *Statfs_t) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go index 226be10..c59f858 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -77,6 +77,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sysnb Getegid() (egid int) = SYS_GETEGID32 //sysnb Geteuid() (euid int) = SYS_GETEUID32 //sysnb Getgid() (gid int) = SYS_GETGID32 diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go index cdda11a..46aa4ff 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -10,6 +10,7 @@ package unix //sys Dup2(oldfd int, newfd int) (err error) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //sys Fstatfs(fd int, buf *Statfs_t) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go index a114ba8..40b8e4f 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go @@ -65,6 +65,7 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Utime(path string, buf *Utimbuf) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 7cae936..17c9116 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -11,6 +11,7 @@ package unix //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //sys Fstatfs(fd int, buf *Statfs_t) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go index e96a40c..c0d86e7 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -15,6 +15,7 @@ import ( //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //sys Fstatfs(fd int, buf *Statfs_t) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go index 012a328..a00f992 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go @@ -10,6 +10,7 @@ package unix //sys Dup2(oldfd int, newfd int) (err error) //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Fstatfs(fd int, buf *Statfs_t) (err error) //sys Ftruncate(fd int, length int64) (err error) //sysnb Getegid() (egid int) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_test.go b/vendor/golang.org/x/sys/unix/syscall_linux_test.go index 84c69d2..78d2879 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_test.go @@ -9,6 +9,7 @@ package unix_test import ( "io/ioutil" "os" + "runtime" "testing" "time" @@ -19,9 +20,12 @@ func TestFchmodat(t *testing.T) { defer chtmpdir(t)() touch(t, "file1") - os.Symlink("file1", "symlink1") + err := os.Symlink("file1", "symlink1") + if err != nil { + t.Fatal(err) + } - err := unix.Fchmodat(unix.AT_FDCWD, "symlink1", 0444, 0) + err = unix.Fchmodat(unix.AT_FDCWD, "symlink1", 0444, 0) if err != nil { t.Fatalf("Fchmodat: unexpected error: %v", err) } @@ -182,17 +186,222 @@ func TestSelect(t *testing.T) { if err != nil { t.Fatalf("Select: %v", err) } -} -func TestUname(t *testing.T) { - var utsname unix.Utsname - err := unix.Uname(&utsname) + dur := 150 * time.Millisecond + tv := unix.NsecToTimeval(int64(dur)) + start := time.Now() + _, err = unix.Select(0, nil, nil, nil, &tv) + took := time.Since(start) if err != nil { - t.Fatalf("Uname: %v", err) + t.Fatalf("Select: %v", err) } - // conversion from []byte to string, golang.org/issue/20753 - t.Logf("OS: %s/%s %s", string(utsname.Sysname[:]), string(utsname.Machine[:]), string(utsname.Release[:])) + if took < dur { + t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) + } +} + +func TestPselect(t *testing.T) { + _, err := unix.Pselect(0, nil, nil, nil, &unix.Timespec{Sec: 0, Nsec: 0}, nil) + if err != nil { + t.Fatalf("Pselect: %v", err) + } + + dur := 2500 * time.Microsecond + ts := unix.NsecToTimespec(int64(dur)) + start := time.Now() + _, err = unix.Pselect(0, nil, nil, nil, &ts, nil) + took := time.Since(start) + if err != nil { + t.Fatalf("Pselect: %v", err) + } + + if took < dur { + t.Errorf("Pselect: timeout should have been at least %v, got %v", dur, took) + } +} + +func TestFstatat(t *testing.T) { + defer chtmpdir(t)() + + touch(t, "file1") + + var st1 unix.Stat_t + err := unix.Stat("file1", &st1) + if err != nil { + t.Fatalf("Stat: %v", err) + } + + var st2 unix.Stat_t + err = unix.Fstatat(unix.AT_FDCWD, "file1", &st2, 0) + if err != nil { + t.Fatalf("Fstatat: %v", err) + } + + if st1 != st2 { + t.Errorf("Fstatat: returned stat does not match Stat") + } + + err = os.Symlink("file1", "symlink1") + if err != nil { + t.Fatal(err) + } + + err = unix.Lstat("symlink1", &st1) + if err != nil { + t.Fatalf("Lstat: %v", err) + } + + err = unix.Fstatat(unix.AT_FDCWD, "symlink1", &st2, unix.AT_SYMLINK_NOFOLLOW) + if err != nil { + t.Fatalf("Fstatat: %v", err) + } + + if st1 != st2 { + t.Errorf("Fstatat: returned stat does not match Lstat") + } +} + +func TestSchedSetaffinity(t *testing.T) { + runtime.LockOSThread() + defer runtime.UnlockOSThread() + + var oldMask unix.CPUSet + err := unix.SchedGetaffinity(0, &oldMask) + if err != nil { + t.Fatalf("SchedGetaffinity: %v", err) + } + + var newMask unix.CPUSet + newMask.Zero() + if newMask.Count() != 0 { + t.Errorf("CpuZero: didn't zero CPU set: %v", newMask) + } + cpu := 1 + newMask.Set(cpu) + if newMask.Count() != 1 || !newMask.IsSet(cpu) { + t.Errorf("CpuSet: didn't set CPU %d in set: %v", cpu, newMask) + } + cpu = 5 + newMask.Set(cpu) + if newMask.Count() != 2 || !newMask.IsSet(cpu) { + t.Errorf("CpuSet: didn't set CPU %d in set: %v", cpu, newMask) + } + newMask.Clear(cpu) + if newMask.Count() != 1 || newMask.IsSet(cpu) { + t.Errorf("CpuClr: didn't clear CPU %d in set: %v", cpu, newMask) + } + + err = unix.SchedSetaffinity(0, &newMask) + if err != nil { + t.Fatalf("SchedSetaffinity: %v", err) + } + + var gotMask unix.CPUSet + err = unix.SchedGetaffinity(0, &gotMask) + if err != nil { + t.Fatalf("SchedGetaffinity: %v", err) + } + + if gotMask != newMask { + t.Errorf("SchedSetaffinity: returned affinity mask does not match set affinity mask") + } + + // Restore old mask so it doesn't affect successive tests + err = unix.SchedSetaffinity(0, &oldMask) + if err != nil { + t.Fatalf("SchedSetaffinity: %v", err) + } +} + +func TestStatx(t *testing.T) { + var stx unix.Statx_t + err := unix.Statx(unix.AT_FDCWD, ".", 0, 0, &stx) + if err == unix.ENOSYS { + t.Skip("statx syscall is not available, skipping test") + } else if err != nil { + t.Fatalf("Statx: %v", err) + } + + defer chtmpdir(t)() + touch(t, "file1") + + var st unix.Stat_t + err = unix.Stat("file1", &st) + if err != nil { + t.Fatalf("Stat: %v", err) + } + + flags := unix.AT_STATX_SYNC_AS_STAT + err = unix.Statx(unix.AT_FDCWD, "file1", flags, unix.STATX_ALL, &stx) + if err != nil { + t.Fatalf("Statx: %v", err) + } + + if uint32(stx.Mode) != st.Mode { + t.Errorf("Statx: returned stat mode does not match Stat") + } + + atime := unix.StatxTimestamp{Sec: int64(st.Atim.Sec), Nsec: uint32(st.Atim.Nsec)} + ctime := unix.StatxTimestamp{Sec: int64(st.Ctim.Sec), Nsec: uint32(st.Ctim.Nsec)} + mtime := unix.StatxTimestamp{Sec: int64(st.Mtim.Sec), Nsec: uint32(st.Mtim.Nsec)} + + if stx.Atime != atime { + t.Errorf("Statx: returned stat atime does not match Stat") + } + if stx.Ctime != ctime { + t.Errorf("Statx: returned stat ctime does not match Stat") + } + if stx.Mtime != mtime { + t.Errorf("Statx: returned stat mtime does not match Stat") + } + + err = os.Symlink("file1", "symlink1") + if err != nil { + t.Fatal(err) + } + + err = unix.Lstat("symlink1", &st) + if err != nil { + t.Fatalf("Lstat: %v", err) + } + + err = unix.Statx(unix.AT_FDCWD, "symlink1", flags, unix.STATX_BASIC_STATS, &stx) + if err != nil { + t.Fatalf("Statx: %v", err) + } + + // follow symlink, expect a regulat file + if stx.Mode&unix.S_IFREG == 0 { + t.Errorf("Statx: didn't follow symlink") + } + + err = unix.Statx(unix.AT_FDCWD, "symlink1", flags|unix.AT_SYMLINK_NOFOLLOW, unix.STATX_ALL, &stx) + if err != nil { + t.Fatalf("Statx: %v", err) + } + + // follow symlink, expect a symlink + if stx.Mode&unix.S_IFLNK == 0 { + t.Errorf("Statx: unexpectedly followed symlink") + } + if uint32(stx.Mode) != st.Mode { + t.Errorf("Statx: returned stat mode does not match Lstat") + } + + atime = unix.StatxTimestamp{Sec: int64(st.Atim.Sec), Nsec: uint32(st.Atim.Nsec)} + ctime = unix.StatxTimestamp{Sec: int64(st.Ctim.Sec), Nsec: uint32(st.Ctim.Nsec)} + mtime = unix.StatxTimestamp{Sec: int64(st.Mtim.Sec), Nsec: uint32(st.Mtim.Nsec)} + + if stx.Atime != atime { + t.Errorf("Statx: returned stat atime does not match Lstat") + } + if stx.Ctime != ctime { + t.Errorf("Statx: returned stat ctime does not match Lstat") + } + if stx.Mtime != mtime { + t.Errorf("Statx: returned stat mtime does not match Lstat") + } } // utilities taken from os/os_test.go diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go index 4455eff..060e5e6 100644 --- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -55,7 +55,6 @@ func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) { } func nametomib(name string) (mib []_C_int, err error) { - // Split name into components. var parts []string last := 0 @@ -93,18 +92,6 @@ func nametomib(name string) (mib []_C_int, err error) { return mib, nil } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) -} - //sysnb pipe() (fd1 int, fd2 int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -119,6 +106,23 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { return getdents(fd, buf) } +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD + +func Getwd() (string, error) { + var buf [PathMax]byte + _, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + // TODO func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { return -1, ENOSYS @@ -129,6 +133,91 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { return ENOSYS } +//sys ioctl(fd int, req uint, arg uintptr) (err error) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req uint, value *Termios) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func Uname(uname *Utsname) error { + mib := []_C_int{CTL_KERN, KERN_OSTYPE} + n := unsafe.Sizeof(uname.Sysname) + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_HOSTNAME} + n = unsafe.Sizeof(uname.Nodename) + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_OSRELEASE} + n = unsafe.Sizeof(uname.Release) + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_VERSION} + n = unsafe.Sizeof(uname.Version) + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + return err + } + + // The version might have newlines or tabs in it, convert them to + // spaces. + for i, b := range uname.Version { + if b == '\n' || b == '\t' { + if i == len(uname.Version)-1 { + uname.Version[i] = 0 + } else { + uname.Version[i] = ' ' + } + } + } + + mib = []_C_int{CTL_HW, HW_MACHINE} + n = unsafe.Sizeof(uname.Machine) + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + return err + } + + return nil +} + /* * Exposed directly */ @@ -389,7 +478,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { // getitimer // getvfsstat // getxattr -// ioctl // ktrace // lchflags // lchmod diff --git a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go deleted file mode 100644 index 530792e..0000000 --- a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build dragonfly freebsd netbsd openbsd - -package unix - -const ImplementsGetwd = false - -func Getwd() (string, error) { return "", ENOTSUP } diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 2158196..407d119 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -13,6 +13,7 @@ package unix import ( + "sort" "syscall" "unsafe" ) @@ -32,39 +33,15 @@ type SockaddrDatalink struct { func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) func nametomib(name string) (mib []_C_int, err error) { - - // Perform lookup via a binary search - left := 0 - right := len(sysctlMib) - 1 - for { - idx := left + (right-left)/2 - switch { - case name == sysctlMib[idx].ctlname: - return sysctlMib[idx].ctloid, nil - case name > sysctlMib[idx].ctlname: - left = idx + 1 - default: - right = idx - 1 - } - if left > right { - break - } + i := sort.Search(len(sysctlMib), func(i int) bool { + return sysctlMib[i].ctlname >= name + }) + if i < len(sysctlMib) && sysctlMib[i].ctlname == name { + return sysctlMib[i].ctloid, nil } return nil, EINVAL } -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) -} - //sysnb pipe(p *[2]_C_int) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { @@ -82,6 +59,23 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { return getdents(fd, buf) } +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD + +func Getwd() (string, error) { + var buf [PathMax]byte + _, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + // TODO func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { return -1, ENOSYS @@ -107,6 +101,91 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { return ENOSYS } +//sys ioctl(fd int, req uint, arg uintptr) (err error) + +// ioctl itself should not be exposed directly, but additional get/set +// functions for specific types are permissible. + +// IoctlSetInt performs an ioctl operation which sets an integer value +// on fd, using the specified request number. +func IoctlSetInt(fd int, req uint, value int) error { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req uint, value *Winsize) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req uint, value *Termios) error { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +// IoctlGetInt performs an ioctl operation which gets an integer value +// from fd, using the specified request number. +func IoctlGetInt(fd int, req uint) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req uint) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func Uname(uname *Utsname) error { + mib := []_C_int{CTL_KERN, KERN_OSTYPE} + n := unsafe.Sizeof(uname.Sysname) + if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_HOSTNAME} + n = unsafe.Sizeof(uname.Nodename) + if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_OSRELEASE} + n = unsafe.Sizeof(uname.Release) + if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { + return err + } + + mib = []_C_int{CTL_KERN, KERN_VERSION} + n = unsafe.Sizeof(uname.Version) + if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { + return err + } + + // The version might have newlines or tabs in it, convert them to + // spaces. + for i, b := range uname.Version { + if b == '\n' || b == '\t' { + if i == len(uname.Version)-1 { + uname.Version[i] = 0 + } else { + uname.Version[i] = ' ' + } + } + } + + mib = []_C_int{CTL_HW, HW_MACHINE} + n = unsafe.Sizeof(uname.Machine) + if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { + return err + } + + return nil +} + /* * Exposed directly */ @@ -227,7 +306,6 @@ func setattrlistTimes(path string, times []Timespec, flags int) error { // getresuid // getrtable // getthrid -// ioctl // ktrace // lfs_bmapv // lfs_markv diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 3ab9e07..a87aebf 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -34,31 +34,6 @@ type SockaddrDatalink struct { raw RawSockaddrDatalink } -func clen(n []byte) int { - for i := 0; i < len(n); i++ { - if n[i] == 0 { - return i - } - } - return len(n) -} - -func direntIno(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) -} - -func direntReclen(buf []byte) (uint64, bool) { - return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) -} - -func direntNamlen(buf []byte) (uint64, bool) { - reclen, ok := direntReclen(buf) - if !ok { - return 0, false - } - return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true -} - //sysnb pipe(p *[2]_C_int) (n int, err error) func Pipe(p []int) (err error) { @@ -139,6 +114,18 @@ func Getsockname(fd int) (sa Sockaddr, err error) { return anyToSockaddr(&rsa) } +// GetsockoptString returns the string value of the socket option opt for the +// socket associated with fd at the given socket level. +func GetsockoptString(fd, level, opt int) (string, error) { + buf := make([]byte, 256) + vallen := _Socklen(len(buf)) + err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) + if err != nil { + return "", err + } + return string(buf[:vallen-1]), nil +} + const ImplementsGetwd = true //sys Getcwd(buf []byte) (n int, err error) @@ -655,6 +642,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) { //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Rmdir(path string) (err error) //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) //sysnb Setegid(egid int) (err error) //sysnb Seteuid(euid int) (err error) //sysnb Setgid(gid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_test.go b/vendor/golang.org/x/sys/unix/syscall_solaris_test.go index d3e7d2b..57dba88 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_test.go @@ -9,10 +9,31 @@ package unix_test import ( "os/exec" "testing" + "time" "golang.org/x/sys/unix" ) +func TestSelect(t *testing.T) { + err := unix.Select(0, nil, nil, nil, &unix.Timeval{Sec: 0, Usec: 0}) + if err != nil { + t.Fatalf("Select: %v", err) + } + + dur := 150 * time.Millisecond + tv := unix.NsecToTimeval(int64(dur)) + start := time.Now() + err = unix.Select(0, nil, nil, nil, &tv) + took := time.Since(start) + if err != nil { + t.Fatalf("Select: %v", err) + } + + if took < dur { + t.Errorf("Select: timeout should have been at least %v, got %v", dur, took) + } +} + func TestStatvfs(t *testing.T) { if err := unix.Statvfs("", nil); err == nil { t.Fatal(`Statvfs("") expected failure`) diff --git a/vendor/golang.org/x/sys/unix/syscall_test.go b/vendor/golang.org/x/sys/unix/syscall_test.go index 95eac92..a8eef7c 100644 --- a/vendor/golang.org/x/sys/unix/syscall_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_test.go @@ -48,3 +48,13 @@ func TestItoa(t *testing.T) { t.Fatalf("itoa(%d) = %s, want %s", i, s, f) } } + +func TestUname(t *testing.T) { + var utsname unix.Utsname + err := unix.Uname(&utsname) + if err != nil { + t.Fatalf("Uname: %v", err) + } + + t.Logf("OS: %s/%s %s", utsname.Sysname[:], utsname.Machine[:], utsname.Release[:]) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 3ed8a91..35c1cd5 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -50,6 +50,17 @@ func errnoErr(e syscall.Errno) error { return e } +// clen returns the index of the first NULL byte in n or len(n) if n contains no +// NULL byte or len(n) if n contains no NULL byte +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + // Mmap manager, for use by operating system-specific implementations. type mmapper struct { diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go index d0a09ce..496e471 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix_test.go @@ -378,6 +378,54 @@ func TestPoll(t *testing.T) { } } +func TestGetwd(t *testing.T) { + fd, err := os.Open(".") + if err != nil { + t.Fatalf("Open .: %s", err) + } + defer fd.Close() + // These are chosen carefully not to be symlinks on a Mac + // (unlike, say, /var, /etc) + dirs := []string{"/", "/usr/bin"} + if runtime.GOOS == "darwin" { + switch runtime.GOARCH { + case "arm", "arm64": + d1, err := ioutil.TempDir("", "d1") + if err != nil { + t.Fatalf("TempDir: %v", err) + } + d2, err := ioutil.TempDir("", "d2") + if err != nil { + t.Fatalf("TempDir: %v", err) + } + dirs = []string{d1, d2} + } + } + oldwd := os.Getenv("PWD") + for _, d := range dirs { + err = os.Chdir(d) + if err != nil { + t.Fatalf("Chdir: %v", err) + } + pwd, err := unix.Getwd() + if err != nil { + t.Fatalf("Getwd in %s: %s", d, err) + } + os.Setenv("PWD", oldwd) + err = fd.Chdir() + if err != nil { + // We changed the current directory and cannot go back. + // Don't let the tests continue; they'll scribble + // all over some other directory. + fmt.Fprintf(os.Stderr, "fchdir back to dot failed: %s\n", err) + os.Exit(1) + } + if pwd != d { + t.Fatalf("Getwd returned %q want %q", pwd, d) + } + } +} + // mktmpfifo creates a temporary FIFO and provides a cleanup function. func mktmpfifo(t *testing.T) (*os.File, func()) { err := unix.Mkfifo("fifo", 0666) diff --git a/vendor/golang.org/x/sys/unix/timestruct.go b/vendor/golang.org/x/sys/unix/timestruct.go index 139fbbe..47b9011 100644 --- a/vendor/golang.org/x/sys/unix/timestruct.go +++ b/vendor/golang.org/x/sys/unix/timestruct.go @@ -6,6 +6,8 @@ package unix +import "time" + // TimespecToNsec converts a Timespec value into a number of // nanoseconds since the Unix epoch. func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } @@ -22,6 +24,24 @@ func NsecToTimespec(nsec int64) Timespec { return setTimespec(sec, nsec) } +// TimeToTimespec converts t into a Timespec. +// On some 32-bit systems the range of valid Timespec values are smaller +// than that of time.Time values. So if t is out of the valid range of +// Timespec, it returns a zero Timespec and ERANGE. +func TimeToTimespec(t time.Time) (Timespec, error) { + sec := t.Unix() + nsec := int64(t.Nanosecond()) + ts := setTimespec(sec, nsec) + + // Currently all targets have either int32 or int64 for Timespec.Sec. + // If there were a new target with floating point type for it, we have + // to consider the rounding error. + if int64(ts.Sec) != sec { + return Timespec{}, ERANGE + } + return ts, nil +} + // TimevalToNsec converts a Timeval value into a number of nanoseconds // since the Unix epoch. func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } diff --git a/vendor/golang.org/x/sys/unix/timestruct_test.go b/vendor/golang.org/x/sys/unix/timestruct_test.go new file mode 100644 index 0000000..4215f46 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/timestruct_test.go @@ -0,0 +1,54 @@ +// Copyright 2017 The Go Authors. All right reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "testing" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +func TestTimeToTimespec(t *testing.T) { + timeTests := []struct { + time time.Time + valid bool + }{ + {time.Unix(0, 0), true}, + {time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC), true}, + {time.Date(2262, time.December, 31, 23, 0, 0, 0, time.UTC), false}, + {time.Unix(0x7FFFFFFF, 0), true}, + {time.Unix(0x80000000, 0), false}, + {time.Unix(0x7FFFFFFF, 1000000000), false}, + {time.Unix(0x7FFFFFFF, 999999999), true}, + {time.Unix(-0x80000000, 0), true}, + {time.Unix(-0x80000001, 0), false}, + {time.Date(2038, time.January, 19, 3, 14, 7, 0, time.UTC), true}, + {time.Date(2038, time.January, 19, 3, 14, 8, 0, time.UTC), false}, + {time.Date(1901, time.December, 13, 20, 45, 52, 0, time.UTC), true}, + {time.Date(1901, time.December, 13, 20, 45, 51, 0, time.UTC), false}, + } + + // Currently all targets have either int32 or int64 for Timespec.Sec. + // If there were a new target with unsigned or floating point type for + // it, this test must be adjusted. + have64BitTime := (unsafe.Sizeof(unix.Timespec{}.Sec) == 8) + for _, tt := range timeTests { + ts, err := unix.TimeToTimespec(tt.time) + tt.valid = tt.valid || have64BitTime + if tt.valid && err != nil { + t.Errorf("TimeToTimespec(%v): %v", tt.time, err) + } + if err == nil { + tstime := time.Unix(int64(ts.Sec), int64(ts.Nsec)) + if !tstime.Equal(tt.time) { + t.Errorf("TimeToTimespec(%v) is the time %v", tt.time, tstime) + } + } + } +} diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go index 3a938ac..46b9908 100644 --- a/vendor/golang.org/x/sys/unix/types_darwin.go +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -39,6 +39,7 @@ package unix #include #include #include +#include #include #include #include @@ -270,3 +271,7 @@ const ( POLLWRBAND = C.POLLWRBAND POLLWRNORM = C.POLLWRNORM ) + +// uname + +type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go index 78ce32a..0c63304 100644 --- a/vendor/golang.org/x/sys/unix/types_dragonfly.go +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go @@ -35,6 +35,7 @@ package unix #include #include #include +#include #include #include #include @@ -126,6 +127,12 @@ type Dirent C.struct_dirent type Fsid C.struct_fsid +// File system limits + +const ( + PathMax = C.PATH_MAX +) + // Sockets type RawSockaddrInet4 C.struct_sockaddr_in @@ -242,6 +249,8 @@ type BpfHdr C.struct_bpf_hdr type Termios C.struct_termios +type Winsize C.struct_winsize + // fchmodat-like syscalls. const ( @@ -265,3 +274,7 @@ const ( POLLWRBAND = C.POLLWRBAND POLLWRNORM = C.POLLWRNORM ) + +// Uname + +type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go index 7340004..4eb02cd 100644 --- a/vendor/golang.org/x/sys/unix/types_freebsd.go +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -36,6 +36,7 @@ package unix #include #include #include +#include #include #include #include @@ -215,6 +216,12 @@ type Dirent C.struct_dirent type Fsid C.struct_fsid +// File system limits + +const ( + PathMax = C.PATH_MAX +) + // Advice to Fadvise const ( @@ -389,3 +396,7 @@ const ( // Capabilities type CapRights C.struct_cap_rights + +// Uname + +type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go index 9097245..10aa9b3 100644 --- a/vendor/golang.org/x/sys/unix/types_netbsd.go +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -37,6 +37,7 @@ package unix #include #include #include +#include #include #include #include @@ -111,6 +112,12 @@ type Dirent C.struct_dirent type Fsid C.fsid_t +// File system limits + +const ( + PathMax = C.PATH_MAX +) + // Sockets type RawSockaddrInet4 C.struct_sockaddr_in @@ -228,6 +235,8 @@ type BpfTimeval C.struct_bpf_timeval type Termios C.struct_termios +type Winsize C.struct_winsize + // fchmodat-like syscalls. const ( @@ -255,3 +264,7 @@ const ( // Sysctl type Sysctlnode C.struct_sysctlnode + +// Uname + +type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go index 44ea7c0..649e559 100644 --- a/vendor/golang.org/x/sys/unix/types_openbsd.go +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -36,6 +36,7 @@ package unix #include #include #include +#include #include #include #include @@ -127,6 +128,12 @@ type Dirent C.struct_dirent type Fsid C.fsid_t +// File system limits + +const ( + PathMax = C.PATH_MAX +) + // Sockets type RawSockaddrInet4 C.struct_sockaddr_in @@ -244,6 +251,8 @@ type BpfTimeval C.struct_bpf_timeval type Termios C.struct_termios +type Winsize C.struct_winsize + // fchmodat-like syscalls. const ( @@ -267,3 +276,7 @@ const ( POLLWRBAND = C.POLLWRBAND POLLWRNORM = C.POLLWRNORM ) + +// Uname + +type Utsname C.struct_utsname diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go index ac581f3..dcba884 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go @@ -249,6 +249,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -510,6 +512,7 @@ const ( F_PATHPKG_CHECK = 0x34 F_PEOFPOSMODE = 0x3 F_PREALLOCATE = 0x2a + F_PUNCHHOLE = 0x63 F_RDADVISE = 0x2c F_RDAHEAD = 0x2d F_RDLCK = 0x1 @@ -526,10 +529,12 @@ const ( F_SINGLE_WRITER = 0x4c F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b + F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -766,6 +771,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOW_ECN_MASK = 0x300 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -856,6 +862,7 @@ const ( IP_RECVOPTS = 0x5 IP_RECVPKTINFO = 0x1a IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x1b IP_RECVTTL = 0x18 IP_RETOPTS = 0x8 IP_RF = 0x8000 @@ -874,6 +881,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index 2ba407a..1a51c96 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -249,6 +249,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -510,6 +512,7 @@ const ( F_PATHPKG_CHECK = 0x34 F_PEOFPOSMODE = 0x3 F_PREALLOCATE = 0x2a + F_PUNCHHOLE = 0x63 F_RDADVISE = 0x2c F_RDAHEAD = 0x2d F_RDLCK = 0x1 @@ -526,10 +529,12 @@ const ( F_SINGLE_WRITER = 0x4c F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b + F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -766,6 +771,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOW_ECN_MASK = 0x300 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -856,6 +862,7 @@ const ( IP_RECVOPTS = 0x5 IP_RECVPKTINFO = 0x1a IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x1b IP_RECVTTL = 0x18 IP_RETOPTS = 0x8 IP_RF = 0x8000 @@ -874,6 +881,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go index f4a2fde..fa135b1 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go @@ -249,6 +249,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -510,6 +512,7 @@ const ( F_PATHPKG_CHECK = 0x34 F_PEOFPOSMODE = 0x3 F_PREALLOCATE = 0x2a + F_PUNCHHOLE = 0x63 F_RDADVISE = 0x2c F_RDAHEAD = 0x2d F_RDLCK = 0x1 @@ -526,10 +529,12 @@ const ( F_SINGLE_WRITER = 0x4c F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b + F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -766,6 +771,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOW_ECN_MASK = 0x300 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -856,6 +862,7 @@ const ( IP_RECVOPTS = 0x5 IP_RECVPKTINFO = 0x1a IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x1b IP_RECVTTL = 0x18 IP_RETOPTS = 0x8 IP_RF = 0x8000 @@ -874,6 +881,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index 4c2e696..6419c65 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -249,6 +249,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -510,6 +512,7 @@ const ( F_PATHPKG_CHECK = 0x34 F_PEOFPOSMODE = 0x3 F_PREALLOCATE = 0x2a + F_PUNCHHOLE = 0x63 F_RDADVISE = 0x2c F_RDAHEAD = 0x2d F_RDLCK = 0x1 @@ -526,10 +529,12 @@ const ( F_SINGLE_WRITER = 0x4c F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b + F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -766,6 +771,7 @@ const ( IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FLOW_ECN_MASK = 0x300 IPV6_FRAGTTL = 0x3c IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f @@ -856,6 +862,7 @@ const ( IP_RECVOPTS = 0x5 IP_RECVPKTINFO = 0x1a IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x1b IP_RECVTTL = 0x18 IP_RETOPTS = 0x8 IP_RF = 0x8000 @@ -874,6 +881,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go index 8f40598..d960155 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -168,6 +168,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -353,6 +355,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -835,6 +838,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go index adf5eef..a8b0587 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -351,6 +351,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -608,6 +610,7 @@ const ( F_UNLCKSYS = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -944,6 +947,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go index 360caff..cf5f012 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -351,6 +351,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -608,6 +610,7 @@ const ( F_UNLCKSYS = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -944,6 +947,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go index 87deda9..9bbb90a 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -351,6 +351,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DLT_A429 = 0xb8 @@ -615,6 +617,7 @@ const ( F_UNLCKSYS = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -951,6 +954,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index bb8a772..4fba476 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1637,6 +1638,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index cf0b224..7e2a108 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1638,6 +1639,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 57cfcf3..250841b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1642,6 +1643,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index b6e5b09..f5d7856 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -625,6 +625,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1628,6 +1629,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index 0113e1f..f45492d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1640,6 +1641,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index 6857657..f5a64fb 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1640,6 +1641,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index 14f7e0e..db6d556 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1640,6 +1641,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index f795862..4a62a55 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1640,6 +1641,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index 2544c4b..5e1e81e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1695,6 +1696,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index 133bdf5..6a80324 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1695,6 +1696,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index b921fb1..af5a895 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -623,6 +623,7 @@ const ( IN_OPEN = 0x20 IN_Q_OVERFLOW = 0x4000 IN_UNMOUNT = 0x2000 + IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 IPPROTO_AH = 0x33 IPPROTO_BEETPH = 0x5e IPPROTO_COMP = 0x6c @@ -1699,6 +1700,27 @@ const ( SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 + STATX_ALL = 0xfff + STATX_ATIME = 0x20 + STATX_ATTR_APPEND = 0x20 + STATX_ATTR_AUTOMOUNT = 0x1000 + STATX_ATTR_COMPRESSED = 0x4 + STATX_ATTR_ENCRYPTED = 0x800 + STATX_ATTR_IMMUTABLE = 0x10 + STATX_ATTR_NODUMP = 0x40 + STATX_BASIC_STATS = 0x7ff + STATX_BLOCKS = 0x400 + STATX_BTIME = 0x800 + STATX_CTIME = 0x80 + STATX_GID = 0x10 + STATX_INO = 0x100 + STATX_MODE = 0x2 + STATX_MTIME = 0x40 + STATX_NLINK = 0x4 + STATX_SIZE = 0x200 + STATX_TYPE = 0x1 + STATX_UID = 0x8 + STATX__RESERVED = 0x80000000 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go index b4338d5..1612b66 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -1,5 +1,5 @@ // mkerrors.sh -m32 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build 386,netbsd @@ -169,6 +169,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 CTL_QUERY = -0x2 @@ -581,6 +583,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -970,6 +973,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go index 4994437..c994ab6 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -1,5 +1,5 @@ // mkerrors.sh -m64 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,netbsd @@ -169,6 +169,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 CTL_QUERY = -0x2 @@ -571,6 +573,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -960,6 +963,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go index 206c75f..a8f9efe 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -1,5 +1,5 @@ // mkerrors.sh -marm -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,netbsd @@ -161,6 +161,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 CTL_QUERY = -0x2 @@ -563,6 +565,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -952,6 +955,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go index 3322e99..04e4f33 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -1,5 +1,5 @@ // mkerrors.sh -m32 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build 386,openbsd @@ -157,6 +157,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCOSFPFLUSH = 0x2000444e @@ -442,6 +444,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -860,6 +863,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LCNT_OVERLOAD_FLUSH = 0x6 LOCK_EX = 0x2 LOCK_NB = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go index 1758ecc..c80ff98 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -1,5 +1,5 @@ // mkerrors.sh -m64 -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,openbsd @@ -157,6 +157,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCOSFPFLUSH = 0x2000444e @@ -442,6 +444,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -860,6 +863,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LCNT_OVERLOAD_FLUSH = 0x6 LOCK_EX = 0x2 LOCK_NB = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go index 3ed0b26..4c32049 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go @@ -1,5 +1,5 @@ // mkerrors.sh -// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Code generated by the command above; see README.md. DO NOT EDIT. // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- _const.go @@ -157,6 +157,8 @@ const ( CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a + CTL_HW = 0x6 + CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCOSFPFLUSH = 0x2000444e @@ -441,6 +443,7 @@ const ( F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 + HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 @@ -859,6 +862,10 @@ const ( IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 + KERN_HOSTNAME = 0xa + KERN_OSRELEASE = 0x2 + KERN_OSTYPE = 0x1 + KERN_VERSION = 0x4 LCNT_OVERLOAD_FLUSH = 0x6 LOCK_EX = 0x2 LOCK_NB = 0x4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go index 9fb1b31..763ae4f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { @@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index 1e0fb46..d6808e0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { @@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go index e1026a8..6ae95e6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -221,7 +221,7 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) } else { _p0 = unsafe.Pointer(&_zero) } - _, _, e1 := Syscall6(SYS_SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if e1 != 0 { err = errnoErr(e1) } @@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { @@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 37fb210..ca6a7ea 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -266,6 +266,17 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { @@ -408,17 +419,6 @@ func ioctl(fd int, req uint, arg uintptr) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT -func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { - r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) - n = int(r0) - if e1 != 0 { - err = errnoErr(e1) - } - return -} - -// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT - func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go index 7576147..a0241de 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -423,6 +423,33 @@ func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go index 8bcecfb..fd9ca5a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { @@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go index 61c0cf9..a9f18b2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { @@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go index ffd0107..9823e18 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -389,6 +389,23 @@ func pipe() (r int, w int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { @@ -937,6 +954,23 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go index 85a2907..ef9602c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1569,6 +1584,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Ftruncate(fd int, length int64) (err error) { _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) if e1 != 0 { @@ -1580,7 +1610,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0) egid = int(r0) return } @@ -1588,7 +1618,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0) euid = int(r0) return } @@ -1596,7 +1626,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0) gid = int(r0) return } @@ -1604,7 +1634,7 @@ func Getgid() (gid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go index 8e2be97..63054b3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1566,6 +1581,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1587,7 +1617,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1595,7 +1625,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1603,7 +1633,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1621,7 +1651,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go index 5ff0637..8b10ee1 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1728,8 +1743,23 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0) egid = int(r0) return } @@ -1737,7 +1767,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0) euid = int(r0) return } @@ -1745,7 +1775,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0) gid = int(r0) return } @@ -1753,7 +1783,7 @@ func Getgid() (gid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go index 4076011..8f276d6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1582,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1590,7 +1605,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1598,7 +1613,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1616,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go index 984e561..61169b3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1540,7 +1555,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1548,7 +1563,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1556,7 +1571,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1564,7 +1579,7 @@ func Getgid() (gid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } @@ -2014,6 +2029,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Stat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go index f98194e..4cb59b4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1546,6 +1561,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1567,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1575,7 +1605,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1583,7 +1613,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1601,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go index f302670..0b547ae 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1546,6 +1561,21 @@ func Fchown(fd int, uid int, gid int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1567,7 +1597,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1575,7 +1605,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1583,7 +1613,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1601,7 +1631,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go index f18c5e4..cd94d3a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1540,7 +1555,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1548,7 +1563,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1556,7 +1571,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1564,7 +1579,7 @@ func Getgid() (gid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } @@ -2014,6 +2029,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Stat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index bc26824..cdad555 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1556,6 +1571,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1577,7 +1607,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1585,7 +1615,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1593,7 +1623,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1611,7 +1641,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 8d874cb..38f4e44 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1556,6 +1571,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1577,7 +1607,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1585,7 +1615,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1593,7 +1623,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1611,7 +1641,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go index 1693212..c443baf 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -538,7 +538,7 @@ func Eventfd(initval uint, flags int) (fd int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { - Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) return } @@ -674,7 +674,7 @@ func Getpgid(pid int) (pgid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { - r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) pid = int(r0) return } @@ -682,7 +682,7 @@ func Getpid() (pid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { - r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } @@ -739,7 +739,7 @@ func Getsid(pid int) (sid int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettid() (tid int) { - r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) tid = int(r0) return } @@ -1238,8 +1238,23 @@ func Setxattr(path string, attr string, data []byte, flags int) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Sync() { - Syscall(SYS_SYNC, 0, 0, 0) + SyscallNoError(SYS_SYNC, 0, 0, 0) return } @@ -1298,7 +1313,7 @@ func Times(tms *Tms) (ticks uintptr, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { - r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) oldmask = int(r0) return } @@ -1566,6 +1581,21 @@ func Fstat(fd int, stat *Stat_t) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Fstatfs(fd int, buf *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) if e1 != 0 { @@ -1587,7 +1617,7 @@ func Ftruncate(fd int, length int64) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { - r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } @@ -1595,7 +1625,7 @@ func Getegid() (egid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { - r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) euid = int(r0) return } @@ -1603,7 +1633,7 @@ func Geteuid() (euid int) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { - r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) gid = int(r0) return } @@ -1621,7 +1651,7 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { - r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) return } diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go index cfdea85..62eadff 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go index 244a3c7..307f4e9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go index e891adc..6110931 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -406,6 +406,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index f48beb0..003f820 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 44a3faf..ba0e8f3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index 1563752..2ce02c7 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -404,6 +404,33 @@ func getdents(fd int, buf []byte) (n int, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ioctl(fd int, req uint, arg uintptr) (err error) { + _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go index 1d45276..f5d01b3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -95,6 +95,7 @@ import ( //go:cgo_import_dynamic libc_renameat renameat "libc.so" //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" //go:cgo_import_dynamic libc_lseek lseek "libc.so" +//go:cgo_import_dynamic libc_select select "libc.so" //go:cgo_import_dynamic libc_setegid setegid "libc.so" //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" //go:cgo_import_dynamic libc_setgid setgid "libc.so" @@ -220,6 +221,7 @@ import ( //go:linkname procRenameat libc_renameat //go:linkname procRmdir libc_rmdir //go:linkname proclseek libc_lseek +//go:linkname procSelect libc_select //go:linkname procSetegid libc_setegid //go:linkname procSeteuid libc_seteuid //go:linkname procSetgid libc_setgid @@ -346,6 +348,7 @@ var ( procRenameat, procRmdir, proclseek, + procSelect, procSetegid, procSeteuid, procSetgid, @@ -1264,6 +1267,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { return } +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = e1 + } + return +} + func Setegid(egid int) (err error) { _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go index 2786773..d1d36da 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go @@ -1,5 +1,5 @@ -// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h +// Code generated by the command above; see README.md. DO NOT EDIT. // +build 386,darwin @@ -121,13 +121,15 @@ const ( SYS_CSOPS = 169 SYS_CSOPS_AUDITTOKEN = 170 SYS_WAITID = 173 + SYS_KDEBUG_TYPEFILTER = 177 + SYS_KDEBUG_TRACE_STRING = 178 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 - SYS_CHUD = 185 + SYS_THREAD_SELFCOUNTS = 186 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -278,7 +280,6 @@ const ( SYS_KQUEUE = 362 SYS_KEVENT = 363 SYS_LCHOWN = 364 - SYS_STACK_SNAPSHOT = 365 SYS_BSDTHREAD_REGISTER = 366 SYS_WORKQ_OPEN = 367 SYS_WORKQ_KERNRETURN = 368 @@ -287,6 +288,8 @@ const ( SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 + SYS_KEVENT_QOS = 374 + SYS_KEVENT_ID = 375 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -298,11 +301,8 @@ const ( SYS___MAC_GET_FD = 388 SYS___MAC_SET_FD = 389 SYS___MAC_GET_PID = 390 - SYS___MAC_GET_LCID = 391 - SYS___MAC_GET_LCTX = 392 - SYS___MAC_SET_LCTX = 393 - SYS_SETLCID = 394 - SYS_GETLCID = 395 + SYS_PSELECT = 394 + SYS_PSELECT_NOCANCEL = 395 SYS_READ_NOCANCEL = 396 SYS_WRITE_NOCANCEL = 397 SYS_OPEN_NOCANCEL = 398 @@ -351,6 +351,7 @@ const ( SYS_GUARDED_CLOSE_NP = 442 SYS_GUARDED_KQUEUE_NP = 443 SYS_CHANGE_FDGUARD_NP = 444 + SYS_USRCTL = 445 SYS_PROC_RLIMIT_CONTROL = 446 SYS_CONNECTX = 447 SYS_DISCONNECTX = 448 @@ -367,6 +368,7 @@ const ( SYS_COALITION_INFO = 459 SYS_NECP_MATCH_POLICY = 460 SYS_GETATTRLISTBULK = 461 + SYS_CLONEFILEAT = 462 SYS_OPENAT = 463 SYS_OPENAT_NOCANCEL = 464 SYS_RENAMEAT = 465 @@ -392,7 +394,43 @@ const ( SYS_GUARDED_WRITE_NP = 485 SYS_GUARDED_PWRITE_NP = 486 SYS_GUARDED_WRITEV_NP = 487 - SYS_RENAME_EXT = 488 + SYS_RENAMEATX_NP = 488 SYS_MREMAP_ENCRYPTED = 489 - SYS_MAXSYSCALL = 490 + SYS_NETAGENT_TRIGGER = 490 + SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 + SYS_MICROSTACKSHOT = 492 + SYS_GRAB_PGO_DATA = 493 + SYS_PERSONA = 494 + SYS_WORK_INTERVAL_CTL = 499 + SYS_GETENTROPY = 500 + SYS_NECP_OPEN = 501 + SYS_NECP_CLIENT_ACTION = 502 + SYS___NEXUS_OPEN = 503 + SYS___NEXUS_REGISTER = 504 + SYS___NEXUS_DEREGISTER = 505 + SYS___NEXUS_CREATE = 506 + SYS___NEXUS_DESTROY = 507 + SYS___NEXUS_GET_OPT = 508 + SYS___NEXUS_SET_OPT = 509 + SYS___CHANNEL_OPEN = 510 + SYS___CHANNEL_GET_INFO = 511 + SYS___CHANNEL_SYNC = 512 + SYS___CHANNEL_GET_OPT = 513 + SYS___CHANNEL_SET_OPT = 514 + SYS_ULOCK_WAIT = 515 + SYS_ULOCK_WAKE = 516 + SYS_FCLONEFILEAT = 517 + SYS_FS_SNAPSHOT = 518 + SYS_TERMINATE_WITH_PAYLOAD = 520 + SYS_ABORT_WITH_PAYLOAD = 521 + SYS_NECP_SESSION_OPEN = 522 + SYS_NECP_SESSION_ACTION = 523 + SYS_SETATTRLISTAT = 524 + SYS_NET_QOS_GUIDELINE = 525 + SYS_FMOUNT = 526 + SYS_NTP_ADJTIME = 527 + SYS_NTP_GETTIME = 528 + SYS_OS_FAULT_WITH_PAYLOAD = 529 + SYS_MAXSYSCALL = 530 + SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go index 09de240..e35de41 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go @@ -1,5 +1,5 @@ -// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h -// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/sys/syscall.h +// Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,darwin @@ -121,13 +121,15 @@ const ( SYS_CSOPS = 169 SYS_CSOPS_AUDITTOKEN = 170 SYS_WAITID = 173 + SYS_KDEBUG_TYPEFILTER = 177 + SYS_KDEBUG_TRACE_STRING = 178 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 - SYS_CHUD = 185 + SYS_THREAD_SELFCOUNTS = 186 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -278,7 +280,6 @@ const ( SYS_KQUEUE = 362 SYS_KEVENT = 363 SYS_LCHOWN = 364 - SYS_STACK_SNAPSHOT = 365 SYS_BSDTHREAD_REGISTER = 366 SYS_WORKQ_OPEN = 367 SYS_WORKQ_KERNRETURN = 368 @@ -287,6 +288,8 @@ const ( SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 + SYS_KEVENT_QOS = 374 + SYS_KEVENT_ID = 375 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -298,11 +301,8 @@ const ( SYS___MAC_GET_FD = 388 SYS___MAC_SET_FD = 389 SYS___MAC_GET_PID = 390 - SYS___MAC_GET_LCID = 391 - SYS___MAC_GET_LCTX = 392 - SYS___MAC_SET_LCTX = 393 - SYS_SETLCID = 394 - SYS_GETLCID = 395 + SYS_PSELECT = 394 + SYS_PSELECT_NOCANCEL = 395 SYS_READ_NOCANCEL = 396 SYS_WRITE_NOCANCEL = 397 SYS_OPEN_NOCANCEL = 398 @@ -351,6 +351,7 @@ const ( SYS_GUARDED_CLOSE_NP = 442 SYS_GUARDED_KQUEUE_NP = 443 SYS_CHANGE_FDGUARD_NP = 444 + SYS_USRCTL = 445 SYS_PROC_RLIMIT_CONTROL = 446 SYS_CONNECTX = 447 SYS_DISCONNECTX = 448 @@ -367,6 +368,7 @@ const ( SYS_COALITION_INFO = 459 SYS_NECP_MATCH_POLICY = 460 SYS_GETATTRLISTBULK = 461 + SYS_CLONEFILEAT = 462 SYS_OPENAT = 463 SYS_OPENAT_NOCANCEL = 464 SYS_RENAMEAT = 465 @@ -392,7 +394,43 @@ const ( SYS_GUARDED_WRITE_NP = 485 SYS_GUARDED_PWRITE_NP = 486 SYS_GUARDED_WRITEV_NP = 487 - SYS_RENAME_EXT = 488 + SYS_RENAMEATX_NP = 488 SYS_MREMAP_ENCRYPTED = 489 - SYS_MAXSYSCALL = 490 + SYS_NETAGENT_TRIGGER = 490 + SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 + SYS_MICROSTACKSHOT = 492 + SYS_GRAB_PGO_DATA = 493 + SYS_PERSONA = 494 + SYS_WORK_INTERVAL_CTL = 499 + SYS_GETENTROPY = 500 + SYS_NECP_OPEN = 501 + SYS_NECP_CLIENT_ACTION = 502 + SYS___NEXUS_OPEN = 503 + SYS___NEXUS_REGISTER = 504 + SYS___NEXUS_DEREGISTER = 505 + SYS___NEXUS_CREATE = 506 + SYS___NEXUS_DESTROY = 507 + SYS___NEXUS_GET_OPT = 508 + SYS___NEXUS_SET_OPT = 509 + SYS___CHANNEL_OPEN = 510 + SYS___CHANNEL_GET_INFO = 511 + SYS___CHANNEL_SYNC = 512 + SYS___CHANNEL_GET_OPT = 513 + SYS___CHANNEL_SET_OPT = 514 + SYS_ULOCK_WAIT = 515 + SYS_ULOCK_WAKE = 516 + SYS_FCLONEFILEAT = 517 + SYS_FS_SNAPSHOT = 518 + SYS_TERMINATE_WITH_PAYLOAD = 520 + SYS_ABORT_WITH_PAYLOAD = 521 + SYS_NECP_SESSION_OPEN = 522 + SYS_NECP_SESSION_ACTION = 523 + SYS_SETATTRLISTAT = 524 + SYS_NET_QOS_GUIDELINE = 525 + SYS_FMOUNT = 526 + SYS_NTP_ADJTIME = 527 + SYS_NTP_GETTIME = 528 + SYS_OS_FAULT_WITH_PAYLOAD = 529 + SYS_MAXSYSCALL = 530 + SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go index 41cb6ed..f2df27d 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go @@ -1,4 +1,4 @@ -// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. // +build arm,darwin @@ -129,6 +129,7 @@ const ( SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 + SYS_THREAD_SELFCOUNTS = 186 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -288,6 +289,7 @@ const ( SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 SYS_KEVENT_QOS = 374 + SYS_KEVENT_ID = 375 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -421,6 +423,14 @@ const ( SYS_FS_SNAPSHOT = 518 SYS_TERMINATE_WITH_PAYLOAD = 520 SYS_ABORT_WITH_PAYLOAD = 521 - SYS_MAXSYSCALL = 522 + SYS_NECP_SESSION_OPEN = 522 + SYS_NECP_SESSION_ACTION = 523 + SYS_SETATTRLISTAT = 524 + SYS_NET_QOS_GUIDELINE = 525 + SYS_FMOUNT = 526 + SYS_NTP_ADJTIME = 527 + SYS_NTP_GETTIME = 528 + SYS_OS_FAULT_WITH_PAYLOAD = 529 + SYS_MAXSYSCALL = 530 SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go index 075816c..9694630 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -1,4 +1,4 @@ -// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. // +build arm64,darwin @@ -129,6 +129,7 @@ const ( SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 + SYS_THREAD_SELFCOUNTS = 186 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 @@ -288,6 +289,7 @@ const ( SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 SYS_KEVENT_QOS = 374 + SYS_KEVENT_ID = 375 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 @@ -421,6 +423,14 @@ const ( SYS_FS_SNAPSHOT = 518 SYS_TERMINATE_WITH_PAYLOAD = 520 SYS_ABORT_WITH_PAYLOAD = 521 - SYS_MAXSYSCALL = 522 + SYS_NECP_SESSION_OPEN = 522 + SYS_NECP_SESSION_ACTION = 523 + SYS_SETATTRLISTAT = 524 + SYS_NET_QOS_GUIDELINE = 525 + SYS_FMOUNT = 526 + SYS_NTP_ADJTIME = 527 + SYS_NTP_GETTIME = 528 + SYS_OS_FAULT_WITH_PAYLOAD = 529 + SYS_MAXSYSCALL = 530 SYS_INVALID = 63 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go deleted file mode 100644 index c708659..0000000 --- a/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build amd64,solaris - -package unix - -// TODO(aram): remove these before Go 1.3. -const ( - SYS_EXECVE = 59 - SYS_FCNTL = 62 -) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go index 4667c7b..bc4bc89 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -479,3 +479,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 3f33b18..d8abcab 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -489,3 +489,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go index 463a28b..9749c9f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -480,3 +480,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 1ec20a0..810b0bd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -489,3 +489,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go index ab515c3..e3b8ebb 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -143,6 +143,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -442,6 +446,13 @@ type Termios struct { Ospeed uint32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = 0xfffafdcd AT_SYMLINK_NOFOLLOW = 0x1 @@ -465,3 +476,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [32]byte + Nodename [32]byte + Release [32]byte + Version [32]byte + Machine [32]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 18f7816..878a21a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -140,6 +140,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -539,3 +543,11 @@ const ( type CapRights struct { Rights [2]uint64 } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index dd0db2a..8408af1 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -140,6 +140,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -542,3 +546,11 @@ const ( type CapRights struct { Rights [2]uint64 } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 473d3dc..4b2d9a4 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -142,6 +142,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 @@ -542,3 +546,11 @@ const ( type CapRights struct { Rights [2]uint64 } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go index c6de942..7cf0a74 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -131,6 +131,36 @@ type Statfs_t struct { Spare [4]int32 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -643,8 +673,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -759,6 +796,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -791,3 +846,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint32 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 4ea42df..1671205 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -131,6 +131,36 @@ type Statfs_t struct { Spare [4]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -661,8 +691,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -777,6 +814,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -809,3 +864,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index f86d683..cc0c3de 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -133,6 +133,36 @@ type Statfs_t struct { Pad_cgo_0 [4]byte } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -632,8 +662,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -748,6 +785,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -780,3 +835,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint32 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 45c10b7..d82cca9 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -132,6 +132,36 @@ type Statfs_t struct { Spare [4]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -640,8 +670,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -756,6 +793,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -788,3 +843,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go index 4cc0a1c..f9a7fae 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go @@ -132,6 +132,36 @@ type Statfs_t struct { Pad_cgo_1 [4]byte } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -637,8 +667,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -753,6 +790,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -785,3 +840,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint32 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index d9df087..5b6c48f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -132,6 +132,36 @@ type Statfs_t struct { Spare [5]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -642,8 +672,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -758,6 +795,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -790,3 +845,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index 15e6b4b..23af0f5 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -132,6 +132,36 @@ type Statfs_t struct { Spare [5]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -642,8 +672,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -758,6 +795,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -790,3 +845,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go index b6c2d32..32f2a86 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go @@ -132,6 +132,36 @@ type Statfs_t struct { Pad_cgo_1 [4]byte } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -637,8 +667,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -753,6 +790,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -785,3 +840,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint32 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 3803e10..51f6778 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -133,6 +133,36 @@ type Statfs_t struct { Spare [4]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -650,8 +680,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -766,6 +803,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -798,3 +853,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index 7ef31fe..59497fe 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -133,6 +133,36 @@ type Statfs_t struct { Spare [4]int64 } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + X__reserved int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -650,8 +680,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -766,6 +803,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -798,3 +853,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go index cb194f4..8f4edcd 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -132,6 +132,36 @@ type Statfs_t struct { _ [4]byte } +type StatxTimestamp struct { + Sec int64 + Nsec uint32 + _ int32 +} + +type Statx_t struct { + Mask uint32 + Blksize uint32 + Attributes uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Mode uint16 + _ [1]uint16 + Ino uint64 + Size uint64 + Blocks uint64 + Attributes_mask uint64 + Atime StatxTimestamp + Btime StatxTimestamp + Ctime StatxTimestamp + Mtime StatxTimestamp + Rdev_major uint32 + Rdev_minor uint32 + Dev_major uint32 + Dev_minor uint32 + _ [14]uint64 +} + type Dirent struct { Ino uint64 Off int64 @@ -667,8 +697,15 @@ type EpollEvent struct { } const ( - AT_FDCWD = -0x64 - AT_REMOVEDIR = 0x200 + AT_EMPTY_PATH = 0x1000 + AT_FDCWD = -0x64 + AT_NO_AUTOMOUNT = 0x800 + AT_REMOVEDIR = 0x200 + + AT_STATX_SYNC_AS_STAT = 0x0 + AT_STATX_FORCE_SYNC = 0x2000 + AT_STATX_DONT_SYNC = 0x4000 + AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 ) @@ -783,6 +820,24 @@ const ( TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) +type CGroupStats struct { + Sleeping uint64 + Running uint64 + Stopped uint64 + Uninterruptible uint64 + Io_wait uint64 +} + +const ( + CGROUPSTATS_CMD_UNSPEC = 0x3 + CGROUPSTATS_CMD_GET = 0x4 + CGROUPSTATS_CMD_NEW = 0x5 + CGROUPSTATS_TYPE_UNSPEC = 0x0 + CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 + CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 + CGROUPSTATS_CMD_ATTR_FD = 0x1 +) + type Genlmsghdr struct { Cmd uint8 Version uint8 @@ -815,3 +870,10 @@ const ( CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 ) + +type cpuMask uint64 + +const ( + _CPU_SETSIZE = 0x400 + _NCPUBITS = 0x40 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go index dfe446b..da70faa 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -99,6 +99,10 @@ type Fsid struct { X__fsid_val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -382,6 +386,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 @@ -418,3 +429,11 @@ type Sysctlnode struct { X_sysctl_parent [8]byte X_sysctl_desc [8]byte } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go index 1498c23..0963ab8 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -103,6 +103,10 @@ type Fsid struct { X__fsid_val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -389,6 +393,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 @@ -425,3 +436,11 @@ type Sysctlnode struct { X_sysctl_parent [8]byte X_sysctl_desc [8]byte } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go index d6711ce..211f641 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -104,6 +104,10 @@ type Fsid struct { X__fsid_val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -387,6 +391,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x200 @@ -423,3 +434,11 @@ type Sysctlnode struct { X_sysctl_parent [8]byte X_sysctl_desc [8]byte } + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go index af295c3..d5a2d75 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -140,6 +140,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -440,6 +444,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x2 @@ -463,3 +474,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go index ae153e7..d531410 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -142,6 +142,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -447,6 +451,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x2 @@ -470,3 +481,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go index 35bb619..e35b13b 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go @@ -140,6 +140,10 @@ type Fsid struct { Val [2]int32 } +const ( + PathMax = 0x400 +) + type RawSockaddrInet4 struct { Len uint8 Family uint8 @@ -433,6 +437,13 @@ type Termios struct { Ospeed int32 } +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} + const ( AT_FDCWD = -0x64 AT_SYMLINK_NOFOLLOW = 0x2 @@ -456,3 +467,11 @@ const ( POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) + +type Utsname struct { + Sysname [256]byte + Nodename [256]byte + Release [256]byte + Version [256]byte + Machine [256]byte +} diff --git a/vendor/golang.org/x/sys/windows/env_unset.go b/vendor/golang.org/x/sys/windows/env_unset.go deleted file mode 100644 index b712c66..0000000 --- a/vendor/golang.org/x/sys/windows/env_unset.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build windows -// +build go1.4 - -package windows - -import "syscall" - -func Unsetenv(key string) error { - // This was added in Go 1.4. - return syscall.Unsetenv(key) -} diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go index e829238..bdc71e2 100644 --- a/vendor/golang.org/x/sys/windows/env_windows.go +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -23,3 +23,7 @@ func Clearenv() { func Environ() []string { return syscall.Environ() } + +func Unsetenv(key string) error { + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index d8e7ff2..f1ec5dc 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -132,6 +132,36 @@ const ( SECURITY_NT_NON_UNIQUE_RID = 0x15 ) +// Predefined domain-relative RIDs for local groups. +// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa379649(v=vs.85).aspx +const ( + DOMAIN_ALIAS_RID_ADMINS = 0x220 + DOMAIN_ALIAS_RID_USERS = 0x221 + DOMAIN_ALIAS_RID_GUESTS = 0x222 + DOMAIN_ALIAS_RID_POWER_USERS = 0x223 + DOMAIN_ALIAS_RID_ACCOUNT_OPS = 0x224 + DOMAIN_ALIAS_RID_SYSTEM_OPS = 0x225 + DOMAIN_ALIAS_RID_PRINT_OPS = 0x226 + DOMAIN_ALIAS_RID_BACKUP_OPS = 0x227 + DOMAIN_ALIAS_RID_REPLICATOR = 0x228 + DOMAIN_ALIAS_RID_RAS_SERVERS = 0x229 + DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 0x22a + DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b + DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c + DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d + DOMAIN_ALIAS_RID_MONITORING_USERS = 0X22e + DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f + DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230 + DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231 + DOMAIN_ALIAS_RID_DCOM_USERS = 0x232 + DOMAIN_ALIAS_RID_IUSERS = 0x238 + DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 0x239 + DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 0x23b + DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 0x23c + DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 0x23d + DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP = 0x23e +) + //sys LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW //sys LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW //sys ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW @@ -335,6 +365,8 @@ type Tokengroups struct { Groups [1]SIDAndAttributes } +// Authorization Functions +//sys checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership //sys OpenProcessToken(h Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken //sys GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation //sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW @@ -433,3 +465,12 @@ func (t Token) GetUserProfileDirectory() (string, error) { } } } + +// IsMember reports whether the access token t is a member of the provided SID. +func (t Token) IsMember(sid *SID) (bool, error) { + var b int32 + if e := checkTokenMembership(t, sid, &b); e != nil { + return false, e + } + return b != 0, nil +} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index bb778db..1e9f4bb 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -16,7 +16,46 @@ import ( type Handle uintptr -const InvalidHandle = ^Handle(0) +const ( + InvalidHandle = ^Handle(0) + + // Flags for DefineDosDevice. + DDD_EXACT_MATCH_ON_REMOVE = 0x00000004 + DDD_NO_BROADCAST_SYSTEM = 0x00000008 + DDD_RAW_TARGET_PATH = 0x00000001 + DDD_REMOVE_DEFINITION = 0x00000002 + + // Return values for GetDriveType. + DRIVE_UNKNOWN = 0 + DRIVE_NO_ROOT_DIR = 1 + DRIVE_REMOVABLE = 2 + DRIVE_FIXED = 3 + DRIVE_REMOTE = 4 + DRIVE_CDROM = 5 + DRIVE_RAMDISK = 6 + + // File system flags from GetVolumeInformation and GetVolumeInformationByHandle. + FILE_CASE_SENSITIVE_SEARCH = 0x00000001 + FILE_CASE_PRESERVED_NAMES = 0x00000002 + FILE_FILE_COMPRESSION = 0x00000010 + FILE_DAX_VOLUME = 0x20000000 + FILE_NAMED_STREAMS = 0x00040000 + FILE_PERSISTENT_ACLS = 0x00000008 + FILE_READ_ONLY_VOLUME = 0x00080000 + FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000 + FILE_SUPPORTS_ENCRYPTION = 0x00020000 + FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000 + FILE_SUPPORTS_HARD_LINKS = 0x00400000 + FILE_SUPPORTS_OBJECT_IDS = 0x00010000 + FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000 + FILE_SUPPORTS_REPARSE_POINTS = 0x00000080 + FILE_SUPPORTS_SPARSE_FILES = 0x00000040 + FILE_SUPPORTS_TRANSACTIONS = 0x00200000 + FILE_SUPPORTS_USN_JOURNAL = 0x02000000 + FILE_UNICODE_ON_DISK = 0x00000004 + FILE_VOLUME_IS_COMPRESSED = 0x00008000 + FILE_VOLUME_QUOTAS = 0x00000020 +) // StringToUTF16 is deprecated. Use UTF16FromString instead. // If s contains a NUL byte this function panics instead of @@ -200,6 +239,27 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent //sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent +// Volume Management Functions +//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW +//sys DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) = DeleteVolumeMountPointW +//sys FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeW +//sys FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeMountPointW +//sys FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) = FindNextVolumeW +//sys FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW +//sys FindVolumeClose(findVolume Handle) (err error) +//sys FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) +//sys GetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW +//sys GetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0] +//sys GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW +//sys GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationW +//sys GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationByHandleW +//sys GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) = GetVolumeNameForVolumeMountPointW +//sys GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) = GetVolumePathNameW +//sys GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) = GetVolumePathNamesForVolumeNameW +//sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW +//sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW +//sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW + // syscall interface implementation for other packages // GetProcAddressByOrdinal retrieves the address of the exported @@ -796,6 +856,75 @@ func ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesS return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped) } +var sendRecvMsgFunc struct { + once sync.Once + sendAddr uintptr + recvAddr uintptr + err error +} + +func loadWSASendRecvMsg() error { + sendRecvMsgFunc.once.Do(func() { + var s Handle + s, sendRecvMsgFunc.err = Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) + if sendRecvMsgFunc.err != nil { + return + } + defer CloseHandle(s) + var n uint32 + sendRecvMsgFunc.err = WSAIoctl(s, + SIO_GET_EXTENSION_FUNCTION_POINTER, + (*byte)(unsafe.Pointer(&WSAID_WSARECVMSG)), + uint32(unsafe.Sizeof(WSAID_WSARECVMSG)), + (*byte)(unsafe.Pointer(&sendRecvMsgFunc.recvAddr)), + uint32(unsafe.Sizeof(sendRecvMsgFunc.recvAddr)), + &n, nil, 0) + if sendRecvMsgFunc.err != nil { + return + } + sendRecvMsgFunc.err = WSAIoctl(s, + SIO_GET_EXTENSION_FUNCTION_POINTER, + (*byte)(unsafe.Pointer(&WSAID_WSASENDMSG)), + uint32(unsafe.Sizeof(WSAID_WSASENDMSG)), + (*byte)(unsafe.Pointer(&sendRecvMsgFunc.sendAddr)), + uint32(unsafe.Sizeof(sendRecvMsgFunc.sendAddr)), + &n, nil, 0) + }) + return sendRecvMsgFunc.err +} + +func WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlapped *Overlapped, croutine *byte) error { + err := loadWSASendRecvMsg() + if err != nil { + return err + } + r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + if r1 == socket_error { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return err +} + +func WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overlapped, croutine *byte) error { + err := loadWSASendRecvMsg() + if err != nil { + return err + } + r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0) + if r1 == socket_error { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return err +} + // Invented structures to support what package os expects. type Rusage struct { CreationTime Filetime diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go index 0f73c11..9c7133c 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows_test.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows_test.go @@ -81,7 +81,7 @@ func TestFormatMessage(t *testing.T) { buf := make([]uint16, 300) _, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil) if err != nil { - t.Fatal("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) + t.Fatalf("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) } } diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index 0229f79..52c2037 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -29,6 +29,7 @@ const ( ERROR_NOT_FOUND syscall.Errno = 1168 ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314 WSAEACCES syscall.Errno = 10013 + WSAEMSGSIZE syscall.Errno = 10040 WSAECONNRESET syscall.Errno = 10054 ) @@ -158,9 +159,6 @@ const ( WAIT_OBJECT_0 = 0x00000000 WAIT_FAILED = 0xFFFFFFFF - CREATE_NEW_PROCESS_GROUP = 0x00000200 - CREATE_UNICODE_ENVIRONMENT = 0x00000400 - PROCESS_TERMINATE = 1 PROCESS_QUERY_INFORMATION = 0x00000400 SYNCHRONIZE = 0x00100000 @@ -177,6 +175,26 @@ const ( APPLICATION_ERROR = 1 << 29 ) +const ( + // Process creation flags. + CREATE_BREAKAWAY_FROM_JOB = 0x01000000 + CREATE_DEFAULT_ERROR_MODE = 0x04000000 + CREATE_NEW_CONSOLE = 0x00000010 + CREATE_NEW_PROCESS_GROUP = 0x00000200 + CREATE_NO_WINDOW = 0x08000000 + CREATE_PROTECTED_PROCESS = 0x00040000 + CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000 + CREATE_SEPARATE_WOW_VDM = 0x00000800 + CREATE_SHARED_WOW_VDM = 0x00001000 + CREATE_SUSPENDED = 0x00000004 + CREATE_UNICODE_ENVIRONMENT = 0x00000400 + DEBUG_ONLY_THIS_PROCESS = 0x00000002 + DEBUG_PROCESS = 0x00000001 + DETACHED_PROCESS = 0x00000008 + EXTENDED_STARTUPINFO_PRESENT = 0x00080000 + INHERIT_PARENT_AFFINITY = 0x00010000 +) + const ( // flags for CreateToolhelp32Snapshot TH32CS_SNAPHEAPLIST = 0x01 @@ -567,6 +585,16 @@ const ( IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_DONTROUTE = 0x4 + MSG_WAITALL = 0x8 + + MSG_TRUNC = 0x0100 + MSG_CTRUNC = 0x0200 + MSG_BCAST = 0x0400 + MSG_MCAST = 0x0800 + SOMAXCONN = 0x7fffffff TCP_NODELAY = 1 @@ -584,6 +612,15 @@ type WSABuf struct { Buf *byte } +type WSAMsg struct { + Name *syscall.RawSockaddrAny + Namelen int32 + Buffers *WSABuf + BufferCount uint32 + Control WSABuf + Flags uint32 +} + // Invented values to support what package os expects. const ( S_IFMT = 0x1f000 @@ -1011,6 +1048,20 @@ var WSAID_CONNECTEX = GUID{ [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}, } +var WSAID_WSASENDMSG = GUID{ + 0xa441e712, + 0x754f, + 0x43ca, + [8]byte{0x84, 0xa7, 0x0d, 0xee, 0x44, 0xcf, 0x60, 0x6d}, +} + +var WSAID_WSARECVMSG = GUID{ + 0xf689d7c8, + 0x6f1f, + 0x436b, + [8]byte{0x8a, 0x53, 0xe5, 0x4f, 0xe3, 0x51, 0xc3, 0x22}, +} + const ( FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1 FILE_SKIP_SET_EVENT_ON_HANDLE = 2 diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 2f893d2..c7b3b15 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -178,6 +178,25 @@ var ( procSetEvent = modkernel32.NewProc("SetEvent") procResetEvent = modkernel32.NewProc("ResetEvent") procPulseEvent = modkernel32.NewProc("PulseEvent") + procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW") + procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW") + procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW") + procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW") + procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW") + procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW") + procFindVolumeClose = modkernel32.NewProc("FindVolumeClose") + procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose") + procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW") + procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives") + procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW") + procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW") + procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW") + procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW") + procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW") + procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW") + procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW") + procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW") + procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW") procWSAStartup = modws2_32.NewProc("WSAStartup") procWSACleanup = modws2_32.NewProc("WSACleanup") procWSAIoctl = modws2_32.NewProc("WSAIoctl") @@ -227,6 +246,7 @@ var ( procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid") procFreeSid = modadvapi32.NewProc("FreeSid") procEqualSid = modadvapi32.NewProc("EqualSid") + procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership") procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken") procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation") procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") @@ -1843,6 +1863,233 @@ func PulseEvent(event Handle) (err error) { return } +func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath))) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) { + r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength)) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) { + r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindVolumeClose(findVolume Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetDriveType(rootPathName *uint16) (driveType uint32) { + r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0) + driveType = uint32(r0) + return +} + +func GetLogicalDrives() (drivesBitMask uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0) + drivesBitMask = uint32(r0) + if drivesBitMask == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength)) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength)) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0) if r0 != 0 { @@ -2391,6 +2638,18 @@ func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) { return } +func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) { + r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember))) + if r1 == 0 { + if e1 != 0 { + err = errnoErr(e1) + } else { + err = syscall.EINVAL + } + } + return +} + func OpenProcessToken(h Handle, access uint32, token *Token) (err error) { r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token))) if r1 == 0 { diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md index 7a512d6..2ed3314 100644 --- a/vendor/gopkg.in/yaml.v2/README.md +++ b/vendor/gopkg.in/yaml.v2/README.md @@ -67,6 +67,8 @@ b: d: [3, 4] ` +// Note: struct fields must be public in order for unmarshal to +// correctly populate the data. type T struct { A string B struct { diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go index db1f5f2..e85eb2e 100644 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ b/vendor/gopkg.in/yaml.v2/decode.go @@ -251,7 +251,7 @@ func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { // // If n holds a null value, prepare returns before doing anything. func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "" && n.implicit) { + if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "~" || n.value == "" && n.implicit) { return out, false, false } again := true @@ -641,7 +641,7 @@ func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { d.unmarshal(n.children[i+1], value) inlineMap.SetMapIndex(name, value) } else if d.strict { - d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", n.line+1, name.String(), out.Type())) + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", ni.line+1, name.String(), out.Type())) } } return true diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go index 713b1ee..e5366c2 100644 --- a/vendor/gopkg.in/yaml.v2/decode_test.go +++ b/vendor/gopkg.in/yaml.v2/decode_test.go @@ -438,6 +438,9 @@ var unmarshalTests = []struct { { "foo: ''", map[string]*string{"foo": new(string)}, + }, { + "foo: null", + map[string]*string{"foo": nil}, }, { "foo: null", map[string]string{"foo": ""}, @@ -446,6 +449,18 @@ var unmarshalTests = []struct { map[string]interface{}{"foo": nil}, }, + // Support for ~ + { + "foo: ~", + map[string]*string{"foo": nil}, + }, { + "foo: ~", + map[string]string{"foo": ""}, + }, { + "foo: ~", + map[string]interface{}{"foo": nil}, + }, + // Ignored field { "a: 1\nb: 2\n", @@ -984,7 +999,7 @@ func (s *S) TestUnmarshalStrict(c *C) { err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v) c.Check(err, IsNil) err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v) - c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }") + c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 3: field c not found in struct struct { A int; B int }") } //var data []byte diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go index 41de8b8..dcaf502 100644 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/vendor/gopkg.in/yaml.v2/emitterc.go @@ -995,9 +995,9 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { space_break = false preceded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false + followed_by_whitespace = false + previous_space = false + previous_break = false ) emitter.scalar_data.value = value diff --git a/vendor/gopkg.in/yaml.v2/example_embedded_test.go b/vendor/gopkg.in/yaml.v2/example_embedded_test.go index c8b241d..171c093 100644 --- a/vendor/gopkg.in/yaml.v2/example_embedded_test.go +++ b/vendor/gopkg.in/yaml.v2/example_embedded_test.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" ) // An example showing how to unmarshal embedded @@ -17,8 +17,8 @@ type StructA struct { type StructB struct { // Embedded structs are not treated as embedded in YAML by default. To do that, // add the ",inline" annotation below - StructA `yaml:",inline"` - B string `yaml:"b"` + StructA `yaml:",inline"` + B string `yaml:"b"` } var data = ` @@ -31,11 +31,11 @@ func ExampleUnmarshal_embedded() { err := yaml.Unmarshal([]byte(data), &b) if err != nil { - log.Fatal("cannot unmarshal data: %v", err) + log.Fatalf("cannot unmarshal data: %v", err) } - fmt.Println(b.A) - fmt.Println(b.B) - // Output: - // a string from struct A - // a string from struct B + fmt.Println(b.A) + fmt.Println(b.B) + // Output: + // a string from struct A + // a string from struct B } diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go index bf18884..5e3c2da 100644 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ b/vendor/gopkg.in/yaml.v2/yaml.go @@ -140,7 +140,7 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // For example: // // type T struct { -// F int "a,omitempty" +// F int `yaml:"a,omitempty"` // B int // } // yaml.Marshal(&T{B: 2}) // Returns "b: 2\n"