diff --git a/codec/0doc.go b/codec/0doc.go index 11a9753a..cfb804ec 100644 --- a/codec/0doc.go +++ b/codec/0doc.go @@ -31,8 +31,13 @@ the standard library (ie json, xml, gob, etc). 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% ) - 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. @@ -156,40 +161,25 @@ Sample usage model: //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) client := rpc.NewClientWithCodec(rpcCodec) +Running Tests + +To run tests, use the following: + + go test + +To run the full suite of tests, use the following: + + go test -tags alltests -run Suite + +You can run the tag 'safe' to run tests or build in safe mode. e.g. + + go test -tags safe -run Json + go test -tags "alltests safe" -run Suite + +Running Benchmarks + +Please see http://github.com/ugorji/go-codec-bench . + */ package codec -// Benefits of go-codec: -// -// - encoding/json always reads whole file into memory first. -// This makes it unsuitable for parsing very large files. -// - encoding/xml cannot parse into a map[string]interface{} -// I found this out on reading https://github.com/clbanning/mxj - -// TODO: -// -// - optimization for codecgen: -// if len of entity is <= 3 words, then support a value receiver for encode. -// - (En|De)coder should store an error when it occurs. -// Until reset, subsequent calls return that error that was stored. -// This means that free panics must go away. -// All errors must be raised through errorf method. -// - Decoding using a chan is good, but incurs concurrency costs. -// This is because there's no fast way to use a channel without it -// having to switch goroutines constantly. -// Callback pattern is still the best. Maybe consider supporting something like: -// type X struct { -// Name string -// Ys []Y -// Ys chan <- Y -// Ys func(Y) -> call this function for each entry -// } -// - Consider adding a isZeroer interface { isZero() bool } -// It is used within isEmpty, for omitEmpty support. -// - Consider making Handle used AS-IS within the encoding/decoding session. -// This means that we don't cache Handle information within the (En|De)coder, -// except we really need it at Reset(...) -// - Consider adding math/big support -// - Consider reducing the size of the generated functions: -// Maybe use one loop, and put the conditionals in the loop. -// for ... { if cLen > 0 { if j == cLen { break } } else if dd.CheckBreak() { break } } diff --git a/codec/binc.go b/codec/binc.go index a5b11434..e257db56 100644 --- a/codec/binc.go +++ b/codec/binc.go @@ -512,7 +512,7 @@ func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) { i = -i } if chkOvf.Int(i, bitsize) { - d.d.errorf("binc: overflow integer: %v", i) + d.d.errorf("binc: overflow integer: %v for num bits: %v", i, bitsize) return } d.bdRead = false @@ -804,7 +804,7 @@ func (d *bincDecDriver) DecodeNaked() { d.readNextBd() } - n := &d.d.n + n := d.d.n var decodeFurther bool switch d.vd { @@ -923,6 +923,10 @@ 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 diff --git a/codec/cbor.go b/codec/cbor.go index 054dbd2f..703ce13b 100644 --- a/codec/cbor.go +++ b/codec/cbor.go @@ -134,12 +134,12 @@ func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Enco func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { e.encUint(uint64(re.Tag), cborBaseTag) - if re.Data != nil { + if false && re.Data != nil { en.encode(re.Data) - } else if re.Value == nil { - e.EncodeNil() - } else { + } else if re.Value != nil { en.encode(re.Value) + } else { + e.EncodeNil() } } @@ -469,7 +469,7 @@ func (d *cborDecDriver) DecodeNaked() { d.readNextBd() } - n := &d.d.n + n := d.d.n var decodeFurther bool switch d.bd { diff --git a/codec/codec_test.go b/codec/codec_test.go index eb8830ba..2a4901b9 100644 --- a/codec/codec_test.go +++ b/codec/codec_test.go @@ -42,6 +42,11 @@ import ( func init() { testPreInitFns = append(testPreInitFns, testInit) + fmt.Printf("sizeof: Decoder: %v, Encoder: %v, decNaked: %v\n", + reflect.TypeOf((*Decoder)(nil)).Elem().Size(), + reflect.TypeOf((*Encoder)(nil)).Elem().Size(), + reflect.TypeOf((*decNaked)(nil)).Elem().Size(), + ) } // make this a mapbyslice @@ -186,7 +191,6 @@ func (x *testUnixNanoTimeExt) ConvertExt(v interface{}) interface{} { return &x.ts } func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { - // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v\n", v) tt := dest.(*time.Time) switch v2 := v.(type) { case int64: @@ -202,7 +206,6 @@ func (x *testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { default: panic(fmt.Sprintf("unsupported format for time conversion: expecting int64/uint64; got %T", v)) } - // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v, tt: %#v\n", v, tt) } func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) { @@ -324,14 +327,20 @@ func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) { } func testInit() { - gob.Register(new(TestStruc)) + gob.Register(new(TestStrucFlex)) if testInitDebug { - ts0 := newTestStruc(2, false, !testSkipIntf, false) - fmt.Printf("====> depth: %v, ts: %#v\n", 2, ts0) + ts0 := newTestStrucFlex(2, false, !testSkipIntf, false) + logT(nil, "====> depth: %v, ts: %#v\n", 2, ts0) } for _, v := range testHandles { bh := v.getBasicHandle() + // pre-fill them first + bh.EncodeOptions = testEncodeOptions + bh.DecodeOptions = testDecodeOptions + // bh.InterfaceReset = true // TODO: remove + // bh.PreferArrayOverSlice = true // TODO: remove + // modify from flag'ish things bh.InternString = testInternStr bh.Canonical = testCanonical bh.CheckCircularRef = testCheckCircRef @@ -464,7 +473,7 @@ ugorji table = append(table, primitives) table = append(table, testMbsT(primitives)) table = append(table, maps...) - table = append(table, newTestStruc(0, false, !testSkipIntf, false)) + table = append(table, newTestStrucFlex(0, false, !testSkipIntf, false)) tableVerify = make([]interface{}, len(table)) tableTestNilVerify = make([]interface{}, len(table)) @@ -561,10 +570,14 @@ func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, if err != nil { continue } + var b1 = b0 + if len(b1) > 256 { + b1 = b1[:256] + } if h.isBinary() { - logT(t, " Encoded bytes: len: %v, %v\n", len(b0), b0) + logT(t, " Encoded bytes: len: %v, %v\n", len(b0), b1) } else { - logT(t, " Encoded string: len: %v, %v\n", len(string(b0)), string(b0)) + logT(t, " Encoded string: len: %v, %v\n", len(b0), string(b1)) // println("########### encoded string: " + string(b0)) } var v1 interface{} @@ -574,10 +587,15 @@ func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, } else { if v0 != nil { v0rt := reflect.TypeOf(v0) // ptr - rv1 := reflect.New(v0rt) - err = testUnmarshal(rv1.Interface(), b0, h) - v1 = rv1.Elem().Interface() - // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() + if v0rt.Kind() == reflect.Ptr { + err = testUnmarshal(v0, b0, h) + v1 = v0 + } else { + rv1 := reflect.New(v0rt) + err = testUnmarshal(rv1.Interface(), b0, h) + v1 = rv1.Elem().Interface() + // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() + } } } @@ -603,7 +621,7 @@ func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, } else { // 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, "-------- Before and After marshal do not match: Error: %v", err) + 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) failT(t) @@ -624,6 +642,7 @@ func testCodecTableOne(t *testing.T, h Handle) { var oldWriteExt, oldRawToString bool oldWriteExt, v.WriteExt = v.WriteExt, true oldRawToString, v.RawToString = v.RawToString, true + // defer func() { v.WriteExt, v.RawToString = oldWriteExt, oldRawToString }() doTestCodecTableOne(t, false, h, table, tableVerify) v.WriteExt, v.RawToString = oldWriteExt, oldRawToString case *JsonHandle: @@ -644,13 +663,11 @@ func testCodecTableOne(t *testing.T, h Handle) { v := h.getBasicHandle() oldMapType, v.MapType = v.MapType, testMapStrIntfTyp - + // defer func() { v.MapType = oldMapType }() //skip time.Time, []interface{} containing time.Time, last map, and newStruc doTestCodecTableOne(t, true, h, table[:idxTime], tableTestNilVerify[:idxTime]) doTestCodecTableOne(t, true, h, table[idxMap:idxMap+numMap-1], tableTestNilVerify[idxMap:idxMap+numMap-1]) - v.MapType = oldMapType - // func TestMsgpackNilIntf(t *testing.T) { //do last map and newStruc @@ -677,18 +694,22 @@ func testCodecMiscOne(t *testing.T, h Handle) { } // func TestMsgpackDecodePtr(t *testing.T) { - ts := newTestStruc(0, false, !testSkipIntf, false) + ts := newTestStrucFlex(testDepth, false, !testSkipIntf, false) b, err = testMarshalErr(ts, h, t, "pointer-to-struct") if len(b) < 40 { logT(t, "------- Size must be > 40. Size: %d", len(b)) failT(t) } + var b1 = b + if len(b1) > 256 { + b1 = b1[:256] + } if h.isBinary() { - logT(t, "------- b: %v", b) + logT(t, "------- b: size: %v, value: %v", len(b), b1) } else { - logT(t, "------- b: %s", b) + logT(t, "------- b: size: %v, value: %s", len(b), b1) } - ts2 := new(TestStruc) + ts2 := new(TestStrucFlex) err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct") if ts2.I64 != math.MaxInt64*2/3 { logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64) @@ -705,9 +726,10 @@ func testCodecMiscOne(t *testing.T, h Handle) { err = testUnmarshalErr(&p2, bs, h, t, "&p2") if m2["A"] != 2 || m2["B"] != 3 { - logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2) + logT(t, "FAIL: m2 not as expected: expecting: %v, got: %v", m, m2) failT(t) } + // log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2) checkEqualT(t, p, p2, "p=p2") checkEqualT(t, m, m2, "m=m2") @@ -759,7 +781,6 @@ func testCodecMiscOne(t *testing.T, h Handle) { var tarr2 tarr testUnmarshalErr(&tarr2, bs, h, t, "tarr2") checkEqualT(t, tarr0, tarr2, "tarr0=tarr2") - // fmt.Printf(">>>> err: %v. tarr1: %v, tarr2: %v\n", err, tarr0, tarr2) } // test byte array, even if empty (msgpack only) @@ -786,7 +807,6 @@ func testCodecEmbeddedPointer(t *testing.T, h Handle) { var z Z = 4 x1 := &B{&z, &A{5}, 6} bs, err := testMarshalErr(x1, h, t, "x1") - // fmt.Printf("buf: len(%v): %x\n", buf.Len(), buf.Bytes()) var x2 = new(B) err = testUnmarshalErr(x2, bs, h, t, "x2") err = checkEqualT(t, x1, x2, "x1=x2") @@ -816,40 +836,115 @@ func testCodecUnderlyingType(t *testing.T, h Handle) { } func testCodecChan(t *testing.T, h Handle) { + testOnce.Do(testInitAll) // - send a slice []*int64 (sl1) into an chan (ch1) with cap > len(s1) // - encode ch1 as a stream array // - decode a chan (ch2), with cap > len(s1) from the stream array // - receive from ch2 into slice sl2 // - compare sl1 and sl2 // - do this for codecs: json, cbor (covers all types) - sl1 := make([]*int64, 4) - for i := range sl1 { - var j int64 = int64(i) - sl1[i] = &j + + if true { + sl1 := make([]*int64, 4) + for i := range sl1 { + var j int64 = int64(i) + sl1[i] = &j + } + ch1 := make(chan *int64, 4) + for _, j := range sl1 { + ch1 <- j + } + var bs []byte + NewEncoderBytes(&bs, h).MustEncode(ch1) + ch2 := make(chan *int64, 8) + NewDecoderBytes(bs, h).MustDecode(&ch2) + close(ch2) + var sl2 []*int64 + for j := range ch2 { + sl2 = append(sl2, j) + } + if err := deepEqual(sl1, sl2); err != nil { + logT(t, "FAIL: Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) + failT(t) + } + } + + if true { + type testBytesT []byte + sl1 := make([]testBytesT, 4) + for i := range sl1 { + var j = []byte(strings.Repeat(strconv.FormatInt(int64(i), 10), i)) + sl1[i] = j + } + ch1 := make(chan testBytesT, 4) + for _, j := range sl1 { + ch1 <- j + } + var bs []byte + NewEncoderBytes(&bs, h).MustEncode(ch1) + ch2 := make(chan testBytesT, 8) + NewDecoderBytes(bs, h).MustDecode(&ch2) + close(ch2) + var sl2 []testBytesT + for j := range ch2 { + sl2 = append(sl2, j) + } + if err := deepEqual(sl1, sl2); err != nil { + logT(t, "FAIL: Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) + failT(t) + } } - ch1 := make(chan *int64, 4) - for _, j := range sl1 { - ch1 <- j + if true { + type testBytesT byte + sl1 := make([]testBytesT, 4) + for i := range sl1 { + var j = strconv.FormatInt(int64(i), 10)[0] + sl1[i] = testBytesT(j) + } + ch1 := make(chan testBytesT, 4) + for _, j := range sl1 { + ch1 <- j + } + var bs []byte + NewEncoderBytes(&bs, h).MustEncode(ch1) + ch2 := make(chan testBytesT, 8) + NewDecoderBytes(bs, h).MustDecode(&ch2) + close(ch2) + var sl2 []testBytesT + for j := range ch2 { + sl2 = append(sl2, j) + } + if err := deepEqual(sl1, sl2); err != nil { + logT(t, "FAIL: Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) + failT(t) + } } - var bs []byte - NewEncoderBytes(&bs, h).MustEncode(ch1) - // if !h.isBinary() { - // fmt.Printf("before: len(ch1): %v, bs: %s\n", len(ch1), bs) - // } - // var ch2 chan *int64 // this will block if json, etc. - ch2 := make(chan *int64, 8) - NewDecoderBytes(bs, h).MustDecode(&ch2) - // logT(t, "Len(ch2): %v", len(ch2)) - // fmt.Printf("after: len(ch2): %v, ch2: %v\n", len(ch2), ch2) - close(ch2) - var sl2 []*int64 - for j := range ch2 { - sl2 = append(sl2, j) - } - if err := deepEqual(sl1, sl2); err != nil { - logT(t, "Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) - failT(t) + + if true { + sl1 := make([]byte, 4) + for i := range sl1 { + var j = strconv.FormatInt(int64(i), 10)[0] + sl1[i] = byte(j) + } + ch1 := make(chan byte, 4) + for _, j := range sl1 { + ch1 <- j + } + var bs []byte + NewEncoderBytes(&bs, h).MustEncode(ch1) + ch2 := make(chan byte, 8) + NewDecoderBytes(bs, h).MustDecode(&ch2) + close(ch2) + var sl2 []byte + for j := range ch2 { + sl2 = append(sl2, j) + } + if err := deepEqual(sl1, sl2); err != nil { + logT(t, "FAIL: Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) + failT(t) + } } + } func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs time.Duration, @@ -918,7 +1013,6 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs connFn := func() (bs net.Conn) { // log("calling f1") bs, err2 := net.Dial(ln.Addr().Network(), ln.Addr().String()) - //fmt.Printf("f1. bs: %v, err2: %v\n", bs, err2) checkErrT(t, err2) return } @@ -954,10 +1048,12 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs } func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) { - v1 := map[string]interface{}{ - "a": 1, - "b": "hello", - "c": map[string]interface{}{ + testOnce.Do(testInitAll) + // println("doTestMapEncodeForCanonical") + v1 := map[stringUint64T]interface{}{ + {"a", 1}: 1, + {"b", 2}: "hello", + {"c", 3}: map[string]interface{}{ "c/a": 1, "c/b": "world", "c/c": []int{1, 2, 3, 4}, @@ -985,7 +1081,7 @@ func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) { }, }, } - var v2 map[string]interface{} + var v2 map[stringUint64T]interface{} var b1, b2 []byte // encode v1 into b1, decode b1 into v2, encode v2 into b2, compare b1 and b2 @@ -1009,6 +1105,7 @@ func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) { } func doTestStdEncIntf(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) args := [][2]interface{}{ {&TestABC{"A", "BB", "CCC"}, new(TestABC)}, {&TestABC2{"AAA", "BB", "C"}, new(TestABC2)}, @@ -1022,13 +1119,14 @@ func doTestStdEncIntf(t *testing.T, name string, h Handle) { if err := deepEqual(a[0], a[1]); err == nil { logT(t, "++++ Objects match") } else { - logT(t, "---- Objects do not match: y1: %v, err: %v", a[1], err) + logT(t, "---- FAIL: Objects do not match: y1: %v, err: %v", a[1], err) failT(t) } } } func doTestEncCircularRef(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) type T1 struct { S string B bool @@ -1063,7 +1161,7 @@ func doTestEncCircularRef(t *testing.T, name string, h Handle) { if x := err.Error(); strings.Contains(x, "circular") || strings.Contains(x, "cyclic") { logT(t, "error detected as expected: %v", x) } else { - logT(t, "error detected was not as expected: %v", x) + logT(t, "FAIL: error detected was not as expected: %v", x) failT(t) } } @@ -1085,6 +1183,7 @@ type ( ) func doTestAnonCycle(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) var x TestAnonCycleT1 x.S = "hello" x.TestAnonCycleT2.S2 = "hello.2" @@ -1098,6 +1197,7 @@ func doTestAnonCycle(t *testing.T, name string, h Handle) { } func doTestJsonLargeInteger(t *testing.T, v interface{}, ias uint8) { + testOnce.Do(testInitAll) logT(t, "Running doTestJsonLargeInteger: v: %#v, ias: %c", v, ias) oldIAS := testJsonH.IntegerAsString defer func() { testJsonH.IntegerAsString = oldIAS }() @@ -1163,11 +1263,11 @@ func doTestJsonLargeInteger(t *testing.T, v interface{}, ias uint8) { logT(t, "Expecting equal values from %s: got golden: %v, decoded: %v", b, v2, vu) failT(t) } - // fmt.Printf("%v: %s, decode: %d, bool: %v, equal_on_decode: %v\n", v, b, vu, vb, vu == v.(uint)) } } func doTestRawValue(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) bh := h.getBasicHandle() if !bh.Raw { bh.Raw = true @@ -1208,6 +1308,7 @@ func doTestRawValue(t *testing.T, name string, h Handle) { // We keep this unexported here, and put actual test in ext_dep_test.go. // This way, it can be excluded by excluding file completely. func doTestPythonGenStreams(t *testing.T, name string, h Handle) { + testOnce.Do(testInitAll) logT(t, "TestPythonGenStreams-%v", name) tmpdir, err := ioutil.TempDir("", "golang-"+name+"-test") if err != nil { @@ -1264,7 +1365,7 @@ func doTestPythonGenStreams(t *testing.T, name string, h Handle) { if err = deepEqual(v, v1); err == nil { logT(t, "++++++++ Objects match: %T, %v", v, v) } else { - logT(t, "-------- Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1) + logT(t, "-------- FAIL: Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1) logT(t, "-------- GOLDEN: %#v", v) // logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) @@ -1279,7 +1380,7 @@ func doTestPythonGenStreams(t *testing.T, name string, h Handle) { if err = deepEqual(bsb, bss); err == nil { logT(t, "++++++++ Bytes match") } else { - logT(t, "???????? Bytes do not match. %v.", err) + logT(t, "???????? FAIL: Bytes do not match. %v.", err) xs := "--------" if reflect.ValueOf(v).Kind() == reflect.Map { xs = " " @@ -1308,6 +1409,7 @@ func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) { if testSkipRPCTests { return } + testOnce.Do(testInitAll) // openPorts are between 6700 and 6800 r := rand.New(rand.NewSource(time.Now().UnixNano())) openPort := strconv.FormatInt(6700+r.Int63n(99), 10) @@ -1336,6 +1438,7 @@ func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) { if testSkipRPCTests { return } + testOnce.Do(testInitAll) port := testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, false, 1*time.Second) //time.Sleep(1000 * time.Millisecond) cmd := exec.Command("python", "test.py", "rpc-client-go-service", strconv.Itoa(port)) @@ -1350,7 +1453,126 @@ func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) { fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestRpcABC{"Aa", "Bb", "Cc"}), "cmdout=") } +func doTestSwallowAndZero(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + v1 := newTestStrucFlex(testDepth, false, false, false) + var b1 []byte + + e1 := NewEncoderBytes(&b1, h) + e1.MustEncode(v1) + d1 := NewDecoderBytes(b1, h) + d1.swallow() + if d1.r.numread() != len(b1) { + logT(t, "swallow didn't consume all encoded bytes: %v out of %v", d1.r.numread(), len(b1)) + failT(t) + } + d1.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{} + _, isJson := h.(*JsonHandle) + _, isCbor := h.(*CborHandle) + isValuer := isJson || isCbor + _ = isValuer + for _, r := range []RawExt{ + {Tag: 99, Value: "9999", Data: []byte("9999")}, + } { + e := NewEncoderBytes(&b, h) + e.MustEncode(&r) + d := NewDecoderBytes(b, h) + d.MustDecode(&v) + switch h.(type) { + case *JsonHandle: + testDeepEqualErr(r.Value, v, t, "rawext-json") + default: + r2 := r + if isValuer { + r2.Data = nil + } else { + r2.Value = nil + } + testDeepEqualErr(v, r2, t, "rawext-default") + } + } +} + +func doTestMapStructKey(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + var b []byte + var v interface{} // map[stringUint64T]wrapUint64Slice // interface{} + bh := h.getBasicHandle() + m := map[stringUint64T]wrapUint64Slice{ + {"55555", 55555}: []wrapUint64{12345}, + {"333", 333}: []wrapUint64{123}, + } + oldCanonical := bh.Canonical + oldMapType := bh.MapType + defer func() { + bh.Canonical = oldCanonical + bh.MapType = oldMapType + }() + + bh.MapType = reflect.TypeOf((*map[stringUint64T]wrapUint64Slice)(nil)).Elem() + for _, bv := range [2]bool{true, false} { + b, v = nil, nil + bh.Canonical = bv + e := NewEncoderBytes(&b, h) + e.MustEncode(m) + d := NewDecoderBytes(b, h) + d.MustDecode(&v) + testDeepEqualErr(v, m, t, "map-structkey") + } +} + +func doTestDecodeNilMapValue(t *testing.T, handle Handle) { + type Struct struct { + Field map[uint16]map[uint32]struct{} + } + + bh := handle.getBasicHandle() + oldMapType := bh.MapType + oldDeleteOnNilMapValue := bh.DeleteOnNilMapValue + defer func() { + bh.MapType = oldMapType + bh.DeleteOnNilMapValue = oldDeleteOnNilMapValue + }() + bh.MapType = reflect.TypeOf(map[interface{}]interface{}(nil)) + bh.DeleteOnNilMapValue = false + + _, isJsonHandle := handle.(*JsonHandle) + + toEncode := Struct{Field: map[uint16]map[uint32]struct{}{ + 1: nil, + }} + + bs, err := testMarshal(toEncode, handle) + if err != nil { + logT(t, "Error encoding: %v, Err: %v", toEncode, err) + failT(t) + } + if isJsonHandle { + logT(t, "json encoded: %s\n", bs) + } + + var decoded Struct + err = testUnmarshal(&decoded, bs, handle) + if err != nil { + logT(t, "Error decoding: %v", err) + failT(t) + } + if !reflect.DeepEqual(decoded, toEncode) { + logT(t, "Decoded value %#v != %#v", decoded, toEncode) + failT(t) + } +} + func testRandomFillRV(v reflect.Value) { + testOnce.Do(testInitAll) fneg := func() int64 { i := rand.Intn(1) if i == 1 { @@ -1428,7 +1650,6 @@ func testMammoth(t *testing.T, name string, h Handle) { testRandomFillRV(reflect.ValueOf(&m).Elem()) b, _ := testMarshalErr(&m, h, t, "mammoth-"+name) testUnmarshalErr(&m2, b, h, t, "mammoth-"+name) - // fmt.Printf("m2: %v", &m2) testDeepEqualErr(&m, &m2, t, "mammoth-"+name) } @@ -1603,6 +1824,86 @@ func TestBincUnderlyingType(t *testing.T) { testCodecUnderlyingType(t, testBincH) } +func TestJsonSwallowAndZero(t *testing.T) { + doTestSwallowAndZero(t, testJsonH) +} + +func TestCborSwallowAndZero(t *testing.T) { + doTestSwallowAndZero(t, testCborH) +} + +func TestMsgpackSwallowAndZero(t *testing.T) { + doTestSwallowAndZero(t, testMsgpackH) +} + +func TestBincSwallowAndZero(t *testing.T) { + doTestSwallowAndZero(t, testBincH) +} + +func TestSimpleSwallowAndZero(t *testing.T) { + doTestSwallowAndZero(t, testSimpleH) +} + +func TestJsonRawExt(t *testing.T) { + doTestRawExt(t, testJsonH) +} + +func TestCborRawExt(t *testing.T) { + doTestRawExt(t, testCborH) +} + +func TestMsgpackRawExt(t *testing.T) { + doTestRawExt(t, testMsgpackH) +} + +func TestBincRawExt(t *testing.T) { + doTestRawExt(t, testBincH) +} + +func TestSimpleRawExt(t *testing.T) { + doTestRawExt(t, testSimpleH) +} + +func TestJsonMapStructKey(t *testing.T) { + doTestMapStructKey(t, testJsonH) +} + +func TestCborMapStructKey(t *testing.T) { + doTestMapStructKey(t, testCborH) +} + +func TestMsgpackMapStructKey(t *testing.T) { + doTestMapStructKey(t, testMsgpackH) +} + +func TestBincMapStructKey(t *testing.T) { + doTestMapStructKey(t, testBincH) +} + +func TestSimpleMapStructKey(t *testing.T) { + doTestMapStructKey(t, testSimpleH) +} + +func TestJsonDecodeNilMapValue(t *testing.T) { + doTestDecodeNilMapValue(t, testJsonH) +} + +func TestCborDecodeNilMapValue(t *testing.T) { + doTestDecodeNilMapValue(t, testCborH) +} + +func TestMsgpackDecodeNilMapValue(t *testing.T) { + doTestDecodeNilMapValue(t, testMsgpackH) +} + +func TestBincDecodeNilMapValue(t *testing.T) { + doTestDecodeNilMapValue(t, testBincH) +} + +func TestSimpleDecodeNilMapValue(t *testing.T) { + doTestDecodeNilMapValue(t, testSimpleH) +} + func TestJsonLargeInteger(t *testing.T) { for _, i := range []uint8{'L', 'A', 0} { for _, j := range []interface{}{ diff --git a/codec/codecgen/gen.go b/codec/codecgen/gen.go index dbde8c3a..bf26fa9f 100644 --- a/codec/codecgen/gen.go +++ b/codec/codecgen/gen.go @@ -62,7 +62,7 @@ func CodecGenTempWrite{{ .RandString }}() { var t{{ $index }} {{ . }} typs = append(typs, reflect.TypeOf(t{{ $index }})) {{ end }} - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...) + {{ 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()) if err != nil { fout.Write(out.Bytes()) @@ -82,8 +82,12 @@ func CodecGenTempWrite{{ .RandString }}() { // Tool then executes: "go run __frun__" which creates fout. // fout contains Codec(En|De)codeSelf implementations for every type T. // -func Generate(outfile, buildTag, codecPkgPath string, uid int64, goRunTag string, - st string, regexName *regexp.Regexp, notRegexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { +func Generate(outfile, buildTag, codecPkgPath string, + uid int64, + goRunTag string, st string, + regexName, notRegexName *regexp.Regexp, + deleteTempFile, noExtensions bool, + infiles ...string) (err error) { // For each file, grab AST, find each type, and write a call to it. if len(infiles) == 0 { return @@ -121,6 +125,7 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, goRunTag string StructTags string Types []string CodecPkgFiles bool + NoExtensions bool } tv := tmplT{ CodecPkgName: genCodecPkg, @@ -129,6 +134,7 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, goRunTag string BuildTag: buildTag, RandString: strconv.FormatInt(uid, 10), StructTags: st, + NoExtensions: noExtensions, } tv.ImportPath = pkg.ImportPath if tv.ImportPath == tv.CodecImportPath { @@ -313,9 +319,12 @@ func main() { x := flag.Bool("x", false, "keep temp file") _ = flag.Bool("u", false, "*IGNORED - kept for backwards compatibility*: Allow unsafe use") d := flag.Int64("d", 0, "random identifier for use in generated code") + nx := flag.Bool("nx", false, "no extensions") + flag.Parse() if err := Generate(*o, *t, *c, *d, *rt, *st, - regexp.MustCompile(*r), regexp.MustCompile(*nr), !*x, flag.Args()...); err != nil { + regexp.MustCompile(*r), regexp.MustCompile(*nr), !*x, *nx, + flag.Args()...); err != nil { fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) os.Exit(1) } diff --git a/codec/codecgen_test.go b/codec/codecgen_test.go deleted file mode 100644 index 586af774..00000000 --- a/codec/codecgen_test.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build x,codecgen - -package codec - -import ( - "fmt" - "testing" -) - -func _TestCodecgenJson1(t *testing.T) { - // This is just a simplistic test for codecgen. - // It is typically disabled. We only enable it for debugging purposes. - const callCodecgenDirect bool = true - v := newTestStruc(2, false, !testSkipIntf, false) - var bs []byte - e := NewEncoderBytes(&bs, testJsonH) - if callCodecgenDirect { - v.CodecEncodeSelf(e) - e.w.atEndOfEncode() - } else { - e.MustEncode(v) - } - fmt.Printf("%s\n", bs) -} diff --git a/codec/decode.go b/codec/decode.go index 2cb0b4e3..cdee28f3 100644 --- a/codec/decode.go +++ b/codec/decode.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "reflect" + "sync" "time" ) @@ -34,15 +35,17 @@ type decReader interface { readx(n int) []byte readb([]byte) readn1() uint8 - readn1eof() (v uint8, eof bool) + readn3() (uint8, uint8, uint8) + readn4() (uint8, uint8, uint8, uint8) + // readn1eof() (v uint8, eof bool) numread() int // number of bytes read track() stopTrack() []byte // skip will skip any byte that matches, and return the first non-matching byte - skip(accept *[256]bool) (token byte) + skip(accept *bitset256) (token byte) // readTo will read any byte that matches, stopping once no-longer matching. - readTo(in []byte, accept *[256]bool) (out []byte) + readTo(in []byte, accept *bitset256) (out []byte) // readUntil will read, only stopping once it matches the 'stop' byte. readUntil(in []byte, stop byte) (out []byte) } @@ -62,7 +65,7 @@ type decDriver interface { TryDecodeAsNil() bool // vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. ContainerType() (vt valueType) - IsBuiltinType(rt uintptr) bool + // IsBuiltinType(rt uintptr) bool DecodeBuiltin(rt uintptr, v interface{}) // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. @@ -154,6 +157,11 @@ type DecodeOptions struct { // or is an interface. MapValueReset bool + // SliceElementReset: on decoding a slice, reset the element to a zero value first. + // + // concern: if the slice already contained some garbage, we will decode into that garbage. + SliceElementReset bool + // InterfaceReset controls how we decode into an interface. // // By default, when we see a field that is an interface{...}, @@ -187,6 +195,12 @@ type DecodeOptions struct { // *Note*: This only applies if using go1.5 and above, // as it requires reflect.ArrayOf support which was absent before go1.5. PreferArrayOverSlice bool + + // DeleteOnNilMapValue controls how to decode a nil value in the stream. + // + // If true, we will delete the mapping of the key. + // Else, just set the mapping to the zero value of the type. + DeleteOnNilMapValue bool } // ------------------------------------ @@ -298,18 +312,6 @@ func (z *ioDecReader) readb(bs []byte) { } } -func (z *ioDecReader) readn1() (b uint8) { - b, err := z.br.ReadByte() - if err != nil { - panic(err) - } - z.n++ - if z.trb { - z.tr = append(z.tr, b) - } - return b -} - func (z *ioDecReader) readn1eof() (b uint8, eof bool) { b, err := z.br.ReadByte() if err == nil { @@ -325,28 +327,74 @@ func (z *ioDecReader) readn1eof() (b uint8, eof bool) { return } -func (z *ioDecReader) skip(accept *[256]bool) (token byte) { +func (z *ioDecReader) readn1() (b uint8) { + var err error + if b, err = z.br.ReadByte(); err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + return + } + panic(err) +} + +func (z *ioDecReader) readn3() (b1, b2, b3 uint8) { + var err error + if b1, err = z.br.ReadByte(); err == nil { + if b2, err = z.br.ReadByte(); err == nil { + if b3, err = z.br.ReadByte(); err == nil { + z.n += 3 + if z.trb { + z.tr = append(z.tr, b1, b2, b3) + } + return + } + } + } + panic(err) +} + +func (z *ioDecReader) readn4() (b1, b2, b3, b4 uint8) { + var err error + if b1, err = z.br.ReadByte(); err == nil { + if b2, err = z.br.ReadByte(); err == nil { + if b3, err = z.br.ReadByte(); err == nil { + if b4, err = z.br.ReadByte(); err == nil { + z.n += 4 + if z.trb { + z.tr = append(z.tr, b1, b2, b3, b4) + } + return + } + } + } + } + panic(err) +} + +func (z *ioDecReader) skip(accept *bitset256) (token byte) { for { var eof bool token, eof = z.readn1eof() if eof { return } - if accept[token] { + if accept.isset(token) { continue } return } } -func (z *ioDecReader) readTo(in []byte, accept *[256]bool) (out []byte) { +func (z *ioDecReader) readTo(in []byte, accept *bitset256) (out []byte) { out = in for { token, eof := z.readn1eof() if eof { return } - if accept[token] { + if accept.isset(token) { out = append(out, token) } else { z.unreadn1() @@ -459,27 +507,50 @@ func (z *bytesDecReader) readn1() (v uint8) { return } -func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { - if z.a == 0 { - eof = true - return +func (z *bytesDecReader) readn3() (b1, b2, b3 uint8) { + if 3 > z.a { + panic(io.ErrUnexpectedEOF) } - v = z.b[z.c] - z.c++ - z.a-- + b3 = z.b[z.c+2] + b2 = z.b[z.c+1] + b1 = z.b[z.c] + z.c += 3 + z.a -= 3 + return +} + +func (z *bytesDecReader) readn4() (b1, b2, b3, b4 uint8) { + if 4 > z.a { + panic(io.ErrUnexpectedEOF) + } + b4 = z.b[z.c+3] + b3 = z.b[z.c+2] + b2 = z.b[z.c+1] + b1 = z.b[z.c] + z.c += 4 + z.a -= 4 return } -func (z *bytesDecReader) skip(accept *[256]bool) (token byte) { +// func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { +// if z.a == 0 { +// eof = true +// return +// } +// v = z.b[z.c] +// z.c++ +// z.a-- +// return +// } + +func (z *bytesDecReader) skip(accept *bitset256) (token byte) { if z.a == 0 { return } for i := z.c; i < len(z.b); i++ { - // fmt.Printf(">>>> skipWhitespace: checking: index: %d, %s\n", i, string(z.b[i])) - if accept[z.b[i]] { + if accept.isset(z.b[i]) { continue } - // fmt.Printf(">>>> skipWhitespace: returning\n") token = z.b[i] i++ z.a -= (i - z.c) @@ -490,15 +561,13 @@ func (z *bytesDecReader) skip(accept *[256]bool) (token byte) { return } -func (z *bytesDecReader) readTo(in []byte, accept *[256]bool) (out []byte) { +func (z *bytesDecReader) readTo(in []byte, accept *bitset256) (out []byte) { if z.a == 0 { return } for i := z.c; i < len(z.b); i++ { - // fmt.Printf(">>>> readbUntilAny: checking: index: %d, %s\n", i, string(z.b[i])) - if !accept[z.b[i]] { + if !accept.isset(z.b[i]) { out = z.b[z.c:i] - // fmt.Printf(">>>> readbUntilAny: returning: %s\n", z.b[z.c:i]) z.a -= (i - z.c) z.c = i return @@ -514,9 +583,7 @@ func (z *bytesDecReader) readUntil(in []byte, stop byte) (out []byte) { panic(io.EOF) } for i := z.c; i < len(z.b); i++ { - // fmt.Printf(">>>> readbUntilDblQUote: checking: index: %d, %s\n", i, string(z.b[i])) if z.b[i] == stop { - // fmt.Printf(">>>> readbUntilDblQUote: returning\n") i++ out = z.b[z.c:i] z.a -= (i - z.c) @@ -536,36 +603,21 @@ func (z *bytesDecReader) stopTrack() (bs []byte) { return z.b[z.t:z.c] } -// ------------------------------------ - -type decFnInfo struct { - d *Decoder - ti *typeInfo - xfFn Ext - xfTag uint64 - seq seqType -} - // ---------------------------------------- -type decFn struct { - i decFnInfo - f func(*decFnInfo, reflect.Value) +func (d *Decoder) builtin(f *codecFnInfo, rv reflect.Value) { + d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv)) } -func (f *decFnInfo) builtin(rv reflect.Value) { - f.d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv.Addr())) +func (d *Decoder) rawExt(f *codecFnInfo, rv reflect.Value) { + d.d.DecodeExt(rv2i(rv), 0, nil) } -func (f *decFnInfo) rawExt(rv reflect.Value) { - f.d.d.DecodeExt(rv2i(rv.Addr()), 0, nil) +func (d *Decoder) ext(f *codecFnInfo, rv reflect.Value) { + d.d.DecodeExt(rv2i(rv), f.xfTag, f.xfFn) } -func (f *decFnInfo) ext(rv reflect.Value) { - f.d.d.DecodeExt(rv2i(rv.Addr()), f.xfTag, f.xfFn) -} - -func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { +func (d *Decoder) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { if indir == -1 { v = rv2i(rv.Addr()) } else if indir == 0 { @@ -582,57 +634,48 @@ func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) return } -func (f *decFnInfo) selferUnmarshal(rv reflect.Value) { - f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d) +func (d *Decoder) selferUnmarshal(f *codecFnInfo, rv reflect.Value) { + d.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(d) } -func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) { - bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) - xbs := f.d.d.DecodeBytes(nil, true) +func (d *Decoder) binaryUnmarshal(f *codecFnInfo, rv reflect.Value) { + bm := d.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) + xbs := d.d.DecodeBytes(nil, true) if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { panic(fnerr) } } -func (f *decFnInfo) textUnmarshal(rv reflect.Value) { - tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) - fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes()) +func (d *Decoder) textUnmarshal(f *codecFnInfo, rv reflect.Value) { + tm := d.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) + fnerr := tm.UnmarshalText(d.d.DecodeStringAsBytes()) if fnerr != nil { panic(fnerr) } } -func (f *decFnInfo) jsonUnmarshal(rv reflect.Value) { - tm := f.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) - // bs := f.d.d.DecodeBytes(f.d.b[:], true, true) +func (d *Decoder) jsonUnmarshal(f *codecFnInfo, rv reflect.Value) { + tm := d.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) + // bs := d.d.DecodeBytes(d.b[:], true, true) // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. - fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + fnerr := tm.UnmarshalJSON(d.nextValueBytes()) if fnerr != nil { panic(fnerr) } } -func (f *decFnInfo) kErr(rv reflect.Value) { - f.d.errorf("no decoding function defined for kind %v", rv.Kind()) +func (d *Decoder) kErr(f *codecFnInfo, rv reflect.Value) { + d.errorf("no decoding function defined for kind %v", rv.Kind()) } -// func (f *decFnInfo) kPtr(rv reflect.Value) { -// debugf(">>>>>>> ??? decode kPtr called - shouldn't get called") -// if rv.IsNil() { -// rv.Set(reflect.New(rv.Type().Elem())) -// } -// f.d.decodeValue(rv.Elem()) -// } - // var kIntfCtr uint64 -func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) { +func (d *Decoder) kInterfaceNaked(f *codecFnInfo) (rvn reflect.Value) { // nil interface: // use some hieristics to decode it appropriately // based on the detected next value in the stream. - d := f.d + n := d.naked() d.d.DecodeNaked() - n := &d.n if n.v == valueTypeNil { return } @@ -645,140 +688,184 @@ func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) { // var useRvn bool switch n.v { case valueTypeMap: - // if d.h.MapType == nil || d.h.MapType == mapIntfIntfTyp { - // } else if d.h.MapType == mapStrIntfTyp { // for json performance - // } if d.mtid == 0 || d.mtid == mapIntfIntfTypId { - l := len(n.ms) - n.ms = append(n.ms, nil) - var v2 interface{} = &n.ms[l] - d.decode(v2) - rvn = d.np.get(v2) - n.ms = n.ms[:l] + if n.lm < arrayCacheLen { + n.ma[n.lm] = nil + rvn = n.rr[decNakedMapIntfIntfIdx*arrayCacheLen+n.lm] + n.lm++ + d.decode(&n.ma[n.lm-1]) + n.lm-- + } else { + var v2 map[interface{}]interface{} + d.decode(&v2) + rvn = reflect.ValueOf(&v2).Elem() + } } else if d.mtid == mapStrIntfTypId { // for json performance - l := len(n.ns) - n.ns = append(n.ns, nil) - var v2 interface{} = &n.ns[l] - d.decode(v2) - rvn = d.np.get(v2) - n.ns = n.ns[:l] + if n.ln < arrayCacheLen { + n.na[n.ln] = nil + rvn = n.rr[decNakedMapStrIntfIdx*arrayCacheLen+n.ln] + n.ln++ + d.decode(&n.na[n.ln-1]) + n.ln-- + } else { + var v2 map[string]interface{} + d.decode(&v2) + rvn = reflect.ValueOf(&v2).Elem() + } } else { - rvn = reflect.New(d.h.MapType).Elem() - d.decodeValue(rvn, nil) + rvn = reflect.New(d.h.MapType) + if useLookupRecognizedTypes && d.mtr { // isRecognizedRtid(d.mtid) { + d.decode(rv2i(rvn)) + rvn = rvn.Elem() + } else { + rvn = rvn.Elem() + d.decodeValue(rvn, nil, false, true) + } } case valueTypeArray: - // if d.h.SliceType == nil || d.h.SliceType == intfSliceTyp { if d.stid == 0 || d.stid == intfSliceTypId { - l := len(n.ss) - n.ss = append(n.ss, nil) - var v2 interface{} = &n.ss[l] - d.decode(v2) - n.ss = n.ss[:l] - if reflectArrayOfSupported && d.stid == 0 && d.h.PreferArrayOverSlice { - rvn00 := d.np.get(v2) - rvn = reflect.New(reflectArrayOf(rvn00.Len(), intfTyp)).Elem() - reflect.Copy(rvn, rvn00) + if n.ls < arrayCacheLen { + n.sa[n.ls] = nil + rvn = n.rr[decNakedSliceIntfIdx*arrayCacheLen+n.ls] + n.ls++ + d.decode(&n.sa[n.ls-1]) + n.ls-- } else { - rvn = d.np.get(v2) + var v2 []interface{} + d.decode(&v2) + rvn = reflect.ValueOf(&v2).Elem() + } + if reflectArrayOfSupported && d.stid == 0 && d.h.PreferArrayOverSlice { + rvn2 := reflect.New(reflectArrayOf(rvn.Len(), intfTyp)).Elem() + reflect.Copy(rvn2, rvn) + rvn = rvn2 } } else { - rvn = reflect.New(d.h.SliceType).Elem() - d.decodeValue(rvn, nil) + rvn = reflect.New(d.h.SliceType) + if useLookupRecognizedTypes && d.str { // isRecognizedRtid(d.stid) { + d.decode(rv2i(rvn)) + rvn = rvn.Elem() + } else { + rvn = rvn.Elem() + d.decodeValue(rvn, nil, false, true) + } } case valueTypeExt: var v interface{} tag, bytes := n.u, n.l // calling decode below might taint the values if bytes == nil { - l := len(n.is) - n.is = append(n.is, nil) - v2 := &n.is[l] - d.decode(v2) - v = *v2 - n.is = n.is[:l] + if n.li < arrayCacheLen { + n.ia[n.li] = nil + n.li++ + d.decode(&n.ia[n.li-1]) + // v = *(&n.ia[l]) + n.li-- + v = n.ia[n.li] + n.ia[n.li] = nil + } else { + d.decode(&v) + } } bfn := d.h.getExtForTag(tag) if bfn == nil { var re RawExt re.Tag = tag re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) - rvn = reflect.ValueOf(re) + re.Value = v + rvn = reflect.ValueOf(&re).Elem() } else { rvnA := reflect.New(bfn.rt) - rvn = rvnA.Elem() if bytes != nil { bfn.ext.ReadExt(rv2i(rvnA), bytes) } else { bfn.ext.UpdateExt(rv2i(rvnA), v) } + rvn = rvnA.Elem() } case valueTypeNil: // no-op case valueTypeInt: - rvn = d.np.get(&n.i) + rvn = n.rr[decNakedIntIdx] // d.np.get(&n.i) case valueTypeUint: - rvn = d.np.get(&n.u) + rvn = n.rr[decNakedUintIdx] // d.np.get(&n.u) case valueTypeFloat: - rvn = d.np.get(&n.f) + rvn = n.rr[decNakedFloatIdx] // d.np.get(&n.f) case valueTypeBool: - rvn = d.np.get(&n.b) + rvn = n.rr[decNakedBoolIdx] // d.np.get(&n.b) case valueTypeString, valueTypeSymbol: - rvn = d.np.get(&n.s) + rvn = n.rr[decNakedStringIdx] // d.np.get(&n.s) case valueTypeBytes: - rvn = d.np.get(&n.l) + rvn = n.rr[decNakedBytesIdx] // d.np.get(&n.l) case valueTypeTimestamp: - rvn = d.np.get(&n.t) + rvn = n.rr[decNakedTimeIdx] // d.np.get(&n.t) default: panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v)) } return } -func (f *decFnInfo) kInterface(rv reflect.Value) { - // debugf("\t===> kInterface") - +func (d *Decoder) kInterface(f *codecFnInfo, rv reflect.Value) { // Note: // A consequence of how kInterface works, is that // if an interface already contains something, we try // to decode into what was there before. // We do not replace with a generic value (as got from decodeNaked). + // every interface passed here MUST be settable. var rvn reflect.Value if rv.IsNil() { - rvn = f.kInterfaceNaked() - if rvn.IsValid() { + if rvn = d.kInterfaceNaked(f); rvn.IsValid() { rv.Set(rvn) } - } else if f.d.h.InterfaceReset { - rvn = f.kInterfaceNaked() - if rvn.IsValid() { + return + } + if d.h.InterfaceReset { + if rvn = d.kInterfaceNaked(f); rvn.IsValid() { rv.Set(rvn) } else { // reset to zero value based on current type in there. rv.Set(reflect.Zero(rv.Elem().Type())) } - } else { - rvn = rv.Elem() - // Note: interface{} is settable, but underlying type may not be. - // Consequently, we have to set the reflect.Value directly. - // if underlying type is settable (e.g. ptr or interface), - // we just decode into it. - // Else we create a settable value, decode into it, and set on the interface. - if rvn.CanSet() { - f.d.decodeValue(rvn, nil) - } else { - rvn2 := reflect.New(rvn.Type()).Elem() - rvn2.Set(rvn) - f.d.decodeValue(rvn2, nil) - rv.Set(rvn2) - } + return + } + + // 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 + } + + // Note: interface{} is settable, but underlying type may not be. + // Consequently, we MAY have to create a decodable value out of the underlying value, + // decode into it, and reset the interface itself. + // fmt.Printf(">>>> kInterface: rvn type: %v, rv type: %v\n", rvn.Type(), rv.Type()) + + rvn2, canDecode := isDecodeable(rvn) + if canDecode { + d.decodeValue(rvn2, nil, true, true) + return } + + rvn2 = reflect.New(rvn.Type()).Elem() + rvn2.Set(rvn) + d.decodeValue(rvn2, nil, true, true) + rv.Set(rvn2) } -func (f *decFnInfo) kStruct(rv reflect.Value) { +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 + fti := f.ti - d := f.d dd := d.d cr := d.cr + sfn := structFieldNode{v: rv, update: true} ctyp := dd.ContainerType() if ctyp == valueTypeMap { containerLen := dd.ReadMapStart() @@ -790,6 +877,7 @@ func (f *decFnInfo) kStruct(rv reflect.Value) { } tisfi := fti.sfi hasLen := containerLen >= 0 + for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { // rvkencname := dd.DecodeString() if cr != nil { @@ -806,7 +894,7 @@ func (f *decFnInfo) kStruct(rv reflect.Value) { if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(si.field(rv, true), nil) + d.decodeValue(sfn.field(si), nil, checkRecognized, true) } } else { d.structFieldNotFound(-1, rvkencname) @@ -837,7 +925,7 @@ func (f *decFnInfo) kStruct(rv reflect.Value) { if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(si.field(rv, true), nil) + d.decodeValue(sfn.field(si), nil, checkRecognized, true) } } if containerLen > len(fti.sfip) { @@ -853,23 +941,22 @@ func (f *decFnInfo) kStruct(rv reflect.Value) { cr.sendContainerState(containerArrayEnd) } } else { - f.d.error(onlyMapOrArrayCanDecodeIntoStructErr) + d.error(onlyMapOrArrayCanDecodeIntoStructErr) return } } -func (f *decFnInfo) kSlice(rv reflect.Value) { +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 - d := f.d dd := d.d rtelem0 := ti.rt.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) { - f.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 or string in the stream must be decoded into a slice or array of bytes, not %v", ti.rt) } if f.seq == seqTypeChan { bs2 := dd.DecodeBytes(nil, true) @@ -895,7 +982,7 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) - // // an array can never return a nil slice. so no need to check f.array here. + // an array can never return a nil slice. so no need to check f.array here. if containerLenS == 0 { if rv.CanSet() { if f.seq == seqTypeSlice { @@ -915,26 +1002,29 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { } rtelem0Size := int(rtelem0.Size()) - rtelem0Mut := !isImmutableKind(rtelem0.Kind()) - // rtelem0Kind := rtelem0.Kind() + rtElem0Kind := rtelem0.Kind() + rtElem0Id := rt2id(rtelem0) + rtelem0Mut := !isImmutableKind(rtElem0Kind) rtelem := rtelem0 - for rtelem.Kind() == reflect.Ptr { + rtelemkind := rtelem.Kind() + for rtelemkind == reflect.Ptr { rtelem = rtelem.Elem() + rtelemkind = rtelem.Kind() } - fn := d.getDecFn(rtelem, true, true) + + var fn *codecFn var rv0, rv9 reflect.Value rv0 = rv rvChanged := false - // for j := 0; j < containerLenS; j++ { rvlen := rv.Len() rvcap := rv.Cap() hasLen := containerLenS > 0 if hasLen && f.seq == seqTypeSlice { if containerLenS > rvcap { oldRvlenGtZero := rvlen > 0 - rvlen = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + rvlen = decInferLen(containerLenS, d.h.MaxInitLen, int(rtelem0.Size())) if rvlen <= rvcap { if rv.CanSet() { rv.SetLen(rvlen) @@ -960,14 +1050,22 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { } } } + + 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 for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ { if j == 0 && (f.seq == seqTypeSlice || f.seq == seqTypeChan) && rv.IsNil() { if hasLen { - rvlen = decInferLen(containerLenS, f.d.h.MaxInitLen, rtelem0Size) + rvlen = decInferLen(containerLenS, d.h.MaxInitLen, rtelem0Size) } else { rvlen = 8 } @@ -978,12 +1076,24 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { rv.Set(reflect.MakeChan(ti.rt, rvlen)) } } + slh.ElemContainerState(j) + decodeAsNil = dd.TryDecodeAsNil() if f.seq == seqTypeChan { - slh.ElemContainerState(j) - if rtelem0Mut || !rv9.IsValid() { + if decodeAsNil { + rv.Send(reflect.Zero(rtelem0)) + continue + } + if rtelem0Mut || !rv9.IsValid() { // || (rtElem0Kind == reflect.Ptr && rv9.IsNil()) { rv9 = reflect.New(rtelem0).Elem() } - d.decodeValue(rv9, fn) + 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) + } rv.Send(rv9) } else { // if indefinite, etc, then expand the slice if necessary @@ -1003,20 +1113,36 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { } } } - slh.ElemContainerState(j) if decodeIntoBlank { - d.swallow() + if !decodeAsNil { + d.swallow() + } } else { rv9 = rv.Index(j) - // rv.Index(rv.Len() - 1).Set(reflect.Zero(rtelem0)) - if resetSliceElemToZeroValue { + if d.h.SliceElementReset || decodeAsNil { if !rtelem0ZeroValid { rtelem0ZeroValid = true rtelem0Zero = reflect.Zero(rtelem0) } rv9.Set(rtelem0Zero) } - d.decodeValue(rv9, fn) + if decodeAsNil { + 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) + } } } } @@ -1041,13 +1167,12 @@ func (f *decFnInfo) kSlice(rv reflect.Value) { } } -func (f *decFnInfo) kArray(rv reflect.Value) { - // f.d.decodeValue(rv.Slice(0, rv.Len())) - f.kSlice(rv.Slice(0, rv.Len())) -} +// func (d *Decoder) kArray(f *codecFnInfo, rv reflect.Value) { +// // d.decodeValueFn(rv.Slice(0, rv.Len())) +// f.kSlice(rv.Slice(0, rv.Len())) +// } -func (f *decFnInfo) kMap(rv reflect.Value) { - d := f.d +func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { dd := d.d containerLen := dd.ReadMapStart() cr := d.cr @@ -1065,18 +1190,27 @@ func (f *decFnInfo) kMap(rv reflect.Value) { ktype, vtype := ti.rt.Key(), ti.rt.Elem() ktypeId := rt2id(ktype) + vtypeId := rt2id(vtype) vtypeKind := vtype.Kind() - var keyFn, valFn *decFn - var xtyp reflect.Type - for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + 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() { } - keyFn = d.getDecFn(xtyp, true, true) - for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + + for vtypeLo = vtype; vtypeLo.Kind() == reflect.Ptr; vtypeLo = vtypeLo.Elem() { } - valFn = d.getDecFn(xtyp, true, true) + var mapGet, mapSet bool rvvImmut := isImmutableKind(vtypeKind) - if !f.d.h.MapValueReset { + if !d.h.MapValueReset { // if pointer, mapGet = true // if interface, mapGet = true if !DecodeNakedAlways (else false) // if builtin, mapGet = false @@ -1084,7 +1218,7 @@ func (f *decFnInfo) kMap(rv reflect.Value) { if vtypeKind == reflect.Ptr { mapGet = true } else if vtypeKind == reflect.Interface { - if !f.d.h.InterfaceReset { + if !d.h.InterfaceReset { mapGet = true } } else if !rvvImmut { @@ -1092,10 +1226,9 @@ func (f *decFnInfo) kMap(rv reflect.Value) { } } - var rvk, rvv, rvz reflect.Value + var rvk, rvkp, rvv, rvz reflect.Value rvkMut := !isImmutableKind(ktype.Kind()) // if ktype is immutable, then re-use the same rvk. ktypeIsString := ktypeId == stringTypId - // ktypeIsString = false ktypeIsIntf := ktypeId == intfTypId hasLen := containerLen > 0 var kstrbs []byte @@ -1103,22 +1236,41 @@ func (f *decFnInfo) kMap(rv reflect.Value) { if cr != nil { cr.sendContainerState(containerMapKey) } - if rvkMut || !rvk.IsValid() { - rvk = reflect.New(ktype).Elem() + // if a nil key, just ignore the mapped value and continue + if dd.TryDecodeAsNil() { + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.swallow() + continue + } + if rvkMut || !rvkp.IsValid() { + rvkp = reflect.New(ktype) + rvk = rvkp.Elem() } if ktypeIsString { kstrbs = dd.DecodeStringAsBytes() - // fmt.Printf(">>>> decode: kMap: kstring: %s\n", kstrbs) 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 { - d.decodeValue(rvk, keyFn) - // special case if a byte array. - if ktypeIsIntf { - rvk = rvk.Elem() - if rvk.Type() == uint8SliceTyp { - rvk = reflect.ValueOf(d.string(rvk.Bytes())) - } + if keyFn == nil { + keyFn = d.cf.get(ktypeLo, true, true) + } + d.decodeValue(rvk, keyFn, false, true) + } + // special case if a byte array. + if ktypeIsIntf { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk.Bytes())) } } @@ -1132,25 +1284,36 @@ func (f *decFnInfo) kMap(rv reflect.Value) { if ktypeIsString { rvk.SetString(d.string(kstrbs)) } - rv.SetMapIndex(rvk, reflect.Value{}) // delete the mapping + if d.h.DeleteOnNilMapValue { + rv.SetMapIndex(rvk, reflect.Value{}) + } else { + rv.SetMapIndex(rvk, reflect.Zero(vtype)) + } continue } - mapSet = true // set to false if u do a get, and its a pointer, and exists + mapSet = true // set to false if u do a get, and its a non-nil pointer if mapGet { + // mapGet true only in case where kind=Ptr|Interface or kind is otherwise mutable. rvv = rv.MapIndex(rvk) if !rvv.IsValid() { rvv = reflect.New(vtype).Elem() } else if vtypeKind == reflect.Ptr { - mapSet = false + if rvv.IsNil() { + rvv = reflect.New(vtype).Elem() + } else { + mapSet = false + } + } else if vtypeKind == reflect.Interface { + // not addressable, and thus not settable. + // e MUST create a settable/addressable variant + rvv2 := reflect.New(rvv.Type()).Elem() + if !rvv.IsNil() { + rvv2.Set(rvv) + } + rvv = rvv2 } - // if rvv.IsValid() { - // if vtypeKind == reflect.Ptr { - // mapSet = false - // } - // } else { - // rvv = reflect.New(vtype).Elem() - // } + // else it is ~mutable, and we can just decode into it directly } else if rvvImmut { if !rvz.IsValid() { rvz = reflect.New(vtype).Elem() @@ -1162,14 +1325,27 @@ func (f *decFnInfo) kMap(rv reflect.Value) { // We MUST be done with the stringview of the key, before decoding the value // so that we don't bastardize the reused byte array. - if mapSet { - if ktypeIsString { - rvk.SetString(d.string(kstrbs)) + 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.decodeValue(rvv, valFn) - rv.SetMapIndex(rvk, rvv) + d.decode(rv2i(rvv)) } else { - d.decodeValue(rvv, valFn) + if valFn == nil { + valFn = d.cf.get(vtypeLo, true, true) + } + // fmt.Printf("decode.kMap: rvv: type: %v (vtype: %v), settable: %v, addressable: %v\n", rvv.Type(), vtype, rvv.CanSet(), rvv.CanAddr()) + d.decodeValue(rvv, valFn, false, true) + // d.decodeValueFn(rvv, valFn) + } + if mapSet { + rv.SetMapIndex(rvk, rvv) } // if ktypeIsString { // // keepAlive4StringView(kstrbs) // not needed, as reference is outside loop @@ -1181,11 +1357,6 @@ func (f *decFnInfo) kMap(rv reflect.Value) { } } -type decRtidFn struct { - rtid uintptr - fn decFn -} - // decNaked is used to keep track of the primitives decoded. // Without it, we would have to decode each primitive and wrap it // in an interface{}, causing an allocation. @@ -1212,37 +1383,75 @@ type decNaked struct { l []byte s string t time.Time + b bool + + inited bool + v valueType - // stacks for reducing allocation - is []interface{} - ms []map[interface{}]interface{} - ns []map[string]interface{} - ss [][]interface{} - // rs []RawExt + li, lm, ln, ls int8 + // array/stacks for reducing allocation // keep arrays at the bottom? Chance is that they are not used much. - ia [4]interface{} - ma [4]map[interface{}]interface{} - na [4]map[string]interface{} - sa [4][]interface{} + ia [arrayCacheLen]interface{} + ma [arrayCacheLen]map[interface{}]interface{} + na [arrayCacheLen]map[string]interface{} + sa [arrayCacheLen][]interface{} // ra [2]RawExt + + rr [5 * arrayCacheLen]reflect.Value } -func (n *decNaked) reset() { - if n.ss != nil { - n.ss = n.ss[:0] - } - if n.is != nil { - n.is = n.is[:0] +const ( + decNakedUintIdx = iota + decNakedIntIdx + decNakedFloatIdx + decNakedBytesIdx + decNakedStringIdx + decNakedTimeIdx + decNakedBoolIdx +) +const ( + _ = iota // maps to the scalars above + decNakedIntfIdx + decNakedMapIntfIntfIdx + decNakedMapStrIntfIdx + decNakedSliceIntfIdx +) + +func (n *decNaked) init() { + if n.inited { + return } - if n.ms != nil { - n.ms = n.ms[:0] + // n.ms = n.ma[:0] + // n.is = n.ia[:0] + // n.ns = n.na[:0] + // n.ss = n.sa[:0] + + 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() } - if n.ns != nil { - n.ns = n.ns[:0] + n.inited = true + // n.rr[] = reflect.ValueOf(&n.) +} + +func (n *decNaked) reset() { + if n == nil { + return } + n.li, n.lm, n.ln, n.ls = 0, 0, 0, 0 } type rtid2rv struct { @@ -1258,33 +1467,41 @@ type Decoder struct { d decDriver // NOTE: Decoder shouldn't call it's read methods, // as the handler MAY need to do some coordination. - r decReader - // sa [initCollectionCap]decRtidFn - h *BasicHandle + 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 cr containerStateRecv - s []decRtidFn - f map[uintptr]*decFn + n *decNaked + nsp *sync.Pool - // _ uintptr // for alignment purposes, so next one starts from a cache line + // ---- cpu cache line boundary? + + is map[string]string // used for interning strings // cache the mapTypeId and sliceTypeId for faster comparisons mtid uintptr stid uintptr - n decNaked - np ptrToRvMap - b [scratchByteArrayLen]byte - is map[string]string // used for interning strings - zc []rtid2rv // zero-valued cache + b [scratchByteArrayLen]byte + // _ uintptr // for alignment purposes, so next one starts from a cache line + + err error + // ---- cpu cache line boundary? + + cf codecFner + // _ [64]byte // force alignment??? } // NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. @@ -1305,46 +1522,74 @@ func NewDecoderBytes(in []byte, h Handle) *Decoder { return d } +var defaultDecNaked decNaked + func newDecoder(h Handle) *Decoder { d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} - d.np.init() - n := &d.n - // n.rs = n.ra[:0] - n.ms = n.ma[:0] - n.is = n.ia[:0] - n.ns = n.na[:0] - n.ss = n.sa[:0] + + // NOTE: do not initialize d.n here. It is lazily initialized in d.naked() + _, d.js = h.(*JsonHandle) if d.h.InternString { d.is = make(map[string]string, 32) } d.d = h.newDecDriver(d) d.cr, _ = d.d.(containerStateRecv) - // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) return d } +// naked must be called before each call to .DecodeNaked, +// as they will use it. +func (d *Decoder) naked() *decNaked { + if d.n == nil { + // consider one of: + // - get from sync.Pool (if GC is frequent, there's no value here) + // - new alloc (safest. only init'ed if it a naked decode will be done) + // - field in Decoder (makes the Decoder struct very big) + // To support using a decoder where a DecodeNaked is not needed, + // we prefer #1 or #2. + // d.n = new(decNaked) // &d.nv // new(decNaked) // grab from a sync.Pool + // d.n.init() + var v interface{} + d.nsp, v = pool.decNaked() + d.n = v.(*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) { d.ri.x = &d.b // d.s = d.sa[:0] - d.ri.bs.r = r + d.ri.bs.r = nil var ok bool d.ri.br, ok = r.(decReaderByteScanner) if !ok { + d.ri.bs.r = r d.ri.br = &d.ri.bs } d.r = &d.ri @@ -1352,19 +1597,12 @@ func (d *Decoder) Reset(r io.Reader) { } func (d *Decoder) ResetBytes(in []byte) { - // d.s = d.sa[:0] d.bytes = true d.rb.reset(in) d.r = &d.rb d.resetCommon() } -// func (d *Decoder) sendContainerState(c containerState) { -// if d.cr != nil { -// d.cr.sendContainerState(c) -// } -// } - // 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. @@ -1416,15 +1654,38 @@ func (d *Decoder) ResetBytes(in []byte) { // to its "zero" value (e.g. nil for slice/map, etc). // func (d *Decoder) Decode(v interface{}) (err error) { - defer panicToErr(&err) - d.decode(v) + defer panicToErrs2(&d.err, &err) + d.MustDecode(v) return } +// MustDecode is like Decode, but panics if unable to Decode. +// This provides insight to the code location that triggered the error. +func (d *Decoder) MustDecode(v interface{}) { + // TODO: Top-level: ensure that v is a pointer and not nil. + if d.err != nil { + panic(d.err) + } + if d.d.TryDecodeAsNil() { + d.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 + // xprintf(">>>>>>>> >>>>>>>> num decFns: %v\n", d.cf.sn) +} + // // this is not a smart swallow, as it allocates objects and does unnecessary work. // func (d *Decoder) swallowViaHammer() { // var blank interface{} -// d.decodeValue(reflect.ValueOf(&blank).Elem(), nil) +// d.decodeValueNoFn(reflect.ValueOf(&blank).Elem()) // } func (d *Decoder) swallow() { @@ -1471,101 +1732,95 @@ func (d *Decoder) swallow() { default: // these are all primitives, which we can get from decodeNaked // if RawExt using Value, complete the processing. + n := d.naked() dd.DecodeNaked() - if n := &d.n; n.v == valueTypeExt && n.l == nil { - l := len(n.is) - n.is = append(n.is, nil) - v2 := &n.is[l] - d.decode(v2) - n.is = n.is[:l] + if n.v == valueTypeExt && n.l == nil { + if n.li < arrayCacheLen { + n.ia[n.li] = nil + n.li++ + d.decode(&n.ia[n.li-1]) + n.ia[n.li-1] = nil + n.li-- + } else { + var v2 interface{} + d.decode(&v2) + } } } } -// MustDecode is like Decode, but panics if unable to Decode. -// This provides insight to the code location that triggered the error. -func (d *Decoder) MustDecode(v interface{}) { - d.decode(v) -} - -func (d *Decoder) decode(iv interface{}) { - // if ics, ok := iv.(Selfer); ok { - // ics.CodecDecodeSelf(d) - // return - // } - - if d.d.TryDecodeAsNil() { - switch v := iv.(type) { - case nil: - case *string: - *v = "" - case *bool: - *v = false - case *int: - *v = 0 - case *int8: - *v = 0 - case *int16: - *v = 0 - case *int32: - *v = 0 - case *int64: - *v = 0 - case *uint: - *v = 0 - case *uint8: - *v = 0 - case *uint16: - *v = 0 - case *uint32: - *v = 0 - case *uint64: - *v = 0 - case *float32: - *v = 0 - case *float64: - *v = 0 - case *[]uint8: - *v = nil - case *Raw: - *v = nil - case reflect.Value: - if v.Kind() != reflect.Ptr || v.IsNil() { - d.errNotValidPtrValue(v) - } - // d.chkPtrValue(v) - v = v.Elem() - if v.IsValid() { +func (d *Decoder) setZero(iv interface{}) { + if iv == nil || definitelyNil(iv) { + return + } + switch v := iv.(type) { + case *string: + *v = "" + case *bool: + *v = false + case *int: + *v = 0 + case *int8: + *v = 0 + case *int16: + *v = 0 + case *int32: + *v = 0 + case *int64: + *v = 0 + case *uint: + *v = 0 + case *uint8: + *v = 0 + case *uint16: + *v = 0 + case *uint32: + *v = 0 + case *uint64: + *v = 0 + case *float32: + *v = 0 + case *float64: + *v = 0 + case *[]uint8: + *v = nil + case *Raw: + *v = nil + case reflect.Value: + v = d.ensureDecodeable(v) + if 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) { + v := reflect.ValueOf(iv) + v = d.ensureDecodeable(v) + if v.CanSet() { v.Set(reflect.Zero(v.Type())) - } - default: - rv := reflect.ValueOf(iv) - if rv.Kind() != reflect.Ptr || rv.IsNil() { - d.errNotValidPtrValue(rv) - } - // d.chkPtrValue(rv) - rv = rv.Elem() - if rv.IsValid() { - rv.Set(reflect.Zero(rv.Type())) - } + } // TODO: else drain if chan, clear if map, set all to nil if slice??? } - return } +} - switch v := iv.(type) { - case nil: +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) return - - case Selfer: + } + if v, ok := iv.(Selfer); ok { v.CodecDecodeSelf(d) + return + } + + switch v := iv.(type) { + // case nil: + // case Selfer: case reflect.Value: - if v.Kind() != reflect.Ptr || v.IsNil() { - d.errNotValidPtrValue(v) - } - // d.chkPtrValue(v) - d.decodeValueNotNil(v.Elem()) + v = d.ensureDecodeable(v) + d.decodeValue(v, nil, false, true) // TODO: maybe ask to recognize ... case *string: *v = d.d.DecodeString() @@ -1599,223 +1854,67 @@ func (d *Decoder) decode(iv interface{}) { *v = d.d.DecodeBytes(*v, false) case *Raw: - *v = d.raw() + *v = d.rawBytes() case *interface{}: - d.decodeValueNotNil(reflect.ValueOf(iv).Elem()) + d.decodeValue(reflect.ValueOf(iv).Elem(), nil, false, true) // TODO: consider recognize here + // d.decodeValueNotNil(reflect.ValueOf(iv).Elem()) default: if !fastpathDecodeTypeSwitch(iv, d) { - d.decodeI(iv, true, false, false, false) + v := reflect.ValueOf(iv) + v = d.ensureDecodeable(v) + d.decodeValue(v, nil, false, false) + // d.decodeValueFallback(v) } } } -func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Value, proceed bool) { - if tryNil && d.d.TryDecodeAsNil() { - // No need to check if a ptr, recursively, to determine whether to set value to nil. - // Just always set value to its zero type. - if rv.IsValid() { // rv.CanSet() // always settable, except it's invalid - rv.Set(reflect.Zero(rv.Type())) - } - return - } - +func (d *Decoder) decodeValue(rv reflect.Value, fn *codecFn, tryRecognized, chkAll bool) { // If stream is not containing a nil value, then we can deref to the base // non-pointer value, and decode into that. - for rv.Kind() == reflect.Ptr { - if rv.IsNil() { - rv.Set(reflect.New(rv.Type().Elem())) - } - rv = rv.Elem() - } - return rv, true -} - -func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) { - rv := reflect.ValueOf(iv) - if checkPtr { - if rv.Kind() != reflect.Ptr || rv.IsNil() { - d.errNotValidPtrValue(rv) - } - // d.chkPtrValue(rv) - } - rv, proceed := d.preDecodeValue(rv, tryNil) - if proceed { - fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer) - fn.f(&fn.i, rv) - } -} - -func (d *Decoder) decodeValue(rv reflect.Value, fn *decFn) { - if rv, proceed := d.preDecodeValue(rv, true); proceed { - if fn == nil { - fn = d.getDecFn(rv.Type(), true, true) - } - fn.f(&fn.i, rv) - } -} - -func (d *Decoder) decodeValueNotNil(rv reflect.Value) { - if rv, proceed := d.preDecodeValue(rv, false); proceed { - fn := d.getDecFn(rv.Type(), true, true) - fn.f(&fn.i, rv) - } -} - -func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *decFn) { - rtid := rt2id(rt) - - // retrieve or register a focus'ed function for this type - // to eliminate need to do the retrieval multiple times - - // if d.f == nil && d.s == nil { debugf("---->Creating new dec f map for type: %v\n", rt) } - var ok bool - if useMapForCodecCache { - fn, ok = d.f[rtid] - } else { - for i := range d.s { - v := &(d.s[i]) - if v.rtid == rtid { - fn, ok = &(v.fn), true + var rvp reflect.Value + var rvpValid bool + if rv.Kind() == reflect.Ptr { + rvpValid = true + for { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rvp = rv + rv = rv.Elem() + if rv.Kind() != reflect.Ptr { break } } } - if ok { - return - } - if useMapForCodecCache { - if d.f == nil { - d.f = make(map[uintptr]*decFn, initCollectionCap) - } - fn = new(decFn) - d.f[rtid] = fn - } else { - if d.s == nil { - d.s = make([]decRtidFn, 0, initCollectionCap) + if useLookupRecognizedTypes && tryRecognized && isRecognizedRtid(rv2rtid(rv)) { + if rvpValid { + d.decode(rv2i(rvp)) + return + } else if rv.CanAddr() { + d.decode(rv2i(rv.Addr())) + return } - d.s = append(d.s, decRtidFn{rtid: rtid}) - fn = &(d.s[len(d.s)-1]).fn } - // debugf("\tCreating new dec fn for type: %v\n", rt) - ti := d.h.getTypeInfo(rtid, rt) - fi := &(fn.i) - fi.d = d - fi.ti = ti - - // An extension can be registered for any type, regardless of the Kind - // (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc. - // - // We can't check if it's an extension byte here first, because the user may have - // registered a pointer or non-pointer type, meaning we may have to recurse first - // before matching a mapped type, even though the extension byte is already detected. - // - // NOTE: if decoding into a nil interface{}, we return a non-nil - // value except even if the container registers a length of 0. - if checkCodecSelfer && ti.cs { - fn.f = (*decFnInfo).selferUnmarshal - } else if rtid == rawExtTypId { - fn.f = (*decFnInfo).rawExt - } else if rtid == rawTypId { - fn.f = (*decFnInfo).raw - } else if d.d.IsBuiltinType(rtid) { - fn.f = (*decFnInfo).builtin - } else if xfFn := d.h.getExt(rtid); xfFn != nil { - fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext - fn.f = (*decFnInfo).ext - } else if supportMarshalInterfaces && d.be && ti.bunm { - fn.f = (*decFnInfo).binaryUnmarshal - } else if supportMarshalInterfaces && !d.be && d.js && ti.junm { - //If JSON, we should check JSONUnmarshal before textUnmarshal - fn.f = (*decFnInfo).jsonUnmarshal - } else if supportMarshalInterfaces && !d.be && ti.tunm { - fn.f = (*decFnInfo).textUnmarshal - } else { - rk := rt.Kind() - if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { - if rt.PkgPath() == "" { - if idx := fastpathAV.index(rtid); idx != -1 { - fn.f = fastpathAV[idx].decfn - } - } else { - // use mapping for underlying type if there - ok = false - var rtu reflect.Type - if rk == reflect.Map { - rtu = reflect.MapOf(rt.Key(), rt.Elem()) - } else { - rtu = reflect.SliceOf(rt.Elem()) - } - rtuid := rt2id(rtu) - if idx := fastpathAV.index(rtuid); idx != -1 { - xfnf := fastpathAV[idx].decfn - xrt := fastpathAV[idx].rt - fn.f = func(xf *decFnInfo, xrv reflect.Value) { - // xfnf(xf, xrv.Convert(xrt)) - xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem()) - } - } - } - } - if fn.f == nil { - switch rk { - case reflect.String: - fn.f = (*decFnInfo).kString - case reflect.Bool: - fn.f = (*decFnInfo).kBool - case reflect.Int: - fn.f = (*decFnInfo).kInt - case reflect.Int64: - fn.f = (*decFnInfo).kInt64 - case reflect.Int32: - fn.f = (*decFnInfo).kInt32 - case reflect.Int8: - fn.f = (*decFnInfo).kInt8 - case reflect.Int16: - fn.f = (*decFnInfo).kInt16 - case reflect.Float32: - fn.f = (*decFnInfo).kFloat32 - case reflect.Float64: - fn.f = (*decFnInfo).kFloat64 - case reflect.Uint8: - fn.f = (*decFnInfo).kUint8 - case reflect.Uint64: - fn.f = (*decFnInfo).kUint64 - case reflect.Uint: - fn.f = (*decFnInfo).kUint - case reflect.Uint32: - fn.f = (*decFnInfo).kUint32 - case reflect.Uint16: - fn.f = (*decFnInfo).kUint16 - // case reflect.Ptr: - // fn.f = (*decFnInfo).kPtr - case reflect.Uintptr: - fn.f = (*decFnInfo).kUintptr - case reflect.Interface: - fn.f = (*decFnInfo).kInterface - case reflect.Struct: - fn.f = (*decFnInfo).kStruct - case reflect.Chan: - fi.seq = seqTypeChan - fn.f = (*decFnInfo).kSlice - case reflect.Slice: - fi.seq = seqTypeSlice - fn.f = (*decFnInfo).kSlice - case reflect.Array: - fi.seq = seqTypeArray - fn.f = (*decFnInfo).kArray - case reflect.Map: - fn.f = (*decFnInfo).kMap - default: - fn.f = (*decFnInfo).kErr - } + 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) + } + if fn.i.addr { + if rvpValid { + fn.fd(d, &fn.i, rvp) + } else if rv.CanAddr() { + fn.fd(d, &fn.i, rv.Addr()) + } else { + fn.fd(d, &fn.i, rv) } + } else { + fn.fd(d, &fn.i, rv) } - - return + // return rv } func (d *Decoder) structFieldNotFound(index int, rvkencname string) { @@ -1838,15 +1937,33 @@ func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { } } -func (d *Decoder) chkPtrValue(rv reflect.Value) { - // We can only decode into a non-nil pointer - if rv.Kind() == reflect.Ptr && !rv.IsNil() { - return +func isDecodeable(rv reflect.Value) (rv2 reflect.Value, canDecode bool) { + switch rv.Kind() { + case reflect.Array: + return rv, true + case reflect.Ptr: + if !rv.IsNil() { + return rv.Elem(), true + } + case reflect.Slice, reflect.Chan, reflect.Map: + if !rv.IsNil() { + return rv, true + } } - d.errNotValidPtrValue(rv) + return } -func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { +func (d *Decoder) ensureDecodeable(rv reflect.Value) (rv2 reflect.Value) { + // decode can take any reflect.Value that is a inherently addressable i.e. + // - array + // - non-nil chan (we will SEND to it) + // - non-nil slice (we will set its elements) + // - non-nil map (we will put into it) + // - non-nil pointer (we can "update" it) + rv2, canDecode := isDecodeable(rv) + if canDecode { + return + } if !rv.IsValid() { d.error(cannotDecodeIntoNilErr) return @@ -1856,9 +1973,31 @@ func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { return } rvi := rv2i(rv) - d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi) + d.errorf("cannot decode into value of kind: %v, type: %T, %v", rv.Kind(), 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) } @@ -1887,12 +2026,6 @@ func (d *Decoder) string(v []byte) (s string) { return s } -// func (d *Decoder) intern(s string) { -// if d.is != nil { -// d.is[s] = s -// } -// } - // nextValueBytes returns the next value in the stream as a set of bytes. func (d *Decoder) nextValueBytes() []byte { d.d.uncacheRead() @@ -1901,7 +2034,7 @@ func (d *Decoder) nextValueBytes() []byte { return d.r.stopTrack() } -func (d *Decoder) raw() []byte { +func (d *Decoder) rawBytes() []byte { // ensure that this is not a view into the bytes // i.e. make new copy always. bs := d.nextValueBytes() @@ -1981,7 +2114,6 @@ func decByteSlice(r decReader, clen, maxInitLen int, bs []byte) (bsOut []byte) { r.readb(bsOut) for len2 < clen { len3 := decInferLen(clen-len2, maxInitLen, 1) - // fmt.Printf(">>>>> TESTING: in loop: clen: %v, maxInitLen: %v, len2: %v, len3: %v\n", clen, maxInitLen, len2, len3) bs3 := bsOut bsOut = make([]byte, len2+len3) copy(bsOut, bs3) @@ -2035,20 +2167,10 @@ func decInferLen(clen, maxlen, unit int) (rvlen int) { rvlen = clen } return - // if clen <= 0 { - // rvlen = 0 - // } else if maxlen > 0 && clen > maxlen { - // rvlen = maxlen - // truncated = true - // } else { - // rvlen = clen - // } - // return } func decExpandSliceRV(s reflect.Value, st reflect.Type, stElemSize, num, slen, scap int) ( s2 reflect.Value, scap2 int, changed bool) { - // fmt.Printf("dec-expand-slice-rv: %v, %v\n", s, st) l1 := slen + num // new slice length if l1 < slen { panic("expandSlice: slice overflow") @@ -2070,24 +2192,3 @@ func decExpandSliceRV(s reflect.Value, st reflect.Type, stElemSize, num, slen, s reflect.Copy(s2, s) return } - -// // implement overall decReader wrapping both, for possible use inline: -// type decReaderT struct { -// bytes bool -// rb *bytesDecReader -// ri *ioDecReader -// } -// -// // implement *Decoder as a decReader. -// // Using decReaderT (defined just above) caused performance degradation -// // possibly because of constant copying the value, -// // and some value->interface conversion causing allocation. -// func (d *Decoder) unreadn1() { -// if d.bytes { -// d.rb.unreadn1() -// } else { -// d.ri.unreadn1() -// } -// } -// ... for other methods of decReader. -// Testing showed that performance improvement was negligible. diff --git a/codec/encode.go b/codec/encode.go index a9fa72f9..286ab5d7 100644 --- a/codec/encode.go +++ b/codec/encode.go @@ -12,9 +12,7 @@ import ( "sync" ) -const ( - defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 -) +const defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 // AsSymbolFlag defines what should be encoded as symbols. type AsSymbolFlag uint8 @@ -44,12 +42,14 @@ type encWriter interface { writestr(string) writen1(byte) writen2(byte, byte) + writen4(byte, byte, byte, byte) + writen5(byte, byte, byte, byte, byte) atEndOfEncode() } // encDriver abstracts the actual codec (binc vs msgpack, etc) type encDriver interface { - IsBuiltinType(rt uintptr) bool + // IsBuiltinType(rt uintptr) bool EncodeBuiltin(rt uintptr, v interface{}) EncodeNil() EncodeInt(i int64) @@ -202,6 +202,9 @@ func (z *ioEncWriter) writeb(bs []byte) { } func (z *ioEncWriter) writestr(s string) { + if len(s) == 0 { + return + } n, err := z.w.WriteString(s) if err != nil { panic(err) @@ -217,9 +220,28 @@ func (z *ioEncWriter) writen1(b byte) { } } -func (z *ioEncWriter) writen2(b1 byte, b2 byte) { - z.writen1(b1) - z.writen1(b2) +func (z *ioEncWriter) writen2(b1, b2 byte) { + for _, b := range [...]byte{b1, b2} { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } + } +} + +func (z *ioEncWriter) writen4(b1, b2, b3, b4 byte) { + for _, b := range [...]byte{b1, b2, b3, b4} { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } + } +} + +func (z *ioEncWriter) writen5(b1, b2, b3, b4, b5 byte) { + for _, b := range [...]byte{b1, b2, b3, b4, b5} { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } + } } func (z *ioEncWriter) atEndOfEncode() {} @@ -264,7 +286,7 @@ func (z *bytesEncWriter) writen1(b1 byte) { z.b[oc] = b1 } -func (z *bytesEncWriter) writen2(b1 byte, b2 byte) { +func (z *bytesEncWriter) writen2(b1, b2 byte) { oc, a := z.growNoAlloc(2) if a { z.growAlloc(2, oc) @@ -273,6 +295,29 @@ func (z *bytesEncWriter) writen2(b1 byte, b2 byte) { z.b[oc] = b1 } +func (z *bytesEncWriter) writen4(b1, b2, b3, b4 byte) { + oc, a := z.growNoAlloc(4) + if a { + z.growAlloc(4, oc) + } + z.b[oc+3] = b4 + z.b[oc+2] = b3 + z.b[oc+1] = b2 + z.b[oc] = b1 +} + +func (z *bytesEncWriter) writen5(b1, b2, b3, b4, b5 byte) { + oc, a := z.growNoAlloc(5) + if a { + z.growAlloc(5, oc) + } + z.b[oc+4] = b5 + z.b[oc+3] = b4 + z.b[oc+2] = b3 + z.b[oc+1] = b2 + z.b[oc] = b1 +} + func (z *bytesEncWriter) atEndOfEncode() { *(z.out) = z.b[:z.c] } @@ -304,25 +349,17 @@ func (z *bytesEncWriter) growAlloc(n int, oldcursor int) { // --------------------------------------------- -type encFnInfo struct { - e *Encoder - ti *typeInfo - xfFn Ext - xfTag uint64 - seq seqType +func (e *Encoder) builtin(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeBuiltin(f.ti.rtid, rv2i(rv)) } -func (f *encFnInfo) builtin(rv reflect.Value) { - f.e.e.EncodeBuiltin(f.ti.rtid, rv2i(rv)) +func (e *Encoder) raw(f *codecFnInfo, rv reflect.Value) { + e.rawBytes(rv2i(rv).(Raw)) } -func (f *encFnInfo) raw(rv reflect.Value) { - f.e.raw(rv2i(rv).(Raw)) -} - -func (f *encFnInfo) rawExt(rv reflect.Value) { +func (e *Encoder) rawExt(f *codecFnInfo, rv reflect.Value) { // rev := rv2i(rv).(RawExt) - // f.e.e.EncodeRawExt(&rev, f.e) + // e.e.EncodeRawExt(&rev, e) var re *RawExt if rv.CanAddr() { re = rv2i(rv.Addr()).(*RawExt) @@ -330,18 +367,18 @@ func (f *encFnInfo) rawExt(rv reflect.Value) { rev := rv2i(rv).(RawExt) re = &rev } - f.e.e.EncodeRawExt(re, f.e) + e.e.EncodeRawExt(re, e) } -func (f *encFnInfo) ext(rv reflect.Value) { +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() } - f.e.e.EncodeExt(rv2i(rv), f.xfTag, f.xfFn, f.e) + e.e.EncodeExt(rv2i(rv), f.xfTag, f.xfFn, e) } -func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { +func (e *Encoder) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { if indir == 0 { v = rv2i(rv) } else if indir == -1 { @@ -353,12 +390,11 @@ func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v rv2 := reflect.New(rv.Type()) rv2.Elem().Set(rv) v = rv2i(rv2) - // fmt.Printf("rv.Type: %v, rv2.Type: %v, v: %v\n", rv.Type(), rv2.Type(), v) } } else { for j := int8(0); j < indir; j++ { if rv.IsNil() { - f.e.e.EncodeNil() + e.e.EncodeNil() return } rv = rv.Elem() @@ -368,73 +404,71 @@ func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v return v, true } -func (f *encFnInfo) selferMarshal(rv reflect.Value) { - if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { - v.(Selfer).CodecEncodeSelf(f.e) +func (e *Encoder) selferMarshal(f *codecFnInfo, rv reflect.Value) { + if v, proceed := e.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { + v.(Selfer).CodecEncodeSelf(e) } } -func (f *encFnInfo) binaryMarshal(rv reflect.Value) { - if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { +func (e *Encoder) binaryMarshal(f *codecFnInfo, rv reflect.Value) { + if v, proceed := e.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary() - f.e.marshal(bs, fnerr, false, c_RAW) + e.marshal(bs, fnerr, false, c_RAW) } } -func (f *encFnInfo) textMarshal(rv reflect.Value) { - if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { - // debugf(">>>> encoding.TextMarshaler: %T", rv2i(rv)) +func (e *Encoder) textMarshal(f *codecFnInfo, rv reflect.Value) { + if v, proceed := e.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { bs, fnerr := v.(encoding.TextMarshaler).MarshalText() - f.e.marshal(bs, fnerr, false, c_UTF8) + e.marshal(bs, fnerr, false, c_UTF8) } } -func (f *encFnInfo) jsonMarshal(rv reflect.Value) { - if v, proceed := f.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { +func (e *Encoder) jsonMarshal(f *codecFnInfo, rv reflect.Value) { + if v, proceed := e.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { bs, fnerr := v.(jsonMarshaler).MarshalJSON() - f.e.marshal(bs, fnerr, true, c_UTF8) + e.marshal(bs, fnerr, true, c_UTF8) } } -func (f *encFnInfo) kBool(rv reflect.Value) { - f.e.e.EncodeBool(rv.Bool()) +func (e *Encoder) kBool(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeBool(rv.Bool()) } -func (f *encFnInfo) kString(rv reflect.Value) { - f.e.e.EncodeString(c_UTF8, rv.String()) +func (e *Encoder) kString(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeString(c_UTF8, rv.String()) } -func (f *encFnInfo) kFloat64(rv reflect.Value) { - f.e.e.EncodeFloat64(rv.Float()) +func (e *Encoder) kFloat64(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeFloat64(rv.Float()) } -func (f *encFnInfo) kFloat32(rv reflect.Value) { - f.e.e.EncodeFloat32(float32(rv.Float())) +func (e *Encoder) kFloat32(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeFloat32(float32(rv.Float())) } -func (f *encFnInfo) kInt(rv reflect.Value) { - f.e.e.EncodeInt(rv.Int()) +func (e *Encoder) kInt(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeInt(rv.Int()) } -func (f *encFnInfo) kUint(rv reflect.Value) { - f.e.e.EncodeUint(rv.Uint()) +func (e *Encoder) kUint(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeUint(rv.Uint()) } -func (f *encFnInfo) kInvalid(rv reflect.Value) { - f.e.e.EncodeNil() +func (e *Encoder) kInvalid(f *codecFnInfo, rv reflect.Value) { + e.e.EncodeNil() } -func (f *encFnInfo) kErr(rv reflect.Value) { - f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) +func (e *Encoder) kErr(f *codecFnInfo, rv reflect.Value) { + e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) } -func (f *encFnInfo) kSlice(rv reflect.Value) { +func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { ti := f.ti // array may be non-addressable, so we have to manage with care // (don't call rv.Bytes, rv.Slice, etc). // E.g. type struct S{B [2]byte}; // Encode(S{}) will bomb on "panic: slice of unaddressable array". - e := f.e if f.seq != seqTypeArray { if rv.IsNil() { e.e.EncodeNil() @@ -453,7 +487,6 @@ func (f *encFnInfo) kSlice(rv reflect.Value) { if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { switch f.seq { case seqTypeArray: - // if l == 0 { e.e.encodeStringBytes(c_RAW, nil) } else if rv.CanAddr() { e.e.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) } else { @@ -464,27 +497,24 @@ func (f *encFnInfo) kSlice(rv reflect.Value) { bs = make([]byte, l) } reflect.Copy(reflect.ValueOf(bs), rv) - // TODO: Test that reflect.Copy works instead of manual one-by-one - // for i := 0; i < l; i++ { - // bs[i] = byte(rv.Index(i).Uint()) - // } e.e.EncodeStringBytes(c_RAW, bs) } + return case seqTypeSlice: e.e.EncodeStringBytes(c_RAW, rv.Bytes()) - 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) - for i := 0; i < l; i++ { - bs = append(bs, <-ch) - } - e.e.EncodeStringBytes(c_RAW, bs) + return } + } + 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) + } + e.e.EncodeStringBytes(c_RAW, bs) return } @@ -499,16 +529,18 @@ func (f *encFnInfo) kSlice(rv reflect.Value) { } if l > 0 { - 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. - var fn *encFn - if rtelem.Kind() != reflect.Interface { - rtelemid := rt2id(rtelem) - fn = e.getEncFn(rtelemid, rtelem, true, true) + var fn *codecFn + var recognizedVtyp = useLookupRecognizedTypes && isRecognizedRtidOrPtr(rt2id(rtelem)) + if !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) + } } // TODO: Consider perf implication of encoding odd index values as symbols if type is string for j := 0; j < l; j++ { @@ -525,12 +557,20 @@ func (f *encFnInfo) kSlice(rv reflect.Value) { } if f.seq == seqTypeChan { if rv2, ok2 := rv.Recv(); ok2 { - e.encodeValue(rv2, fn) + if useLookupRecognizedTypes && recognizedVtyp { + e.encode(rv2i(rv2)) + } else { + e.encodeValue(rv2, fn, true) + } } else { - e.encode(nil) // WE HAVE TO DO SOMETHING, so nil if nothing received. + e.e.EncodeNil() // WE HAVE TO DO SOMETHING, so nil if nothing received. } } else { - e.encodeValue(rv.Index(j), fn) + if useLookupRecognizedTypes && recognizedVtyp { + e.encode(rv2i(rv.Index(j))) + } else { + e.encodeValue(rv.Index(j), fn, true) + } } } } @@ -544,27 +584,112 @@ func (f *encFnInfo) kSlice(rv reflect.Value) { } } -func (f *encFnInfo) kStruct(rv reflect.Value) { +func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { fti := f.ti - e := f.e cr := e.cr tisfi := fti.sfip toMap := !(fti.toArray || e.h.StructToArray) - newlen := len(fti.sfi) + if toMap { + tisfi = fti.sfi + } + ee := e.e - // Use sync.Pool to reduce allocating slices unnecessarily. - // The cost of sync.Pool is less than the cost of new allocation. - pool, poolv, fkvs := encStructPoolGet(newlen) + sfn := structFieldNode{v: rv, update: false} + if toMap { + ee.EncodeMapStart(len(tisfi)) + // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + if cr == nil { + for _, si := range tisfi { + if asSymbols { + ee.EncodeSymbol(si.encName) + } else { + ee.EncodeString(c_UTF8, si.encName) + } + e.encodeValue(sfn.field(si), nil, true) + } + } else { + for _, si := range tisfi { + cr.sendContainerState(containerMapKey) + if asSymbols { + ee.EncodeSymbol(si.encName) + } else { + ee.EncodeString(c_UTF8, si.encName) + } + cr.sendContainerState(containerMapValue) + e.encodeValue(sfn.field(si), nil, true) + } + cr.sendContainerState(containerMapEnd) + } + } else { + ee.EncodeArrayStart(len(tisfi)) + if cr == nil { + for _, si := range tisfi { + e.encodeValue(sfn.field(si), nil, true) + } + } else { + for _, si := range tisfi { + cr.sendContainerState(containerArrayElem) + e.encodeValue(sfn.field(si), nil, true) + } + cr.sendContainerState(containerArrayEnd) + } + } +} +func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { + fti := f.ti + cr := e.cr + tisfi := fti.sfip + 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 } + newlen := len(fti.sfi) + ee := e.e + + // Use sync.Pool to reduce allocating slices unnecessarily. + // The cost of sync.Pool is less than the cost of new allocation. + // + // Each element of the array pools one of encStructPool(8|16|32|64). + // It allows the re-use of slices up to 64 in length. + // A performance cost of encoding structs was collecting + // which values were empty and should be omitted. + // We needed slices of reflect.Value and string to collect them. + // This shared pool reduces the amount of unnecessary creation we do. + // The cost is that of locking sometimes, but sync.Pool is efficient + // enough to reduce thread contention. + + var spool *sync.Pool + var poolv interface{} + var fkvs []stringRv + if newlen <= 8 { + spool, poolv = pool.stringRv8() + fkvs = poolv.(*[8]stringRv)[:newlen] + } else if newlen <= 16 { + spool, poolv = pool.stringRv16() + fkvs = poolv.(*[16]stringRv)[:newlen] + } else if newlen <= 32 { + spool, poolv = pool.stringRv32() + fkvs = poolv.(*[32]stringRv)[:newlen] + } else if newlen <= 64 { + spool, poolv = pool.stringRv64() + fkvs = poolv.(*[64]stringRv)[:newlen] + } else if newlen <= 128 { + spool, poolv = pool.stringRv128() + fkvs = poolv.(*[128]stringRv)[:newlen] + } else { + fkvs = make([]stringRv, newlen) + } + newlen = 0 var kv stringRv recur := e.h.RecursiveEmptyCheck + sfn := structFieldNode{v: rv, update: false} for _, si := range tisfi { - kv.r = si.field(rv, false) + // kv.r = si.field(rv, false) + kv.r = sfn.field(si) if toMap { if si.omitEmpty && isEmptyValue(kv.r, recur, recur) { continue @@ -584,42 +709,45 @@ func (f *encFnInfo) kStruct(rv reflect.Value) { newlen++ } - // debugf(">>>> kStruct: newlen: %v", newlen) - // sep := !e.be - ee := e.e //don't dereference every time - if toMap { ee.EncodeMapStart(newlen) // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - for j := 0; j < newlen; j++ { - kv = fkvs[j] - if cr != nil { - cr.sendContainerState(containerMapKey) - } - if asSymbols { - ee.EncodeSymbol(kv.v) - } else { - ee.EncodeString(c_UTF8, kv.v) + if cr == nil { + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if asSymbols { + ee.EncodeSymbol(kv.v) + } else { + ee.EncodeString(c_UTF8, kv.v) + } + e.encodeValue(kv.r, nil, true) } - if cr != nil { + } else { + for j := 0; j < newlen; j++ { + kv = fkvs[j] + cr.sendContainerState(containerMapKey) + if asSymbols { + ee.EncodeSymbol(kv.v) + } else { + ee.EncodeString(c_UTF8, kv.v) + } cr.sendContainerState(containerMapValue) + e.encodeValue(kv.r, nil, true) } - e.encodeValue(kv.r, nil) - } - if cr != nil { cr.sendContainerState(containerMapEnd) } } else { ee.EncodeArrayStart(newlen) - for j := 0; j < newlen; j++ { - kv = fkvs[j] - if cr != nil { + if cr == nil { + for j := 0; j < newlen; j++ { + e.encodeValue(fkvs[j].r, nil, true) + } + } else { + for j := 0; j < newlen; j++ { cr.sendContainerState(containerArrayElem) + e.encodeValue(fkvs[j].r, nil, true) } - e.encodeValue(kv.r, nil) - } - if cr != nil { cr.sendContainerState(containerArrayEnd) } } @@ -627,32 +755,13 @@ func (f *encFnInfo) kStruct(rv reflect.Value) { // do not use defer. Instead, use explicit pool return at end of function. // defer has a cost we are trying to avoid. // If there is a panic and these slices are not returned, it is ok. - if pool != nil { - pool.Put(poolv) + if spool != nil { + spool.Put(poolv) } } -// func (f *encFnInfo) kPtr(rv reflect.Value) { -// debugf(">>>>>>> ??? encode kPtr called - shouldn't get called") -// if rv.IsNil() { -// f.e.e.encodeNil() -// return -// } -// f.e.encodeValue(rv.Elem()) -// } - -// func (f *encFnInfo) kInterface(rv reflect.Value) { -// println("kInterface called") -// debug.PrintStack() -// if rv.IsNil() { -// f.e.e.EncodeNil() -// return -// } -// f.e.encodeValue(rv.Elem(), nil) -// } - -func (f *encFnInfo) kMap(rv reflect.Value) { - ee := f.e.e +func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { + ee := e.e if rv.IsNil() { ee.EncodeNil() return @@ -660,7 +769,6 @@ func (f *encFnInfo) kMap(rv reflect.Value) { l := rv.Len() ee.EncodeMapStart(l) - e := f.e cr := e.cr if l == 0 { if cr != nil { @@ -676,54 +784,74 @@ func (f *encFnInfo) kMap(rv reflect.Value) { // However, 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. - var keyFn, valFn *encFn + var keyFn, valFn *codecFn ti := f.ti - rtkey := ti.rt.Key() - rtval := ti.rt.Elem() - rtkeyid := rt2id(rtkey) - // keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String + rtkey0 := ti.rt.Key() + rtkey := rtkey0 + rtval0 := ti.rt.Elem() + rtval := rtval0 + rtkeyid := rt2id(rtkey0) + rtvalid := rt2id(rtval0) + for rtval.Kind() == reflect.Ptr { + rtval = rtval.Elem() + } + if rtval.Kind() != reflect.Interface { + valFn = e.cf.get(rtval, true, true) + } + mks := rv.MapKeys() + + if e.h.Canonical { + e.kMapCanonical(rtkey, rv, mks, valFn, asSymbols) + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + + var recognizedKtyp, recognizedVtyp bool var keyTypeIsString = rtkeyid == stringTypId if keyTypeIsString { asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 } else { + if useLookupRecognizedTypes { + if recognizedKtyp = isRecognizedRtidOrPtr(rtkeyid); recognizedKtyp { + goto LABEL1 + } + } for rtkey.Kind() == reflect.Ptr { rtkey = rtkey.Elem() } if rtkey.Kind() != reflect.Interface { rtkeyid = rt2id(rtkey) - keyFn = e.getEncFn(rtkeyid, rtkey, true, true) + keyFn = e.cf.get(rtkey, true, true) } } - for rtval.Kind() == reflect.Ptr { - rtval = rtval.Elem() - } - if rtval.Kind() != reflect.Interface { - rtvalid := rt2id(rtval) - valFn = e.getEncFn(rtvalid, rtval, true, true) - } - mks := rv.MapKeys() - // for j, lmks := 0, len(mks); j < lmks; j++ { - if e.h.Canonical { - e.kMapCanonical(rtkeyid, rtkey, rv, mks, valFn, asSymbols) - } else { - for j := range mks { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - if keyTypeIsString { - if asSymbols { - ee.EncodeSymbol(mks[j].String()) - } else { - ee.EncodeString(c_UTF8, mks[j].String()) - } + // for j, lmks := 0, len(mks); j < lmks; j++ { +LABEL1: + recognizedVtyp = useLookupRecognizedTypes && isRecognizedRtidOrPtr(rtvalid) + for j := range mks { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if keyTypeIsString { + if asSymbols { + ee.EncodeSymbol(mks[j].String()) } else { - e.encodeValue(mks[j], keyFn) - } - if cr != nil { - cr.sendContainerState(containerMapValue) + ee.EncodeString(c_UTF8, mks[j].String()) } - e.encodeValue(rv.MapIndex(mks[j]), valFn) + } else if useLookupRecognizedTypes && recognizedKtyp { + e.encode(rv2i(mks[j])) + } else { + e.encodeValue(mks[j], keyFn, true) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if useLookupRecognizedTypes && recognizedVtyp { + e.encode(rv2i(rv.MapIndex(mks[j]))) + } else { + e.encodeValue(rv.MapIndex(mks[j]), valFn, true) } } if cr != nil { @@ -731,190 +859,175 @@ func (f *encFnInfo) kMap(rv reflect.Value) { } } -func (e *Encoder) kMapCanonical(rtkeyid uintptr, rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *encFn, asSymbols bool) { +func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *codecFn, asSymbols bool) { ee := e.e cr := e.cr // we previously did out-of-band if an extension was registered. // This is not necessary, as the natural kind is sufficient for ordering. - if rtkeyid == uint8SliceTypId { - mksv := make([]bytesRv, len(mks)) + // 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 cr != nil { + // cr.sendContainerState(containerMapKey) + // } + // ee.EncodeStringBytes(c_RAW, mksv[i].v) + // if cr != nil { + // cr.sendContainerState(containerMapValue) + // } + // e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + // } + // return + // } + + switch rtkey.Kind() { + case reflect.Bool: + mksv := make([]boolRv, len(mks)) for i, k := range mks { v := &mksv[i] v.r = k - v.v = k.Bytes() + v.v = k.Bool() } - sort.Sort(bytesRvSlice(mksv)) + sort.Sort(boolRvSlice(mksv)) for i := range mksv { if cr != nil { cr.sendContainerState(containerMapKey) } - ee.EncodeStringBytes(c_RAW, mksv[i].v) + ee.EncodeBool(mksv[i].v) if cr != nil { cr.sendContainerState(containerMapValue) } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } - } else { - switch rtkey.Kind() { - case reflect.Bool: - mksv := make([]boolRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.Bool() - } - sort.Sort(boolRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - ee.EncodeBool(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + case reflect.String: + mksv := make([]stringRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.String() + } + sort.Sort(stringRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - case reflect.String: - mksv := make([]stringRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.String() + if asSymbols { + ee.EncodeSymbol(mksv[i].v) + } else { + ee.EncodeString(c_UTF8, mksv[i].v) } - sort.Sort(stringRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - if asSymbols { - ee.EncodeSymbol(mksv[i].v) - } else { - ee.EncodeString(c_UTF8, mksv[i].v) - } - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + if cr != nil { + cr.sendContainerState(containerMapValue) } - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: - mksv := make([]uintRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.Uint() + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: + mksv := make([]uintRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Uint() + } + sort.Sort(uintRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - sort.Sort(uintRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - ee.EncodeUint(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + ee.EncodeUint(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) } - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - mksv := make([]intRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.Int() + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + mksv := make([]intRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Int() + } + sort.Sort(intRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - sort.Sort(intRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - ee.EncodeInt(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + ee.EncodeInt(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) } - case reflect.Float32: - mksv := make([]floatRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.Float() + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + case reflect.Float32: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - sort.Sort(floatRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - ee.EncodeFloat32(float32(mksv[i].v)) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + ee.EncodeFloat32(float32(mksv[i].v)) + if cr != nil { + cr.sendContainerState(containerMapValue) } - case reflect.Float64: - mksv := make([]floatRv, len(mks)) - for i, k := range mks { - v := &mksv[i] - v.r = k - v.v = k.Float() + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + case reflect.Float64: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - sort.Sort(floatRvSlice(mksv)) - for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - ee.EncodeFloat64(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + ee.EncodeFloat64(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) } - default: - // out-of-band - // first encode each key to a []byte first, then sort them, then record - var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - mksbv := make([]bytesRv, len(mks)) - for i, k := range mks { - v := &mksbv[i] - l := len(mksv) - e2.MustEncode(k) - v.r = k - v.v = mksv[l:] - // fmt.Printf(">>>>> %s\n", mksv[l:]) + e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) + } + default: + // out-of-band + // first encode each key to a []byte first, then sort them, then record + var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + mksbv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksbv[i] + l := len(mksv) + e2.MustEncode(k) + v.r = k + v.v = mksv[l:] + } + sort.Sort(bytesRvSlice(mksbv)) + for j := range mksbv { + if cr != nil { + cr.sendContainerState(containerMapKey) } - sort.Sort(bytesRvSlice(mksbv)) - for j := range mksbv { - if cr != nil { - cr.sendContainerState(containerMapKey) - } - e.asis(mksbv[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) - } - e.encodeValue(rv.MapIndex(mksbv[j].r), valFn) + e.asis(mksbv[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) } + e.encodeValue(rv.MapIndex(mksbv[j].r), valFn, true) } } } -// -------------------------------------------------- - -// encFn encapsulates the captured variables and the encode function. -// This way, we only do some calculations one times, and pass to the -// code block that should be called (encapsulated in a function) -// instead of executing the checks every time. -type encFn struct { - i encFnInfo - f func(*encFnInfo, reflect.Value) -} - -// -------------------------------------------------- - -type encRtidFn struct { - rtid uintptr - fn encFn -} +// // -------------------------------------------------- // An Encoder writes an object to an output stream in the codec format. type Encoder struct { @@ -922,23 +1035,25 @@ type Encoder struct { e encDriver // NOTE: Encoder shouldn't call it's write methods, // as the handler MAY need to do some coordination. - w encWriter - s []encRtidFn - ci set - be bool // is binary encoding - js bool // is json handle + w encWriter + + hh Handle + h *BasicHandle + + // ---- cpu cache line boundary? wi ioEncWriter wb bytesEncWriter - h *BasicHandle - hh Handle - cr containerStateRecv as encDriverAsis + // ---- cpu cache line boundary? + + ci set + err error - f map[uintptr]*encFn - b [scratchByteArrayLen]byte + b [scratchByteArrayLen]byte + cf codecFner } // NewEncoder returns an Encoder for encoding into an io.Writer. @@ -963,8 +1078,7 @@ func NewEncoderBytes(out *[]byte, h Handle) *Encoder { } func newEncoder(h Handle) *Encoder { - e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} - _, e.js = h.(*JsonHandle) + e := &Encoder{hh: h, h: h.getBasicHandle()} e.e = h.newEncDriver(e) e.as, _ = e.e.(encDriverAsis) e.cr, _ = e.e.(containerStateRecv) @@ -989,6 +1103,8 @@ func (e *Encoder) Reset(w io.Writer) { } e.w = &e.wi e.e.reset() + e.cf.reset(e.hh) + e.err = nil } func (e *Encoder) ResetBytes(out *[]byte) { @@ -999,14 +1115,10 @@ func (e *Encoder) ResetBytes(out *[]byte) { e.wb.b, e.wb.out, e.wb.c = in, out, 0 e.w = &e.wb e.e.reset() + e.cf.reset(e.hh) + e.err = nil } -// func (e *Encoder) sendContainerState(c containerState) { -// if e.cr != nil { -// e.cr.sendContainerState(c) -// } -// } - // Encode writes an object into a stream. // // Encoding can be configured via the struct tag for the fields. @@ -1068,34 +1180,40 @@ func (e *Encoder) ResetBytes(out *[]byte) { // 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 panicToErr(&err) - e.encode(v) - e.w.atEndOfEncode() + defer panicToErrs2(&e.err, &err) + e.MustEncode(v) return } // MustEncode is like Encode, but panics if unable to Encode. // This provides insight to the code location that triggered the error. func (e *Encoder) MustEncode(v interface{}) { + if e.err != nil { + panic(e.err) + } e.encode(v) e.w.atEndOfEncode() } func (e *Encoder) encode(iv interface{}) { - // if ics, ok := iv.(Selfer); ok { - // ics.CodecEncodeSelf(e) - // return - // } - - switch v := iv.(type) { - case nil: + if iv == nil || definitelyNil(iv) { e.e.EncodeNil() - case Selfer: + return + } + if v, ok := iv.(Selfer); ok { v.CodecEncodeSelf(e) + return + } + + switch v := iv.(type) { + // case nil: + // e.e.EncodeNil() + // case Selfer: + // v.CodecEncodeSelf(e) case Raw: - e.raw(v) + e.rawBytes(v) case reflect.Value: - e.encodeValue(v, nil) + e.encodeValue(v, nil, true) case string: e.e.EncodeString(c_UTF8, v) @@ -1121,6 +1239,8 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeUint(uint64(v)) case uint64: e.e.EncodeUint(v) + case uintptr: + e.e.EncodeUint(uint64(v)) case float32: e.e.EncodeFloat32(v) case float64: @@ -1153,6 +1273,8 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeUint(uint64(*v)) case *uint64: e.e.EncodeUint(*v) + case *uintptr: + e.e.EncodeUint(uint64(*v)) case *float32: e.e.EncodeFloat32(*v) case *float64: @@ -1162,15 +1284,15 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeStringBytes(c_RAW, *v) default: - const checkCodecSelfer1 = true // in case T is passed, where *T is a Selfer, still checkCodecSelfer if !fastpathEncodeTypeSwitch(iv, e) { - e.encodeI(iv, false, checkCodecSelfer1) + e.encodeValue(reflect.ValueOf(iv), nil, false) } } } -func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, sptr uintptr, proceed bool) { - // use a goto statement instead of a recursive function for ptr/interface. +func (e *Encoder) encodeValue(rv reflect.Value, fn *codecFn, checkFastpath bool) { + // if a valid fn is passed, it MUST BE for the dereferenced type of rv + var sptr uintptr TOP: switch rv.Kind() { case reflect.Ptr: @@ -1202,167 +1324,26 @@ TOP: return } - proceed = true - rv2 = rv - return -} - -func (e *Encoder) doEncodeValue(rv reflect.Value, fn *encFn, sptr uintptr, - checkFastpath, checkCodecSelfer bool) { - if sptr != 0 { - if (&e.ci).add(sptr) { - e.errorf("circular reference found: # %d", sptr) - } + if sptr != 0 && (&e.ci).add(sptr) { + e.errorf("circular reference found: # %d", sptr) } + if fn == nil { rt := rv.Type() - rtid := rt2id(rt) - // fn = e.getEncFn(rtid, rt, true, true) - fn = e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) + // 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.f(&fn.i, rv) + fn.fe(e, &fn.i, rv) if sptr != 0 { (&e.ci).remove(sptr) } } -func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { - if rv, sptr, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { - e.doEncodeValue(rv, nil, sptr, checkFastpath, checkCodecSelfer) - } -} - -func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) { - // if a valid fn is passed, it MUST BE for the dereferenced type of rv - if rv, sptr, proceed := e.preEncodeValue(rv); proceed { - e.doEncodeValue(rv, fn, sptr, true, true) - } -} - -func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *encFn) { - // rtid := rt2id(rt) - var ok bool - if useMapForCodecCache { - fn, ok = e.f[rtid] - } else { - for i := range e.s { - v := &(e.s[i]) - if v.rtid == rtid { - fn, ok = &(v.fn), true - break - } - } - } - if ok { - return - } - - if useMapForCodecCache { - if e.f == nil { - e.f = make(map[uintptr]*encFn, initCollectionCap) - } - fn = new(encFn) - e.f[rtid] = fn - } else { - if e.s == nil { - e.s = make([]encRtidFn, 0, initCollectionCap) - } - e.s = append(e.s, encRtidFn{rtid: rtid}) - fn = &(e.s[len(e.s)-1]).fn - } - - ti := e.h.getTypeInfo(rtid, rt) - fi := &(fn.i) - fi.e = e - fi.ti = ti - - if checkCodecSelfer && ti.cs { - fn.f = (*encFnInfo).selferMarshal - } else if rtid == rawTypId { - fn.f = (*encFnInfo).raw - } else if rtid == rawExtTypId { - fn.f = (*encFnInfo).rawExt - } else if e.e.IsBuiltinType(rtid) { - fn.f = (*encFnInfo).builtin - } else if xfFn := e.h.getExt(rtid); xfFn != nil { - fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext - fn.f = (*encFnInfo).ext - } else if supportMarshalInterfaces && e.be && ti.bm { - fn.f = (*encFnInfo).binaryMarshal - } else if supportMarshalInterfaces && !e.be && e.js && ti.jm { - //If JSON, we should check JSONMarshal before textMarshal - fn.f = (*encFnInfo).jsonMarshal - } else if supportMarshalInterfaces && !e.be && ti.tm { - fn.f = (*encFnInfo).textMarshal - } else { - rk := rt.Kind() - if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { - if rt.PkgPath() == "" { // un-named slice or map - if idx := fastpathAV.index(rtid); idx != -1 { - fn.f = fastpathAV[idx].encfn - } - } else { - ok = false - // use mapping for underlying type if there - var rtu reflect.Type - if rk == reflect.Map { - rtu = reflect.MapOf(rt.Key(), rt.Elem()) - } else { - rtu = reflect.SliceOf(rt.Elem()) - } - rtuid := rt2id(rtu) - if idx := fastpathAV.index(rtuid); idx != -1 { - xfnf := fastpathAV[idx].encfn - xrt := fastpathAV[idx].rt - fn.f = func(xf *encFnInfo, xrv reflect.Value) { - xfnf(xf, xrv.Convert(xrt)) - } - } - } - } - if fn.f == nil { - switch rk { - case reflect.Bool: - fn.f = (*encFnInfo).kBool - case reflect.String: - fn.f = (*encFnInfo).kString - case reflect.Float64: - fn.f = (*encFnInfo).kFloat64 - case reflect.Float32: - fn.f = (*encFnInfo).kFloat32 - case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16: - fn.f = (*encFnInfo).kInt - case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uintptr: - fn.f = (*encFnInfo).kUint - case reflect.Invalid: - fn.f = (*encFnInfo).kInvalid - case reflect.Chan: - fi.seq = seqTypeChan - fn.f = (*encFnInfo).kSlice - case reflect.Slice: - fi.seq = seqTypeSlice - fn.f = (*encFnInfo).kSlice - case reflect.Array: - fi.seq = seqTypeArray - fn.f = (*encFnInfo).kSlice - case reflect.Struct: - fn.f = (*encFnInfo).kStruct - // reflect.Ptr and reflect.Interface are handled already by preEncodeValue - // case reflect.Ptr: - // fn.f = (*encFnInfo).kPtr - // case reflect.Interface: - // fn.f = (*encFnInfo).kInterface - case reflect.Map: - fn.f = (*encFnInfo).kMap - default: - fn.f = (*encFnInfo).kErr - } - } - } - - return -} - func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { if fnerr != nil { panic(fnerr) @@ -1384,7 +1365,7 @@ func (e *Encoder) asis(v []byte) { } } -func (e *Encoder) raw(vv Raw) { +func (e *Encoder) rawBytes(vv Raw) { v := []byte(vv) if !e.h.Raw { e.errorf("Raw values cannot be encoded: %v", v) @@ -1400,63 +1381,3 @@ func (e *Encoder) errorf(format string, params ...interface{}) { err := fmt.Errorf(format, params...) panic(err) } - -// ---------------------------------------- - -const encStructPoolLen = 5 - -// encStructPool is an array of sync.Pool. -// Each element of the array pools one of encStructPool(8|16|32|64). -// It allows the re-use of slices up to 64 in length. -// A performance cost of encoding structs was collecting -// which values were empty and should be omitted. -// We needed slices of reflect.Value and string to collect them. -// This shared pool reduces the amount of unnecessary creation we do. -// The cost is that of locking sometimes, but sync.Pool is efficient -// enough to reduce thread contention. -var encStructPool [encStructPoolLen]sync.Pool - -func init() { - encStructPool[0].New = func() interface{} { return new([8]stringRv) } - encStructPool[1].New = func() interface{} { return new([16]stringRv) } - encStructPool[2].New = func() interface{} { return new([32]stringRv) } - encStructPool[3].New = func() interface{} { return new([64]stringRv) } - encStructPool[4].New = func() interface{} { return new([128]stringRv) } -} - -func encStructPoolGet(newlen int) (p *sync.Pool, v interface{}, s []stringRv) { - // if encStructPoolLen != 5 { // constant chec, so removed at build time. - // panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed - // } - // idxpool := newlen / 8 - if newlen <= 8 { - p = &encStructPool[0] - v = p.Get() - s = v.(*[8]stringRv)[:newlen] - } else if newlen <= 16 { - p = &encStructPool[1] - v = p.Get() - s = v.(*[16]stringRv)[:newlen] - } else if newlen <= 32 { - p = &encStructPool[2] - v = p.Get() - s = v.(*[32]stringRv)[:newlen] - } else if newlen <= 64 { - p = &encStructPool[3] - v = p.Get() - s = v.(*[64]stringRv)[:newlen] - } else if newlen <= 128 { - p = &encStructPool[4] - v = p.Get() - s = v.(*[128]stringRv)[:newlen] - } else { - s = make([]stringRv, newlen) - } - return -} - -// ---------------------------------------- - -// func encErr(format string, params ...interface{}) { -// doPanic(msgTagEnc, format, params...) -// } diff --git a/codec/fast-path.generated.go b/codec/fast-path.generated.go index a1abd55c..5a426130 100644 --- a/codec/fast-path.generated.go +++ b/codec/fast-path.generated.go @@ -40,9 +40,6 @@ import ( const fastpathEnabled = true -const fastpathCheckNilFalse = false // for reflect -const fastpathCheckNilTrue = true // for type switch - type fastpathT struct{} var fastpathTV fastpathT @@ -50,8 +47,8 @@ var fastpathTV fastpathT type fastpathE struct { rtid uintptr rt reflect.Type - encfn func(*encFnInfo, reflect.Value) - decfn func(*decFnInfo, reflect.Value) + encfn func(*Encoder, *codecFnInfo, reflect.Value) + decfn func(*Decoder, *codecFnInfo, reflect.Value) } type fastpathA [271]fastpathE @@ -84,286 +81,292 @@ var fastpathAV fastpathA // due to possible initialization loop error, make fastpath in an init() func init() { i := 0 - fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + 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 } - fn([]interface{}(nil), (*encFnInfo).fastpathEncSliceIntfR, (*decFnInfo).fastpathDecSliceIntfR) - fn([]string(nil), (*encFnInfo).fastpathEncSliceStringR, (*decFnInfo).fastpathDecSliceStringR) - fn([]float32(nil), (*encFnInfo).fastpathEncSliceFloat32R, (*decFnInfo).fastpathDecSliceFloat32R) - fn([]float64(nil), (*encFnInfo).fastpathEncSliceFloat64R, (*decFnInfo).fastpathDecSliceFloat64R) - fn([]uint(nil), (*encFnInfo).fastpathEncSliceUintR, (*decFnInfo).fastpathDecSliceUintR) - fn([]uint16(nil), (*encFnInfo).fastpathEncSliceUint16R, (*decFnInfo).fastpathDecSliceUint16R) - fn([]uint32(nil), (*encFnInfo).fastpathEncSliceUint32R, (*decFnInfo).fastpathDecSliceUint32R) - fn([]uint64(nil), (*encFnInfo).fastpathEncSliceUint64R, (*decFnInfo).fastpathDecSliceUint64R) - fn([]uintptr(nil), (*encFnInfo).fastpathEncSliceUintptrR, (*decFnInfo).fastpathDecSliceUintptrR) - fn([]int(nil), (*encFnInfo).fastpathEncSliceIntR, (*decFnInfo).fastpathDecSliceIntR) - fn([]int8(nil), (*encFnInfo).fastpathEncSliceInt8R, (*decFnInfo).fastpathDecSliceInt8R) - fn([]int16(nil), (*encFnInfo).fastpathEncSliceInt16R, (*decFnInfo).fastpathDecSliceInt16R) - fn([]int32(nil), (*encFnInfo).fastpathEncSliceInt32R, (*decFnInfo).fastpathDecSliceInt32R) - fn([]int64(nil), (*encFnInfo).fastpathEncSliceInt64R, (*decFnInfo).fastpathDecSliceInt64R) - fn([]bool(nil), (*encFnInfo).fastpathEncSliceBoolR, (*decFnInfo).fastpathDecSliceBoolR) - - fn(map[interface{}]interface{}(nil), (*encFnInfo).fastpathEncMapIntfIntfR, (*decFnInfo).fastpathDecMapIntfIntfR) - fn(map[interface{}]string(nil), (*encFnInfo).fastpathEncMapIntfStringR, (*decFnInfo).fastpathDecMapIntfStringR) - fn(map[interface{}]uint(nil), (*encFnInfo).fastpathEncMapIntfUintR, (*decFnInfo).fastpathDecMapIntfUintR) - fn(map[interface{}]uint8(nil), (*encFnInfo).fastpathEncMapIntfUint8R, (*decFnInfo).fastpathDecMapIntfUint8R) - fn(map[interface{}]uint16(nil), (*encFnInfo).fastpathEncMapIntfUint16R, (*decFnInfo).fastpathDecMapIntfUint16R) - fn(map[interface{}]uint32(nil), (*encFnInfo).fastpathEncMapIntfUint32R, (*decFnInfo).fastpathDecMapIntfUint32R) - fn(map[interface{}]uint64(nil), (*encFnInfo).fastpathEncMapIntfUint64R, (*decFnInfo).fastpathDecMapIntfUint64R) - fn(map[interface{}]uintptr(nil), (*encFnInfo).fastpathEncMapIntfUintptrR, (*decFnInfo).fastpathDecMapIntfUintptrR) - fn(map[interface{}]int(nil), (*encFnInfo).fastpathEncMapIntfIntR, (*decFnInfo).fastpathDecMapIntfIntR) - fn(map[interface{}]int8(nil), (*encFnInfo).fastpathEncMapIntfInt8R, (*decFnInfo).fastpathDecMapIntfInt8R) - fn(map[interface{}]int16(nil), (*encFnInfo).fastpathEncMapIntfInt16R, (*decFnInfo).fastpathDecMapIntfInt16R) - fn(map[interface{}]int32(nil), (*encFnInfo).fastpathEncMapIntfInt32R, (*decFnInfo).fastpathDecMapIntfInt32R) - fn(map[interface{}]int64(nil), (*encFnInfo).fastpathEncMapIntfInt64R, (*decFnInfo).fastpathDecMapIntfInt64R) - fn(map[interface{}]float32(nil), (*encFnInfo).fastpathEncMapIntfFloat32R, (*decFnInfo).fastpathDecMapIntfFloat32R) - fn(map[interface{}]float64(nil), (*encFnInfo).fastpathEncMapIntfFloat64R, (*decFnInfo).fastpathDecMapIntfFloat64R) - fn(map[interface{}]bool(nil), (*encFnInfo).fastpathEncMapIntfBoolR, (*decFnInfo).fastpathDecMapIntfBoolR) - fn(map[string]interface{}(nil), (*encFnInfo).fastpathEncMapStringIntfR, (*decFnInfo).fastpathDecMapStringIntfR) - fn(map[string]string(nil), (*encFnInfo).fastpathEncMapStringStringR, (*decFnInfo).fastpathDecMapStringStringR) - fn(map[string]uint(nil), (*encFnInfo).fastpathEncMapStringUintR, (*decFnInfo).fastpathDecMapStringUintR) - fn(map[string]uint8(nil), (*encFnInfo).fastpathEncMapStringUint8R, (*decFnInfo).fastpathDecMapStringUint8R) - fn(map[string]uint16(nil), (*encFnInfo).fastpathEncMapStringUint16R, (*decFnInfo).fastpathDecMapStringUint16R) - fn(map[string]uint32(nil), (*encFnInfo).fastpathEncMapStringUint32R, (*decFnInfo).fastpathDecMapStringUint32R) - fn(map[string]uint64(nil), (*encFnInfo).fastpathEncMapStringUint64R, (*decFnInfo).fastpathDecMapStringUint64R) - fn(map[string]uintptr(nil), (*encFnInfo).fastpathEncMapStringUintptrR, (*decFnInfo).fastpathDecMapStringUintptrR) - fn(map[string]int(nil), (*encFnInfo).fastpathEncMapStringIntR, (*decFnInfo).fastpathDecMapStringIntR) - fn(map[string]int8(nil), (*encFnInfo).fastpathEncMapStringInt8R, (*decFnInfo).fastpathDecMapStringInt8R) - fn(map[string]int16(nil), (*encFnInfo).fastpathEncMapStringInt16R, (*decFnInfo).fastpathDecMapStringInt16R) - fn(map[string]int32(nil), (*encFnInfo).fastpathEncMapStringInt32R, (*decFnInfo).fastpathDecMapStringInt32R) - fn(map[string]int64(nil), (*encFnInfo).fastpathEncMapStringInt64R, (*decFnInfo).fastpathDecMapStringInt64R) - fn(map[string]float32(nil), (*encFnInfo).fastpathEncMapStringFloat32R, (*decFnInfo).fastpathDecMapStringFloat32R) - fn(map[string]float64(nil), (*encFnInfo).fastpathEncMapStringFloat64R, (*decFnInfo).fastpathDecMapStringFloat64R) - fn(map[string]bool(nil), (*encFnInfo).fastpathEncMapStringBoolR, (*decFnInfo).fastpathDecMapStringBoolR) - fn(map[float32]interface{}(nil), (*encFnInfo).fastpathEncMapFloat32IntfR, (*decFnInfo).fastpathDecMapFloat32IntfR) - fn(map[float32]string(nil), (*encFnInfo).fastpathEncMapFloat32StringR, (*decFnInfo).fastpathDecMapFloat32StringR) - fn(map[float32]uint(nil), (*encFnInfo).fastpathEncMapFloat32UintR, (*decFnInfo).fastpathDecMapFloat32UintR) - fn(map[float32]uint8(nil), (*encFnInfo).fastpathEncMapFloat32Uint8R, (*decFnInfo).fastpathDecMapFloat32Uint8R) - fn(map[float32]uint16(nil), (*encFnInfo).fastpathEncMapFloat32Uint16R, (*decFnInfo).fastpathDecMapFloat32Uint16R) - fn(map[float32]uint32(nil), (*encFnInfo).fastpathEncMapFloat32Uint32R, (*decFnInfo).fastpathDecMapFloat32Uint32R) - fn(map[float32]uint64(nil), (*encFnInfo).fastpathEncMapFloat32Uint64R, (*decFnInfo).fastpathDecMapFloat32Uint64R) - fn(map[float32]uintptr(nil), (*encFnInfo).fastpathEncMapFloat32UintptrR, (*decFnInfo).fastpathDecMapFloat32UintptrR) - fn(map[float32]int(nil), (*encFnInfo).fastpathEncMapFloat32IntR, (*decFnInfo).fastpathDecMapFloat32IntR) - fn(map[float32]int8(nil), (*encFnInfo).fastpathEncMapFloat32Int8R, (*decFnInfo).fastpathDecMapFloat32Int8R) - fn(map[float32]int16(nil), (*encFnInfo).fastpathEncMapFloat32Int16R, (*decFnInfo).fastpathDecMapFloat32Int16R) - fn(map[float32]int32(nil), (*encFnInfo).fastpathEncMapFloat32Int32R, (*decFnInfo).fastpathDecMapFloat32Int32R) - fn(map[float32]int64(nil), (*encFnInfo).fastpathEncMapFloat32Int64R, (*decFnInfo).fastpathDecMapFloat32Int64R) - fn(map[float32]float32(nil), (*encFnInfo).fastpathEncMapFloat32Float32R, (*decFnInfo).fastpathDecMapFloat32Float32R) - fn(map[float32]float64(nil), (*encFnInfo).fastpathEncMapFloat32Float64R, (*decFnInfo).fastpathDecMapFloat32Float64R) - fn(map[float32]bool(nil), (*encFnInfo).fastpathEncMapFloat32BoolR, (*decFnInfo).fastpathDecMapFloat32BoolR) - fn(map[float64]interface{}(nil), (*encFnInfo).fastpathEncMapFloat64IntfR, (*decFnInfo).fastpathDecMapFloat64IntfR) - fn(map[float64]string(nil), (*encFnInfo).fastpathEncMapFloat64StringR, (*decFnInfo).fastpathDecMapFloat64StringR) - fn(map[float64]uint(nil), (*encFnInfo).fastpathEncMapFloat64UintR, (*decFnInfo).fastpathDecMapFloat64UintR) - fn(map[float64]uint8(nil), (*encFnInfo).fastpathEncMapFloat64Uint8R, (*decFnInfo).fastpathDecMapFloat64Uint8R) - fn(map[float64]uint16(nil), (*encFnInfo).fastpathEncMapFloat64Uint16R, (*decFnInfo).fastpathDecMapFloat64Uint16R) - fn(map[float64]uint32(nil), (*encFnInfo).fastpathEncMapFloat64Uint32R, (*decFnInfo).fastpathDecMapFloat64Uint32R) - fn(map[float64]uint64(nil), (*encFnInfo).fastpathEncMapFloat64Uint64R, (*decFnInfo).fastpathDecMapFloat64Uint64R) - fn(map[float64]uintptr(nil), (*encFnInfo).fastpathEncMapFloat64UintptrR, (*decFnInfo).fastpathDecMapFloat64UintptrR) - fn(map[float64]int(nil), (*encFnInfo).fastpathEncMapFloat64IntR, (*decFnInfo).fastpathDecMapFloat64IntR) - fn(map[float64]int8(nil), (*encFnInfo).fastpathEncMapFloat64Int8R, (*decFnInfo).fastpathDecMapFloat64Int8R) - fn(map[float64]int16(nil), (*encFnInfo).fastpathEncMapFloat64Int16R, (*decFnInfo).fastpathDecMapFloat64Int16R) - fn(map[float64]int32(nil), (*encFnInfo).fastpathEncMapFloat64Int32R, (*decFnInfo).fastpathDecMapFloat64Int32R) - fn(map[float64]int64(nil), (*encFnInfo).fastpathEncMapFloat64Int64R, (*decFnInfo).fastpathDecMapFloat64Int64R) - fn(map[float64]float32(nil), (*encFnInfo).fastpathEncMapFloat64Float32R, (*decFnInfo).fastpathDecMapFloat64Float32R) - fn(map[float64]float64(nil), (*encFnInfo).fastpathEncMapFloat64Float64R, (*decFnInfo).fastpathDecMapFloat64Float64R) - fn(map[float64]bool(nil), (*encFnInfo).fastpathEncMapFloat64BoolR, (*decFnInfo).fastpathDecMapFloat64BoolR) - fn(map[uint]interface{}(nil), (*encFnInfo).fastpathEncMapUintIntfR, (*decFnInfo).fastpathDecMapUintIntfR) - fn(map[uint]string(nil), (*encFnInfo).fastpathEncMapUintStringR, (*decFnInfo).fastpathDecMapUintStringR) - fn(map[uint]uint(nil), (*encFnInfo).fastpathEncMapUintUintR, (*decFnInfo).fastpathDecMapUintUintR) - fn(map[uint]uint8(nil), (*encFnInfo).fastpathEncMapUintUint8R, (*decFnInfo).fastpathDecMapUintUint8R) - fn(map[uint]uint16(nil), (*encFnInfo).fastpathEncMapUintUint16R, (*decFnInfo).fastpathDecMapUintUint16R) - fn(map[uint]uint32(nil), (*encFnInfo).fastpathEncMapUintUint32R, (*decFnInfo).fastpathDecMapUintUint32R) - fn(map[uint]uint64(nil), (*encFnInfo).fastpathEncMapUintUint64R, (*decFnInfo).fastpathDecMapUintUint64R) - fn(map[uint]uintptr(nil), (*encFnInfo).fastpathEncMapUintUintptrR, (*decFnInfo).fastpathDecMapUintUintptrR) - fn(map[uint]int(nil), (*encFnInfo).fastpathEncMapUintIntR, (*decFnInfo).fastpathDecMapUintIntR) - fn(map[uint]int8(nil), (*encFnInfo).fastpathEncMapUintInt8R, (*decFnInfo).fastpathDecMapUintInt8R) - fn(map[uint]int16(nil), (*encFnInfo).fastpathEncMapUintInt16R, (*decFnInfo).fastpathDecMapUintInt16R) - fn(map[uint]int32(nil), (*encFnInfo).fastpathEncMapUintInt32R, (*decFnInfo).fastpathDecMapUintInt32R) - fn(map[uint]int64(nil), (*encFnInfo).fastpathEncMapUintInt64R, (*decFnInfo).fastpathDecMapUintInt64R) - fn(map[uint]float32(nil), (*encFnInfo).fastpathEncMapUintFloat32R, (*decFnInfo).fastpathDecMapUintFloat32R) - fn(map[uint]float64(nil), (*encFnInfo).fastpathEncMapUintFloat64R, (*decFnInfo).fastpathDecMapUintFloat64R) - fn(map[uint]bool(nil), (*encFnInfo).fastpathEncMapUintBoolR, (*decFnInfo).fastpathDecMapUintBoolR) - fn(map[uint8]interface{}(nil), (*encFnInfo).fastpathEncMapUint8IntfR, (*decFnInfo).fastpathDecMapUint8IntfR) - fn(map[uint8]string(nil), (*encFnInfo).fastpathEncMapUint8StringR, (*decFnInfo).fastpathDecMapUint8StringR) - fn(map[uint8]uint(nil), (*encFnInfo).fastpathEncMapUint8UintR, (*decFnInfo).fastpathDecMapUint8UintR) - fn(map[uint8]uint8(nil), (*encFnInfo).fastpathEncMapUint8Uint8R, (*decFnInfo).fastpathDecMapUint8Uint8R) - fn(map[uint8]uint16(nil), (*encFnInfo).fastpathEncMapUint8Uint16R, (*decFnInfo).fastpathDecMapUint8Uint16R) - fn(map[uint8]uint32(nil), (*encFnInfo).fastpathEncMapUint8Uint32R, (*decFnInfo).fastpathDecMapUint8Uint32R) - fn(map[uint8]uint64(nil), (*encFnInfo).fastpathEncMapUint8Uint64R, (*decFnInfo).fastpathDecMapUint8Uint64R) - fn(map[uint8]uintptr(nil), (*encFnInfo).fastpathEncMapUint8UintptrR, (*decFnInfo).fastpathDecMapUint8UintptrR) - fn(map[uint8]int(nil), (*encFnInfo).fastpathEncMapUint8IntR, (*decFnInfo).fastpathDecMapUint8IntR) - fn(map[uint8]int8(nil), (*encFnInfo).fastpathEncMapUint8Int8R, (*decFnInfo).fastpathDecMapUint8Int8R) - fn(map[uint8]int16(nil), (*encFnInfo).fastpathEncMapUint8Int16R, (*decFnInfo).fastpathDecMapUint8Int16R) - fn(map[uint8]int32(nil), (*encFnInfo).fastpathEncMapUint8Int32R, (*decFnInfo).fastpathDecMapUint8Int32R) - fn(map[uint8]int64(nil), (*encFnInfo).fastpathEncMapUint8Int64R, (*decFnInfo).fastpathDecMapUint8Int64R) - fn(map[uint8]float32(nil), (*encFnInfo).fastpathEncMapUint8Float32R, (*decFnInfo).fastpathDecMapUint8Float32R) - fn(map[uint8]float64(nil), (*encFnInfo).fastpathEncMapUint8Float64R, (*decFnInfo).fastpathDecMapUint8Float64R) - fn(map[uint8]bool(nil), (*encFnInfo).fastpathEncMapUint8BoolR, (*decFnInfo).fastpathDecMapUint8BoolR) - fn(map[uint16]interface{}(nil), (*encFnInfo).fastpathEncMapUint16IntfR, (*decFnInfo).fastpathDecMapUint16IntfR) - fn(map[uint16]string(nil), (*encFnInfo).fastpathEncMapUint16StringR, (*decFnInfo).fastpathDecMapUint16StringR) - fn(map[uint16]uint(nil), (*encFnInfo).fastpathEncMapUint16UintR, (*decFnInfo).fastpathDecMapUint16UintR) - fn(map[uint16]uint8(nil), (*encFnInfo).fastpathEncMapUint16Uint8R, (*decFnInfo).fastpathDecMapUint16Uint8R) - fn(map[uint16]uint16(nil), (*encFnInfo).fastpathEncMapUint16Uint16R, (*decFnInfo).fastpathDecMapUint16Uint16R) - fn(map[uint16]uint32(nil), (*encFnInfo).fastpathEncMapUint16Uint32R, (*decFnInfo).fastpathDecMapUint16Uint32R) - fn(map[uint16]uint64(nil), (*encFnInfo).fastpathEncMapUint16Uint64R, (*decFnInfo).fastpathDecMapUint16Uint64R) - fn(map[uint16]uintptr(nil), (*encFnInfo).fastpathEncMapUint16UintptrR, (*decFnInfo).fastpathDecMapUint16UintptrR) - fn(map[uint16]int(nil), (*encFnInfo).fastpathEncMapUint16IntR, (*decFnInfo).fastpathDecMapUint16IntR) - fn(map[uint16]int8(nil), (*encFnInfo).fastpathEncMapUint16Int8R, (*decFnInfo).fastpathDecMapUint16Int8R) - fn(map[uint16]int16(nil), (*encFnInfo).fastpathEncMapUint16Int16R, (*decFnInfo).fastpathDecMapUint16Int16R) - fn(map[uint16]int32(nil), (*encFnInfo).fastpathEncMapUint16Int32R, (*decFnInfo).fastpathDecMapUint16Int32R) - fn(map[uint16]int64(nil), (*encFnInfo).fastpathEncMapUint16Int64R, (*decFnInfo).fastpathDecMapUint16Int64R) - fn(map[uint16]float32(nil), (*encFnInfo).fastpathEncMapUint16Float32R, (*decFnInfo).fastpathDecMapUint16Float32R) - fn(map[uint16]float64(nil), (*encFnInfo).fastpathEncMapUint16Float64R, (*decFnInfo).fastpathDecMapUint16Float64R) - fn(map[uint16]bool(nil), (*encFnInfo).fastpathEncMapUint16BoolR, (*decFnInfo).fastpathDecMapUint16BoolR) - fn(map[uint32]interface{}(nil), (*encFnInfo).fastpathEncMapUint32IntfR, (*decFnInfo).fastpathDecMapUint32IntfR) - fn(map[uint32]string(nil), (*encFnInfo).fastpathEncMapUint32StringR, (*decFnInfo).fastpathDecMapUint32StringR) - fn(map[uint32]uint(nil), (*encFnInfo).fastpathEncMapUint32UintR, (*decFnInfo).fastpathDecMapUint32UintR) - fn(map[uint32]uint8(nil), (*encFnInfo).fastpathEncMapUint32Uint8R, (*decFnInfo).fastpathDecMapUint32Uint8R) - fn(map[uint32]uint16(nil), (*encFnInfo).fastpathEncMapUint32Uint16R, (*decFnInfo).fastpathDecMapUint32Uint16R) - fn(map[uint32]uint32(nil), (*encFnInfo).fastpathEncMapUint32Uint32R, (*decFnInfo).fastpathDecMapUint32Uint32R) - fn(map[uint32]uint64(nil), (*encFnInfo).fastpathEncMapUint32Uint64R, (*decFnInfo).fastpathDecMapUint32Uint64R) - fn(map[uint32]uintptr(nil), (*encFnInfo).fastpathEncMapUint32UintptrR, (*decFnInfo).fastpathDecMapUint32UintptrR) - fn(map[uint32]int(nil), (*encFnInfo).fastpathEncMapUint32IntR, (*decFnInfo).fastpathDecMapUint32IntR) - fn(map[uint32]int8(nil), (*encFnInfo).fastpathEncMapUint32Int8R, (*decFnInfo).fastpathDecMapUint32Int8R) - fn(map[uint32]int16(nil), (*encFnInfo).fastpathEncMapUint32Int16R, (*decFnInfo).fastpathDecMapUint32Int16R) - fn(map[uint32]int32(nil), (*encFnInfo).fastpathEncMapUint32Int32R, (*decFnInfo).fastpathDecMapUint32Int32R) - fn(map[uint32]int64(nil), (*encFnInfo).fastpathEncMapUint32Int64R, (*decFnInfo).fastpathDecMapUint32Int64R) - fn(map[uint32]float32(nil), (*encFnInfo).fastpathEncMapUint32Float32R, (*decFnInfo).fastpathDecMapUint32Float32R) - fn(map[uint32]float64(nil), (*encFnInfo).fastpathEncMapUint32Float64R, (*decFnInfo).fastpathDecMapUint32Float64R) - fn(map[uint32]bool(nil), (*encFnInfo).fastpathEncMapUint32BoolR, (*decFnInfo).fastpathDecMapUint32BoolR) - fn(map[uint64]interface{}(nil), (*encFnInfo).fastpathEncMapUint64IntfR, (*decFnInfo).fastpathDecMapUint64IntfR) - fn(map[uint64]string(nil), (*encFnInfo).fastpathEncMapUint64StringR, (*decFnInfo).fastpathDecMapUint64StringR) - fn(map[uint64]uint(nil), (*encFnInfo).fastpathEncMapUint64UintR, (*decFnInfo).fastpathDecMapUint64UintR) - fn(map[uint64]uint8(nil), (*encFnInfo).fastpathEncMapUint64Uint8R, (*decFnInfo).fastpathDecMapUint64Uint8R) - fn(map[uint64]uint16(nil), (*encFnInfo).fastpathEncMapUint64Uint16R, (*decFnInfo).fastpathDecMapUint64Uint16R) - fn(map[uint64]uint32(nil), (*encFnInfo).fastpathEncMapUint64Uint32R, (*decFnInfo).fastpathDecMapUint64Uint32R) - fn(map[uint64]uint64(nil), (*encFnInfo).fastpathEncMapUint64Uint64R, (*decFnInfo).fastpathDecMapUint64Uint64R) - fn(map[uint64]uintptr(nil), (*encFnInfo).fastpathEncMapUint64UintptrR, (*decFnInfo).fastpathDecMapUint64UintptrR) - fn(map[uint64]int(nil), (*encFnInfo).fastpathEncMapUint64IntR, (*decFnInfo).fastpathDecMapUint64IntR) - fn(map[uint64]int8(nil), (*encFnInfo).fastpathEncMapUint64Int8R, (*decFnInfo).fastpathDecMapUint64Int8R) - fn(map[uint64]int16(nil), (*encFnInfo).fastpathEncMapUint64Int16R, (*decFnInfo).fastpathDecMapUint64Int16R) - fn(map[uint64]int32(nil), (*encFnInfo).fastpathEncMapUint64Int32R, (*decFnInfo).fastpathDecMapUint64Int32R) - fn(map[uint64]int64(nil), (*encFnInfo).fastpathEncMapUint64Int64R, (*decFnInfo).fastpathDecMapUint64Int64R) - fn(map[uint64]float32(nil), (*encFnInfo).fastpathEncMapUint64Float32R, (*decFnInfo).fastpathDecMapUint64Float32R) - fn(map[uint64]float64(nil), (*encFnInfo).fastpathEncMapUint64Float64R, (*decFnInfo).fastpathDecMapUint64Float64R) - fn(map[uint64]bool(nil), (*encFnInfo).fastpathEncMapUint64BoolR, (*decFnInfo).fastpathDecMapUint64BoolR) - fn(map[uintptr]interface{}(nil), (*encFnInfo).fastpathEncMapUintptrIntfR, (*decFnInfo).fastpathDecMapUintptrIntfR) - fn(map[uintptr]string(nil), (*encFnInfo).fastpathEncMapUintptrStringR, (*decFnInfo).fastpathDecMapUintptrStringR) - fn(map[uintptr]uint(nil), (*encFnInfo).fastpathEncMapUintptrUintR, (*decFnInfo).fastpathDecMapUintptrUintR) - fn(map[uintptr]uint8(nil), (*encFnInfo).fastpathEncMapUintptrUint8R, (*decFnInfo).fastpathDecMapUintptrUint8R) - fn(map[uintptr]uint16(nil), (*encFnInfo).fastpathEncMapUintptrUint16R, (*decFnInfo).fastpathDecMapUintptrUint16R) - fn(map[uintptr]uint32(nil), (*encFnInfo).fastpathEncMapUintptrUint32R, (*decFnInfo).fastpathDecMapUintptrUint32R) - fn(map[uintptr]uint64(nil), (*encFnInfo).fastpathEncMapUintptrUint64R, (*decFnInfo).fastpathDecMapUintptrUint64R) - fn(map[uintptr]uintptr(nil), (*encFnInfo).fastpathEncMapUintptrUintptrR, (*decFnInfo).fastpathDecMapUintptrUintptrR) - fn(map[uintptr]int(nil), (*encFnInfo).fastpathEncMapUintptrIntR, (*decFnInfo).fastpathDecMapUintptrIntR) - fn(map[uintptr]int8(nil), (*encFnInfo).fastpathEncMapUintptrInt8R, (*decFnInfo).fastpathDecMapUintptrInt8R) - fn(map[uintptr]int16(nil), (*encFnInfo).fastpathEncMapUintptrInt16R, (*decFnInfo).fastpathDecMapUintptrInt16R) - fn(map[uintptr]int32(nil), (*encFnInfo).fastpathEncMapUintptrInt32R, (*decFnInfo).fastpathDecMapUintptrInt32R) - fn(map[uintptr]int64(nil), (*encFnInfo).fastpathEncMapUintptrInt64R, (*decFnInfo).fastpathDecMapUintptrInt64R) - fn(map[uintptr]float32(nil), (*encFnInfo).fastpathEncMapUintptrFloat32R, (*decFnInfo).fastpathDecMapUintptrFloat32R) - fn(map[uintptr]float64(nil), (*encFnInfo).fastpathEncMapUintptrFloat64R, (*decFnInfo).fastpathDecMapUintptrFloat64R) - fn(map[uintptr]bool(nil), (*encFnInfo).fastpathEncMapUintptrBoolR, (*decFnInfo).fastpathDecMapUintptrBoolR) - fn(map[int]interface{}(nil), (*encFnInfo).fastpathEncMapIntIntfR, (*decFnInfo).fastpathDecMapIntIntfR) - fn(map[int]string(nil), (*encFnInfo).fastpathEncMapIntStringR, (*decFnInfo).fastpathDecMapIntStringR) - fn(map[int]uint(nil), (*encFnInfo).fastpathEncMapIntUintR, (*decFnInfo).fastpathDecMapIntUintR) - fn(map[int]uint8(nil), (*encFnInfo).fastpathEncMapIntUint8R, (*decFnInfo).fastpathDecMapIntUint8R) - fn(map[int]uint16(nil), (*encFnInfo).fastpathEncMapIntUint16R, (*decFnInfo).fastpathDecMapIntUint16R) - fn(map[int]uint32(nil), (*encFnInfo).fastpathEncMapIntUint32R, (*decFnInfo).fastpathDecMapIntUint32R) - fn(map[int]uint64(nil), (*encFnInfo).fastpathEncMapIntUint64R, (*decFnInfo).fastpathDecMapIntUint64R) - fn(map[int]uintptr(nil), (*encFnInfo).fastpathEncMapIntUintptrR, (*decFnInfo).fastpathDecMapIntUintptrR) - fn(map[int]int(nil), (*encFnInfo).fastpathEncMapIntIntR, (*decFnInfo).fastpathDecMapIntIntR) - fn(map[int]int8(nil), (*encFnInfo).fastpathEncMapIntInt8R, (*decFnInfo).fastpathDecMapIntInt8R) - fn(map[int]int16(nil), (*encFnInfo).fastpathEncMapIntInt16R, (*decFnInfo).fastpathDecMapIntInt16R) - fn(map[int]int32(nil), (*encFnInfo).fastpathEncMapIntInt32R, (*decFnInfo).fastpathDecMapIntInt32R) - fn(map[int]int64(nil), (*encFnInfo).fastpathEncMapIntInt64R, (*decFnInfo).fastpathDecMapIntInt64R) - fn(map[int]float32(nil), (*encFnInfo).fastpathEncMapIntFloat32R, (*decFnInfo).fastpathDecMapIntFloat32R) - fn(map[int]float64(nil), (*encFnInfo).fastpathEncMapIntFloat64R, (*decFnInfo).fastpathDecMapIntFloat64R) - fn(map[int]bool(nil), (*encFnInfo).fastpathEncMapIntBoolR, (*decFnInfo).fastpathDecMapIntBoolR) - fn(map[int8]interface{}(nil), (*encFnInfo).fastpathEncMapInt8IntfR, (*decFnInfo).fastpathDecMapInt8IntfR) - fn(map[int8]string(nil), (*encFnInfo).fastpathEncMapInt8StringR, (*decFnInfo).fastpathDecMapInt8StringR) - fn(map[int8]uint(nil), (*encFnInfo).fastpathEncMapInt8UintR, (*decFnInfo).fastpathDecMapInt8UintR) - fn(map[int8]uint8(nil), (*encFnInfo).fastpathEncMapInt8Uint8R, (*decFnInfo).fastpathDecMapInt8Uint8R) - fn(map[int8]uint16(nil), (*encFnInfo).fastpathEncMapInt8Uint16R, (*decFnInfo).fastpathDecMapInt8Uint16R) - fn(map[int8]uint32(nil), (*encFnInfo).fastpathEncMapInt8Uint32R, (*decFnInfo).fastpathDecMapInt8Uint32R) - fn(map[int8]uint64(nil), (*encFnInfo).fastpathEncMapInt8Uint64R, (*decFnInfo).fastpathDecMapInt8Uint64R) - fn(map[int8]uintptr(nil), (*encFnInfo).fastpathEncMapInt8UintptrR, (*decFnInfo).fastpathDecMapInt8UintptrR) - fn(map[int8]int(nil), (*encFnInfo).fastpathEncMapInt8IntR, (*decFnInfo).fastpathDecMapInt8IntR) - fn(map[int8]int8(nil), (*encFnInfo).fastpathEncMapInt8Int8R, (*decFnInfo).fastpathDecMapInt8Int8R) - fn(map[int8]int16(nil), (*encFnInfo).fastpathEncMapInt8Int16R, (*decFnInfo).fastpathDecMapInt8Int16R) - fn(map[int8]int32(nil), (*encFnInfo).fastpathEncMapInt8Int32R, (*decFnInfo).fastpathDecMapInt8Int32R) - fn(map[int8]int64(nil), (*encFnInfo).fastpathEncMapInt8Int64R, (*decFnInfo).fastpathDecMapInt8Int64R) - fn(map[int8]float32(nil), (*encFnInfo).fastpathEncMapInt8Float32R, (*decFnInfo).fastpathDecMapInt8Float32R) - fn(map[int8]float64(nil), (*encFnInfo).fastpathEncMapInt8Float64R, (*decFnInfo).fastpathDecMapInt8Float64R) - fn(map[int8]bool(nil), (*encFnInfo).fastpathEncMapInt8BoolR, (*decFnInfo).fastpathDecMapInt8BoolR) - fn(map[int16]interface{}(nil), (*encFnInfo).fastpathEncMapInt16IntfR, (*decFnInfo).fastpathDecMapInt16IntfR) - fn(map[int16]string(nil), (*encFnInfo).fastpathEncMapInt16StringR, (*decFnInfo).fastpathDecMapInt16StringR) - fn(map[int16]uint(nil), (*encFnInfo).fastpathEncMapInt16UintR, (*decFnInfo).fastpathDecMapInt16UintR) - fn(map[int16]uint8(nil), (*encFnInfo).fastpathEncMapInt16Uint8R, (*decFnInfo).fastpathDecMapInt16Uint8R) - fn(map[int16]uint16(nil), (*encFnInfo).fastpathEncMapInt16Uint16R, (*decFnInfo).fastpathDecMapInt16Uint16R) - fn(map[int16]uint32(nil), (*encFnInfo).fastpathEncMapInt16Uint32R, (*decFnInfo).fastpathDecMapInt16Uint32R) - fn(map[int16]uint64(nil), (*encFnInfo).fastpathEncMapInt16Uint64R, (*decFnInfo).fastpathDecMapInt16Uint64R) - fn(map[int16]uintptr(nil), (*encFnInfo).fastpathEncMapInt16UintptrR, (*decFnInfo).fastpathDecMapInt16UintptrR) - fn(map[int16]int(nil), (*encFnInfo).fastpathEncMapInt16IntR, (*decFnInfo).fastpathDecMapInt16IntR) - fn(map[int16]int8(nil), (*encFnInfo).fastpathEncMapInt16Int8R, (*decFnInfo).fastpathDecMapInt16Int8R) - fn(map[int16]int16(nil), (*encFnInfo).fastpathEncMapInt16Int16R, (*decFnInfo).fastpathDecMapInt16Int16R) - fn(map[int16]int32(nil), (*encFnInfo).fastpathEncMapInt16Int32R, (*decFnInfo).fastpathDecMapInt16Int32R) - fn(map[int16]int64(nil), (*encFnInfo).fastpathEncMapInt16Int64R, (*decFnInfo).fastpathDecMapInt16Int64R) - fn(map[int16]float32(nil), (*encFnInfo).fastpathEncMapInt16Float32R, (*decFnInfo).fastpathDecMapInt16Float32R) - fn(map[int16]float64(nil), (*encFnInfo).fastpathEncMapInt16Float64R, (*decFnInfo).fastpathDecMapInt16Float64R) - fn(map[int16]bool(nil), (*encFnInfo).fastpathEncMapInt16BoolR, (*decFnInfo).fastpathDecMapInt16BoolR) - fn(map[int32]interface{}(nil), (*encFnInfo).fastpathEncMapInt32IntfR, (*decFnInfo).fastpathDecMapInt32IntfR) - fn(map[int32]string(nil), (*encFnInfo).fastpathEncMapInt32StringR, (*decFnInfo).fastpathDecMapInt32StringR) - fn(map[int32]uint(nil), (*encFnInfo).fastpathEncMapInt32UintR, (*decFnInfo).fastpathDecMapInt32UintR) - fn(map[int32]uint8(nil), (*encFnInfo).fastpathEncMapInt32Uint8R, (*decFnInfo).fastpathDecMapInt32Uint8R) - fn(map[int32]uint16(nil), (*encFnInfo).fastpathEncMapInt32Uint16R, (*decFnInfo).fastpathDecMapInt32Uint16R) - fn(map[int32]uint32(nil), (*encFnInfo).fastpathEncMapInt32Uint32R, (*decFnInfo).fastpathDecMapInt32Uint32R) - fn(map[int32]uint64(nil), (*encFnInfo).fastpathEncMapInt32Uint64R, (*decFnInfo).fastpathDecMapInt32Uint64R) - fn(map[int32]uintptr(nil), (*encFnInfo).fastpathEncMapInt32UintptrR, (*decFnInfo).fastpathDecMapInt32UintptrR) - fn(map[int32]int(nil), (*encFnInfo).fastpathEncMapInt32IntR, (*decFnInfo).fastpathDecMapInt32IntR) - fn(map[int32]int8(nil), (*encFnInfo).fastpathEncMapInt32Int8R, (*decFnInfo).fastpathDecMapInt32Int8R) - fn(map[int32]int16(nil), (*encFnInfo).fastpathEncMapInt32Int16R, (*decFnInfo).fastpathDecMapInt32Int16R) - fn(map[int32]int32(nil), (*encFnInfo).fastpathEncMapInt32Int32R, (*decFnInfo).fastpathDecMapInt32Int32R) - fn(map[int32]int64(nil), (*encFnInfo).fastpathEncMapInt32Int64R, (*decFnInfo).fastpathDecMapInt32Int64R) - fn(map[int32]float32(nil), (*encFnInfo).fastpathEncMapInt32Float32R, (*decFnInfo).fastpathDecMapInt32Float32R) - fn(map[int32]float64(nil), (*encFnInfo).fastpathEncMapInt32Float64R, (*decFnInfo).fastpathDecMapInt32Float64R) - fn(map[int32]bool(nil), (*encFnInfo).fastpathEncMapInt32BoolR, (*decFnInfo).fastpathDecMapInt32BoolR) - fn(map[int64]interface{}(nil), (*encFnInfo).fastpathEncMapInt64IntfR, (*decFnInfo).fastpathDecMapInt64IntfR) - fn(map[int64]string(nil), (*encFnInfo).fastpathEncMapInt64StringR, (*decFnInfo).fastpathDecMapInt64StringR) - fn(map[int64]uint(nil), (*encFnInfo).fastpathEncMapInt64UintR, (*decFnInfo).fastpathDecMapInt64UintR) - fn(map[int64]uint8(nil), (*encFnInfo).fastpathEncMapInt64Uint8R, (*decFnInfo).fastpathDecMapInt64Uint8R) - fn(map[int64]uint16(nil), (*encFnInfo).fastpathEncMapInt64Uint16R, (*decFnInfo).fastpathDecMapInt64Uint16R) - fn(map[int64]uint32(nil), (*encFnInfo).fastpathEncMapInt64Uint32R, (*decFnInfo).fastpathDecMapInt64Uint32R) - fn(map[int64]uint64(nil), (*encFnInfo).fastpathEncMapInt64Uint64R, (*decFnInfo).fastpathDecMapInt64Uint64R) - fn(map[int64]uintptr(nil), (*encFnInfo).fastpathEncMapInt64UintptrR, (*decFnInfo).fastpathDecMapInt64UintptrR) - fn(map[int64]int(nil), (*encFnInfo).fastpathEncMapInt64IntR, (*decFnInfo).fastpathDecMapInt64IntR) - fn(map[int64]int8(nil), (*encFnInfo).fastpathEncMapInt64Int8R, (*decFnInfo).fastpathDecMapInt64Int8R) - fn(map[int64]int16(nil), (*encFnInfo).fastpathEncMapInt64Int16R, (*decFnInfo).fastpathDecMapInt64Int16R) - fn(map[int64]int32(nil), (*encFnInfo).fastpathEncMapInt64Int32R, (*decFnInfo).fastpathDecMapInt64Int32R) - fn(map[int64]int64(nil), (*encFnInfo).fastpathEncMapInt64Int64R, (*decFnInfo).fastpathDecMapInt64Int64R) - fn(map[int64]float32(nil), (*encFnInfo).fastpathEncMapInt64Float32R, (*decFnInfo).fastpathDecMapInt64Float32R) - fn(map[int64]float64(nil), (*encFnInfo).fastpathEncMapInt64Float64R, (*decFnInfo).fastpathDecMapInt64Float64R) - fn(map[int64]bool(nil), (*encFnInfo).fastpathEncMapInt64BoolR, (*decFnInfo).fastpathDecMapInt64BoolR) - fn(map[bool]interface{}(nil), (*encFnInfo).fastpathEncMapBoolIntfR, (*decFnInfo).fastpathDecMapBoolIntfR) - fn(map[bool]string(nil), (*encFnInfo).fastpathEncMapBoolStringR, (*decFnInfo).fastpathDecMapBoolStringR) - fn(map[bool]uint(nil), (*encFnInfo).fastpathEncMapBoolUintR, (*decFnInfo).fastpathDecMapBoolUintR) - fn(map[bool]uint8(nil), (*encFnInfo).fastpathEncMapBoolUint8R, (*decFnInfo).fastpathDecMapBoolUint8R) - fn(map[bool]uint16(nil), (*encFnInfo).fastpathEncMapBoolUint16R, (*decFnInfo).fastpathDecMapBoolUint16R) - fn(map[bool]uint32(nil), (*encFnInfo).fastpathEncMapBoolUint32R, (*decFnInfo).fastpathDecMapBoolUint32R) - fn(map[bool]uint64(nil), (*encFnInfo).fastpathEncMapBoolUint64R, (*decFnInfo).fastpathDecMapBoolUint64R) - fn(map[bool]uintptr(nil), (*encFnInfo).fastpathEncMapBoolUintptrR, (*decFnInfo).fastpathDecMapBoolUintptrR) - fn(map[bool]int(nil), (*encFnInfo).fastpathEncMapBoolIntR, (*decFnInfo).fastpathDecMapBoolIntR) - fn(map[bool]int8(nil), (*encFnInfo).fastpathEncMapBoolInt8R, (*decFnInfo).fastpathDecMapBoolInt8R) - fn(map[bool]int16(nil), (*encFnInfo).fastpathEncMapBoolInt16R, (*decFnInfo).fastpathDecMapBoolInt16R) - fn(map[bool]int32(nil), (*encFnInfo).fastpathEncMapBoolInt32R, (*decFnInfo).fastpathDecMapBoolInt32R) - fn(map[bool]int64(nil), (*encFnInfo).fastpathEncMapBoolInt64R, (*decFnInfo).fastpathDecMapBoolInt64R) - fn(map[bool]float32(nil), (*encFnInfo).fastpathEncMapBoolFloat32R, (*decFnInfo).fastpathDecMapBoolFloat32R) - fn(map[bool]float64(nil), (*encFnInfo).fastpathEncMapBoolFloat64R, (*decFnInfo).fastpathDecMapBoolFloat64R) - fn(map[bool]bool(nil), (*encFnInfo).fastpathEncMapBoolBoolR, (*decFnInfo).fastpathDecMapBoolBoolR) + fn([]interface{}(nil), (*Encoder).fastpathEncSliceIntfR, (*Decoder).fastpathDecSliceIntfR) + fn([]string(nil), (*Encoder).fastpathEncSliceStringR, (*Decoder).fastpathDecSliceStringR) + fn([]float32(nil), (*Encoder).fastpathEncSliceFloat32R, (*Decoder).fastpathDecSliceFloat32R) + fn([]float64(nil), (*Encoder).fastpathEncSliceFloat64R, (*Decoder).fastpathDecSliceFloat64R) + fn([]uint(nil), (*Encoder).fastpathEncSliceUintR, (*Decoder).fastpathDecSliceUintR) + fn([]uint16(nil), (*Encoder).fastpathEncSliceUint16R, (*Decoder).fastpathDecSliceUint16R) + fn([]uint32(nil), (*Encoder).fastpathEncSliceUint32R, (*Decoder).fastpathDecSliceUint32R) + fn([]uint64(nil), (*Encoder).fastpathEncSliceUint64R, (*Decoder).fastpathDecSliceUint64R) + fn([]uintptr(nil), (*Encoder).fastpathEncSliceUintptrR, (*Decoder).fastpathDecSliceUintptrR) + fn([]int(nil), (*Encoder).fastpathEncSliceIntR, (*Decoder).fastpathDecSliceIntR) + fn([]int8(nil), (*Encoder).fastpathEncSliceInt8R, (*Decoder).fastpathDecSliceInt8R) + fn([]int16(nil), (*Encoder).fastpathEncSliceInt16R, (*Decoder).fastpathDecSliceInt16R) + fn([]int32(nil), (*Encoder).fastpathEncSliceInt32R, (*Decoder).fastpathDecSliceInt32R) + fn([]int64(nil), (*Encoder).fastpathEncSliceInt64R, (*Decoder).fastpathDecSliceInt64R) + fn([]bool(nil), (*Encoder).fastpathEncSliceBoolR, (*Decoder).fastpathDecSliceBoolR) + + fn(map[interface{}]interface{}(nil), (*Encoder).fastpathEncMapIntfIntfR, (*Decoder).fastpathDecMapIntfIntfR) + fn(map[interface{}]string(nil), (*Encoder).fastpathEncMapIntfStringR, (*Decoder).fastpathDecMapIntfStringR) + fn(map[interface{}]uint(nil), (*Encoder).fastpathEncMapIntfUintR, (*Decoder).fastpathDecMapIntfUintR) + fn(map[interface{}]uint8(nil), (*Encoder).fastpathEncMapIntfUint8R, (*Decoder).fastpathDecMapIntfUint8R) + fn(map[interface{}]uint16(nil), (*Encoder).fastpathEncMapIntfUint16R, (*Decoder).fastpathDecMapIntfUint16R) + fn(map[interface{}]uint32(nil), (*Encoder).fastpathEncMapIntfUint32R, (*Decoder).fastpathDecMapIntfUint32R) + fn(map[interface{}]uint64(nil), (*Encoder).fastpathEncMapIntfUint64R, (*Decoder).fastpathDecMapIntfUint64R) + fn(map[interface{}]uintptr(nil), (*Encoder).fastpathEncMapIntfUintptrR, (*Decoder).fastpathDecMapIntfUintptrR) + fn(map[interface{}]int(nil), (*Encoder).fastpathEncMapIntfIntR, (*Decoder).fastpathDecMapIntfIntR) + fn(map[interface{}]int8(nil), (*Encoder).fastpathEncMapIntfInt8R, (*Decoder).fastpathDecMapIntfInt8R) + fn(map[interface{}]int16(nil), (*Encoder).fastpathEncMapIntfInt16R, (*Decoder).fastpathDecMapIntfInt16R) + fn(map[interface{}]int32(nil), (*Encoder).fastpathEncMapIntfInt32R, (*Decoder).fastpathDecMapIntfInt32R) + fn(map[interface{}]int64(nil), (*Encoder).fastpathEncMapIntfInt64R, (*Decoder).fastpathDecMapIntfInt64R) + fn(map[interface{}]float32(nil), (*Encoder).fastpathEncMapIntfFloat32R, (*Decoder).fastpathDecMapIntfFloat32R) + fn(map[interface{}]float64(nil), (*Encoder).fastpathEncMapIntfFloat64R, (*Decoder).fastpathDecMapIntfFloat64R) + fn(map[interface{}]bool(nil), (*Encoder).fastpathEncMapIntfBoolR, (*Decoder).fastpathDecMapIntfBoolR) + fn(map[string]interface{}(nil), (*Encoder).fastpathEncMapStringIntfR, (*Decoder).fastpathDecMapStringIntfR) + fn(map[string]string(nil), (*Encoder).fastpathEncMapStringStringR, (*Decoder).fastpathDecMapStringStringR) + fn(map[string]uint(nil), (*Encoder).fastpathEncMapStringUintR, (*Decoder).fastpathDecMapStringUintR) + fn(map[string]uint8(nil), (*Encoder).fastpathEncMapStringUint8R, (*Decoder).fastpathDecMapStringUint8R) + fn(map[string]uint16(nil), (*Encoder).fastpathEncMapStringUint16R, (*Decoder).fastpathDecMapStringUint16R) + fn(map[string]uint32(nil), (*Encoder).fastpathEncMapStringUint32R, (*Decoder).fastpathDecMapStringUint32R) + fn(map[string]uint64(nil), (*Encoder).fastpathEncMapStringUint64R, (*Decoder).fastpathDecMapStringUint64R) + fn(map[string]uintptr(nil), (*Encoder).fastpathEncMapStringUintptrR, (*Decoder).fastpathDecMapStringUintptrR) + fn(map[string]int(nil), (*Encoder).fastpathEncMapStringIntR, (*Decoder).fastpathDecMapStringIntR) + fn(map[string]int8(nil), (*Encoder).fastpathEncMapStringInt8R, (*Decoder).fastpathDecMapStringInt8R) + fn(map[string]int16(nil), (*Encoder).fastpathEncMapStringInt16R, (*Decoder).fastpathDecMapStringInt16R) + fn(map[string]int32(nil), (*Encoder).fastpathEncMapStringInt32R, (*Decoder).fastpathDecMapStringInt32R) + fn(map[string]int64(nil), (*Encoder).fastpathEncMapStringInt64R, (*Decoder).fastpathDecMapStringInt64R) + fn(map[string]float32(nil), (*Encoder).fastpathEncMapStringFloat32R, (*Decoder).fastpathDecMapStringFloat32R) + fn(map[string]float64(nil), (*Encoder).fastpathEncMapStringFloat64R, (*Decoder).fastpathDecMapStringFloat64R) + fn(map[string]bool(nil), (*Encoder).fastpathEncMapStringBoolR, (*Decoder).fastpathDecMapStringBoolR) + fn(map[float32]interface{}(nil), (*Encoder).fastpathEncMapFloat32IntfR, (*Decoder).fastpathDecMapFloat32IntfR) + fn(map[float32]string(nil), (*Encoder).fastpathEncMapFloat32StringR, (*Decoder).fastpathDecMapFloat32StringR) + fn(map[float32]uint(nil), (*Encoder).fastpathEncMapFloat32UintR, (*Decoder).fastpathDecMapFloat32UintR) + fn(map[float32]uint8(nil), (*Encoder).fastpathEncMapFloat32Uint8R, (*Decoder).fastpathDecMapFloat32Uint8R) + fn(map[float32]uint16(nil), (*Encoder).fastpathEncMapFloat32Uint16R, (*Decoder).fastpathDecMapFloat32Uint16R) + fn(map[float32]uint32(nil), (*Encoder).fastpathEncMapFloat32Uint32R, (*Decoder).fastpathDecMapFloat32Uint32R) + fn(map[float32]uint64(nil), (*Encoder).fastpathEncMapFloat32Uint64R, (*Decoder).fastpathDecMapFloat32Uint64R) + fn(map[float32]uintptr(nil), (*Encoder).fastpathEncMapFloat32UintptrR, (*Decoder).fastpathDecMapFloat32UintptrR) + fn(map[float32]int(nil), (*Encoder).fastpathEncMapFloat32IntR, (*Decoder).fastpathDecMapFloat32IntR) + fn(map[float32]int8(nil), (*Encoder).fastpathEncMapFloat32Int8R, (*Decoder).fastpathDecMapFloat32Int8R) + fn(map[float32]int16(nil), (*Encoder).fastpathEncMapFloat32Int16R, (*Decoder).fastpathDecMapFloat32Int16R) + fn(map[float32]int32(nil), (*Encoder).fastpathEncMapFloat32Int32R, (*Decoder).fastpathDecMapFloat32Int32R) + fn(map[float32]int64(nil), (*Encoder).fastpathEncMapFloat32Int64R, (*Decoder).fastpathDecMapFloat32Int64R) + fn(map[float32]float32(nil), (*Encoder).fastpathEncMapFloat32Float32R, (*Decoder).fastpathDecMapFloat32Float32R) + fn(map[float32]float64(nil), (*Encoder).fastpathEncMapFloat32Float64R, (*Decoder).fastpathDecMapFloat32Float64R) + fn(map[float32]bool(nil), (*Encoder).fastpathEncMapFloat32BoolR, (*Decoder).fastpathDecMapFloat32BoolR) + fn(map[float64]interface{}(nil), (*Encoder).fastpathEncMapFloat64IntfR, (*Decoder).fastpathDecMapFloat64IntfR) + fn(map[float64]string(nil), (*Encoder).fastpathEncMapFloat64StringR, (*Decoder).fastpathDecMapFloat64StringR) + fn(map[float64]uint(nil), (*Encoder).fastpathEncMapFloat64UintR, (*Decoder).fastpathDecMapFloat64UintR) + fn(map[float64]uint8(nil), (*Encoder).fastpathEncMapFloat64Uint8R, (*Decoder).fastpathDecMapFloat64Uint8R) + fn(map[float64]uint16(nil), (*Encoder).fastpathEncMapFloat64Uint16R, (*Decoder).fastpathDecMapFloat64Uint16R) + fn(map[float64]uint32(nil), (*Encoder).fastpathEncMapFloat64Uint32R, (*Decoder).fastpathDecMapFloat64Uint32R) + fn(map[float64]uint64(nil), (*Encoder).fastpathEncMapFloat64Uint64R, (*Decoder).fastpathDecMapFloat64Uint64R) + fn(map[float64]uintptr(nil), (*Encoder).fastpathEncMapFloat64UintptrR, (*Decoder).fastpathDecMapFloat64UintptrR) + fn(map[float64]int(nil), (*Encoder).fastpathEncMapFloat64IntR, (*Decoder).fastpathDecMapFloat64IntR) + fn(map[float64]int8(nil), (*Encoder).fastpathEncMapFloat64Int8R, (*Decoder).fastpathDecMapFloat64Int8R) + fn(map[float64]int16(nil), (*Encoder).fastpathEncMapFloat64Int16R, (*Decoder).fastpathDecMapFloat64Int16R) + fn(map[float64]int32(nil), (*Encoder).fastpathEncMapFloat64Int32R, (*Decoder).fastpathDecMapFloat64Int32R) + fn(map[float64]int64(nil), (*Encoder).fastpathEncMapFloat64Int64R, (*Decoder).fastpathDecMapFloat64Int64R) + fn(map[float64]float32(nil), (*Encoder).fastpathEncMapFloat64Float32R, (*Decoder).fastpathDecMapFloat64Float32R) + fn(map[float64]float64(nil), (*Encoder).fastpathEncMapFloat64Float64R, (*Decoder).fastpathDecMapFloat64Float64R) + fn(map[float64]bool(nil), (*Encoder).fastpathEncMapFloat64BoolR, (*Decoder).fastpathDecMapFloat64BoolR) + fn(map[uint]interface{}(nil), (*Encoder).fastpathEncMapUintIntfR, (*Decoder).fastpathDecMapUintIntfR) + fn(map[uint]string(nil), (*Encoder).fastpathEncMapUintStringR, (*Decoder).fastpathDecMapUintStringR) + fn(map[uint]uint(nil), (*Encoder).fastpathEncMapUintUintR, (*Decoder).fastpathDecMapUintUintR) + fn(map[uint]uint8(nil), (*Encoder).fastpathEncMapUintUint8R, (*Decoder).fastpathDecMapUintUint8R) + fn(map[uint]uint16(nil), (*Encoder).fastpathEncMapUintUint16R, (*Decoder).fastpathDecMapUintUint16R) + fn(map[uint]uint32(nil), (*Encoder).fastpathEncMapUintUint32R, (*Decoder).fastpathDecMapUintUint32R) + fn(map[uint]uint64(nil), (*Encoder).fastpathEncMapUintUint64R, (*Decoder).fastpathDecMapUintUint64R) + fn(map[uint]uintptr(nil), (*Encoder).fastpathEncMapUintUintptrR, (*Decoder).fastpathDecMapUintUintptrR) + fn(map[uint]int(nil), (*Encoder).fastpathEncMapUintIntR, (*Decoder).fastpathDecMapUintIntR) + fn(map[uint]int8(nil), (*Encoder).fastpathEncMapUintInt8R, (*Decoder).fastpathDecMapUintInt8R) + fn(map[uint]int16(nil), (*Encoder).fastpathEncMapUintInt16R, (*Decoder).fastpathDecMapUintInt16R) + fn(map[uint]int32(nil), (*Encoder).fastpathEncMapUintInt32R, (*Decoder).fastpathDecMapUintInt32R) + fn(map[uint]int64(nil), (*Encoder).fastpathEncMapUintInt64R, (*Decoder).fastpathDecMapUintInt64R) + fn(map[uint]float32(nil), (*Encoder).fastpathEncMapUintFloat32R, (*Decoder).fastpathDecMapUintFloat32R) + fn(map[uint]float64(nil), (*Encoder).fastpathEncMapUintFloat64R, (*Decoder).fastpathDecMapUintFloat64R) + fn(map[uint]bool(nil), (*Encoder).fastpathEncMapUintBoolR, (*Decoder).fastpathDecMapUintBoolR) + fn(map[uint8]interface{}(nil), (*Encoder).fastpathEncMapUint8IntfR, (*Decoder).fastpathDecMapUint8IntfR) + fn(map[uint8]string(nil), (*Encoder).fastpathEncMapUint8StringR, (*Decoder).fastpathDecMapUint8StringR) + fn(map[uint8]uint(nil), (*Encoder).fastpathEncMapUint8UintR, (*Decoder).fastpathDecMapUint8UintR) + fn(map[uint8]uint8(nil), (*Encoder).fastpathEncMapUint8Uint8R, (*Decoder).fastpathDecMapUint8Uint8R) + fn(map[uint8]uint16(nil), (*Encoder).fastpathEncMapUint8Uint16R, (*Decoder).fastpathDecMapUint8Uint16R) + fn(map[uint8]uint32(nil), (*Encoder).fastpathEncMapUint8Uint32R, (*Decoder).fastpathDecMapUint8Uint32R) + fn(map[uint8]uint64(nil), (*Encoder).fastpathEncMapUint8Uint64R, (*Decoder).fastpathDecMapUint8Uint64R) + fn(map[uint8]uintptr(nil), (*Encoder).fastpathEncMapUint8UintptrR, (*Decoder).fastpathDecMapUint8UintptrR) + fn(map[uint8]int(nil), (*Encoder).fastpathEncMapUint8IntR, (*Decoder).fastpathDecMapUint8IntR) + fn(map[uint8]int8(nil), (*Encoder).fastpathEncMapUint8Int8R, (*Decoder).fastpathDecMapUint8Int8R) + fn(map[uint8]int16(nil), (*Encoder).fastpathEncMapUint8Int16R, (*Decoder).fastpathDecMapUint8Int16R) + fn(map[uint8]int32(nil), (*Encoder).fastpathEncMapUint8Int32R, (*Decoder).fastpathDecMapUint8Int32R) + fn(map[uint8]int64(nil), (*Encoder).fastpathEncMapUint8Int64R, (*Decoder).fastpathDecMapUint8Int64R) + fn(map[uint8]float32(nil), (*Encoder).fastpathEncMapUint8Float32R, (*Decoder).fastpathDecMapUint8Float32R) + fn(map[uint8]float64(nil), (*Encoder).fastpathEncMapUint8Float64R, (*Decoder).fastpathDecMapUint8Float64R) + fn(map[uint8]bool(nil), (*Encoder).fastpathEncMapUint8BoolR, (*Decoder).fastpathDecMapUint8BoolR) + fn(map[uint16]interface{}(nil), (*Encoder).fastpathEncMapUint16IntfR, (*Decoder).fastpathDecMapUint16IntfR) + fn(map[uint16]string(nil), (*Encoder).fastpathEncMapUint16StringR, (*Decoder).fastpathDecMapUint16StringR) + fn(map[uint16]uint(nil), (*Encoder).fastpathEncMapUint16UintR, (*Decoder).fastpathDecMapUint16UintR) + fn(map[uint16]uint8(nil), (*Encoder).fastpathEncMapUint16Uint8R, (*Decoder).fastpathDecMapUint16Uint8R) + fn(map[uint16]uint16(nil), (*Encoder).fastpathEncMapUint16Uint16R, (*Decoder).fastpathDecMapUint16Uint16R) + fn(map[uint16]uint32(nil), (*Encoder).fastpathEncMapUint16Uint32R, (*Decoder).fastpathDecMapUint16Uint32R) + fn(map[uint16]uint64(nil), (*Encoder).fastpathEncMapUint16Uint64R, (*Decoder).fastpathDecMapUint16Uint64R) + fn(map[uint16]uintptr(nil), (*Encoder).fastpathEncMapUint16UintptrR, (*Decoder).fastpathDecMapUint16UintptrR) + fn(map[uint16]int(nil), (*Encoder).fastpathEncMapUint16IntR, (*Decoder).fastpathDecMapUint16IntR) + fn(map[uint16]int8(nil), (*Encoder).fastpathEncMapUint16Int8R, (*Decoder).fastpathDecMapUint16Int8R) + fn(map[uint16]int16(nil), (*Encoder).fastpathEncMapUint16Int16R, (*Decoder).fastpathDecMapUint16Int16R) + fn(map[uint16]int32(nil), (*Encoder).fastpathEncMapUint16Int32R, (*Decoder).fastpathDecMapUint16Int32R) + fn(map[uint16]int64(nil), (*Encoder).fastpathEncMapUint16Int64R, (*Decoder).fastpathDecMapUint16Int64R) + fn(map[uint16]float32(nil), (*Encoder).fastpathEncMapUint16Float32R, (*Decoder).fastpathDecMapUint16Float32R) + fn(map[uint16]float64(nil), (*Encoder).fastpathEncMapUint16Float64R, (*Decoder).fastpathDecMapUint16Float64R) + fn(map[uint16]bool(nil), (*Encoder).fastpathEncMapUint16BoolR, (*Decoder).fastpathDecMapUint16BoolR) + fn(map[uint32]interface{}(nil), (*Encoder).fastpathEncMapUint32IntfR, (*Decoder).fastpathDecMapUint32IntfR) + fn(map[uint32]string(nil), (*Encoder).fastpathEncMapUint32StringR, (*Decoder).fastpathDecMapUint32StringR) + fn(map[uint32]uint(nil), (*Encoder).fastpathEncMapUint32UintR, (*Decoder).fastpathDecMapUint32UintR) + fn(map[uint32]uint8(nil), (*Encoder).fastpathEncMapUint32Uint8R, (*Decoder).fastpathDecMapUint32Uint8R) + fn(map[uint32]uint16(nil), (*Encoder).fastpathEncMapUint32Uint16R, (*Decoder).fastpathDecMapUint32Uint16R) + fn(map[uint32]uint32(nil), (*Encoder).fastpathEncMapUint32Uint32R, (*Decoder).fastpathDecMapUint32Uint32R) + fn(map[uint32]uint64(nil), (*Encoder).fastpathEncMapUint32Uint64R, (*Decoder).fastpathDecMapUint32Uint64R) + fn(map[uint32]uintptr(nil), (*Encoder).fastpathEncMapUint32UintptrR, (*Decoder).fastpathDecMapUint32UintptrR) + fn(map[uint32]int(nil), (*Encoder).fastpathEncMapUint32IntR, (*Decoder).fastpathDecMapUint32IntR) + fn(map[uint32]int8(nil), (*Encoder).fastpathEncMapUint32Int8R, (*Decoder).fastpathDecMapUint32Int8R) + fn(map[uint32]int16(nil), (*Encoder).fastpathEncMapUint32Int16R, (*Decoder).fastpathDecMapUint32Int16R) + fn(map[uint32]int32(nil), (*Encoder).fastpathEncMapUint32Int32R, (*Decoder).fastpathDecMapUint32Int32R) + fn(map[uint32]int64(nil), (*Encoder).fastpathEncMapUint32Int64R, (*Decoder).fastpathDecMapUint32Int64R) + fn(map[uint32]float32(nil), (*Encoder).fastpathEncMapUint32Float32R, (*Decoder).fastpathDecMapUint32Float32R) + fn(map[uint32]float64(nil), (*Encoder).fastpathEncMapUint32Float64R, (*Decoder).fastpathDecMapUint32Float64R) + fn(map[uint32]bool(nil), (*Encoder).fastpathEncMapUint32BoolR, (*Decoder).fastpathDecMapUint32BoolR) + fn(map[uint64]interface{}(nil), (*Encoder).fastpathEncMapUint64IntfR, (*Decoder).fastpathDecMapUint64IntfR) + fn(map[uint64]string(nil), (*Encoder).fastpathEncMapUint64StringR, (*Decoder).fastpathDecMapUint64StringR) + fn(map[uint64]uint(nil), (*Encoder).fastpathEncMapUint64UintR, (*Decoder).fastpathDecMapUint64UintR) + fn(map[uint64]uint8(nil), (*Encoder).fastpathEncMapUint64Uint8R, (*Decoder).fastpathDecMapUint64Uint8R) + fn(map[uint64]uint16(nil), (*Encoder).fastpathEncMapUint64Uint16R, (*Decoder).fastpathDecMapUint64Uint16R) + fn(map[uint64]uint32(nil), (*Encoder).fastpathEncMapUint64Uint32R, (*Decoder).fastpathDecMapUint64Uint32R) + fn(map[uint64]uint64(nil), (*Encoder).fastpathEncMapUint64Uint64R, (*Decoder).fastpathDecMapUint64Uint64R) + fn(map[uint64]uintptr(nil), (*Encoder).fastpathEncMapUint64UintptrR, (*Decoder).fastpathDecMapUint64UintptrR) + fn(map[uint64]int(nil), (*Encoder).fastpathEncMapUint64IntR, (*Decoder).fastpathDecMapUint64IntR) + fn(map[uint64]int8(nil), (*Encoder).fastpathEncMapUint64Int8R, (*Decoder).fastpathDecMapUint64Int8R) + fn(map[uint64]int16(nil), (*Encoder).fastpathEncMapUint64Int16R, (*Decoder).fastpathDecMapUint64Int16R) + fn(map[uint64]int32(nil), (*Encoder).fastpathEncMapUint64Int32R, (*Decoder).fastpathDecMapUint64Int32R) + fn(map[uint64]int64(nil), (*Encoder).fastpathEncMapUint64Int64R, (*Decoder).fastpathDecMapUint64Int64R) + fn(map[uint64]float32(nil), (*Encoder).fastpathEncMapUint64Float32R, (*Decoder).fastpathDecMapUint64Float32R) + fn(map[uint64]float64(nil), (*Encoder).fastpathEncMapUint64Float64R, (*Decoder).fastpathDecMapUint64Float64R) + fn(map[uint64]bool(nil), (*Encoder).fastpathEncMapUint64BoolR, (*Decoder).fastpathDecMapUint64BoolR) + fn(map[uintptr]interface{}(nil), (*Encoder).fastpathEncMapUintptrIntfR, (*Decoder).fastpathDecMapUintptrIntfR) + fn(map[uintptr]string(nil), (*Encoder).fastpathEncMapUintptrStringR, (*Decoder).fastpathDecMapUintptrStringR) + fn(map[uintptr]uint(nil), (*Encoder).fastpathEncMapUintptrUintR, (*Decoder).fastpathDecMapUintptrUintR) + fn(map[uintptr]uint8(nil), (*Encoder).fastpathEncMapUintptrUint8R, (*Decoder).fastpathDecMapUintptrUint8R) + fn(map[uintptr]uint16(nil), (*Encoder).fastpathEncMapUintptrUint16R, (*Decoder).fastpathDecMapUintptrUint16R) + fn(map[uintptr]uint32(nil), (*Encoder).fastpathEncMapUintptrUint32R, (*Decoder).fastpathDecMapUintptrUint32R) + fn(map[uintptr]uint64(nil), (*Encoder).fastpathEncMapUintptrUint64R, (*Decoder).fastpathDecMapUintptrUint64R) + fn(map[uintptr]uintptr(nil), (*Encoder).fastpathEncMapUintptrUintptrR, (*Decoder).fastpathDecMapUintptrUintptrR) + fn(map[uintptr]int(nil), (*Encoder).fastpathEncMapUintptrIntR, (*Decoder).fastpathDecMapUintptrIntR) + fn(map[uintptr]int8(nil), (*Encoder).fastpathEncMapUintptrInt8R, (*Decoder).fastpathDecMapUintptrInt8R) + fn(map[uintptr]int16(nil), (*Encoder).fastpathEncMapUintptrInt16R, (*Decoder).fastpathDecMapUintptrInt16R) + fn(map[uintptr]int32(nil), (*Encoder).fastpathEncMapUintptrInt32R, (*Decoder).fastpathDecMapUintptrInt32R) + fn(map[uintptr]int64(nil), (*Encoder).fastpathEncMapUintptrInt64R, (*Decoder).fastpathDecMapUintptrInt64R) + fn(map[uintptr]float32(nil), (*Encoder).fastpathEncMapUintptrFloat32R, (*Decoder).fastpathDecMapUintptrFloat32R) + fn(map[uintptr]float64(nil), (*Encoder).fastpathEncMapUintptrFloat64R, (*Decoder).fastpathDecMapUintptrFloat64R) + fn(map[uintptr]bool(nil), (*Encoder).fastpathEncMapUintptrBoolR, (*Decoder).fastpathDecMapUintptrBoolR) + fn(map[int]interface{}(nil), (*Encoder).fastpathEncMapIntIntfR, (*Decoder).fastpathDecMapIntIntfR) + fn(map[int]string(nil), (*Encoder).fastpathEncMapIntStringR, (*Decoder).fastpathDecMapIntStringR) + fn(map[int]uint(nil), (*Encoder).fastpathEncMapIntUintR, (*Decoder).fastpathDecMapIntUintR) + fn(map[int]uint8(nil), (*Encoder).fastpathEncMapIntUint8R, (*Decoder).fastpathDecMapIntUint8R) + fn(map[int]uint16(nil), (*Encoder).fastpathEncMapIntUint16R, (*Decoder).fastpathDecMapIntUint16R) + fn(map[int]uint32(nil), (*Encoder).fastpathEncMapIntUint32R, (*Decoder).fastpathDecMapIntUint32R) + fn(map[int]uint64(nil), (*Encoder).fastpathEncMapIntUint64R, (*Decoder).fastpathDecMapIntUint64R) + fn(map[int]uintptr(nil), (*Encoder).fastpathEncMapIntUintptrR, (*Decoder).fastpathDecMapIntUintptrR) + fn(map[int]int(nil), (*Encoder).fastpathEncMapIntIntR, (*Decoder).fastpathDecMapIntIntR) + fn(map[int]int8(nil), (*Encoder).fastpathEncMapIntInt8R, (*Decoder).fastpathDecMapIntInt8R) + fn(map[int]int16(nil), (*Encoder).fastpathEncMapIntInt16R, (*Decoder).fastpathDecMapIntInt16R) + fn(map[int]int32(nil), (*Encoder).fastpathEncMapIntInt32R, (*Decoder).fastpathDecMapIntInt32R) + fn(map[int]int64(nil), (*Encoder).fastpathEncMapIntInt64R, (*Decoder).fastpathDecMapIntInt64R) + fn(map[int]float32(nil), (*Encoder).fastpathEncMapIntFloat32R, (*Decoder).fastpathDecMapIntFloat32R) + fn(map[int]float64(nil), (*Encoder).fastpathEncMapIntFloat64R, (*Decoder).fastpathDecMapIntFloat64R) + fn(map[int]bool(nil), (*Encoder).fastpathEncMapIntBoolR, (*Decoder).fastpathDecMapIntBoolR) + fn(map[int8]interface{}(nil), (*Encoder).fastpathEncMapInt8IntfR, (*Decoder).fastpathDecMapInt8IntfR) + fn(map[int8]string(nil), (*Encoder).fastpathEncMapInt8StringR, (*Decoder).fastpathDecMapInt8StringR) + fn(map[int8]uint(nil), (*Encoder).fastpathEncMapInt8UintR, (*Decoder).fastpathDecMapInt8UintR) + fn(map[int8]uint8(nil), (*Encoder).fastpathEncMapInt8Uint8R, (*Decoder).fastpathDecMapInt8Uint8R) + fn(map[int8]uint16(nil), (*Encoder).fastpathEncMapInt8Uint16R, (*Decoder).fastpathDecMapInt8Uint16R) + fn(map[int8]uint32(nil), (*Encoder).fastpathEncMapInt8Uint32R, (*Decoder).fastpathDecMapInt8Uint32R) + fn(map[int8]uint64(nil), (*Encoder).fastpathEncMapInt8Uint64R, (*Decoder).fastpathDecMapInt8Uint64R) + fn(map[int8]uintptr(nil), (*Encoder).fastpathEncMapInt8UintptrR, (*Decoder).fastpathDecMapInt8UintptrR) + fn(map[int8]int(nil), (*Encoder).fastpathEncMapInt8IntR, (*Decoder).fastpathDecMapInt8IntR) + fn(map[int8]int8(nil), (*Encoder).fastpathEncMapInt8Int8R, (*Decoder).fastpathDecMapInt8Int8R) + fn(map[int8]int16(nil), (*Encoder).fastpathEncMapInt8Int16R, (*Decoder).fastpathDecMapInt8Int16R) + fn(map[int8]int32(nil), (*Encoder).fastpathEncMapInt8Int32R, (*Decoder).fastpathDecMapInt8Int32R) + fn(map[int8]int64(nil), (*Encoder).fastpathEncMapInt8Int64R, (*Decoder).fastpathDecMapInt8Int64R) + fn(map[int8]float32(nil), (*Encoder).fastpathEncMapInt8Float32R, (*Decoder).fastpathDecMapInt8Float32R) + fn(map[int8]float64(nil), (*Encoder).fastpathEncMapInt8Float64R, (*Decoder).fastpathDecMapInt8Float64R) + fn(map[int8]bool(nil), (*Encoder).fastpathEncMapInt8BoolR, (*Decoder).fastpathDecMapInt8BoolR) + fn(map[int16]interface{}(nil), (*Encoder).fastpathEncMapInt16IntfR, (*Decoder).fastpathDecMapInt16IntfR) + fn(map[int16]string(nil), (*Encoder).fastpathEncMapInt16StringR, (*Decoder).fastpathDecMapInt16StringR) + fn(map[int16]uint(nil), (*Encoder).fastpathEncMapInt16UintR, (*Decoder).fastpathDecMapInt16UintR) + fn(map[int16]uint8(nil), (*Encoder).fastpathEncMapInt16Uint8R, (*Decoder).fastpathDecMapInt16Uint8R) + fn(map[int16]uint16(nil), (*Encoder).fastpathEncMapInt16Uint16R, (*Decoder).fastpathDecMapInt16Uint16R) + fn(map[int16]uint32(nil), (*Encoder).fastpathEncMapInt16Uint32R, (*Decoder).fastpathDecMapInt16Uint32R) + fn(map[int16]uint64(nil), (*Encoder).fastpathEncMapInt16Uint64R, (*Decoder).fastpathDecMapInt16Uint64R) + fn(map[int16]uintptr(nil), (*Encoder).fastpathEncMapInt16UintptrR, (*Decoder).fastpathDecMapInt16UintptrR) + fn(map[int16]int(nil), (*Encoder).fastpathEncMapInt16IntR, (*Decoder).fastpathDecMapInt16IntR) + fn(map[int16]int8(nil), (*Encoder).fastpathEncMapInt16Int8R, (*Decoder).fastpathDecMapInt16Int8R) + fn(map[int16]int16(nil), (*Encoder).fastpathEncMapInt16Int16R, (*Decoder).fastpathDecMapInt16Int16R) + fn(map[int16]int32(nil), (*Encoder).fastpathEncMapInt16Int32R, (*Decoder).fastpathDecMapInt16Int32R) + fn(map[int16]int64(nil), (*Encoder).fastpathEncMapInt16Int64R, (*Decoder).fastpathDecMapInt16Int64R) + fn(map[int16]float32(nil), (*Encoder).fastpathEncMapInt16Float32R, (*Decoder).fastpathDecMapInt16Float32R) + fn(map[int16]float64(nil), (*Encoder).fastpathEncMapInt16Float64R, (*Decoder).fastpathDecMapInt16Float64R) + fn(map[int16]bool(nil), (*Encoder).fastpathEncMapInt16BoolR, (*Decoder).fastpathDecMapInt16BoolR) + fn(map[int32]interface{}(nil), (*Encoder).fastpathEncMapInt32IntfR, (*Decoder).fastpathDecMapInt32IntfR) + fn(map[int32]string(nil), (*Encoder).fastpathEncMapInt32StringR, (*Decoder).fastpathDecMapInt32StringR) + fn(map[int32]uint(nil), (*Encoder).fastpathEncMapInt32UintR, (*Decoder).fastpathDecMapInt32UintR) + fn(map[int32]uint8(nil), (*Encoder).fastpathEncMapInt32Uint8R, (*Decoder).fastpathDecMapInt32Uint8R) + fn(map[int32]uint16(nil), (*Encoder).fastpathEncMapInt32Uint16R, (*Decoder).fastpathDecMapInt32Uint16R) + fn(map[int32]uint32(nil), (*Encoder).fastpathEncMapInt32Uint32R, (*Decoder).fastpathDecMapInt32Uint32R) + fn(map[int32]uint64(nil), (*Encoder).fastpathEncMapInt32Uint64R, (*Decoder).fastpathDecMapInt32Uint64R) + fn(map[int32]uintptr(nil), (*Encoder).fastpathEncMapInt32UintptrR, (*Decoder).fastpathDecMapInt32UintptrR) + fn(map[int32]int(nil), (*Encoder).fastpathEncMapInt32IntR, (*Decoder).fastpathDecMapInt32IntR) + fn(map[int32]int8(nil), (*Encoder).fastpathEncMapInt32Int8R, (*Decoder).fastpathDecMapInt32Int8R) + fn(map[int32]int16(nil), (*Encoder).fastpathEncMapInt32Int16R, (*Decoder).fastpathDecMapInt32Int16R) + fn(map[int32]int32(nil), (*Encoder).fastpathEncMapInt32Int32R, (*Decoder).fastpathDecMapInt32Int32R) + fn(map[int32]int64(nil), (*Encoder).fastpathEncMapInt32Int64R, (*Decoder).fastpathDecMapInt32Int64R) + fn(map[int32]float32(nil), (*Encoder).fastpathEncMapInt32Float32R, (*Decoder).fastpathDecMapInt32Float32R) + fn(map[int32]float64(nil), (*Encoder).fastpathEncMapInt32Float64R, (*Decoder).fastpathDecMapInt32Float64R) + fn(map[int32]bool(nil), (*Encoder).fastpathEncMapInt32BoolR, (*Decoder).fastpathDecMapInt32BoolR) + fn(map[int64]interface{}(nil), (*Encoder).fastpathEncMapInt64IntfR, (*Decoder).fastpathDecMapInt64IntfR) + fn(map[int64]string(nil), (*Encoder).fastpathEncMapInt64StringR, (*Decoder).fastpathDecMapInt64StringR) + fn(map[int64]uint(nil), (*Encoder).fastpathEncMapInt64UintR, (*Decoder).fastpathDecMapInt64UintR) + fn(map[int64]uint8(nil), (*Encoder).fastpathEncMapInt64Uint8R, (*Decoder).fastpathDecMapInt64Uint8R) + fn(map[int64]uint16(nil), (*Encoder).fastpathEncMapInt64Uint16R, (*Decoder).fastpathDecMapInt64Uint16R) + fn(map[int64]uint32(nil), (*Encoder).fastpathEncMapInt64Uint32R, (*Decoder).fastpathDecMapInt64Uint32R) + fn(map[int64]uint64(nil), (*Encoder).fastpathEncMapInt64Uint64R, (*Decoder).fastpathDecMapInt64Uint64R) + fn(map[int64]uintptr(nil), (*Encoder).fastpathEncMapInt64UintptrR, (*Decoder).fastpathDecMapInt64UintptrR) + fn(map[int64]int(nil), (*Encoder).fastpathEncMapInt64IntR, (*Decoder).fastpathDecMapInt64IntR) + fn(map[int64]int8(nil), (*Encoder).fastpathEncMapInt64Int8R, (*Decoder).fastpathDecMapInt64Int8R) + fn(map[int64]int16(nil), (*Encoder).fastpathEncMapInt64Int16R, (*Decoder).fastpathDecMapInt64Int16R) + fn(map[int64]int32(nil), (*Encoder).fastpathEncMapInt64Int32R, (*Decoder).fastpathDecMapInt64Int32R) + fn(map[int64]int64(nil), (*Encoder).fastpathEncMapInt64Int64R, (*Decoder).fastpathDecMapInt64Int64R) + fn(map[int64]float32(nil), (*Encoder).fastpathEncMapInt64Float32R, (*Decoder).fastpathDecMapInt64Float32R) + fn(map[int64]float64(nil), (*Encoder).fastpathEncMapInt64Float64R, (*Decoder).fastpathDecMapInt64Float64R) + fn(map[int64]bool(nil), (*Encoder).fastpathEncMapInt64BoolR, (*Decoder).fastpathDecMapInt64BoolR) + fn(map[bool]interface{}(nil), (*Encoder).fastpathEncMapBoolIntfR, (*Decoder).fastpathDecMapBoolIntfR) + fn(map[bool]string(nil), (*Encoder).fastpathEncMapBoolStringR, (*Decoder).fastpathDecMapBoolStringR) + fn(map[bool]uint(nil), (*Encoder).fastpathEncMapBoolUintR, (*Decoder).fastpathDecMapBoolUintR) + fn(map[bool]uint8(nil), (*Encoder).fastpathEncMapBoolUint8R, (*Decoder).fastpathDecMapBoolUint8R) + fn(map[bool]uint16(nil), (*Encoder).fastpathEncMapBoolUint16R, (*Decoder).fastpathDecMapBoolUint16R) + fn(map[bool]uint32(nil), (*Encoder).fastpathEncMapBoolUint32R, (*Decoder).fastpathDecMapBoolUint32R) + fn(map[bool]uint64(nil), (*Encoder).fastpathEncMapBoolUint64R, (*Decoder).fastpathDecMapBoolUint64R) + fn(map[bool]uintptr(nil), (*Encoder).fastpathEncMapBoolUintptrR, (*Decoder).fastpathDecMapBoolUintptrR) + fn(map[bool]int(nil), (*Encoder).fastpathEncMapBoolIntR, (*Decoder).fastpathDecMapBoolIntR) + fn(map[bool]int8(nil), (*Encoder).fastpathEncMapBoolInt8R, (*Decoder).fastpathDecMapBoolInt8R) + fn(map[bool]int16(nil), (*Encoder).fastpathEncMapBoolInt16R, (*Decoder).fastpathDecMapBoolInt16R) + fn(map[bool]int32(nil), (*Encoder).fastpathEncMapBoolInt32R, (*Decoder).fastpathDecMapBoolInt32R) + fn(map[bool]int64(nil), (*Encoder).fastpathEncMapBoolInt64R, (*Decoder).fastpathDecMapBoolInt64R) + fn(map[bool]float32(nil), (*Encoder).fastpathEncMapBoolFloat32R, (*Decoder).fastpathDecMapBoolFloat32R) + fn(map[bool]float64(nil), (*Encoder).fastpathEncMapBoolFloat64R, (*Decoder).fastpathDecMapBoolFloat64R) + fn(map[bool]bool(nil), (*Encoder).fastpathEncMapBoolBoolR, (*Decoder).fastpathDecMapBoolBoolR) sort.Sort(fastpathAslice(fastpathAV[:])) } @@ -375,1359 +378,1359 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { switch v := iv.(type) { case []interface{}: - fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntfV(v, e) case *[]interface{}: - fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntfV(*v, e) case map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntfV(v, e) case *map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntfV(*v, e) case map[interface{}]string: - fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfStringV(v, e) case *map[interface{}]string: - fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfStringV(*v, e) case map[interface{}]uint: - fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintV(v, e) case *map[interface{}]uint: - fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintV(*v, e) case map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint8V(v, e) case *map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint8V(*v, e) case map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint16V(v, e) case *map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint16V(*v, e) case map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint32V(v, e) case *map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint32V(*v, e) case map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint64V(v, e) case *map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint64V(*v, e) case map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintptrV(v, e) case *map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintptrV(*v, e) case map[interface{}]int: - fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntV(v, e) case *map[interface{}]int: - fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntV(*v, e) case map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt8V(v, e) case *map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt8V(*v, e) case map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt16V(v, e) case *map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt16V(*v, e) case map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt32V(v, e) case *map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt32V(*v, e) case map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt64V(v, e) case *map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt64V(*v, e) case map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat32V(v, e) case *map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat32V(*v, e) case map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat64V(v, e) case *map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat64V(*v, e) case map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfBoolV(v, e) case *map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfBoolV(*v, e) case []string: - fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceStringV(v, e) case *[]string: - fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceStringV(*v, e) case map[string]interface{}: - fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntfV(v, e) case *map[string]interface{}: - fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntfV(*v, e) case map[string]string: - fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringStringV(v, e) case *map[string]string: - fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringStringV(*v, e) case map[string]uint: - fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintV(v, e) case *map[string]uint: - fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintV(*v, e) case map[string]uint8: - fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint8V(v, e) case *map[string]uint8: - fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint8V(*v, e) case map[string]uint16: - fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint16V(v, e) case *map[string]uint16: - fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint16V(*v, e) case map[string]uint32: - fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint32V(v, e) case *map[string]uint32: - fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint32V(*v, e) case map[string]uint64: - fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint64V(v, e) case *map[string]uint64: - fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint64V(*v, e) case map[string]uintptr: - fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintptrV(v, e) case *map[string]uintptr: - fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintptrV(*v, e) case map[string]int: - fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntV(v, e) case *map[string]int: - fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntV(*v, e) case map[string]int8: - fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt8V(v, e) case *map[string]int8: - fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt8V(*v, e) case map[string]int16: - fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt16V(v, e) case *map[string]int16: - fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt16V(*v, e) case map[string]int32: - fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt32V(v, e) case *map[string]int32: - fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt32V(*v, e) case map[string]int64: - fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt64V(v, e) case *map[string]int64: - fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt64V(*v, e) case map[string]float32: - fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat32V(v, e) case *map[string]float32: - fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat32V(*v, e) case map[string]float64: - fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat64V(v, e) case *map[string]float64: - fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat64V(*v, e) case map[string]bool: - fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringBoolV(v, e) case *map[string]bool: - fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringBoolV(*v, e) case []float32: - fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat32V(v, e) case *[]float32: - fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat32V(*v, e) case map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntfV(v, e) case *map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntfV(*v, e) case map[float32]string: - fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32StringV(v, e) case *map[float32]string: - fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32StringV(*v, e) case map[float32]uint: - fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintV(v, e) case *map[float32]uint: - fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintV(*v, e) case map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint8V(v, e) case *map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint8V(*v, e) case map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint16V(v, e) case *map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint16V(*v, e) case map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint32V(v, e) case *map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint32V(*v, e) case map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint64V(v, e) case *map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint64V(*v, e) case map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintptrV(v, e) case *map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintptrV(*v, e) case map[float32]int: - fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntV(v, e) case *map[float32]int: - fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntV(*v, e) case map[float32]int8: - fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int8V(v, e) case *map[float32]int8: - fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int8V(*v, e) case map[float32]int16: - fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int16V(v, e) case *map[float32]int16: - fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int16V(*v, e) case map[float32]int32: - fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int32V(v, e) case *map[float32]int32: - fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int32V(*v, e) case map[float32]int64: - fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int64V(v, e) case *map[float32]int64: - fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int64V(*v, e) case map[float32]float32: - fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float32V(v, e) case *map[float32]float32: - fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float32V(*v, e) case map[float32]float64: - fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float64V(v, e) case *map[float32]float64: - fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float64V(*v, e) case map[float32]bool: - fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32BoolV(v, e) case *map[float32]bool: - fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32BoolV(*v, e) case []float64: - fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat64V(v, e) case *[]float64: - fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat64V(*v, e) case map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntfV(v, e) case *map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntfV(*v, e) case map[float64]string: - fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64StringV(v, e) case *map[float64]string: - fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64StringV(*v, e) case map[float64]uint: - fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintV(v, e) case *map[float64]uint: - fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintV(*v, e) case map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint8V(v, e) case *map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint8V(*v, e) case map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint16V(v, e) case *map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint16V(*v, e) case map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint32V(v, e) case *map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint32V(*v, e) case map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint64V(v, e) case *map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint64V(*v, e) case map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintptrV(v, e) case *map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintptrV(*v, e) case map[float64]int: - fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntV(v, e) case *map[float64]int: - fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntV(*v, e) case map[float64]int8: - fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int8V(v, e) case *map[float64]int8: - fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int8V(*v, e) case map[float64]int16: - fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int16V(v, e) case *map[float64]int16: - fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int16V(*v, e) case map[float64]int32: - fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int32V(v, e) case *map[float64]int32: - fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int32V(*v, e) case map[float64]int64: - fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int64V(v, e) case *map[float64]int64: - fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int64V(*v, e) case map[float64]float32: - fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float32V(v, e) case *map[float64]float32: - fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float32V(*v, e) case map[float64]float64: - fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float64V(v, e) case *map[float64]float64: - fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float64V(*v, e) case map[float64]bool: - fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64BoolV(v, e) case *map[float64]bool: - fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64BoolV(*v, e) case []uint: - fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintV(v, e) case *[]uint: - fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintV(*v, e) case map[uint]interface{}: - fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntfV(v, e) case *map[uint]interface{}: - fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntfV(*v, e) case map[uint]string: - fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintStringV(v, e) case *map[uint]string: - fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintStringV(*v, e) case map[uint]uint: - fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintV(v, e) case *map[uint]uint: - fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintV(*v, e) case map[uint]uint8: - fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint8V(v, e) case *map[uint]uint8: - fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint8V(*v, e) case map[uint]uint16: - fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint16V(v, e) case *map[uint]uint16: - fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint16V(*v, e) case map[uint]uint32: - fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint32V(v, e) case *map[uint]uint32: - fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint32V(*v, e) case map[uint]uint64: - fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint64V(v, e) case *map[uint]uint64: - fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint64V(*v, e) case map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintptrV(v, e) case *map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintptrV(*v, e) case map[uint]int: - fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntV(v, e) case *map[uint]int: - fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntV(*v, e) case map[uint]int8: - fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt8V(v, e) case *map[uint]int8: - fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt8V(*v, e) case map[uint]int16: - fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt16V(v, e) case *map[uint]int16: - fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt16V(*v, e) case map[uint]int32: - fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt32V(v, e) case *map[uint]int32: - fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt32V(*v, e) case map[uint]int64: - fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt64V(v, e) case *map[uint]int64: - fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt64V(*v, e) case map[uint]float32: - fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat32V(v, e) case *map[uint]float32: - fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat32V(*v, e) case map[uint]float64: - fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat64V(v, e) case *map[uint]float64: - fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat64V(*v, e) case map[uint]bool: - fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintBoolV(v, e) case *map[uint]bool: - fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintBoolV(*v, e) case map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntfV(v, e) case *map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntfV(*v, e) case map[uint8]string: - fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8StringV(v, e) case *map[uint8]string: - fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8StringV(*v, e) case map[uint8]uint: - fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintV(v, e) case *map[uint8]uint: - fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintV(*v, e) case map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint8V(v, e) case *map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint8V(*v, e) case map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint16V(v, e) case *map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint16V(*v, e) case map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint32V(v, e) case *map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint32V(*v, e) case map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint64V(v, e) case *map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint64V(*v, e) case map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintptrV(v, e) case *map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintptrV(*v, e) case map[uint8]int: - fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntV(v, e) case *map[uint8]int: - fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntV(*v, e) case map[uint8]int8: - fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int8V(v, e) case *map[uint8]int8: - fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int8V(*v, e) case map[uint8]int16: - fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int16V(v, e) case *map[uint8]int16: - fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int16V(*v, e) case map[uint8]int32: - fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int32V(v, e) case *map[uint8]int32: - fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int32V(*v, e) case map[uint8]int64: - fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int64V(v, e) case *map[uint8]int64: - fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int64V(*v, e) case map[uint8]float32: - fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float32V(v, e) case *map[uint8]float32: - fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float32V(*v, e) case map[uint8]float64: - fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float64V(v, e) case *map[uint8]float64: - fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float64V(*v, e) case map[uint8]bool: - fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8BoolV(v, e) case *map[uint8]bool: - fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8BoolV(*v, e) case []uint16: - fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint16V(v, e) case *[]uint16: - fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint16V(*v, e) case map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntfV(v, e) case *map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntfV(*v, e) case map[uint16]string: - fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16StringV(v, e) case *map[uint16]string: - fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16StringV(*v, e) case map[uint16]uint: - fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintV(v, e) case *map[uint16]uint: - fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintV(*v, e) case map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint8V(v, e) case *map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint8V(*v, e) case map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint16V(v, e) case *map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint16V(*v, e) case map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint32V(v, e) case *map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint32V(*v, e) case map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint64V(v, e) case *map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint64V(*v, e) case map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintptrV(v, e) case *map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintptrV(*v, e) case map[uint16]int: - fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntV(v, e) case *map[uint16]int: - fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntV(*v, e) case map[uint16]int8: - fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int8V(v, e) case *map[uint16]int8: - fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int8V(*v, e) case map[uint16]int16: - fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int16V(v, e) case *map[uint16]int16: - fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int16V(*v, e) case map[uint16]int32: - fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int32V(v, e) case *map[uint16]int32: - fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int32V(*v, e) case map[uint16]int64: - fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int64V(v, e) case *map[uint16]int64: - fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int64V(*v, e) case map[uint16]float32: - fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float32V(v, e) case *map[uint16]float32: - fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float32V(*v, e) case map[uint16]float64: - fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float64V(v, e) case *map[uint16]float64: - fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float64V(*v, e) case map[uint16]bool: - fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16BoolV(v, e) case *map[uint16]bool: - fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16BoolV(*v, e) case []uint32: - fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint32V(v, e) case *[]uint32: - fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint32V(*v, e) case map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntfV(v, e) case *map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntfV(*v, e) case map[uint32]string: - fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32StringV(v, e) case *map[uint32]string: - fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32StringV(*v, e) case map[uint32]uint: - fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintV(v, e) case *map[uint32]uint: - fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintV(*v, e) case map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint8V(v, e) case *map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint8V(*v, e) case map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint16V(v, e) case *map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint16V(*v, e) case map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint32V(v, e) case *map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint32V(*v, e) case map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint64V(v, e) case *map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint64V(*v, e) case map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintptrV(v, e) case *map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintptrV(*v, e) case map[uint32]int: - fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntV(v, e) case *map[uint32]int: - fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntV(*v, e) case map[uint32]int8: - fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int8V(v, e) case *map[uint32]int8: - fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int8V(*v, e) case map[uint32]int16: - fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int16V(v, e) case *map[uint32]int16: - fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int16V(*v, e) case map[uint32]int32: - fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int32V(v, e) case *map[uint32]int32: - fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int32V(*v, e) case map[uint32]int64: - fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int64V(v, e) case *map[uint32]int64: - fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int64V(*v, e) case map[uint32]float32: - fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float32V(v, e) case *map[uint32]float32: - fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float32V(*v, e) case map[uint32]float64: - fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float64V(v, e) case *map[uint32]float64: - fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float64V(*v, e) case map[uint32]bool: - fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32BoolV(v, e) case *map[uint32]bool: - fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32BoolV(*v, e) case []uint64: - fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint64V(v, e) case *[]uint64: - fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint64V(*v, e) case map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntfV(v, e) case *map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntfV(*v, e) case map[uint64]string: - fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64StringV(v, e) case *map[uint64]string: - fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64StringV(*v, e) case map[uint64]uint: - fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintV(v, e) case *map[uint64]uint: - fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintV(*v, e) case map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint8V(v, e) case *map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint8V(*v, e) case map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint16V(v, e) case *map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint16V(*v, e) case map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint32V(v, e) case *map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint32V(*v, e) case map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint64V(v, e) case *map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint64V(*v, e) case map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintptrV(v, e) case *map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintptrV(*v, e) case map[uint64]int: - fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntV(v, e) case *map[uint64]int: - fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntV(*v, e) case map[uint64]int8: - fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int8V(v, e) case *map[uint64]int8: - fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int8V(*v, e) case map[uint64]int16: - fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int16V(v, e) case *map[uint64]int16: - fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int16V(*v, e) case map[uint64]int32: - fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int32V(v, e) case *map[uint64]int32: - fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int32V(*v, e) case map[uint64]int64: - fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int64V(v, e) case *map[uint64]int64: - fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int64V(*v, e) case map[uint64]float32: - fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float32V(v, e) case *map[uint64]float32: - fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float32V(*v, e) case map[uint64]float64: - fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float64V(v, e) case *map[uint64]float64: - fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float64V(*v, e) case map[uint64]bool: - fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64BoolV(v, e) case *map[uint64]bool: - fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64BoolV(*v, e) case []uintptr: - fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintptrV(v, e) case *[]uintptr: - fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintptrV(*v, e) case map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntfV(v, e) case *map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntfV(*v, e) case map[uintptr]string: - fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrStringV(v, e) case *map[uintptr]string: - fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrStringV(*v, e) case map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintV(v, e) case *map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintV(*v, e) case map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint8V(v, e) case *map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint8V(*v, e) case map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint16V(v, e) case *map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint16V(*v, e) case map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint32V(v, e) case *map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint32V(*v, e) case map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint64V(v, e) case *map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint64V(*v, e) case map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintptrV(v, e) case *map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintptrV(*v, e) case map[uintptr]int: - fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntV(v, e) case *map[uintptr]int: - fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntV(*v, e) case map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt8V(v, e) case *map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt8V(*v, e) case map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt16V(v, e) case *map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt16V(*v, e) case map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt32V(v, e) case *map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt32V(*v, e) case map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt64V(v, e) case *map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt64V(*v, e) case map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat32V(v, e) case *map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat32V(*v, e) case map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat64V(v, e) case *map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat64V(*v, e) case map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrBoolV(v, e) case *map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrBoolV(*v, e) case []int: - fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntV(v, e) case *[]int: - fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntV(*v, e) case map[int]interface{}: - fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntfV(v, e) case *map[int]interface{}: - fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntfV(*v, e) case map[int]string: - fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntStringV(v, e) case *map[int]string: - fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntStringV(*v, e) case map[int]uint: - fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintV(v, e) case *map[int]uint: - fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintV(*v, e) case map[int]uint8: - fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint8V(v, e) case *map[int]uint8: - fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint8V(*v, e) case map[int]uint16: - fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint16V(v, e) case *map[int]uint16: - fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint16V(*v, e) case map[int]uint32: - fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint32V(v, e) case *map[int]uint32: - fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint32V(*v, e) case map[int]uint64: - fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint64V(v, e) case *map[int]uint64: - fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint64V(*v, e) case map[int]uintptr: - fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintptrV(v, e) case *map[int]uintptr: - fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintptrV(*v, e) case map[int]int: - fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntV(v, e) case *map[int]int: - fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntV(*v, e) case map[int]int8: - fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt8V(v, e) case *map[int]int8: - fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt8V(*v, e) case map[int]int16: - fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt16V(v, e) case *map[int]int16: - fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt16V(*v, e) case map[int]int32: - fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt32V(v, e) case *map[int]int32: - fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt32V(*v, e) case map[int]int64: - fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt64V(v, e) case *map[int]int64: - fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt64V(*v, e) case map[int]float32: - fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat32V(v, e) case *map[int]float32: - fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat32V(*v, e) case map[int]float64: - fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat64V(v, e) case *map[int]float64: - fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat64V(*v, e) case map[int]bool: - fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntBoolV(v, e) case *map[int]bool: - fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntBoolV(*v, e) case []int8: - fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt8V(v, e) case *[]int8: - fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt8V(*v, e) case map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntfV(v, e) case *map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntfV(*v, e) case map[int8]string: - fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8StringV(v, e) case *map[int8]string: - fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8StringV(*v, e) case map[int8]uint: - fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintV(v, e) case *map[int8]uint: - fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintV(*v, e) case map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint8V(v, e) case *map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint8V(*v, e) case map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint16V(v, e) case *map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint16V(*v, e) case map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint32V(v, e) case *map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint32V(*v, e) case map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint64V(v, e) case *map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint64V(*v, e) case map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintptrV(v, e) case *map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintptrV(*v, e) case map[int8]int: - fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntV(v, e) case *map[int8]int: - fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntV(*v, e) case map[int8]int8: - fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int8V(v, e) case *map[int8]int8: - fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int8V(*v, e) case map[int8]int16: - fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int16V(v, e) case *map[int8]int16: - fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int16V(*v, e) case map[int8]int32: - fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int32V(v, e) case *map[int8]int32: - fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int32V(*v, e) case map[int8]int64: - fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int64V(v, e) case *map[int8]int64: - fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int64V(*v, e) case map[int8]float32: - fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float32V(v, e) case *map[int8]float32: - fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float32V(*v, e) case map[int8]float64: - fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float64V(v, e) case *map[int8]float64: - fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float64V(*v, e) case map[int8]bool: - fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8BoolV(v, e) case *map[int8]bool: - fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8BoolV(*v, e) case []int16: - fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt16V(v, e) case *[]int16: - fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt16V(*v, e) case map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntfV(v, e) case *map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntfV(*v, e) case map[int16]string: - fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16StringV(v, e) case *map[int16]string: - fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16StringV(*v, e) case map[int16]uint: - fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintV(v, e) case *map[int16]uint: - fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintV(*v, e) case map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint8V(v, e) case *map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint8V(*v, e) case map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint16V(v, e) case *map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint16V(*v, e) case map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint32V(v, e) case *map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint32V(*v, e) case map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint64V(v, e) case *map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint64V(*v, e) case map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintptrV(v, e) case *map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintptrV(*v, e) case map[int16]int: - fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntV(v, e) case *map[int16]int: - fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntV(*v, e) case map[int16]int8: - fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int8V(v, e) case *map[int16]int8: - fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int8V(*v, e) case map[int16]int16: - fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int16V(v, e) case *map[int16]int16: - fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int16V(*v, e) case map[int16]int32: - fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int32V(v, e) case *map[int16]int32: - fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int32V(*v, e) case map[int16]int64: - fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int64V(v, e) case *map[int16]int64: - fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int64V(*v, e) case map[int16]float32: - fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float32V(v, e) case *map[int16]float32: - fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float32V(*v, e) case map[int16]float64: - fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float64V(v, e) case *map[int16]float64: - fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float64V(*v, e) case map[int16]bool: - fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16BoolV(v, e) case *map[int16]bool: - fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16BoolV(*v, e) case []int32: - fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt32V(v, e) case *[]int32: - fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt32V(*v, e) case map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntfV(v, e) case *map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntfV(*v, e) case map[int32]string: - fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32StringV(v, e) case *map[int32]string: - fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32StringV(*v, e) case map[int32]uint: - fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintV(v, e) case *map[int32]uint: - fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintV(*v, e) case map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint8V(v, e) case *map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint8V(*v, e) case map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint16V(v, e) case *map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint16V(*v, e) case map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint32V(v, e) case *map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint32V(*v, e) case map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint64V(v, e) case *map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint64V(*v, e) case map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintptrV(v, e) case *map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintptrV(*v, e) case map[int32]int: - fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntV(v, e) case *map[int32]int: - fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntV(*v, e) case map[int32]int8: - fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int8V(v, e) case *map[int32]int8: - fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int8V(*v, e) case map[int32]int16: - fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int16V(v, e) case *map[int32]int16: - fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int16V(*v, e) case map[int32]int32: - fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int32V(v, e) case *map[int32]int32: - fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int32V(*v, e) case map[int32]int64: - fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int64V(v, e) case *map[int32]int64: - fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int64V(*v, e) case map[int32]float32: - fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float32V(v, e) case *map[int32]float32: - fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float32V(*v, e) case map[int32]float64: - fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float64V(v, e) case *map[int32]float64: - fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float64V(*v, e) case map[int32]bool: - fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32BoolV(v, e) case *map[int32]bool: - fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32BoolV(*v, e) case []int64: - fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt64V(v, e) case *[]int64: - fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt64V(*v, e) case map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntfV(v, e) case *map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntfV(*v, e) case map[int64]string: - fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64StringV(v, e) case *map[int64]string: - fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64StringV(*v, e) case map[int64]uint: - fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintV(v, e) case *map[int64]uint: - fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintV(*v, e) case map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint8V(v, e) case *map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint8V(*v, e) case map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint16V(v, e) case *map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint16V(*v, e) case map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint32V(v, e) case *map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint32V(*v, e) case map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint64V(v, e) case *map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint64V(*v, e) case map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintptrV(v, e) case *map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintptrV(*v, e) case map[int64]int: - fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntV(v, e) case *map[int64]int: - fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntV(*v, e) case map[int64]int8: - fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int8V(v, e) case *map[int64]int8: - fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int8V(*v, e) case map[int64]int16: - fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int16V(v, e) case *map[int64]int16: - fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int16V(*v, e) case map[int64]int32: - fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int32V(v, e) case *map[int64]int32: - fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int32V(*v, e) case map[int64]int64: - fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int64V(v, e) case *map[int64]int64: - fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int64V(*v, e) case map[int64]float32: - fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float32V(v, e) case *map[int64]float32: - fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float32V(*v, e) case map[int64]float64: - fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float64V(v, e) case *map[int64]float64: - fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float64V(*v, e) case map[int64]bool: - fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64BoolV(v, e) case *map[int64]bool: - fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64BoolV(*v, e) case []bool: - fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceBoolV(v, e) case *[]bool: - fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceBoolV(*v, e) case map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntfV(v, e) case *map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntfV(*v, e) case map[bool]string: - fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolStringV(v, e) case *map[bool]string: - fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolStringV(*v, e) case map[bool]uint: - fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintV(v, e) case *map[bool]uint: - fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintV(*v, e) case map[bool]uint8: - fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint8V(v, e) case *map[bool]uint8: - fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint8V(*v, e) case map[bool]uint16: - fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint16V(v, e) case *map[bool]uint16: - fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint16V(*v, e) case map[bool]uint32: - fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint32V(v, e) case *map[bool]uint32: - fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint32V(*v, e) case map[bool]uint64: - fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint64V(v, e) case *map[bool]uint64: - fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint64V(*v, e) case map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintptrV(v, e) case *map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintptrV(*v, e) case map[bool]int: - fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntV(v, e) case *map[bool]int: - fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntV(*v, e) case map[bool]int8: - fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt8V(v, e) case *map[bool]int8: - fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt8V(*v, e) case map[bool]int16: - fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt16V(v, e) case *map[bool]int16: - fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt16V(*v, e) case map[bool]int32: - fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt32V(v, e) case *map[bool]int32: - fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt32V(*v, e) case map[bool]int64: - fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt64V(v, e) case *map[bool]int64: - fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt64V(*v, e) case map[bool]float32: - fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat32V(v, e) case *map[bool]float32: - fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat32V(*v, e) case map[bool]float64: - fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat64V(v, e) case *map[bool]float64: - fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat64V(*v, e) case map[bool]bool: - fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolBoolV(v, e) case *map[bool]bool: - fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolBoolV(*v, e) default: _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) @@ -1740,79 +1743,79 @@ func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { switch v := iv.(type) { case []interface{}: - fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntfV(v, e) case *[]interface{}: - fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntfV(*v, e) case []string: - fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceStringV(v, e) case *[]string: - fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceStringV(*v, e) case []float32: - fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat32V(v, e) case *[]float32: - fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat32V(*v, e) case []float64: - fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat64V(v, e) case *[]float64: - fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceFloat64V(*v, e) case []uint: - fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintV(v, e) case *[]uint: - fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintV(*v, e) case []uint16: - fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint16V(v, e) case *[]uint16: - fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint16V(*v, e) case []uint32: - fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint32V(v, e) case *[]uint32: - fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint32V(*v, e) case []uint64: - fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint64V(v, e) case *[]uint64: - fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUint64V(*v, e) case []uintptr: - fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintptrV(v, e) case *[]uintptr: - fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceUintptrV(*v, e) case []int: - fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntV(v, e) case *[]int: - fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceIntV(*v, e) case []int8: - fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt8V(v, e) case *[]int8: - fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt8V(*v, e) case []int16: - fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt16V(v, e) case *[]int16: - fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt16V(*v, e) case []int32: - fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt32V(v, e) case *[]int32: - fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt32V(*v, e) case []int64: - fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt64V(v, e) case *[]int64: - fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceInt64V(*v, e) case []bool: - fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceBoolV(v, e) case *[]bool: - fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncSliceBoolV(*v, e) default: _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) @@ -1825,1284 +1828,1284 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { switch v := iv.(type) { case map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntfV(v, e) case *map[interface{}]interface{}: - fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntfV(*v, e) case map[interface{}]string: - fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfStringV(v, e) case *map[interface{}]string: - fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfStringV(*v, e) case map[interface{}]uint: - fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintV(v, e) case *map[interface{}]uint: - fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintV(*v, e) case map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint8V(v, e) case *map[interface{}]uint8: - fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint8V(*v, e) case map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint16V(v, e) case *map[interface{}]uint16: - fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint16V(*v, e) case map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint32V(v, e) case *map[interface{}]uint32: - fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint32V(*v, e) case map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint64V(v, e) case *map[interface{}]uint64: - fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUint64V(*v, e) case map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintptrV(v, e) case *map[interface{}]uintptr: - fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfUintptrV(*v, e) case map[interface{}]int: - fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntV(v, e) case *map[interface{}]int: - fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfIntV(*v, e) case map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt8V(v, e) case *map[interface{}]int8: - fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt8V(*v, e) case map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt16V(v, e) case *map[interface{}]int16: - fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt16V(*v, e) case map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt32V(v, e) case *map[interface{}]int32: - fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt32V(*v, e) case map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt64V(v, e) case *map[interface{}]int64: - fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfInt64V(*v, e) case map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat32V(v, e) case *map[interface{}]float32: - fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat32V(*v, e) case map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat64V(v, e) case *map[interface{}]float64: - fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfFloat64V(*v, e) case map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfBoolV(v, e) case *map[interface{}]bool: - fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntfBoolV(*v, e) case map[string]interface{}: - fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntfV(v, e) case *map[string]interface{}: - fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntfV(*v, e) case map[string]string: - fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringStringV(v, e) case *map[string]string: - fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringStringV(*v, e) case map[string]uint: - fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintV(v, e) case *map[string]uint: - fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintV(*v, e) case map[string]uint8: - fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint8V(v, e) case *map[string]uint8: - fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint8V(*v, e) case map[string]uint16: - fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint16V(v, e) case *map[string]uint16: - fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint16V(*v, e) case map[string]uint32: - fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint32V(v, e) case *map[string]uint32: - fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint32V(*v, e) case map[string]uint64: - fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint64V(v, e) case *map[string]uint64: - fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUint64V(*v, e) case map[string]uintptr: - fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintptrV(v, e) case *map[string]uintptr: - fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringUintptrV(*v, e) case map[string]int: - fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntV(v, e) case *map[string]int: - fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringIntV(*v, e) case map[string]int8: - fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt8V(v, e) case *map[string]int8: - fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt8V(*v, e) case map[string]int16: - fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt16V(v, e) case *map[string]int16: - fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt16V(*v, e) case map[string]int32: - fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt32V(v, e) case *map[string]int32: - fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt32V(*v, e) case map[string]int64: - fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt64V(v, e) case *map[string]int64: - fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringInt64V(*v, e) case map[string]float32: - fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat32V(v, e) case *map[string]float32: - fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat32V(*v, e) case map[string]float64: - fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat64V(v, e) case *map[string]float64: - fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringFloat64V(*v, e) case map[string]bool: - fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringBoolV(v, e) case *map[string]bool: - fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapStringBoolV(*v, e) case map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntfV(v, e) case *map[float32]interface{}: - fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntfV(*v, e) case map[float32]string: - fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32StringV(v, e) case *map[float32]string: - fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32StringV(*v, e) case map[float32]uint: - fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintV(v, e) case *map[float32]uint: - fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintV(*v, e) case map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint8V(v, e) case *map[float32]uint8: - fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint8V(*v, e) case map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint16V(v, e) case *map[float32]uint16: - fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint16V(*v, e) case map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint32V(v, e) case *map[float32]uint32: - fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint32V(*v, e) case map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint64V(v, e) case *map[float32]uint64: - fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Uint64V(*v, e) case map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintptrV(v, e) case *map[float32]uintptr: - fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32UintptrV(*v, e) case map[float32]int: - fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntV(v, e) case *map[float32]int: - fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32IntV(*v, e) case map[float32]int8: - fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int8V(v, e) case *map[float32]int8: - fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int8V(*v, e) case map[float32]int16: - fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int16V(v, e) case *map[float32]int16: - fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int16V(*v, e) case map[float32]int32: - fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int32V(v, e) case *map[float32]int32: - fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int32V(*v, e) case map[float32]int64: - fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int64V(v, e) case *map[float32]int64: - fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Int64V(*v, e) case map[float32]float32: - fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float32V(v, e) case *map[float32]float32: - fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float32V(*v, e) case map[float32]float64: - fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float64V(v, e) case *map[float32]float64: - fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32Float64V(*v, e) case map[float32]bool: - fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32BoolV(v, e) case *map[float32]bool: - fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat32BoolV(*v, e) case map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntfV(v, e) case *map[float64]interface{}: - fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntfV(*v, e) case map[float64]string: - fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64StringV(v, e) case *map[float64]string: - fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64StringV(*v, e) case map[float64]uint: - fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintV(v, e) case *map[float64]uint: - fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintV(*v, e) case map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint8V(v, e) case *map[float64]uint8: - fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint8V(*v, e) case map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint16V(v, e) case *map[float64]uint16: - fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint16V(*v, e) case map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint32V(v, e) case *map[float64]uint32: - fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint32V(*v, e) case map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint64V(v, e) case *map[float64]uint64: - fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Uint64V(*v, e) case map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintptrV(v, e) case *map[float64]uintptr: - fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64UintptrV(*v, e) case map[float64]int: - fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntV(v, e) case *map[float64]int: - fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64IntV(*v, e) case map[float64]int8: - fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int8V(v, e) case *map[float64]int8: - fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int8V(*v, e) case map[float64]int16: - fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int16V(v, e) case *map[float64]int16: - fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int16V(*v, e) case map[float64]int32: - fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int32V(v, e) case *map[float64]int32: - fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int32V(*v, e) case map[float64]int64: - fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int64V(v, e) case *map[float64]int64: - fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Int64V(*v, e) case map[float64]float32: - fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float32V(v, e) case *map[float64]float32: - fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float32V(*v, e) case map[float64]float64: - fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float64V(v, e) case *map[float64]float64: - fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64Float64V(*v, e) case map[float64]bool: - fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64BoolV(v, e) case *map[float64]bool: - fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapFloat64BoolV(*v, e) case map[uint]interface{}: - fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntfV(v, e) case *map[uint]interface{}: - fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntfV(*v, e) case map[uint]string: - fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintStringV(v, e) case *map[uint]string: - fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintStringV(*v, e) case map[uint]uint: - fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintV(v, e) case *map[uint]uint: - fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintV(*v, e) case map[uint]uint8: - fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint8V(v, e) case *map[uint]uint8: - fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint8V(*v, e) case map[uint]uint16: - fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint16V(v, e) case *map[uint]uint16: - fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint16V(*v, e) case map[uint]uint32: - fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint32V(v, e) case *map[uint]uint32: - fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint32V(*v, e) case map[uint]uint64: - fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint64V(v, e) case *map[uint]uint64: - fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUint64V(*v, e) case map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintptrV(v, e) case *map[uint]uintptr: - fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintUintptrV(*v, e) case map[uint]int: - fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntV(v, e) case *map[uint]int: - fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintIntV(*v, e) case map[uint]int8: - fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt8V(v, e) case *map[uint]int8: - fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt8V(*v, e) case map[uint]int16: - fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt16V(v, e) case *map[uint]int16: - fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt16V(*v, e) case map[uint]int32: - fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt32V(v, e) case *map[uint]int32: - fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt32V(*v, e) case map[uint]int64: - fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt64V(v, e) case *map[uint]int64: - fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintInt64V(*v, e) case map[uint]float32: - fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat32V(v, e) case *map[uint]float32: - fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat32V(*v, e) case map[uint]float64: - fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat64V(v, e) case *map[uint]float64: - fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintFloat64V(*v, e) case map[uint]bool: - fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintBoolV(v, e) case *map[uint]bool: - fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintBoolV(*v, e) case map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntfV(v, e) case *map[uint8]interface{}: - fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntfV(*v, e) case map[uint8]string: - fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8StringV(v, e) case *map[uint8]string: - fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8StringV(*v, e) case map[uint8]uint: - fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintV(v, e) case *map[uint8]uint: - fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintV(*v, e) case map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint8V(v, e) case *map[uint8]uint8: - fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint8V(*v, e) case map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint16V(v, e) case *map[uint8]uint16: - fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint16V(*v, e) case map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint32V(v, e) case *map[uint8]uint32: - fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint32V(*v, e) case map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint64V(v, e) case *map[uint8]uint64: - fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Uint64V(*v, e) case map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintptrV(v, e) case *map[uint8]uintptr: - fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8UintptrV(*v, e) case map[uint8]int: - fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntV(v, e) case *map[uint8]int: - fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8IntV(*v, e) case map[uint8]int8: - fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int8V(v, e) case *map[uint8]int8: - fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int8V(*v, e) case map[uint8]int16: - fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int16V(v, e) case *map[uint8]int16: - fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int16V(*v, e) case map[uint8]int32: - fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int32V(v, e) case *map[uint8]int32: - fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int32V(*v, e) case map[uint8]int64: - fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int64V(v, e) case *map[uint8]int64: - fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Int64V(*v, e) case map[uint8]float32: - fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float32V(v, e) case *map[uint8]float32: - fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float32V(*v, e) case map[uint8]float64: - fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float64V(v, e) case *map[uint8]float64: - fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8Float64V(*v, e) case map[uint8]bool: - fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8BoolV(v, e) case *map[uint8]bool: - fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint8BoolV(*v, e) case map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntfV(v, e) case *map[uint16]interface{}: - fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntfV(*v, e) case map[uint16]string: - fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16StringV(v, e) case *map[uint16]string: - fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16StringV(*v, e) case map[uint16]uint: - fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintV(v, e) case *map[uint16]uint: - fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintV(*v, e) case map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint8V(v, e) case *map[uint16]uint8: - fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint8V(*v, e) case map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint16V(v, e) case *map[uint16]uint16: - fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint16V(*v, e) case map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint32V(v, e) case *map[uint16]uint32: - fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint32V(*v, e) case map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint64V(v, e) case *map[uint16]uint64: - fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Uint64V(*v, e) case map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintptrV(v, e) case *map[uint16]uintptr: - fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16UintptrV(*v, e) case map[uint16]int: - fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntV(v, e) case *map[uint16]int: - fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16IntV(*v, e) case map[uint16]int8: - fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int8V(v, e) case *map[uint16]int8: - fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int8V(*v, e) case map[uint16]int16: - fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int16V(v, e) case *map[uint16]int16: - fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int16V(*v, e) case map[uint16]int32: - fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int32V(v, e) case *map[uint16]int32: - fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int32V(*v, e) case map[uint16]int64: - fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int64V(v, e) case *map[uint16]int64: - fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Int64V(*v, e) case map[uint16]float32: - fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float32V(v, e) case *map[uint16]float32: - fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float32V(*v, e) case map[uint16]float64: - fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float64V(v, e) case *map[uint16]float64: - fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16Float64V(*v, e) case map[uint16]bool: - fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16BoolV(v, e) case *map[uint16]bool: - fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint16BoolV(*v, e) case map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntfV(v, e) case *map[uint32]interface{}: - fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntfV(*v, e) case map[uint32]string: - fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32StringV(v, e) case *map[uint32]string: - fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32StringV(*v, e) case map[uint32]uint: - fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintV(v, e) case *map[uint32]uint: - fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintV(*v, e) case map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint8V(v, e) case *map[uint32]uint8: - fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint8V(*v, e) case map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint16V(v, e) case *map[uint32]uint16: - fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint16V(*v, e) case map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint32V(v, e) case *map[uint32]uint32: - fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint32V(*v, e) case map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint64V(v, e) case *map[uint32]uint64: - fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Uint64V(*v, e) case map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintptrV(v, e) case *map[uint32]uintptr: - fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32UintptrV(*v, e) case map[uint32]int: - fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntV(v, e) case *map[uint32]int: - fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32IntV(*v, e) case map[uint32]int8: - fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int8V(v, e) case *map[uint32]int8: - fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int8V(*v, e) case map[uint32]int16: - fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int16V(v, e) case *map[uint32]int16: - fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int16V(*v, e) case map[uint32]int32: - fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int32V(v, e) case *map[uint32]int32: - fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int32V(*v, e) case map[uint32]int64: - fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int64V(v, e) case *map[uint32]int64: - fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Int64V(*v, e) case map[uint32]float32: - fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float32V(v, e) case *map[uint32]float32: - fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float32V(*v, e) case map[uint32]float64: - fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float64V(v, e) case *map[uint32]float64: - fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32Float64V(*v, e) case map[uint32]bool: - fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32BoolV(v, e) case *map[uint32]bool: - fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint32BoolV(*v, e) case map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntfV(v, e) case *map[uint64]interface{}: - fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntfV(*v, e) case map[uint64]string: - fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64StringV(v, e) case *map[uint64]string: - fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64StringV(*v, e) case map[uint64]uint: - fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintV(v, e) case *map[uint64]uint: - fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintV(*v, e) case map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint8V(v, e) case *map[uint64]uint8: - fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint8V(*v, e) case map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint16V(v, e) case *map[uint64]uint16: - fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint16V(*v, e) case map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint32V(v, e) case *map[uint64]uint32: - fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint32V(*v, e) case map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint64V(v, e) case *map[uint64]uint64: - fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Uint64V(*v, e) case map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintptrV(v, e) case *map[uint64]uintptr: - fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64UintptrV(*v, e) case map[uint64]int: - fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntV(v, e) case *map[uint64]int: - fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64IntV(*v, e) case map[uint64]int8: - fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int8V(v, e) case *map[uint64]int8: - fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int8V(*v, e) case map[uint64]int16: - fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int16V(v, e) case *map[uint64]int16: - fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int16V(*v, e) case map[uint64]int32: - fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int32V(v, e) case *map[uint64]int32: - fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int32V(*v, e) case map[uint64]int64: - fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int64V(v, e) case *map[uint64]int64: - fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Int64V(*v, e) case map[uint64]float32: - fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float32V(v, e) case *map[uint64]float32: - fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float32V(*v, e) case map[uint64]float64: - fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float64V(v, e) case *map[uint64]float64: - fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64Float64V(*v, e) case map[uint64]bool: - fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64BoolV(v, e) case *map[uint64]bool: - fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUint64BoolV(*v, e) case map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntfV(v, e) case *map[uintptr]interface{}: - fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntfV(*v, e) case map[uintptr]string: - fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrStringV(v, e) case *map[uintptr]string: - fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrStringV(*v, e) case map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintV(v, e) case *map[uintptr]uint: - fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintV(*v, e) case map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint8V(v, e) case *map[uintptr]uint8: - fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint8V(*v, e) case map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint16V(v, e) case *map[uintptr]uint16: - fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint16V(*v, e) case map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint32V(v, e) case *map[uintptr]uint32: - fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint32V(*v, e) case map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint64V(v, e) case *map[uintptr]uint64: - fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUint64V(*v, e) case map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintptrV(v, e) case *map[uintptr]uintptr: - fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrUintptrV(*v, e) case map[uintptr]int: - fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntV(v, e) case *map[uintptr]int: - fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrIntV(*v, e) case map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt8V(v, e) case *map[uintptr]int8: - fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt8V(*v, e) case map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt16V(v, e) case *map[uintptr]int16: - fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt16V(*v, e) case map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt32V(v, e) case *map[uintptr]int32: - fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt32V(*v, e) case map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt64V(v, e) case *map[uintptr]int64: - fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrInt64V(*v, e) case map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat32V(v, e) case *map[uintptr]float32: - fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat32V(*v, e) case map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat64V(v, e) case *map[uintptr]float64: - fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrFloat64V(*v, e) case map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrBoolV(v, e) case *map[uintptr]bool: - fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapUintptrBoolV(*v, e) case map[int]interface{}: - fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntfV(v, e) case *map[int]interface{}: - fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntfV(*v, e) case map[int]string: - fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntStringV(v, e) case *map[int]string: - fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntStringV(*v, e) case map[int]uint: - fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintV(v, e) case *map[int]uint: - fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintV(*v, e) case map[int]uint8: - fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint8V(v, e) case *map[int]uint8: - fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint8V(*v, e) case map[int]uint16: - fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint16V(v, e) case *map[int]uint16: - fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint16V(*v, e) case map[int]uint32: - fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint32V(v, e) case *map[int]uint32: - fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint32V(*v, e) case map[int]uint64: - fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint64V(v, e) case *map[int]uint64: - fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUint64V(*v, e) case map[int]uintptr: - fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintptrV(v, e) case *map[int]uintptr: - fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntUintptrV(*v, e) case map[int]int: - fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntV(v, e) case *map[int]int: - fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntIntV(*v, e) case map[int]int8: - fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt8V(v, e) case *map[int]int8: - fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt8V(*v, e) case map[int]int16: - fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt16V(v, e) case *map[int]int16: - fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt16V(*v, e) case map[int]int32: - fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt32V(v, e) case *map[int]int32: - fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt32V(*v, e) case map[int]int64: - fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt64V(v, e) case *map[int]int64: - fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntInt64V(*v, e) case map[int]float32: - fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat32V(v, e) case *map[int]float32: - fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat32V(*v, e) case map[int]float64: - fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat64V(v, e) case *map[int]float64: - fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntFloat64V(*v, e) case map[int]bool: - fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntBoolV(v, e) case *map[int]bool: - fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapIntBoolV(*v, e) case map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntfV(v, e) case *map[int8]interface{}: - fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntfV(*v, e) case map[int8]string: - fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8StringV(v, e) case *map[int8]string: - fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8StringV(*v, e) case map[int8]uint: - fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintV(v, e) case *map[int8]uint: - fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintV(*v, e) case map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint8V(v, e) case *map[int8]uint8: - fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint8V(*v, e) case map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint16V(v, e) case *map[int8]uint16: - fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint16V(*v, e) case map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint32V(v, e) case *map[int8]uint32: - fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint32V(*v, e) case map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint64V(v, e) case *map[int8]uint64: - fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Uint64V(*v, e) case map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintptrV(v, e) case *map[int8]uintptr: - fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8UintptrV(*v, e) case map[int8]int: - fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntV(v, e) case *map[int8]int: - fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8IntV(*v, e) case map[int8]int8: - fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int8V(v, e) case *map[int8]int8: - fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int8V(*v, e) case map[int8]int16: - fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int16V(v, e) case *map[int8]int16: - fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int16V(*v, e) case map[int8]int32: - fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int32V(v, e) case *map[int8]int32: - fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int32V(*v, e) case map[int8]int64: - fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int64V(v, e) case *map[int8]int64: - fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Int64V(*v, e) case map[int8]float32: - fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float32V(v, e) case *map[int8]float32: - fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float32V(*v, e) case map[int8]float64: - fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float64V(v, e) case *map[int8]float64: - fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8Float64V(*v, e) case map[int8]bool: - fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8BoolV(v, e) case *map[int8]bool: - fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt8BoolV(*v, e) case map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntfV(v, e) case *map[int16]interface{}: - fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntfV(*v, e) case map[int16]string: - fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16StringV(v, e) case *map[int16]string: - fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16StringV(*v, e) case map[int16]uint: - fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintV(v, e) case *map[int16]uint: - fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintV(*v, e) case map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint8V(v, e) case *map[int16]uint8: - fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint8V(*v, e) case map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint16V(v, e) case *map[int16]uint16: - fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint16V(*v, e) case map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint32V(v, e) case *map[int16]uint32: - fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint32V(*v, e) case map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint64V(v, e) case *map[int16]uint64: - fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Uint64V(*v, e) case map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintptrV(v, e) case *map[int16]uintptr: - fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16UintptrV(*v, e) case map[int16]int: - fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntV(v, e) case *map[int16]int: - fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16IntV(*v, e) case map[int16]int8: - fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int8V(v, e) case *map[int16]int8: - fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int8V(*v, e) case map[int16]int16: - fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int16V(v, e) case *map[int16]int16: - fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int16V(*v, e) case map[int16]int32: - fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int32V(v, e) case *map[int16]int32: - fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int32V(*v, e) case map[int16]int64: - fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int64V(v, e) case *map[int16]int64: - fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Int64V(*v, e) case map[int16]float32: - fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float32V(v, e) case *map[int16]float32: - fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float32V(*v, e) case map[int16]float64: - fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float64V(v, e) case *map[int16]float64: - fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16Float64V(*v, e) case map[int16]bool: - fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16BoolV(v, e) case *map[int16]bool: - fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt16BoolV(*v, e) case map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntfV(v, e) case *map[int32]interface{}: - fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntfV(*v, e) case map[int32]string: - fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32StringV(v, e) case *map[int32]string: - fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32StringV(*v, e) case map[int32]uint: - fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintV(v, e) case *map[int32]uint: - fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintV(*v, e) case map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint8V(v, e) case *map[int32]uint8: - fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint8V(*v, e) case map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint16V(v, e) case *map[int32]uint16: - fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint16V(*v, e) case map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint32V(v, e) case *map[int32]uint32: - fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint32V(*v, e) case map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint64V(v, e) case *map[int32]uint64: - fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Uint64V(*v, e) case map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintptrV(v, e) case *map[int32]uintptr: - fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32UintptrV(*v, e) case map[int32]int: - fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntV(v, e) case *map[int32]int: - fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32IntV(*v, e) case map[int32]int8: - fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int8V(v, e) case *map[int32]int8: - fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int8V(*v, e) case map[int32]int16: - fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int16V(v, e) case *map[int32]int16: - fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int16V(*v, e) case map[int32]int32: - fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int32V(v, e) case *map[int32]int32: - fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int32V(*v, e) case map[int32]int64: - fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int64V(v, e) case *map[int32]int64: - fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Int64V(*v, e) case map[int32]float32: - fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float32V(v, e) case *map[int32]float32: - fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float32V(*v, e) case map[int32]float64: - fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float64V(v, e) case *map[int32]float64: - fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32Float64V(*v, e) case map[int32]bool: - fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32BoolV(v, e) case *map[int32]bool: - fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt32BoolV(*v, e) case map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntfV(v, e) case *map[int64]interface{}: - fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntfV(*v, e) case map[int64]string: - fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64StringV(v, e) case *map[int64]string: - fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64StringV(*v, e) case map[int64]uint: - fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintV(v, e) case *map[int64]uint: - fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintV(*v, e) case map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint8V(v, e) case *map[int64]uint8: - fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint8V(*v, e) case map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint16V(v, e) case *map[int64]uint16: - fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint16V(*v, e) case map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint32V(v, e) case *map[int64]uint32: - fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint32V(*v, e) case map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint64V(v, e) case *map[int64]uint64: - fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Uint64V(*v, e) case map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintptrV(v, e) case *map[int64]uintptr: - fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64UintptrV(*v, e) case map[int64]int: - fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntV(v, e) case *map[int64]int: - fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64IntV(*v, e) case map[int64]int8: - fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int8V(v, e) case *map[int64]int8: - fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int8V(*v, e) case map[int64]int16: - fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int16V(v, e) case *map[int64]int16: - fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int16V(*v, e) case map[int64]int32: - fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int32V(v, e) case *map[int64]int32: - fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int32V(*v, e) case map[int64]int64: - fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int64V(v, e) case *map[int64]int64: - fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Int64V(*v, e) case map[int64]float32: - fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float32V(v, e) case *map[int64]float32: - fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float32V(*v, e) case map[int64]float64: - fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float64V(v, e) case *map[int64]float64: - fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64Float64V(*v, e) case map[int64]bool: - fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64BoolV(v, e) case *map[int64]bool: - fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapInt64BoolV(*v, e) case map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntfV(v, e) case *map[bool]interface{}: - fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntfV(*v, e) case map[bool]string: - fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolStringV(v, e) case *map[bool]string: - fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolStringV(*v, e) case map[bool]uint: - fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintV(v, e) case *map[bool]uint: - fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintV(*v, e) case map[bool]uint8: - fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint8V(v, e) case *map[bool]uint8: - fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint8V(*v, e) case map[bool]uint16: - fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint16V(v, e) case *map[bool]uint16: - fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint16V(*v, e) case map[bool]uint32: - fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint32V(v, e) case *map[bool]uint32: - fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint32V(*v, e) case map[bool]uint64: - fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint64V(v, e) case *map[bool]uint64: - fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUint64V(*v, e) case map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintptrV(v, e) case *map[bool]uintptr: - fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolUintptrV(*v, e) case map[bool]int: - fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntV(v, e) case *map[bool]int: - fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolIntV(*v, e) case map[bool]int8: - fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt8V(v, e) case *map[bool]int8: - fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt8V(*v, e) case map[bool]int16: - fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt16V(v, e) case *map[bool]int16: - fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt16V(*v, e) case map[bool]int32: - fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt32V(v, e) case *map[bool]int32: - fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt32V(*v, e) case map[bool]int64: - fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt64V(v, e) case *map[bool]int64: - fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolInt64V(*v, e) case map[bool]float32: - fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat32V(v, e) case *map[bool]float32: - fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat32V(*v, e) case map[bool]float64: - fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat64V(v, e) case *map[bool]float64: - fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolFloat64V(*v, e) case map[bool]bool: - fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolBoolV(v, e) case *map[bool]bool: - fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + fastpathTV.EncMapBoolBoolV(*v, e) default: _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) @@ -3113,20 +3116,15 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { // -- -- fast path functions -func (f *encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceIntfR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceIntfV(rv2i(rv).([]interface{}), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceIntfV(rv2i(rv).([]interface{}), e) } else { - fastpathTV.EncSliceIntfV(rv2i(rv).([]interface{}), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceIntfV(rv2i(rv).([]interface{}), e) } } -func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3139,13 +3137,8 @@ func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3166,20 +3159,15 @@ func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, checkNil bool, e *Encoder } } -func (f *encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceStringV(rv2i(rv).([]string), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceStringV(rv2i(rv).([]string), e) } else { - fastpathTV.EncSliceStringV(rv2i(rv).([]string), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceStringV(rv2i(rv).([]string), e) } } -func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceStringV(v []string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3192,13 +3180,8 @@ func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceStringV(v []string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3219,20 +3202,15 @@ func (_ fastpathT) EncAsMapSliceStringV(v []string, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), e) } else { - fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), e) } } -func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceFloat32V(v []float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3245,13 +3223,8 @@ func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3272,20 +3245,15 @@ func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), e) } else { - fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), e) } } -func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceFloat64V(v []float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3298,13 +3266,8 @@ func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3325,20 +3288,15 @@ func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), e) } else { - fastpathTV.EncSliceUintV(rv2i(rv).([]uint), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceUintV(rv2i(rv).([]uint), e) } } -func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceUintV(v []uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3351,13 +3309,8 @@ func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceUintV(v []uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3378,20 +3331,15 @@ func (_ fastpathT) EncAsMapSliceUintV(v []uint, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUint16V(rv2i(rv).([]uint16), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceUint16V(rv2i(rv).([]uint16), e) } else { - fastpathTV.EncSliceUint16V(rv2i(rv).([]uint16), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceUint16V(rv2i(rv).([]uint16), e) } } -func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceUint16V(v []uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3404,13 +3352,8 @@ func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3431,20 +3374,15 @@ func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUint32V(rv2i(rv).([]uint32), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceUint32V(rv2i(rv).([]uint32), e) } else { - fastpathTV.EncSliceUint32V(rv2i(rv).([]uint32), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceUint32V(rv2i(rv).([]uint32), e) } } -func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceUint32V(v []uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3457,13 +3395,8 @@ func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3484,20 +3417,15 @@ func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUint64V(rv2i(rv).([]uint64), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceUint64V(rv2i(rv).([]uint64), e) } else { - fastpathTV.EncSliceUint64V(rv2i(rv).([]uint64), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceUint64V(rv2i(rv).([]uint64), e) } } -func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceUint64V(v []uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3510,13 +3438,8 @@ func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3537,20 +3460,15 @@ func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceUintptrR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceUintptrR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceUintptrV(rv2i(rv).([]uintptr), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceUintptrV(rv2i(rv).([]uintptr), e) } else { - fastpathTV.EncSliceUintptrV(rv2i(rv).([]uintptr), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceUintptrV(rv2i(rv).([]uintptr), e) } } -func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceUintptrV(v []uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3563,13 +3481,8 @@ func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3590,20 +3503,15 @@ func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), e) } else { - fastpathTV.EncSliceIntV(rv2i(rv).([]int), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceIntV(rv2i(rv).([]int), e) } } -func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceIntV(v []int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3616,13 +3524,8 @@ func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceIntV(v []int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3643,20 +3546,15 @@ func (_ fastpathT) EncAsMapSliceIntV(v []int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceInt8V(rv2i(rv).([]int8), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceInt8V(rv2i(rv).([]int8), e) } else { - fastpathTV.EncSliceInt8V(rv2i(rv).([]int8), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceInt8V(rv2i(rv).([]int8), e) } } -func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceInt8V(v []int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3669,13 +3567,8 @@ func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceInt8V(v []int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3696,20 +3589,15 @@ func (_ fastpathT) EncAsMapSliceInt8V(v []int8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceInt16V(rv2i(rv).([]int16), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceInt16V(rv2i(rv).([]int16), e) } else { - fastpathTV.EncSliceInt16V(rv2i(rv).([]int16), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceInt16V(rv2i(rv).([]int16), e) } } -func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceInt16V(v []int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3722,13 +3610,8 @@ func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceInt16V(v []int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3749,20 +3632,15 @@ func (_ fastpathT) EncAsMapSliceInt16V(v []int16, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceInt32V(rv2i(rv).([]int32), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceInt32V(rv2i(rv).([]int32), e) } else { - fastpathTV.EncSliceInt32V(rv2i(rv).([]int32), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceInt32V(rv2i(rv).([]int32), e) } } -func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceInt32V(v []int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3775,13 +3653,8 @@ func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceInt32V(v []int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3802,20 +3675,15 @@ func (_ fastpathT) EncAsMapSliceInt32V(v []int32, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceInt64V(rv2i(rv).([]int64), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceInt64V(rv2i(rv).([]int64), e) } else { - fastpathTV.EncSliceInt64V(rv2i(rv).([]int64), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceInt64V(rv2i(rv).([]int64), e) } } -func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceInt64V(v []int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3828,13 +3696,8 @@ func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceInt64V(v []int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3855,20 +3718,15 @@ func (_ fastpathT) EncAsMapSliceInt64V(v []int64, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { +func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.EncAsMapSliceBoolV(rv2i(rv).([]bool), fastpathCheckNilFalse, f.e) + fastpathTV.EncAsMapSliceBoolV(rv2i(rv).([]bool), e) } else { - fastpathTV.EncSliceBoolV(rv2i(rv).([]bool), fastpathCheckNilFalse, f.e) + fastpathTV.EncSliceBoolV(rv2i(rv).([]bool), e) } } -func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncSliceBoolV(v []bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { @@ -3881,13 +3739,8 @@ func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { } } -func (_ fastpathT) EncAsMapSliceBoolV(v []bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -3908,16 +3761,11 @@ func (_ fastpathT) EncAsMapSliceBoolV(v []bool, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { - fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), e) } -func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -3961,16 +3809,11 @@ func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { - fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), e) } -func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4014,16 +3857,11 @@ func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { - fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), e) } -func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4067,16 +3905,11 @@ func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { - fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), e) } -func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4120,16 +3953,11 @@ func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { - fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), e) } -func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4173,16 +4001,11 @@ func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { - fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), e) } -func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4226,16 +4049,11 @@ func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { - fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), e) } -func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4279,16 +4097,11 @@ func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapIntfUintptrR(rv reflect.Value) { - fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), e) } -func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4332,16 +4145,11 @@ func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { - fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), e) } -func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4385,16 +4193,11 @@ func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encod } } -func (f *encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { - fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), e) } -func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4438,16 +4241,11 @@ func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { - fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), e) } -func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4491,16 +4289,11 @@ func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { - fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), e) } -func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4544,16 +4337,11 @@ func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { - fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), e) } -func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4597,16 +4385,11 @@ func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { - fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), e) } -func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4650,16 +4433,11 @@ func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { - fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), e) } -func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4703,16 +4481,11 @@ func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { - fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntfBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), e) } -func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding @@ -4756,16 +4529,11 @@ func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { - fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), e) } -func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -4811,16 +4579,11 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { - fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), e) } -func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -4866,16 +4629,11 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { - fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), e) } -func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -4921,16 +4679,11 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { - fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), e) } -func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -4976,16 +4729,11 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { - fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), e) } -func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5031,16 +4779,11 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { - fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), e) } -func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5086,16 +4829,11 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { - fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), e) } -func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5141,16 +4879,11 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapStringUintptrR(rv reflect.Value) { - fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), e) } -func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5196,16 +4929,11 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { - fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), e) } -func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5251,16 +4979,11 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { - fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), e) } -func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5306,16 +5029,11 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { - fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), e) } -func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5361,16 +5079,11 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { - fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), e) } -func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5416,16 +5129,11 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { - fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), e) } -func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5471,16 +5179,11 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { - fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), e) } -func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5526,16 +5229,11 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { - fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), e) } -func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5581,16 +5279,11 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { - fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapStringBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), e) } -func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { @@ -5636,16 +5329,11 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { - fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), e) } -func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5682,16 +5370,11 @@ func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { - fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), e) } -func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5728,16 +5411,11 @@ func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { - fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), e) } -func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5774,16 +5452,11 @@ func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { - fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), e) } -func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5820,16 +5493,11 @@ func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { - fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), e) } -func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5866,16 +5534,11 @@ func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { - fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), e) } -func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5912,16 +5575,11 @@ func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { - fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), e) } -func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -5958,16 +5616,11 @@ func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat32UintptrR(rv reflect.Value) { - fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), e) } -func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6004,16 +5657,11 @@ func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { - fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), e) } -func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6050,16 +5698,11 @@ func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { - fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), e) } -func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6096,16 +5739,11 @@ func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { - fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), e) } -func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6142,16 +5780,11 @@ func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { - fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), e) } -func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6188,16 +5821,11 @@ func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { - fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), e) } -func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6234,16 +5862,11 @@ func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { - fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), e) } -func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6280,16 +5903,11 @@ func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { - fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), e) } -func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6326,16 +5944,11 @@ func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { - fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), e) } -func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6372,16 +5985,11 @@ func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { - fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), e) } -func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6418,16 +6026,11 @@ func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { - fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), e) } -func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6464,16 +6067,11 @@ func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { - fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), e) } -func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6510,16 +6108,11 @@ func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { - fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), e) } -func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6556,16 +6149,11 @@ func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { - fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), e) } -func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6602,16 +6190,11 @@ func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { - fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), e) } -func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6648,16 +6231,11 @@ func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { - fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), e) } -func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6694,16 +6272,11 @@ func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapFloat64UintptrR(rv reflect.Value) { - fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), e) } -func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6740,16 +6313,11 @@ func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { - fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), e) } -func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6786,16 +6354,11 @@ func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { - fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), e) } -func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6832,16 +6395,11 @@ func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { - fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), e) } -func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6878,16 +6436,11 @@ func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { - fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), e) } -func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6924,16 +6477,11 @@ func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { - fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), e) } -func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -6970,16 +6518,11 @@ func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { - fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), e) } -func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -7016,16 +6559,11 @@ func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { - fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), e) } -func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -7062,16 +6600,11 @@ func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { - fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), e) } -func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) @@ -7108,16 +6641,11 @@ func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { - fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), e) } -func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7154,16 +6682,11 @@ func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { - fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), e) } -func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7200,16 +6723,11 @@ func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { - fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), e) } -func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7246,16 +6764,11 @@ func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { - fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), e) } -func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7292,16 +6805,11 @@ func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { - fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), e) } -func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7338,16 +6846,11 @@ func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { - fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), e) } -func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7384,16 +6887,11 @@ func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { - fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), e) } -func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7430,16 +6928,11 @@ func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintUintptrR(rv reflect.Value) { - fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), e) } -func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7476,16 +6969,11 @@ func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { - fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), e) } -func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7522,16 +7010,11 @@ func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { - fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), e) } -func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7568,16 +7051,11 @@ func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { - fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), e) } -func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7614,16 +7092,11 @@ func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { - fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), e) } -func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7660,16 +7133,11 @@ func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { - fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), e) } -func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7706,16 +7174,11 @@ func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { - fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), e) } -func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7752,16 +7215,11 @@ func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { - fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), e) } -func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7798,16 +7256,11 @@ func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { - fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), e) } -func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7844,16 +7297,11 @@ func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { - fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), e) } -func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7890,16 +7338,11 @@ func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { - fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), e) } -func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7936,16 +7379,11 @@ func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { - fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), e) } -func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -7982,16 +7420,11 @@ func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { - fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), e) } -func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8028,16 +7461,11 @@ func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { - fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), e) } -func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8074,16 +7502,11 @@ func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { - fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), e) } -func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8120,16 +7543,11 @@ func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { - fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), e) } -func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8166,16 +7584,11 @@ func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint8UintptrR(rv reflect.Value) { - fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), e) } -func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8212,16 +7625,11 @@ func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { - fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), e) } -func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8258,16 +7666,11 @@ func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { - fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), e) } -func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8304,16 +7707,11 @@ func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { - fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), e) } -func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8350,16 +7748,11 @@ func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { - fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), e) } -func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8396,16 +7789,11 @@ func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { - fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), e) } -func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8442,16 +7830,11 @@ func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { - fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), e) } -func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8488,16 +7871,11 @@ func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { - fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), e) } -func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8534,16 +7912,11 @@ func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { - fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), e) } -func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8580,16 +7953,11 @@ func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { - fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), e) } -func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8626,16 +7994,11 @@ func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { - fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), e) } -func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8672,16 +8035,11 @@ func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { - fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), e) } -func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8718,16 +8076,11 @@ func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { - fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), e) } -func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8764,16 +8117,11 @@ func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { - fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), e) } -func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8810,16 +8158,11 @@ func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { - fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), e) } -func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8856,16 +8199,11 @@ func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { - fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), e) } -func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8902,16 +8240,11 @@ func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint16UintptrR(rv reflect.Value) { - fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), e) } -func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8948,16 +8281,11 @@ func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { - fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), e) } -func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -8994,16 +8322,11 @@ func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { - fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), e) } -func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9040,16 +8363,11 @@ func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { - fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), e) } -func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9086,16 +8404,11 @@ func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { - fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), e) } -func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9132,16 +8445,11 @@ func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { - fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), e) } -func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9178,16 +8486,11 @@ func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { - fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), e) } -func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9224,16 +8527,11 @@ func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { - fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), e) } -func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9270,16 +8568,11 @@ func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { - fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint16BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), e) } -func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9316,16 +8609,11 @@ func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { - fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), e) } -func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9362,16 +8650,11 @@ func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { - fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), e) } -func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9408,16 +8691,11 @@ func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { - fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), e) } -func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9454,16 +8732,11 @@ func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { - fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), e) } -func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9500,16 +8773,11 @@ func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { - fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), e) } -func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9546,16 +8814,11 @@ func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { - fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), e) } -func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9592,16 +8855,11 @@ func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { - fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), e) } -func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9638,16 +8896,11 @@ func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint32UintptrR(rv reflect.Value) { - fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), e) } -func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9684,16 +8937,11 @@ func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { - fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), e) } -func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9730,16 +8978,11 @@ func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { - fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), e) } -func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9776,16 +9019,11 @@ func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { - fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), e) } -func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9822,16 +9060,11 @@ func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { - fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), e) } -func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9868,16 +9101,11 @@ func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { - fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), e) } -func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9914,16 +9142,11 @@ func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { - fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), e) } -func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -9960,16 +9183,11 @@ func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { - fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), e) } -func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10006,16 +9224,11 @@ func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { - fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint32BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), e) } -func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10052,16 +9265,11 @@ func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { - fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), e) } -func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10098,16 +9306,11 @@ func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { - fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), e) } -func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10144,16 +9347,11 @@ func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { - fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), e) } -func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10190,16 +9388,11 @@ func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { - fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), e) } -func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10236,16 +9429,11 @@ func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { - fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), e) } -func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10282,16 +9470,11 @@ func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { - fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), e) } -func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10328,16 +9511,11 @@ func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { - fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), e) } -func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10374,16 +9552,11 @@ func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUint64UintptrR(rv reflect.Value) { - fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), e) } -func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10420,16 +9593,11 @@ func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { - fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), e) } -func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10466,16 +9634,11 @@ func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { - fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), e) } -func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10512,16 +9675,11 @@ func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { - fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), e) } -func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10558,16 +9716,11 @@ func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { - fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), e) } -func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10604,16 +9757,11 @@ func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { - fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), e) } -func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10650,16 +9798,11 @@ func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { - fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), e) } -func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10696,16 +9839,11 @@ func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { - fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), e) } -func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10742,16 +9880,11 @@ func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { - fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), e) } -func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10788,16 +9921,11 @@ func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintptrIntfR(rv reflect.Value) { - fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), e) } -func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10834,16 +9962,11 @@ func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, } } -func (f *encFnInfo) fastpathEncMapUintptrStringR(rv reflect.Value) { - fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), e) } -func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10880,16 +10003,11 @@ func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUintptrUintR(rv reflect.Value) { - fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), e) } -func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10926,16 +10044,11 @@ func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintptrUint8R(rv reflect.Value) { - fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), e) } -func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -10972,16 +10085,11 @@ func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUintptrUint16R(rv reflect.Value) { - fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), e) } -func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11018,16 +10126,11 @@ func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUintptrUint32R(rv reflect.Value) { - fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), e) } -func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11064,16 +10167,11 @@ func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUintptrUint64R(rv reflect.Value) { - fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), e) } -func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11110,16 +10208,11 @@ func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e * } } -func (f *encFnInfo) fastpathEncMapUintptrUintptrR(rv reflect.Value) { - fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), e) } -func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11156,16 +10249,11 @@ func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUintptrIntR(rv reflect.Value) { - fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), e) } -func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11202,16 +10290,11 @@ func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapUintptrInt8R(rv reflect.Value) { - fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), e) } -func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11248,16 +10331,11 @@ func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapUintptrInt16R(rv reflect.Value) { - fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), e) } -func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11294,16 +10372,11 @@ func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUintptrInt32R(rv reflect.Value) { - fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), e) } -func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11340,16 +10413,11 @@ func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUintptrInt64R(rv reflect.Value) { - fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), e) } -func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11386,16 +10454,11 @@ func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapUintptrFloat32R(rv reflect.Value) { - fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), e) } -func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11432,16 +10495,11 @@ func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUintptrFloat64R(rv reflect.Value) { - fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), e) } -func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11478,16 +10536,11 @@ func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e } } -func (f *encFnInfo) fastpathEncMapUintptrBoolR(rv reflect.Value) { - fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), e) } -func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) @@ -11524,16 +10577,11 @@ func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { - fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), e) } -func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11570,16 +10618,11 @@ func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encod } } -func (f *encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { - fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), e) } -func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11616,16 +10659,11 @@ func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { - fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), e) } -func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11662,16 +10700,11 @@ func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { - fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), e) } -func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11708,16 +10741,11 @@ func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { - fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), e) } -func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11754,16 +10782,11 @@ func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { - fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), e) } -func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11800,16 +10823,11 @@ func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { - fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), e) } -func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11846,16 +10864,11 @@ func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapIntUintptrR(rv reflect.Value) { - fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), e) } -func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11892,16 +10905,11 @@ func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { - fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), e) } -func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11938,16 +10946,11 @@ func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { - fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), e) } -func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -11984,16 +10987,11 @@ func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { - fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), e) } -func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12030,16 +11028,11 @@ func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { - fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), e) } -func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12076,16 +11069,11 @@ func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { - fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), e) } -func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12122,16 +11110,11 @@ func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { - fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), e) } -func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12168,16 +11151,11 @@ func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { - fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), e) } -func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12214,16 +11192,11 @@ func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { - fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapIntBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), e) } -func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12260,16 +11233,11 @@ func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { - fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), e) } -func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12306,16 +11274,11 @@ func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { - fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), e) } -func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12352,16 +11315,11 @@ func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { - fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), e) } -func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12398,16 +11356,11 @@ func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), e) } -func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12444,16 +11397,11 @@ func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), e) } -func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12490,16 +11438,11 @@ func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), e) } -func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12536,16 +11479,11 @@ func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), e) } -func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12582,16 +11520,11 @@ func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt8UintptrR(rv reflect.Value) { - fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), e) } -func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12628,16 +11561,11 @@ func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { - fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), e) } -func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12674,16 +11602,11 @@ func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { - fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), e) } -func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12720,16 +11643,11 @@ func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { - fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), e) } -func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12766,16 +11684,11 @@ func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { - fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), e) } -func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12812,16 +11725,11 @@ func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { - fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), e) } -func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12858,16 +11766,11 @@ func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { - fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), e) } -func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12904,16 +11807,11 @@ func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { - fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), e) } -func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12950,16 +11848,11 @@ func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { - fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt8BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), e) } -func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -12996,16 +11889,11 @@ func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { - fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), e) } -func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13042,16 +11930,11 @@ func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { - fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), e) } -func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13088,16 +11971,11 @@ func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { - fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), e) } -func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13134,16 +12012,11 @@ func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), e) } -func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13180,16 +12053,11 @@ func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), e) } -func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13226,16 +12094,11 @@ func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), e) } -func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13272,16 +12135,11 @@ func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), e) } -func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13318,16 +12176,11 @@ func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt16UintptrR(rv reflect.Value) { - fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), e) } -func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13364,16 +12217,11 @@ func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { - fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), e) } -func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13410,16 +12258,11 @@ func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { - fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), e) } -func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13456,16 +12299,11 @@ func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { - fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), e) } -func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13502,16 +12340,11 @@ func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { - fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), e) } -func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13548,16 +12381,11 @@ func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { - fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), e) } -func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13594,16 +12422,11 @@ func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { - fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), e) } -func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13640,16 +12463,11 @@ func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { - fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), e) } -func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13686,16 +12504,11 @@ func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { - fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt16BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), e) } -func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13732,16 +12545,11 @@ func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { - fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), e) } -func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13778,16 +12586,11 @@ func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { - fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), e) } -func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13824,16 +12627,11 @@ func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { - fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), e) } -func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13870,16 +12668,11 @@ func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), e) } -func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13916,16 +12709,11 @@ func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), e) } -func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -13962,16 +12750,11 @@ func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), e) } -func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14008,16 +12791,11 @@ func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), e) } -func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14054,16 +12832,11 @@ func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt32UintptrR(rv reflect.Value) { - fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), e) } -func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14100,16 +12873,11 @@ func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { - fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), e) } -func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14146,16 +12914,11 @@ func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { - fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), e) } -func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14192,16 +12955,11 @@ func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { - fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), e) } -func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14238,16 +12996,11 @@ func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { - fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), e) } -func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14284,16 +13037,11 @@ func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { - fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), e) } -func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14330,16 +13078,11 @@ func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { - fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), e) } -func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14376,16 +13119,11 @@ func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { - fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), e) } -func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14422,16 +13160,11 @@ func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { - fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt32BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), e) } -func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14468,16 +13201,11 @@ func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { - fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), e) } -func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14514,16 +13242,11 @@ func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *E } } -func (f *encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { - fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64StringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), e) } -func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14560,16 +13283,11 @@ func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { - fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64UintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), e) } -func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14606,16 +13324,11 @@ func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), e) } -func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14652,16 +13365,11 @@ func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), e) } -func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14698,16 +13406,11 @@ func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), e) } -func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14744,16 +13447,11 @@ func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), e) } -func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14790,16 +13488,11 @@ func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapInt64UintptrR(rv reflect.Value) { - fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), e) } -func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14836,16 +13529,11 @@ func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { - fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64IntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), e) } -func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14882,16 +13570,11 @@ func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { - fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Int8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), e) } -func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14928,16 +13611,11 @@ func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { - fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Int16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), e) } -func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -14974,16 +13652,11 @@ func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { - fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Int32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), e) } -func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -15020,16 +13693,11 @@ func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { - fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), e) } -func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -15066,16 +13734,11 @@ func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { - fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), e) } -func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -15112,16 +13775,11 @@ func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { - fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), e) } -func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -15158,16 +13816,11 @@ func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *En } } -func (f *encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { - fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), e) } -func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) @@ -15204,16 +13857,11 @@ func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { - fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolIntfR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), e) } -func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15250,16 +13898,11 @@ func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Enc } } -func (f *encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { - fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolStringR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), e) } -func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15296,16 +13939,11 @@ func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { - fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUintR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), e) } -func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15342,16 +13980,11 @@ func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { - fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUint8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), e) } -func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15388,16 +14021,11 @@ func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { - fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUint16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), e) } -func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15434,16 +14062,11 @@ func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { - fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUint32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), e) } -func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15480,16 +14103,11 @@ func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { - fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUint64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), e) } -func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15526,16 +14144,11 @@ func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encode } } -func (f *encFnInfo) fastpathEncMapBoolUintptrR(rv reflect.Value) { - fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), e) } -func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15572,16 +14185,11 @@ func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { - fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolIntR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), e) } -func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15618,16 +14226,11 @@ func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { - fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolInt8R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), e) } -func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15664,16 +14267,11 @@ func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { } } -func (f *encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { - fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolInt16R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), e) } -func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15710,16 +14308,11 @@ func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { - fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolInt32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), e) } -func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15756,16 +14349,11 @@ func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { - fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolInt64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), e) } -func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15802,16 +14390,11 @@ func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) } } -func (f *encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { - fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), e) } -func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15848,16 +14431,11 @@ func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { - fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), e) } -func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15894,16 +14472,11 @@ func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Enco } } -func (f *encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { - fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), fastpathCheckNilFalse, f.e) +func (e *Encoder) fastpathEncMapBoolBoolR(f *codecFnInfo, rv reflect.Value) { + fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), e) } -func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) @@ -15947,2170 +14520,1899 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { switch v := iv.(type) { case []interface{}: - fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceIntfV(v, false, d) case *[]interface{}: - v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceIntfV(*v, true, d); changed2 { *v = v2 } case map[interface{}]interface{}: - fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfIntfV(v, false, d) case *map[interface{}]interface{}: - v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, true, d); changed2 { *v = v2 } case map[interface{}]string: - fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfStringV(v, false, d) case *map[interface{}]string: - v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfStringV(*v, true, d); changed2 { *v = v2 } case map[interface{}]uint: - fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUintV(v, false, d) case *map[interface{}]uint: - v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUintV(*v, true, d); changed2 { *v = v2 } case map[interface{}]uint8: - fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUint8V(v, false, d) case *map[interface{}]uint8: - v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, true, d); changed2 { *v = v2 } case map[interface{}]uint16: - fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUint16V(v, false, d) case *map[interface{}]uint16: - v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, true, d); changed2 { *v = v2 } case map[interface{}]uint32: - fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUint32V(v, false, d) case *map[interface{}]uint32: - v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, true, d); changed2 { *v = v2 } case map[interface{}]uint64: - fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUint64V(v, false, d) case *map[interface{}]uint64: - v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, true, d); changed2 { *v = v2 } case map[interface{}]uintptr: - fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfUintptrV(v, false, d) case *map[interface{}]uintptr: - v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, true, d); changed2 { *v = v2 } case map[interface{}]int: - fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfIntV(v, false, d) case *map[interface{}]int: - v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfIntV(*v, true, d); changed2 { *v = v2 } case map[interface{}]int8: - fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfInt8V(v, false, d) case *map[interface{}]int8: - v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, true, d); changed2 { *v = v2 } case map[interface{}]int16: - fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfInt16V(v, false, d) case *map[interface{}]int16: - v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, true, d); changed2 { *v = v2 } case map[interface{}]int32: - fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfInt32V(v, false, d) case *map[interface{}]int32: - v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, true, d); changed2 { *v = v2 } case map[interface{}]int64: - fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfInt64V(v, false, d) case *map[interface{}]int64: - v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, true, d); changed2 { *v = v2 } case map[interface{}]float32: - fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfFloat32V(v, false, d) case *map[interface{}]float32: - v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, true, d); changed2 { *v = v2 } case map[interface{}]float64: - fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfFloat64V(v, false, d) case *map[interface{}]float64: - v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, true, d); changed2 { *v = v2 } case map[interface{}]bool: - fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntfBoolV(v, false, d) case *map[interface{}]bool: - v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, true, d); changed2 { *v = v2 } case []string: - fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceStringV(v, false, d) case *[]string: - v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceStringV(*v, true, d); changed2 { *v = v2 } case map[string]interface{}: - fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringIntfV(v, false, d) case *map[string]interface{}: - v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringIntfV(*v, true, d); changed2 { *v = v2 } case map[string]string: - fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringStringV(v, false, d) case *map[string]string: - v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringStringV(*v, true, d); changed2 { *v = v2 } case map[string]uint: - fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUintV(v, false, d) case *map[string]uint: - v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUintV(*v, true, d); changed2 { *v = v2 } case map[string]uint8: - fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUint8V(v, false, d) case *map[string]uint8: - v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUint8V(*v, true, d); changed2 { *v = v2 } case map[string]uint16: - fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUint16V(v, false, d) case *map[string]uint16: - v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUint16V(*v, true, d); changed2 { *v = v2 } case map[string]uint32: - fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUint32V(v, false, d) case *map[string]uint32: - v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUint32V(*v, true, d); changed2 { *v = v2 } case map[string]uint64: - fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUint64V(v, false, d) case *map[string]uint64: - v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUint64V(*v, true, d); changed2 { *v = v2 } case map[string]uintptr: - fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringUintptrV(v, false, d) case *map[string]uintptr: - v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, true, d); changed2 { *v = v2 } case map[string]int: - fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringIntV(v, false, d) case *map[string]int: - v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringIntV(*v, true, d); changed2 { *v = v2 } case map[string]int8: - fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringInt8V(v, false, d) case *map[string]int8: - v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringInt8V(*v, true, d); changed2 { *v = v2 } case map[string]int16: - fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringInt16V(v, false, d) case *map[string]int16: - v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringInt16V(*v, true, d); changed2 { *v = v2 } case map[string]int32: - fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringInt32V(v, false, d) case *map[string]int32: - v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringInt32V(*v, true, d); changed2 { *v = v2 } case map[string]int64: - fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringInt64V(v, false, d) case *map[string]int64: - v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringInt64V(*v, true, d); changed2 { *v = v2 } case map[string]float32: - fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringFloat32V(v, false, d) case *map[string]float32: - v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, true, d); changed2 { *v = v2 } case map[string]float64: - fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringFloat64V(v, false, d) case *map[string]float64: - v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, true, d); changed2 { *v = v2 } case map[string]bool: - fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapStringBoolV(v, false, d) case *map[string]bool: - v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapStringBoolV(*v, true, d); changed2 { *v = v2 } case []float32: - fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceFloat32V(v, false, d) case *[]float32: - v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceFloat32V(*v, true, d); changed2 { *v = v2 } case map[float32]interface{}: - fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32IntfV(v, false, d) case *map[float32]interface{}: - v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, true, d); changed2 { *v = v2 } case map[float32]string: - fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32StringV(v, false, d) case *map[float32]string: - v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, true, d); changed2 { *v = v2 } case map[float32]uint: - fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32UintV(v, false, d) case *map[float32]uint: - v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, true, d); changed2 { *v = v2 } case map[float32]uint8: - fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Uint8V(v, false, d) case *map[float32]uint8: - v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, true, d); changed2 { *v = v2 } case map[float32]uint16: - fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Uint16V(v, false, d) case *map[float32]uint16: - v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, true, d); changed2 { *v = v2 } case map[float32]uint32: - fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Uint32V(v, false, d) case *map[float32]uint32: - v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, true, d); changed2 { *v = v2 } case map[float32]uint64: - fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Uint64V(v, false, d) case *map[float32]uint64: - v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, true, d); changed2 { *v = v2 } case map[float32]uintptr: - fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32UintptrV(v, false, d) case *map[float32]uintptr: - v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, true, d); changed2 { *v = v2 } case map[float32]int: - fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32IntV(v, false, d) case *map[float32]int: - v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, true, d); changed2 { *v = v2 } case map[float32]int8: - fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Int8V(v, false, d) case *map[float32]int8: - v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, true, d); changed2 { *v = v2 } case map[float32]int16: - fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Int16V(v, false, d) case *map[float32]int16: - v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, true, d); changed2 { *v = v2 } case map[float32]int32: - fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Int32V(v, false, d) case *map[float32]int32: - v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, true, d); changed2 { *v = v2 } case map[float32]int64: - fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Int64V(v, false, d) case *map[float32]int64: - v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, true, d); changed2 { *v = v2 } case map[float32]float32: - fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Float32V(v, false, d) case *map[float32]float32: - v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, true, d); changed2 { *v = v2 } case map[float32]float64: - fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32Float64V(v, false, d) case *map[float32]float64: - v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, true, d); changed2 { *v = v2 } case map[float32]bool: - fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat32BoolV(v, false, d) case *map[float32]bool: - v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, true, d); changed2 { *v = v2 } case []float64: - fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceFloat64V(v, false, d) case *[]float64: - v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceFloat64V(*v, true, d); changed2 { *v = v2 } case map[float64]interface{}: - fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64IntfV(v, false, d) case *map[float64]interface{}: - v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, true, d); changed2 { *v = v2 } case map[float64]string: - fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64StringV(v, false, d) case *map[float64]string: - v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, true, d); changed2 { *v = v2 } case map[float64]uint: - fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64UintV(v, false, d) case *map[float64]uint: - v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, true, d); changed2 { *v = v2 } case map[float64]uint8: - fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Uint8V(v, false, d) case *map[float64]uint8: - v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, true, d); changed2 { *v = v2 } case map[float64]uint16: - fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Uint16V(v, false, d) case *map[float64]uint16: - v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, true, d); changed2 { *v = v2 } case map[float64]uint32: - fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Uint32V(v, false, d) case *map[float64]uint32: - v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, true, d); changed2 { *v = v2 } case map[float64]uint64: - fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Uint64V(v, false, d) case *map[float64]uint64: - v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, true, d); changed2 { *v = v2 } case map[float64]uintptr: - fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64UintptrV(v, false, d) case *map[float64]uintptr: - v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, true, d); changed2 { *v = v2 } case map[float64]int: - fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64IntV(v, false, d) case *map[float64]int: - v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, true, d); changed2 { *v = v2 } case map[float64]int8: - fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Int8V(v, false, d) case *map[float64]int8: - v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, true, d); changed2 { *v = v2 } case map[float64]int16: - fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Int16V(v, false, d) case *map[float64]int16: - v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, true, d); changed2 { *v = v2 } case map[float64]int32: - fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Int32V(v, false, d) case *map[float64]int32: - v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, true, d); changed2 { *v = v2 } case map[float64]int64: - fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Int64V(v, false, d) case *map[float64]int64: - v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, true, d); changed2 { *v = v2 } case map[float64]float32: - fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Float32V(v, false, d) case *map[float64]float32: - v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, true, d); changed2 { *v = v2 } case map[float64]float64: - fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64Float64V(v, false, d) case *map[float64]float64: - v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, true, d); changed2 { *v = v2 } case map[float64]bool: - fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapFloat64BoolV(v, false, d) case *map[float64]bool: - v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, true, d); changed2 { *v = v2 } case []uint: - fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceUintV(v, false, d) case *[]uint: - v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceUintV(*v, true, d); changed2 { *v = v2 } case map[uint]interface{}: - fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintIntfV(v, false, d) case *map[uint]interface{}: - v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintIntfV(*v, true, d); changed2 { *v = v2 } case map[uint]string: - fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintStringV(v, false, d) case *map[uint]string: - v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintStringV(*v, true, d); changed2 { *v = v2 } case map[uint]uint: - fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUintV(v, false, d) case *map[uint]uint: - v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUintV(*v, true, d); changed2 { *v = v2 } case map[uint]uint8: - fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUint8V(v, false, d) case *map[uint]uint8: - v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUint8V(*v, true, d); changed2 { *v = v2 } case map[uint]uint16: - fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUint16V(v, false, d) case *map[uint]uint16: - v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUint16V(*v, true, d); changed2 { *v = v2 } case map[uint]uint32: - fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUint32V(v, false, d) case *map[uint]uint32: - v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUint32V(*v, true, d); changed2 { *v = v2 } case map[uint]uint64: - fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUint64V(v, false, d) case *map[uint]uint64: - v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUint64V(*v, true, d); changed2 { *v = v2 } case map[uint]uintptr: - fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintUintptrV(v, false, d) case *map[uint]uintptr: - v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, true, d); changed2 { *v = v2 } case map[uint]int: - fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintIntV(v, false, d) case *map[uint]int: - v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintIntV(*v, true, d); changed2 { *v = v2 } case map[uint]int8: - fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintInt8V(v, false, d) case *map[uint]int8: - v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintInt8V(*v, true, d); changed2 { *v = v2 } case map[uint]int16: - fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintInt16V(v, false, d) case *map[uint]int16: - v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintInt16V(*v, true, d); changed2 { *v = v2 } case map[uint]int32: - fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintInt32V(v, false, d) case *map[uint]int32: - v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintInt32V(*v, true, d); changed2 { *v = v2 } case map[uint]int64: - fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintInt64V(v, false, d) case *map[uint]int64: - v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintInt64V(*v, true, d); changed2 { *v = v2 } case map[uint]float32: - fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintFloat32V(v, false, d) case *map[uint]float32: - v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, true, d); changed2 { *v = v2 } case map[uint]float64: - fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintFloat64V(v, false, d) case *map[uint]float64: - v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, true, d); changed2 { *v = v2 } case map[uint]bool: - fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintBoolV(v, false, d) case *map[uint]bool: - v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintBoolV(*v, true, d); changed2 { *v = v2 } case map[uint8]interface{}: - fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8IntfV(v, false, d) case *map[uint8]interface{}: - v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, true, d); changed2 { *v = v2 } case map[uint8]string: - fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8StringV(v, false, d) case *map[uint8]string: - v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8StringV(*v, true, d); changed2 { *v = v2 } case map[uint8]uint: - fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8UintV(v, false, d) case *map[uint8]uint: - v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8UintV(*v, true, d); changed2 { *v = v2 } case map[uint8]uint8: - fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Uint8V(v, false, d) case *map[uint8]uint8: - v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, true, d); changed2 { *v = v2 } case map[uint8]uint16: - fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Uint16V(v, false, d) case *map[uint8]uint16: - v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, true, d); changed2 { *v = v2 } case map[uint8]uint32: - fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Uint32V(v, false, d) case *map[uint8]uint32: - v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, true, d); changed2 { *v = v2 } case map[uint8]uint64: - fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Uint64V(v, false, d) case *map[uint8]uint64: - v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, true, d); changed2 { *v = v2 } case map[uint8]uintptr: - fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8UintptrV(v, false, d) case *map[uint8]uintptr: - v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, true, d); changed2 { *v = v2 } case map[uint8]int: - fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8IntV(v, false, d) case *map[uint8]int: - v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8IntV(*v, true, d); changed2 { *v = v2 } case map[uint8]int8: - fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Int8V(v, false, d) case *map[uint8]int8: - v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, true, d); changed2 { *v = v2 } case map[uint8]int16: - fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Int16V(v, false, d) case *map[uint8]int16: - v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, true, d); changed2 { *v = v2 } case map[uint8]int32: - fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Int32V(v, false, d) case *map[uint8]int32: - v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, true, d); changed2 { *v = v2 } case map[uint8]int64: - fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Int64V(v, false, d) case *map[uint8]int64: - v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, true, d); changed2 { *v = v2 } case map[uint8]float32: - fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Float32V(v, false, d) case *map[uint8]float32: - v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, true, d); changed2 { *v = v2 } case map[uint8]float64: - fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8Float64V(v, false, d) case *map[uint8]float64: - v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, true, d); changed2 { *v = v2 } case map[uint8]bool: - fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint8BoolV(v, false, d) case *map[uint8]bool: - v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, true, d); changed2 { *v = v2 } case []uint16: - fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceUint16V(v, false, d) case *[]uint16: - v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceUint16V(*v, true, d); changed2 { *v = v2 } case map[uint16]interface{}: - fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16IntfV(v, false, d) case *map[uint16]interface{}: - v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, true, d); changed2 { *v = v2 } case map[uint16]string: - fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16StringV(v, false, d) case *map[uint16]string: - v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16StringV(*v, true, d); changed2 { *v = v2 } case map[uint16]uint: - fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16UintV(v, false, d) case *map[uint16]uint: - v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16UintV(*v, true, d); changed2 { *v = v2 } case map[uint16]uint8: - fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Uint8V(v, false, d) case *map[uint16]uint8: - v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, true, d); changed2 { *v = v2 } case map[uint16]uint16: - fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Uint16V(v, false, d) case *map[uint16]uint16: - v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, true, d); changed2 { *v = v2 } case map[uint16]uint32: - fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Uint32V(v, false, d) case *map[uint16]uint32: - v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, true, d); changed2 { *v = v2 } case map[uint16]uint64: - fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Uint64V(v, false, d) case *map[uint16]uint64: - v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, true, d); changed2 { *v = v2 } case map[uint16]uintptr: - fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16UintptrV(v, false, d) case *map[uint16]uintptr: - v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, true, d); changed2 { *v = v2 } case map[uint16]int: - fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16IntV(v, false, d) case *map[uint16]int: - v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16IntV(*v, true, d); changed2 { *v = v2 } case map[uint16]int8: - fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Int8V(v, false, d) case *map[uint16]int8: - v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, true, d); changed2 { *v = v2 } case map[uint16]int16: - fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Int16V(v, false, d) case *map[uint16]int16: - v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, true, d); changed2 { *v = v2 } case map[uint16]int32: - fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Int32V(v, false, d) case *map[uint16]int32: - v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, true, d); changed2 { *v = v2 } case map[uint16]int64: - fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Int64V(v, false, d) case *map[uint16]int64: - v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, true, d); changed2 { *v = v2 } case map[uint16]float32: - fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Float32V(v, false, d) case *map[uint16]float32: - v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, true, d); changed2 { *v = v2 } case map[uint16]float64: - fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16Float64V(v, false, d) case *map[uint16]float64: - v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, true, d); changed2 { *v = v2 } case map[uint16]bool: - fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint16BoolV(v, false, d) case *map[uint16]bool: - v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, true, d); changed2 { *v = v2 } case []uint32: - fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceUint32V(v, false, d) case *[]uint32: - v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceUint32V(*v, true, d); changed2 { *v = v2 } case map[uint32]interface{}: - fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32IntfV(v, false, d) case *map[uint32]interface{}: - v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, true, d); changed2 { *v = v2 } case map[uint32]string: - fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32StringV(v, false, d) case *map[uint32]string: - v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32StringV(*v, true, d); changed2 { *v = v2 } case map[uint32]uint: - fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32UintV(v, false, d) case *map[uint32]uint: - v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32UintV(*v, true, d); changed2 { *v = v2 } case map[uint32]uint8: - fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Uint8V(v, false, d) case *map[uint32]uint8: - v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, true, d); changed2 { *v = v2 } case map[uint32]uint16: - fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Uint16V(v, false, d) case *map[uint32]uint16: - v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, true, d); changed2 { *v = v2 } case map[uint32]uint32: - fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Uint32V(v, false, d) case *map[uint32]uint32: - v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, true, d); changed2 { *v = v2 } case map[uint32]uint64: - fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Uint64V(v, false, d) case *map[uint32]uint64: - v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, true, d); changed2 { *v = v2 } case map[uint32]uintptr: - fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32UintptrV(v, false, d) case *map[uint32]uintptr: - v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, true, d); changed2 { *v = v2 } case map[uint32]int: - fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32IntV(v, false, d) case *map[uint32]int: - v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32IntV(*v, true, d); changed2 { *v = v2 } case map[uint32]int8: - fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Int8V(v, false, d) case *map[uint32]int8: - v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, true, d); changed2 { *v = v2 } case map[uint32]int16: - fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Int16V(v, false, d) case *map[uint32]int16: - v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, true, d); changed2 { *v = v2 } case map[uint32]int32: - fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Int32V(v, false, d) case *map[uint32]int32: - v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, true, d); changed2 { *v = v2 } case map[uint32]int64: - fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Int64V(v, false, d) case *map[uint32]int64: - v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, true, d); changed2 { *v = v2 } case map[uint32]float32: - fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Float32V(v, false, d) case *map[uint32]float32: - v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, true, d); changed2 { *v = v2 } case map[uint32]float64: - fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32Float64V(v, false, d) case *map[uint32]float64: - v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, true, d); changed2 { *v = v2 } case map[uint32]bool: - fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint32BoolV(v, false, d) case *map[uint32]bool: - v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, true, d); changed2 { *v = v2 } case []uint64: - fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceUint64V(v, false, d) case *[]uint64: - v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceUint64V(*v, true, d); changed2 { *v = v2 } case map[uint64]interface{}: - fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64IntfV(v, false, d) case *map[uint64]interface{}: - v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, true, d); changed2 { *v = v2 } case map[uint64]string: - fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64StringV(v, false, d) case *map[uint64]string: - v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64StringV(*v, true, d); changed2 { *v = v2 } case map[uint64]uint: - fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64UintV(v, false, d) case *map[uint64]uint: - v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64UintV(*v, true, d); changed2 { *v = v2 } case map[uint64]uint8: - fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Uint8V(v, false, d) case *map[uint64]uint8: - v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, true, d); changed2 { *v = v2 } case map[uint64]uint16: - fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Uint16V(v, false, d) case *map[uint64]uint16: - v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, true, d); changed2 { *v = v2 } case map[uint64]uint32: - fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Uint32V(v, false, d) case *map[uint64]uint32: - v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, true, d); changed2 { *v = v2 } case map[uint64]uint64: - fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Uint64V(v, false, d) case *map[uint64]uint64: - v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, true, d); changed2 { *v = v2 } case map[uint64]uintptr: - fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64UintptrV(v, false, d) case *map[uint64]uintptr: - v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, true, d); changed2 { *v = v2 } case map[uint64]int: - fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64IntV(v, false, d) case *map[uint64]int: - v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64IntV(*v, true, d); changed2 { *v = v2 } case map[uint64]int8: - fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Int8V(v, false, d) case *map[uint64]int8: - v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, true, d); changed2 { *v = v2 } case map[uint64]int16: - fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Int16V(v, false, d) case *map[uint64]int16: - v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, true, d); changed2 { *v = v2 } case map[uint64]int32: - fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Int32V(v, false, d) case *map[uint64]int32: - v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, true, d); changed2 { *v = v2 } case map[uint64]int64: - fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Int64V(v, false, d) case *map[uint64]int64: - v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, true, d); changed2 { *v = v2 } case map[uint64]float32: - fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Float32V(v, false, d) case *map[uint64]float32: - v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, true, d); changed2 { *v = v2 } case map[uint64]float64: - fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64Float64V(v, false, d) case *map[uint64]float64: - v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, true, d); changed2 { *v = v2 } case map[uint64]bool: - fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUint64BoolV(v, false, d) case *map[uint64]bool: - v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, true, d); changed2 { *v = v2 } case []uintptr: - fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceUintptrV(v, false, d) case *[]uintptr: - v2, changed2 := fastpathTV.DecSliceUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceUintptrV(*v, true, d); changed2 { *v = v2 } case map[uintptr]interface{}: - fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrIntfV(v, false, d) case *map[uintptr]interface{}: - v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, true, d); changed2 { *v = v2 } case map[uintptr]string: - fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrStringV(v, false, d) case *map[uintptr]string: - v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, true, d); changed2 { *v = v2 } case map[uintptr]uint: - fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUintV(v, false, d) case *map[uintptr]uint: - v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, true, d); changed2 { *v = v2 } case map[uintptr]uint8: - fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUint8V(v, false, d) case *map[uintptr]uint8: - v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, true, d); changed2 { *v = v2 } case map[uintptr]uint16: - fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUint16V(v, false, d) case *map[uintptr]uint16: - v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, true, d); changed2 { *v = v2 } case map[uintptr]uint32: - fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUint32V(v, false, d) case *map[uintptr]uint32: - v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, true, d); changed2 { *v = v2 } case map[uintptr]uint64: - fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUint64V(v, false, d) case *map[uintptr]uint64: - v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, true, d); changed2 { *v = v2 } case map[uintptr]uintptr: - fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrUintptrV(v, false, d) case *map[uintptr]uintptr: - v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, true, d); changed2 { *v = v2 } case map[uintptr]int: - fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrIntV(v, false, d) case *map[uintptr]int: - v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, true, d); changed2 { *v = v2 } case map[uintptr]int8: - fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrInt8V(v, false, d) case *map[uintptr]int8: - v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, true, d); changed2 { *v = v2 } case map[uintptr]int16: - fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrInt16V(v, false, d) case *map[uintptr]int16: - v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, true, d); changed2 { *v = v2 } case map[uintptr]int32: - fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrInt32V(v, false, d) case *map[uintptr]int32: - v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, true, d); changed2 { *v = v2 } case map[uintptr]int64: - fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrInt64V(v, false, d) case *map[uintptr]int64: - v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, true, d); changed2 { *v = v2 } case map[uintptr]float32: - fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrFloat32V(v, false, d) case *map[uintptr]float32: - v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, true, d); changed2 { *v = v2 } case map[uintptr]float64: - fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrFloat64V(v, false, d) case *map[uintptr]float64: - v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, true, d); changed2 { *v = v2 } case map[uintptr]bool: - fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapUintptrBoolV(v, false, d) case *map[uintptr]bool: - v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, true, d); changed2 { *v = v2 } case []int: - fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceIntV(v, false, d) case *[]int: - v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceIntV(*v, true, d); changed2 { *v = v2 } case map[int]interface{}: - fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntIntfV(v, false, d) case *map[int]interface{}: - v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntIntfV(*v, true, d); changed2 { *v = v2 } case map[int]string: - fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntStringV(v, false, d) case *map[int]string: - v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntStringV(*v, true, d); changed2 { *v = v2 } case map[int]uint: - fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUintV(v, false, d) case *map[int]uint: - v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUintV(*v, true, d); changed2 { *v = v2 } case map[int]uint8: - fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUint8V(v, false, d) case *map[int]uint8: - v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUint8V(*v, true, d); changed2 { *v = v2 } case map[int]uint16: - fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUint16V(v, false, d) case *map[int]uint16: - v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUint16V(*v, true, d); changed2 { *v = v2 } case map[int]uint32: - fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUint32V(v, false, d) case *map[int]uint32: - v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUint32V(*v, true, d); changed2 { *v = v2 } case map[int]uint64: - fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUint64V(v, false, d) case *map[int]uint64: - v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUint64V(*v, true, d); changed2 { *v = v2 } case map[int]uintptr: - fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntUintptrV(v, false, d) case *map[int]uintptr: - v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, true, d); changed2 { *v = v2 } case map[int]int: - fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntIntV(v, false, d) case *map[int]int: - v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntIntV(*v, true, d); changed2 { *v = v2 } case map[int]int8: - fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntInt8V(v, false, d) case *map[int]int8: - v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntInt8V(*v, true, d); changed2 { *v = v2 } case map[int]int16: - fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntInt16V(v, false, d) case *map[int]int16: - v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntInt16V(*v, true, d); changed2 { *v = v2 } case map[int]int32: - fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntInt32V(v, false, d) case *map[int]int32: - v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntInt32V(*v, true, d); changed2 { *v = v2 } case map[int]int64: - fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntInt64V(v, false, d) case *map[int]int64: - v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntInt64V(*v, true, d); changed2 { *v = v2 } case map[int]float32: - fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntFloat32V(v, false, d) case *map[int]float32: - v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, true, d); changed2 { *v = v2 } case map[int]float64: - fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntFloat64V(v, false, d) case *map[int]float64: - v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, true, d); changed2 { *v = v2 } case map[int]bool: - fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapIntBoolV(v, false, d) case *map[int]bool: - v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapIntBoolV(*v, true, d); changed2 { *v = v2 } case []int8: - fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceInt8V(v, false, d) case *[]int8: - v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceInt8V(*v, true, d); changed2 { *v = v2 } case map[int8]interface{}: - fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8IntfV(v, false, d) case *map[int8]interface{}: - v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, true, d); changed2 { *v = v2 } case map[int8]string: - fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8StringV(v, false, d) case *map[int8]string: - v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8StringV(*v, true, d); changed2 { *v = v2 } case map[int8]uint: - fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8UintV(v, false, d) case *map[int8]uint: - v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8UintV(*v, true, d); changed2 { *v = v2 } case map[int8]uint8: - fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Uint8V(v, false, d) case *map[int8]uint8: - v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, true, d); changed2 { *v = v2 } case map[int8]uint16: - fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Uint16V(v, false, d) case *map[int8]uint16: - v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, true, d); changed2 { *v = v2 } case map[int8]uint32: - fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Uint32V(v, false, d) case *map[int8]uint32: - v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, true, d); changed2 { *v = v2 } case map[int8]uint64: - fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Uint64V(v, false, d) case *map[int8]uint64: - v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, true, d); changed2 { *v = v2 } case map[int8]uintptr: - fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8UintptrV(v, false, d) case *map[int8]uintptr: - v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, true, d); changed2 { *v = v2 } case map[int8]int: - fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8IntV(v, false, d) case *map[int8]int: - v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8IntV(*v, true, d); changed2 { *v = v2 } case map[int8]int8: - fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Int8V(v, false, d) case *map[int8]int8: - v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, true, d); changed2 { *v = v2 } case map[int8]int16: - fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Int16V(v, false, d) case *map[int8]int16: - v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, true, d); changed2 { *v = v2 } case map[int8]int32: - fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Int32V(v, false, d) case *map[int8]int32: - v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, true, d); changed2 { *v = v2 } case map[int8]int64: - fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Int64V(v, false, d) case *map[int8]int64: - v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, true, d); changed2 { *v = v2 } case map[int8]float32: - fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Float32V(v, false, d) case *map[int8]float32: - v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, true, d); changed2 { *v = v2 } case map[int8]float64: - fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8Float64V(v, false, d) case *map[int8]float64: - v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, true, d); changed2 { *v = v2 } case map[int8]bool: - fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt8BoolV(v, false, d) case *map[int8]bool: - v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, true, d); changed2 { *v = v2 } case []int16: - fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceInt16V(v, false, d) case *[]int16: - v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceInt16V(*v, true, d); changed2 { *v = v2 } case map[int16]interface{}: - fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16IntfV(v, false, d) case *map[int16]interface{}: - v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, true, d); changed2 { *v = v2 } case map[int16]string: - fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16StringV(v, false, d) case *map[int16]string: - v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16StringV(*v, true, d); changed2 { *v = v2 } case map[int16]uint: - fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16UintV(v, false, d) case *map[int16]uint: - v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16UintV(*v, true, d); changed2 { *v = v2 } case map[int16]uint8: - fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Uint8V(v, false, d) case *map[int16]uint8: - v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, true, d); changed2 { *v = v2 } case map[int16]uint16: - fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Uint16V(v, false, d) case *map[int16]uint16: - v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, true, d); changed2 { *v = v2 } case map[int16]uint32: - fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Uint32V(v, false, d) case *map[int16]uint32: - v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, true, d); changed2 { *v = v2 } case map[int16]uint64: - fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Uint64V(v, false, d) case *map[int16]uint64: - v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, true, d); changed2 { *v = v2 } case map[int16]uintptr: - fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16UintptrV(v, false, d) case *map[int16]uintptr: - v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, true, d); changed2 { *v = v2 } case map[int16]int: - fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16IntV(v, false, d) case *map[int16]int: - v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16IntV(*v, true, d); changed2 { *v = v2 } case map[int16]int8: - fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Int8V(v, false, d) case *map[int16]int8: - v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, true, d); changed2 { *v = v2 } case map[int16]int16: - fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Int16V(v, false, d) case *map[int16]int16: - v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, true, d); changed2 { *v = v2 } case map[int16]int32: - fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Int32V(v, false, d) case *map[int16]int32: - v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, true, d); changed2 { *v = v2 } case map[int16]int64: - fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Int64V(v, false, d) case *map[int16]int64: - v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, true, d); changed2 { *v = v2 } case map[int16]float32: - fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Float32V(v, false, d) case *map[int16]float32: - v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, true, d); changed2 { *v = v2 } case map[int16]float64: - fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16Float64V(v, false, d) case *map[int16]float64: - v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, true, d); changed2 { *v = v2 } case map[int16]bool: - fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt16BoolV(v, false, d) case *map[int16]bool: - v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, true, d); changed2 { *v = v2 } case []int32: - fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceInt32V(v, false, d) case *[]int32: - v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceInt32V(*v, true, d); changed2 { *v = v2 } case map[int32]interface{}: - fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32IntfV(v, false, d) case *map[int32]interface{}: - v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, true, d); changed2 { *v = v2 } case map[int32]string: - fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32StringV(v, false, d) case *map[int32]string: - v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32StringV(*v, true, d); changed2 { *v = v2 } case map[int32]uint: - fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32UintV(v, false, d) case *map[int32]uint: - v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32UintV(*v, true, d); changed2 { *v = v2 } case map[int32]uint8: - fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Uint8V(v, false, d) case *map[int32]uint8: - v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, true, d); changed2 { *v = v2 } case map[int32]uint16: - fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Uint16V(v, false, d) case *map[int32]uint16: - v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, true, d); changed2 { *v = v2 } case map[int32]uint32: - fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Uint32V(v, false, d) case *map[int32]uint32: - v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, true, d); changed2 { *v = v2 } case map[int32]uint64: - fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Uint64V(v, false, d) case *map[int32]uint64: - v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, true, d); changed2 { *v = v2 } case map[int32]uintptr: - fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32UintptrV(v, false, d) case *map[int32]uintptr: - v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, true, d); changed2 { *v = v2 } case map[int32]int: - fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32IntV(v, false, d) case *map[int32]int: - v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32IntV(*v, true, d); changed2 { *v = v2 } case map[int32]int8: - fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Int8V(v, false, d) case *map[int32]int8: - v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, true, d); changed2 { *v = v2 } case map[int32]int16: - fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Int16V(v, false, d) case *map[int32]int16: - v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, true, d); changed2 { *v = v2 } case map[int32]int32: - fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Int32V(v, false, d) case *map[int32]int32: - v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, true, d); changed2 { *v = v2 } case map[int32]int64: - fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Int64V(v, false, d) case *map[int32]int64: - v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, true, d); changed2 { *v = v2 } case map[int32]float32: - fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Float32V(v, false, d) case *map[int32]float32: - v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, true, d); changed2 { *v = v2 } case map[int32]float64: - fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32Float64V(v, false, d) case *map[int32]float64: - v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, true, d); changed2 { *v = v2 } case map[int32]bool: - fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt32BoolV(v, false, d) case *map[int32]bool: - v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, true, d); changed2 { *v = v2 } case []int64: - fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceInt64V(v, false, d) case *[]int64: - v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceInt64V(*v, true, d); changed2 { *v = v2 } case map[int64]interface{}: - fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64IntfV(v, false, d) case *map[int64]interface{}: - v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, true, d); changed2 { *v = v2 } case map[int64]string: - fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64StringV(v, false, d) case *map[int64]string: - v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64StringV(*v, true, d); changed2 { *v = v2 } case map[int64]uint: - fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64UintV(v, false, d) case *map[int64]uint: - v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64UintV(*v, true, d); changed2 { *v = v2 } case map[int64]uint8: - fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Uint8V(v, false, d) case *map[int64]uint8: - v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, true, d); changed2 { *v = v2 } case map[int64]uint16: - fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Uint16V(v, false, d) case *map[int64]uint16: - v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, true, d); changed2 { *v = v2 } case map[int64]uint32: - fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Uint32V(v, false, d) case *map[int64]uint32: - v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, true, d); changed2 { *v = v2 } case map[int64]uint64: - fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Uint64V(v, false, d) case *map[int64]uint64: - v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, true, d); changed2 { *v = v2 } case map[int64]uintptr: - fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64UintptrV(v, false, d) case *map[int64]uintptr: - v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, true, d); changed2 { *v = v2 } case map[int64]int: - fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64IntV(v, false, d) case *map[int64]int: - v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64IntV(*v, true, d); changed2 { *v = v2 } case map[int64]int8: - fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Int8V(v, false, d) case *map[int64]int8: - v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, true, d); changed2 { *v = v2 } case map[int64]int16: - fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Int16V(v, false, d) case *map[int64]int16: - v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, true, d); changed2 { *v = v2 } case map[int64]int32: - fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Int32V(v, false, d) case *map[int64]int32: - v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, true, d); changed2 { *v = v2 } case map[int64]int64: - fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Int64V(v, false, d) case *map[int64]int64: - v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, true, d); changed2 { *v = v2 } case map[int64]float32: - fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Float32V(v, false, d) case *map[int64]float32: - v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, true, d); changed2 { *v = v2 } case map[int64]float64: - fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64Float64V(v, false, d) case *map[int64]float64: - v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, true, d); changed2 { *v = v2 } case map[int64]bool: - fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapInt64BoolV(v, false, d) case *map[int64]bool: - v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, true, d); changed2 { *v = v2 } case []bool: - fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecSliceBoolV(v, false, d) case *[]bool: - v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecSliceBoolV(*v, true, d); changed2 { *v = v2 } case map[bool]interface{}: - fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolIntfV(v, false, d) case *map[bool]interface{}: - v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, true, d); changed2 { *v = v2 } case map[bool]string: - fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolStringV(v, false, d) case *map[bool]string: - v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolStringV(*v, true, d); changed2 { *v = v2 } case map[bool]uint: - fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUintV(v, false, d) case *map[bool]uint: - v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUintV(*v, true, d); changed2 { *v = v2 } case map[bool]uint8: - fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUint8V(v, false, d) case *map[bool]uint8: - v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, true, d); changed2 { *v = v2 } case map[bool]uint16: - fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUint16V(v, false, d) case *map[bool]uint16: - v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, true, d); changed2 { *v = v2 } case map[bool]uint32: - fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUint32V(v, false, d) case *map[bool]uint32: - v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, true, d); changed2 { *v = v2 } case map[bool]uint64: - fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUint64V(v, false, d) case *map[bool]uint64: - v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, true, d); changed2 { *v = v2 } case map[bool]uintptr: - fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolUintptrV(v, false, d) case *map[bool]uintptr: - v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, true, d); changed2 { *v = v2 } case map[bool]int: - fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolIntV(v, false, d) case *map[bool]int: - v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolIntV(*v, true, d); changed2 { *v = v2 } case map[bool]int8: - fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolInt8V(v, false, d) case *map[bool]int8: - v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, true, d); changed2 { *v = v2 } case map[bool]int16: - fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolInt16V(v, false, d) case *map[bool]int16: - v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, true, d); changed2 { *v = v2 } case map[bool]int32: - fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolInt32V(v, false, d) case *map[bool]int32: - v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, true, d); changed2 { *v = v2 } case map[bool]int64: - fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolInt64V(v, false, d) case *map[bool]int64: - v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, true, d); changed2 { *v = v2 } case map[bool]float32: - fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolFloat32V(v, false, d) case *map[bool]float32: - v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, true, d); changed2 { *v = v2 } case map[bool]float64: - fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolFloat64V(v, false, d) case *map[bool]float64: - v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, true, d); changed2 { *v = v2 } case map[bool]bool: - fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) + fastpathTV.DecMapBoolBoolV(v, false, d) case *map[bool]bool: - v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { + if v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, true, d); changed2 { *v = v2 } @@ -18121,242 +16423,1035 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return true } -// -- -- fast path functions +func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) bool { + switch v := iv.(type) { -func (f *decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]interface{}) - v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]interface{}) - fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) - } -} + case *[]interface{}: + *v = nil -func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, d *Decoder) (_ []interface{}, changed bool) { - dd := d.d + case *map[interface{}]interface{}: + *v = nil - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []interface{}{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } + case *map[interface{}]string: + *v = nil - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - if xlen <= cap(v) { - v = v[:xlen] - } else { - v = make([]interface{}, 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 { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - } else { - xlen = 8 - } - v = make([]interface{}, xlen) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, nil) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else { - d.decode(&v[j]) - } - } - if canChange { - if j < len(v) { - v = v[:j] - changed = true - } else if j == 0 && v == nil { - v = make([]interface{}, 0) - changed = true - } - } - slh.End() - return v, changed -} + case *map[interface{}]uint: + *v = nil -func (f *decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]string) - v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]string) - fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) - } -} + case *map[interface{}]uint8: + *v = nil -func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { - v, changed := f.DecSliceStringV(*vp, checkNil, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d *Decoder) (_ []string, changed bool) { - dd := d.d + case *map[interface{}]uint16: + *v = nil - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { - if v == nil { - v = []string{} - } else if len(v) != 0 { - v = v[:0] - } - changed = true - } - slh.End() - return v, changed - } + case *map[interface{}]uint32: + *v = nil - hasLen := containerLenS > 0 - var xlen int - if hasLen && canChange { - if containerLenS > cap(v) { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - if xlen <= cap(v) { - v = v[:xlen] - } else { - v = make([]string, 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 { - if hasLen { - xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) - } else { - xlen = 8 - } - v = make([]string, xlen) - changed = true - } - // if indefinite, etc, then expand the slice if necessary - var decodeIntoBlank bool - if j >= len(v) { - if canChange { - v = append(v, "") - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - decodeIntoBlank = true - } - } - slh.ElemContainerState(j) - if decodeIntoBlank { - d.swallow() - } else { - v[j] = dd.DecodeString() - } - } - if canChange { - if j < len(v) { - v = v[:j] - changed = true - } else if j == 0 && v == nil { - v = make([]string, 0) - changed = true - } - } - slh.End() - return v, changed -} + case *map[interface{}]uint64: + *v = nil -func (f *decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]float32) - v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { - *vp = v - } - } else { - v := rv2i(rv).([]float32) - fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) - } -} + case *map[interface{}]uintptr: + *v = nil -func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) - if changed { - *vp = v - } -} -func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, d *Decoder) (_ []float32, changed bool) { - dd := d.d + case *map[interface{}]int: + *v = nil - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } - slh, containerLenS := d.decSliceHelperStart() - if containerLenS == 0 { - if canChange { + 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{}: + *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[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) + return false + } + return true +} + +// -- -- fast path functions + +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 = v + } + } else { + fastpathTV.DecSliceIntfV(rv2i(rv).([]interface{}), !array, d) + } +} + +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, d *Decoder) { + if v, changed := f.DecSliceIntfV(*vp, true, d); 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 { + if v == nil { + v = []interface{}{} + } 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, 16) + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]interface{}, 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 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) + } else { + xlen = 8 + } + v = make([]interface{}, xlen) + changed = true + } + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= len(v) { + if canChange { + v = append(v, nil) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + decodeIntoBlank = true + } + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else { + d.decode(&v[j]) + } + } + if canChange { + if j < len(v) { + v = v[:j] + changed = true + } else if j == 0 && v == nil { + v = make([]interface{}, 0) + changed = true + } + } + slh.End() + return v, changed +} + +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 = v + } + } else { + fastpathTV.DecSliceStringV(rv2i(rv).([]string), !array, d) + } +} + +func (f fastpathT) DecSliceStringX(vp *[]string, d *Decoder) { + if v, changed := f.DecSliceStringV(*vp, true, d); 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 { + if v == nil { + v = []string{} + } 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, 16) + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]string, 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 { + if hasLen { + xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16) + } else { + xlen = 8 + } + v = make([]string, xlen) + changed = true + } + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= len(v) { + if canChange { + v = append(v, "") + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + decodeIntoBlank = true + } + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else { + v[j] = dd.DecodeString() + } + } + if canChange { + if j < len(v) { + v = v[:j] + changed = true + } else if j == 0 && v == nil { + v = make([]string, 0) + changed = true + } + } + slh.End() + return v, changed +} + +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 = v + } + } else { + fastpathTV.DecSliceFloat32V(rv2i(rv).([]float32), !array, d) + } +} + +func (f fastpathT) DecSliceFloat32X(vp *[]float32, d *Decoder) { + if v, changed := f.DecSliceFloat32V(*vp, true, d); 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 { if v == nil { v = []float32{} } else if len(v) != 0 { @@ -18426,35 +17521,25 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]float64) - v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]float64) - fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceFloat64V(rv2i(rv).([]float64), !array, d) } } -func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceFloat64X(vp *[]float64, d *Decoder) { + if v, changed := f.DecSliceFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, d *Decoder) (_ []float64, changed bool) { +func (_ fastpathT) DecSliceFloat64V(v []float64, canChange bool, d *Decoder) (_ []float64, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -18527,35 +17612,25 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]uint) - v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]uint) - fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceUintV(rv2i(rv).([]uint), !array, d) } } -func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceUintX(vp *[]uint, d *Decoder) { + if v, changed := f.DecSliceUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Decoder) (_ []uint, changed bool) { +func (_ fastpathT) DecSliceUintV(v []uint, canChange bool, d *Decoder) (_ []uint, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -18628,35 +17703,25 @@ func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Dec return v, changed } -func (f *decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]uint16) - v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +func (d *Decoder) fastpathDecSliceUint16R(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 = v } } else { - v := rv2i(rv).([]uint16) - fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceUint16V(rv2i(rv).([]uint16), !array, d) } } -func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceUint16X(vp *[]uint16, d *Decoder) { + if v, changed := f.DecSliceUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d *Decoder) (_ []uint16, changed bool) { +func (_ fastpathT) DecSliceUint16V(v []uint16, canChange bool, d *Decoder) (_ []uint16, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -18729,35 +17794,25 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d return v, changed } -func (f *decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]uint32) - v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]uint32) - fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceUint32V(rv2i(rv).([]uint32), !array, d) } } -func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceUint32X(vp *[]uint32, d *Decoder) { + if v, changed := f.DecSliceUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d *Decoder) (_ []uint32, changed bool) { +func (_ fastpathT) DecSliceUint32V(v []uint32, canChange bool, d *Decoder) (_ []uint32, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -18830,35 +17885,25 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d return v, changed } -func (f *decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]uint64) - v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]uint64) - fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceUint64V(rv2i(rv).([]uint64), !array, d) } } -func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceUint64X(vp *[]uint64, d *Decoder) { + if v, changed := f.DecSliceUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d *Decoder) (_ []uint64, changed bool) { +func (_ fastpathT) DecSliceUint64V(v []uint64, canChange bool, d *Decoder) (_ []uint64, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -18931,35 +17976,25 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d return v, changed } -func (f *decFnInfo) fastpathDecSliceUintptrR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]uintptr) - v, changed := fastpathTV.DecSliceUintptrV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]uintptr) - fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceUintptrV(rv2i(rv).([]uintptr), !array, d) } } -func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, d *Decoder) { + if v, changed := f.DecSliceUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool, d *Decoder) (_ []uintptr, changed bool) { +func (_ fastpathT) DecSliceUintptrV(v []uintptr, canChange bool, d *Decoder) (_ []uintptr, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19032,35 +18067,25 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]int) - v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]int) - fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceIntV(rv2i(rv).([]int), !array, d) } } -func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { - v, changed := f.DecSliceIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceIntX(vp *[]int, d *Decoder) { + if v, changed := f.DecSliceIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decoder) (_ []int, changed bool) { +func (_ fastpathT) DecSliceIntV(v []int, canChange bool, d *Decoder) (_ []int, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19133,35 +18158,25 @@ func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decod return v, changed } -func (f *decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]int8) - v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]int8) - fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceInt8V(rv2i(rv).([]int8), !array, d) } } -func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceInt8X(vp *[]int8, d *Decoder) { + if v, changed := f.DecSliceInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Decoder) (_ []int8, changed bool) { +func (_ fastpathT) DecSliceInt8V(v []int8, canChange bool, d *Decoder) (_ []int8, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19234,35 +18249,25 @@ func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Dec return v, changed } -func (f *decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]int16) - v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]int16) - fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceInt16V(rv2i(rv).([]int16), !array, d) } } -func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceInt16X(vp *[]int16, d *Decoder) { + if v, changed := f.DecSliceInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *Decoder) (_ []int16, changed bool) { +func (_ fastpathT) DecSliceInt16V(v []int16, canChange bool, d *Decoder) (_ []int16, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19335,35 +18340,25 @@ func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *D return v, changed } -func (f *decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]int32) - v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]int32) - fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceInt32V(rv2i(rv).([]int32), !array, d) } } -func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceInt32X(vp *[]int32, d *Decoder) { + if v, changed := f.DecSliceInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *Decoder) (_ []int32, changed bool) { +func (_ fastpathT) DecSliceInt32V(v []int32, canChange bool, d *Decoder) (_ []int32, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19436,35 +18431,25 @@ func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *D return v, changed } -func (f *decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]int64) - v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]int64) - fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceInt64V(rv2i(rv).([]int64), !array, d) } } -func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceInt64X(vp *[]int64, d *Decoder) { + if v, changed := f.DecSliceInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *Decoder) (_ []int64, changed bool) { +func (_ fastpathT) DecSliceInt64V(v []int64, canChange bool, d *Decoder) (_ []int64, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19537,35 +18522,25 @@ func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *D return v, changed } -func (f *decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { - vp := rv2i(rv.Addr()).(*[]bool) - v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { +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 = v } } else { - v := rv2i(rv).([]bool) - fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.DecSliceBoolV(rv2i(rv).([]bool), !array, d) } } -func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { - v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecSliceBoolX(vp *[]bool, d *Decoder) { + if v, changed := f.DecSliceBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Decoder) (_ []bool, changed bool) { +func (_ fastpathT) DecSliceBoolV(v []bool, canChange bool, d *Decoder) (_ []bool, changed bool) { dd := d.d - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -19638,35 +18613,25 @@ func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Dec return v, changed } -func (f *decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]interface{}) - v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]interface{}) - fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), false, d) } -func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, d *Decoder) { + if v, changed := f.DecMapIntfIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool, d *Decoder) (_ map[interface{}]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -19695,6 +18660,14 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -19711,35 +18684,25 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]string) - v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]string) - fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfStringV(rv2i(rv).(map[interface{}]string), false, d) } -func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, d *Decoder) { + if v, changed := f.DecMapIntfStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, d *Decoder) (_ map[interface{}]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -19768,6 +18731,14 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -19779,35 +18750,25 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uint) - v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uint) - fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUintV(rv2i(rv).(map[interface{}]uint), false, d) } -func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, d *Decoder) { + if v, changed := f.DecMapIntfUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, d *Decoder) (_ map[interface{}]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -19836,6 +18797,14 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -19847,35 +18816,25 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uint8) - v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uint8) - fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), false, d) } -func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, d *Decoder) { + if v, changed := f.DecMapIntfUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, d *Decoder) (_ map[interface{}]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -19904,6 +18863,14 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -19915,35 +18882,25 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uint16) - v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uint16) - fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), false, d) } -func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, d *Decoder) { + if v, changed := f.DecMapIntfUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, d *Decoder) (_ map[interface{}]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -19972,6 +18929,14 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -19983,35 +18948,25 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uint32) - v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uint32) - fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), false, d) } -func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, d *Decoder) { + if v, changed := f.DecMapIntfUint32V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint32, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, + d *Decoder) (_ map[interface{}]uint32, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -20040,6 +18995,14 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -20051,35 +19014,25 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uint64) - v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uint64) - fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), false, d) } -func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, d *Decoder) { + if v, changed := f.DecMapIntfUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, d *Decoder) (_ map[interface{}]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20108,6 +19061,14 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -20119,35 +19080,25 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapIntfUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]uintptr) - v, changed := fastpathTV.DecMapIntfUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]uintptr) - fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), false, d) } -func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, d *Decoder) { + if v, changed := f.DecMapIntfUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, d *Decoder) (_ map[interface{}]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20176,6 +19127,14 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -20187,35 +19146,25 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]int) - v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]int) - fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfIntV(rv2i(rv).(map[interface{}]int), false, d) } -func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, d *Decoder) { + if v, changed := f.DecMapIntfIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, d *Decoder) (_ map[interface{}]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20244,6 +19193,14 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChang if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -20255,35 +19212,25 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChang return v, changed } -func (f *decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]int8) - v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]int8) - fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfInt8V(rv2i(rv).(map[interface{}]int8), false, d) } -func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, d *Decoder) { + if v, changed := f.DecMapIntfInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, d *Decoder) (_ map[interface{}]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -20312,6 +19259,14 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -20323,35 +19278,25 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]int16) - v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]int16) - fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfInt16V(rv2i(rv).(map[interface{}]int16), false, d) } -func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, d *Decoder) { + if v, changed := f.DecMapIntfInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, d *Decoder) (_ map[interface{}]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -20380,6 +19325,14 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -20391,35 +19344,25 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]int32) - v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]int32) - fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfInt32V(rv2i(rv).(map[interface{}]int32), false, d) } -func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, d *Decoder) { + if v, changed := f.DecMapIntfInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, d *Decoder) (_ map[interface{}]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -20448,6 +19391,14 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -20459,35 +19410,25 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]int64) - v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]int64) - fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfInt64V(rv2i(rv).(map[interface{}]int64), false, d) } -func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, d *Decoder) { + if v, changed := f.DecMapIntfInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, d *Decoder) (_ map[interface{}]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20516,6 +19457,14 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -20527,35 +19476,25 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]float32) - v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]float32) - fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), false, d) } -func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, d *Decoder) { + if v, changed := f.DecMapIntfFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, d *Decoder) (_ map[interface{}]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -20584,6 +19523,14 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -20595,35 +19542,25 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]float64) - v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]float64) - fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), false, d) } -func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, d *Decoder) { + if v, changed := f.DecMapIntfFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, d *Decoder) (_ map[interface{}]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20652,6 +19589,14 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -20663,35 +19608,25 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[interface{}]bool) - v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[interface{}]bool) - fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntfBoolV(rv2i(rv).(map[interface{}]bool), false, d) } -func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, d *Decoder) { + if v, changed := f.DecMapIntfBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, d *Decoder) (_ map[interface{}]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -20720,6 +19655,14 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -20731,35 +19674,25 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]interface{}) - v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]interface{}) - fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringIntfV(rv2i(rv).(map[string]interface{}), false, d) } -func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) { + if v, changed := f.DecMapStringIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, d *Decoder) (_ map[string]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -20784,6 +19717,14 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -20800,35 +19741,25 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]string) - v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]string) - fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringStringV(rv2i(rv).(map[string]string), false, d) } -func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) { + if v, changed := f.DecMapStringStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, d *Decoder) (_ map[string]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 32) @@ -20853,6 +19784,14 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -20864,35 +19803,25 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uint) - v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uint) - fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUintV(rv2i(rv).(map[string]uint), false, d) } -func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) { + if v, changed := f.DecMapStringUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, d *Decoder) (_ map[string]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -20917,6 +19846,14 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -20928,35 +19865,25 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uint8) - v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uint8) - fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUint8V(rv2i(rv).(map[string]uint8), false, d) } -func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) { + if v, changed := f.DecMapStringUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, d *Decoder) (_ map[string]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -20981,6 +19908,14 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -20992,35 +19927,25 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uint16) - v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uint16) - fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUint16V(rv2i(rv).(map[string]uint16), false, d) } -func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, d *Decoder) { + if v, changed := f.DecMapStringUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, d *Decoder) (_ map[string]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -21045,6 +19970,14 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -21056,35 +19989,25 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uint32) - v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uint32) - fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUint32V(rv2i(rv).(map[string]uint32), false, d) } -func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, d *Decoder) { + if v, changed := f.DecMapStringUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, d *Decoder) (_ map[string]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -21109,6 +20032,14 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -21120,35 +20051,25 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uint64) - v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uint64) - fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUint64V(rv2i(rv).(map[string]uint64), false, d) } -func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) { + if v, changed := f.DecMapStringUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, d *Decoder) (_ map[string]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21173,6 +20094,14 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -21184,35 +20113,25 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapStringUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]uintptr) - v, changed := fastpathTV.DecMapStringUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]uintptr) - fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringUintptrV(rv2i(rv).(map[string]uintptr), false, d) } -func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, d *Decoder) { + if v, changed := f.DecMapStringUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, d *Decoder) (_ map[string]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21237,6 +20156,14 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -21248,35 +20175,25 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]int) - v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]int) - fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringIntV(rv2i(rv).(map[string]int), false, d) } -func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) { + if v, changed := f.DecMapStringIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, d *Decoder) (_ map[string]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21301,6 +20218,14 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -21312,35 +20237,25 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]int8) - v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]int8) - fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringInt8V(rv2i(rv).(map[string]int8), false, d) } -func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, d *Decoder) { + if v, changed := f.DecMapStringInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, d *Decoder) (_ map[string]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -21365,6 +20280,14 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -21376,35 +20299,25 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]int16) - v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]int16) - fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringInt16V(rv2i(rv).(map[string]int16), false, d) } -func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, d *Decoder) { + if v, changed := f.DecMapStringInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, d *Decoder) (_ map[string]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -21429,6 +20342,14 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -21440,35 +20361,25 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]int32) - v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]int32) - fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringInt32V(rv2i(rv).(map[string]int32), false, d) } -func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, d *Decoder) { + if v, changed := f.DecMapStringInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, d *Decoder) (_ map[string]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -21493,6 +20404,14 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -21504,35 +20423,25 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]int64) - v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]int64) - fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringInt64V(rv2i(rv).(map[string]int64), false, d) } -func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) { + if v, changed := f.DecMapStringInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, d *Decoder) (_ map[string]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21557,6 +20466,14 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -21568,35 +20485,25 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]float32) - v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]float32) - fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringFloat32V(rv2i(rv).(map[string]float32), false, d) } -func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) { + if v, changed := f.DecMapStringFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, d *Decoder) (_ map[string]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -21621,6 +20528,14 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -21632,35 +20547,25 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]float64) - v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]float64) - fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringFloat64V(rv2i(rv).(map[string]float64), false, d) } -func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) { + if v, changed := f.DecMapStringFloat64V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[string]float64, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, + d *Decoder) (_ map[string]float64, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -21685,6 +20590,14 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -21696,35 +20609,25 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[string]bool) - v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[string]bool) - fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapStringBoolV(rv2i(rv).(map[string]bool), false, d) } -func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) { + if v, changed := f.DecMapStringBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, d *Decoder) (_ map[string]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -21749,6 +20652,14 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -21760,35 +20671,25 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]interface{}) - v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]interface{}) - fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), false, d) } -func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, d *Decoder) { + if v, changed := f.DecMapFloat32IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, d *Decoder) (_ map[float32]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -21813,6 +20714,14 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -21829,35 +20738,25 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]string) - v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]string) - fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32StringV(rv2i(rv).(map[float32]string), false, d) } -func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, d *Decoder) { + if v, changed := f.DecMapFloat32StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, d *Decoder) (_ map[float32]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -21882,6 +20781,14 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -21893,35 +20800,25 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uint) - v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uint) - fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32UintV(rv2i(rv).(map[float32]uint), false, d) } -func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, d *Decoder) { + if v, changed := f.DecMapFloat32UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, d *Decoder) (_ map[float32]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -21946,6 +20843,14 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -21957,35 +20862,25 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uint8) - v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uint8) - fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), false, d) } -func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, d *Decoder) { + if v, changed := f.DecMapFloat32Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, d *Decoder) (_ map[float32]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -22010,6 +20905,14 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -22021,35 +20924,25 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uint16) - v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uint16) - fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), false, d) } -func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, d *Decoder) { + if v, changed := f.DecMapFloat32Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, d *Decoder) (_ map[float32]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -22074,6 +20967,14 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -22085,35 +20986,25 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uint32) - v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uint32) - fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), false, d) } -func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, d *Decoder) { + if v, changed := f.DecMapFloat32Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, d *Decoder) (_ map[float32]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -22138,6 +21029,14 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -22149,35 +21048,25 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uint64) - v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uint64) - fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), false, d) } -func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, d *Decoder) { + if v, changed := f.DecMapFloat32Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, d *Decoder) (_ map[float32]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22202,6 +21091,14 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -22213,35 +21110,25 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]uintptr) - v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]uintptr) - fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), false, d) } -func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, d *Decoder) { + if v, changed := f.DecMapFloat32UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, d *Decoder) (_ map[float32]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22266,6 +21153,14 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -22277,35 +21172,25 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]int) - v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]int) - fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32IntV(rv2i(rv).(map[float32]int), false, d) } -func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, d *Decoder) { + if v, changed := f.DecMapFloat32IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, d *Decoder) (_ map[float32]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22330,6 +21215,14 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -22341,35 +21234,25 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]int8) - v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]int8) - fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Int8V(rv2i(rv).(map[float32]int8), false, d) } -func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, d *Decoder) { + if v, changed := f.DecMapFloat32Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, d *Decoder) (_ map[float32]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -22394,6 +21277,14 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -22405,35 +21296,25 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]int16) - v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]int16) - fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Int16V(rv2i(rv).(map[float32]int16), false, d) } -func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, d *Decoder) { + if v, changed := f.DecMapFloat32Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, d *Decoder) (_ map[float32]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -22458,6 +21339,14 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -22469,35 +21358,25 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]int32) - v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]int32) - fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Int32V(rv2i(rv).(map[float32]int32), false, d) } -func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, d *Decoder) { + if v, changed := f.DecMapFloat32Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, d *Decoder) (_ map[float32]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -22522,6 +21401,14 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -22533,35 +21420,25 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]int64) - v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]int64) - fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Int64V(rv2i(rv).(map[float32]int64), false, d) } -func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, d *Decoder) { + if v, changed := f.DecMapFloat32Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, d *Decoder) (_ map[float32]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22586,6 +21463,14 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -22597,35 +21482,25 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]float32) - v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]float32) - fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Float32V(rv2i(rv).(map[float32]float32), false, d) } -func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, d *Decoder) { + if v, changed := f.DecMapFloat32Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, d *Decoder) (_ map[float32]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -22650,6 +21525,14 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -22661,35 +21544,25 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]float64) - v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]float64) - fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32Float64V(rv2i(rv).(map[float32]float64), false, d) } -func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, d *Decoder) { + if v, changed := f.DecMapFloat32Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, d *Decoder) (_ map[float32]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -22714,6 +21587,14 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -22725,35 +21606,25 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float32]bool) - v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float32]bool) - fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat32BoolV(rv2i(rv).(map[float32]bool), false, d) } -func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, d *Decoder) { + if v, changed := f.DecMapFloat32BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, d *Decoder) (_ map[float32]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -22778,6 +21649,14 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -22789,35 +21668,25 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]interface{}) - v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]interface{}) - fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), false, d) } -func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, d *Decoder) { + if v, changed := f.DecMapFloat64IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, d *Decoder) (_ map[float64]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -22842,6 +21711,14 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -22858,35 +21735,25 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]string) - v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]string) - fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64StringV(rv2i(rv).(map[float64]string), false, d) } -func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, d *Decoder) { + if v, changed := f.DecMapFloat64StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, d *Decoder) (_ map[float64]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -22911,6 +21778,14 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -22922,35 +21797,25 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uint) - v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uint) - fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64UintV(rv2i(rv).(map[float64]uint), false, d) } -func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, d *Decoder) { + if v, changed := f.DecMapFloat64UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, d *Decoder) (_ map[float64]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -22975,6 +21840,14 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -22986,35 +21859,25 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uint8) - v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uint8) - fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), false, d) } -func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, d *Decoder) { + if v, changed := f.DecMapFloat64Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, d *Decoder) (_ map[float64]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -23039,6 +21902,14 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -23050,35 +21921,25 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uint16) - v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uint16) - fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), false, d) } -func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, d *Decoder) { + if v, changed := f.DecMapFloat64Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, d *Decoder) (_ map[float64]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23103,6 +21964,14 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -23114,35 +21983,25 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uint32) - v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uint32) - fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), false, d) } -func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, d *Decoder) { + if v, changed := f.DecMapFloat64Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, d *Decoder) (_ map[float64]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -23167,6 +22026,14 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -23178,35 +22045,25 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uint64) - v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uint64) - fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), false, d) } -func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, d *Decoder) { + if v, changed := f.DecMapFloat64Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, d *Decoder) (_ map[float64]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -23231,6 +22088,14 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -23242,35 +22107,25 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]uintptr) - v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]uintptr) - fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), false, d) } -func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, d *Decoder) { + if v, changed := f.DecMapFloat64UintptrV(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uintptr, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, + d *Decoder) (_ map[float64]uintptr, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -23295,6 +22150,14 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -23306,35 +22169,25 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]int) - v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]int) - fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64IntV(rv2i(rv).(map[float64]int), false, d) } -func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, d *Decoder) { + if v, changed := f.DecMapFloat64IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, d *Decoder) (_ map[float64]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -23359,6 +22212,14 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -23370,35 +22231,25 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]int8) - v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]int8) - fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Int8V(rv2i(rv).(map[float64]int8), false, d) } -func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, d *Decoder) { + if v, changed := f.DecMapFloat64Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, d *Decoder) (_ map[float64]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -23423,6 +22274,14 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -23434,35 +22293,25 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]int16) - v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]int16) - fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Int16V(rv2i(rv).(map[float64]int16), false, d) } -func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, d *Decoder) { + if v, changed := f.DecMapFloat64Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, d *Decoder) (_ map[float64]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -23487,6 +22336,14 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -23498,35 +22355,25 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]int32) - v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]int32) - fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Int32V(rv2i(rv).(map[float64]int32), false, d) } -func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, d *Decoder) { + if v, changed := f.DecMapFloat64Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, d *Decoder) (_ map[float64]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -23551,6 +22398,14 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -23562,35 +22417,25 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]int64) - v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]int64) - fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Int64V(rv2i(rv).(map[float64]int64), false, d) } -func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, d *Decoder) { + if v, changed := f.DecMapFloat64Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, d *Decoder) (_ map[float64]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -23615,6 +22460,14 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -23626,35 +22479,25 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]float32) - v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]float32) - fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Float32V(rv2i(rv).(map[float64]float32), false, d) } -func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, d *Decoder) { + if v, changed := f.DecMapFloat64Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, d *Decoder) (_ map[float64]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -23679,6 +22522,14 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -23690,35 +22541,25 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]float64) - v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]float64) - fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64Float64V(rv2i(rv).(map[float64]float64), false, d) } -func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, d *Decoder) { + if v, changed := f.DecMapFloat64Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, d *Decoder) (_ map[float64]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -23743,6 +22584,14 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -23754,35 +22603,25 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[float64]bool) - v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[float64]bool) - fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapFloat64BoolV(rv2i(rv).(map[float64]bool), false, d) } -func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, d *Decoder) { + if v, changed := f.DecMapFloat64BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, d *Decoder) (_ map[float64]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -23807,6 +22646,14 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -23818,35 +22665,25 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]interface{}) - v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]interface{}) - fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintIntfV(rv2i(rv).(map[uint]interface{}), false, d) } -func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) { + if v, changed := f.DecMapUintIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, d *Decoder) (_ map[uint]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -23871,6 +22708,14 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -23887,35 +22732,25 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]string) - v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]string) - fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintStringV(rv2i(rv).(map[uint]string), false, d) } -func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) { + if v, changed := f.DecMapUintStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, d *Decoder) (_ map[uint]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -23940,6 +22775,14 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -23951,35 +22794,25 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uint) - v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uint) - fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUintV(rv2i(rv).(map[uint]uint), false, d) } -func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) { + if v, changed := f.DecMapUintUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, d *Decoder) (_ map[uint]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24004,6 +22837,14 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -24015,35 +22856,25 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uint8) - v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uint8) - fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUint8V(rv2i(rv).(map[uint]uint8), false, d) } -func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) { + if v, changed := f.DecMapUintUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, d *Decoder) (_ map[uint]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -24068,6 +22899,14 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -24079,35 +22918,25 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uint16) - v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uint16) - fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUint16V(rv2i(rv).(map[uint]uint16), false, d) } -func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, d *Decoder) { + if v, changed := f.DecMapUintUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, d *Decoder) (_ map[uint]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -24132,6 +22961,14 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -24143,35 +22980,25 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uint32) - v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uint32) - fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUint32V(rv2i(rv).(map[uint]uint32), false, d) } -func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, d *Decoder) { + if v, changed := f.DecMapUintUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, d *Decoder) (_ map[uint]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24196,6 +23023,14 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -24207,35 +23042,25 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uint64) - v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uint64) - fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUint64V(rv2i(rv).(map[uint]uint64), false, d) } -func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) { + if v, changed := f.DecMapUintUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, d *Decoder) (_ map[uint]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24260,6 +23085,14 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -24271,35 +23104,25 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]uintptr) - v, changed := fastpathTV.DecMapUintUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]uintptr) - fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintUintptrV(rv2i(rv).(map[uint]uintptr), false, d) } -func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, d *Decoder) { + if v, changed := f.DecMapUintUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, d *Decoder) (_ map[uint]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24324,6 +23147,14 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -24335,35 +23166,25 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]int) - v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]int) - fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintIntV(rv2i(rv).(map[uint]int), false, d) } -func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) { + if v, changed := f.DecMapUintIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, d *Decoder) (_ map[uint]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24388,6 +23209,14 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -24399,35 +23228,25 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]int8) - v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]int8) - fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintInt8V(rv2i(rv).(map[uint]int8), false, d) } -func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, d *Decoder) { + if v, changed := f.DecMapUintInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, d *Decoder) (_ map[uint]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -24452,6 +23271,14 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -24463,35 +23290,25 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]int16) - v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]int16) - fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintInt16V(rv2i(rv).(map[uint]int16), false, d) } -func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, d *Decoder) { + if v, changed := f.DecMapUintInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, d *Decoder) (_ map[uint]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -24516,6 +23333,14 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -24527,35 +23352,25 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]int32) - v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]int32) - fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintInt32V(rv2i(rv).(map[uint]int32), false, d) } -func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, d *Decoder) { + if v, changed := f.DecMapUintInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, d *Decoder) (_ map[uint]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24580,6 +23395,14 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -24591,35 +23414,25 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]int64) - v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]int64) - fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintInt64V(rv2i(rv).(map[uint]int64), false, d) } -func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) { + if v, changed := f.DecMapUintInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, d *Decoder) (_ map[uint]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24644,6 +23457,14 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -24655,35 +23476,25 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]float32) - v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]float32) - fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintFloat32V(rv2i(rv).(map[uint]float32), false, d) } -func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) { + if v, changed := f.DecMapUintFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, d *Decoder) (_ map[uint]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -24708,6 +23519,14 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -24719,35 +23538,25 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]float64) - v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]float64) - fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintFloat64V(rv2i(rv).(map[uint]float64), false, d) } -func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) { + if v, changed := f.DecMapUintFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, d *Decoder) (_ map[uint]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -24772,6 +23581,14 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -24783,35 +23600,25 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint]bool) - v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint]bool) - fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintBoolV(rv2i(rv).(map[uint]bool), false, d) } -func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) { + if v, changed := f.DecMapUintBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, d *Decoder) (_ map[uint]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -24836,6 +23643,14 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -24847,35 +23662,25 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]interface{}) - v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]interface{}) - fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), false, d) } -func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) { + if v, changed := f.DecMapUint8IntfV(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]interface{}, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, + d *Decoder) (_ map[uint8]interface{}, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -24900,6 +23705,14 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -24916,35 +23729,25 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]string) - v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]string) - fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8StringV(rv2i(rv).(map[uint8]string), false, d) } -func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) { + if v, changed := f.DecMapUint8StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, d *Decoder) (_ map[uint8]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -24969,6 +23772,14 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -24980,35 +23791,25 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uint) - v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uint) - fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8UintV(rv2i(rv).(map[uint8]uint), false, d) } -func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) { + if v, changed := f.DecMapUint8UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, d *Decoder) (_ map[uint8]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25033,6 +23834,14 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -25044,35 +23853,25 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uint8) - v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uint8) - fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), false, d) } -func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) { + if v, changed := f.DecMapUint8Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, d *Decoder) (_ map[uint8]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -25097,6 +23896,14 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -25108,35 +23915,25 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uint16) - v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uint16) - fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), false, d) } -func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, d *Decoder) { + if v, changed := f.DecMapUint8Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, d *Decoder) (_ map[uint8]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -25161,6 +23958,14 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -25172,35 +23977,25 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uint32) - v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uint32) - fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), false, d) } -func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, d *Decoder) { + if v, changed := f.DecMapUint8Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, d *Decoder) (_ map[uint8]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -25225,6 +24020,14 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -25236,35 +24039,25 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uint64) - v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uint64) - fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), false, d) } -func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) { + if v, changed := f.DecMapUint8Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, d *Decoder) (_ map[uint8]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25289,6 +24082,14 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -25300,35 +24101,25 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint8UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]uintptr) - v, changed := fastpathTV.DecMapUint8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]uintptr) - fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), false, d) } -func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, d *Decoder) { + if v, changed := f.DecMapUint8UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, d *Decoder) (_ map[uint8]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25353,6 +24144,14 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -25364,35 +24163,25 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]int) - v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]int) - fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8IntV(rv2i(rv).(map[uint8]int), false, d) } -func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) { + if v, changed := f.DecMapUint8IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, d *Decoder) (_ map[uint8]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25417,6 +24206,14 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -25428,35 +24225,25 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]int8) - v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]int8) - fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Int8V(rv2i(rv).(map[uint8]int8), false, d) } -func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, d *Decoder) { + if v, changed := f.DecMapUint8Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, d *Decoder) (_ map[uint8]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -25481,6 +24268,14 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -25492,35 +24287,25 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]int16) - v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]int16) - fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Int16V(rv2i(rv).(map[uint8]int16), false, d) } -func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, d *Decoder) { + if v, changed := f.DecMapUint8Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, d *Decoder) (_ map[uint8]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -25545,6 +24330,14 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -25556,35 +24349,25 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]int32) - v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]int32) - fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Int32V(rv2i(rv).(map[uint8]int32), false, d) } -func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, d *Decoder) { + if v, changed := f.DecMapUint8Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, d *Decoder) (_ map[uint8]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -25609,6 +24392,14 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -25620,35 +24411,25 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]int64) - v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]int64) - fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Int64V(rv2i(rv).(map[uint8]int64), false, d) } -func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) { + if v, changed := f.DecMapUint8Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, d *Decoder) (_ map[uint8]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25673,6 +24454,14 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -25684,35 +24473,25 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]float32) - v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]float32) - fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Float32V(rv2i(rv).(map[uint8]float32), false, d) } -func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) { + if v, changed := f.DecMapUint8Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, d *Decoder) (_ map[uint8]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -25737,6 +24516,14 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -25748,35 +24535,25 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]float64) - v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]float64) - fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8Float64V(rv2i(rv).(map[uint8]float64), false, d) } -func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) { + if v, changed := f.DecMapUint8Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, d *Decoder) (_ map[uint8]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -25801,6 +24578,14 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -25812,35 +24597,25 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint8]bool) - v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint8]bool) - fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint8BoolV(rv2i(rv).(map[uint8]bool), false, d) } -func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) { + if v, changed := f.DecMapUint8BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, d *Decoder) (_ map[uint8]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -25865,6 +24640,14 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -25876,35 +24659,25 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]interface{}) - v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]interface{}) - fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), false, d) } -func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, d *Decoder) { + if v, changed := f.DecMapUint16IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, d *Decoder) (_ map[uint16]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -25929,6 +24702,14 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -25945,35 +24726,25 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]string) - v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]string) - fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16StringV(rv2i(rv).(map[uint16]string), false, d) } -func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, d *Decoder) { + if v, changed := f.DecMapUint16StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, d *Decoder) (_ map[uint16]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -25998,6 +24769,14 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -26009,35 +24788,25 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uint) - v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uint) - fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16UintV(rv2i(rv).(map[uint16]uint), false, d) } -func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, d *Decoder) { + if v, changed := f.DecMapUint16UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, d *Decoder) (_ map[uint16]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26062,6 +24831,14 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -26073,35 +24850,25 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uint8) - v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uint8) - fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), false, d) } -func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, d *Decoder) { + if v, changed := f.DecMapUint16Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, d *Decoder) (_ map[uint16]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -26126,6 +24893,14 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -26137,35 +24912,25 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uint16) - v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uint16) - fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), false, d) } -func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, d *Decoder) { + if v, changed := f.DecMapUint16Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, d *Decoder) (_ map[uint16]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -26190,6 +24955,14 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -26201,35 +24974,25 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uint32) - v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uint32) - fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), false, d) } -func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, d *Decoder) { + if v, changed := f.DecMapUint16Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, d *Decoder) (_ map[uint16]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -26254,6 +25017,14 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -26265,35 +25036,25 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uint64) - v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uint64) - fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), false, d) } -func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, d *Decoder) { + if v, changed := f.DecMapUint16Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, d *Decoder) (_ map[uint16]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26318,6 +25079,14 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -26329,35 +25098,25 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint16UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]uintptr) - v, changed := fastpathTV.DecMapUint16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]uintptr) - fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), false, d) } -func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, d *Decoder) { + if v, changed := f.DecMapUint16UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, d *Decoder) (_ map[uint16]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26382,6 +25141,14 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -26393,35 +25160,25 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]int) - v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]int) - fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16IntV(rv2i(rv).(map[uint16]int), false, d) } -func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, d *Decoder) { + if v, changed := f.DecMapUint16IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, d *Decoder) (_ map[uint16]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26446,6 +25203,14 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -26457,35 +25222,25 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]int8) - v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]int8) - fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Int8V(rv2i(rv).(map[uint16]int8), false, d) } -func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, d *Decoder) { + if v, changed := f.DecMapUint16Int8V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int8, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, + d *Decoder) (_ map[uint16]int8, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -26510,6 +25265,14 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -26521,35 +25284,25 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]int16) - v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]int16) - fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Int16V(rv2i(rv).(map[uint16]int16), false, d) } -func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, d *Decoder) { + if v, changed := f.DecMapUint16Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, d *Decoder) (_ map[uint16]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -26574,6 +25327,14 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -26585,35 +25346,25 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]int32) - v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]int32) - fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Int32V(rv2i(rv).(map[uint16]int32), false, d) } -func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, d *Decoder) { + if v, changed := f.DecMapUint16Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, d *Decoder) (_ map[uint16]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -26638,6 +25389,14 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -26649,35 +25408,25 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]int64) - v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]int64) - fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Int64V(rv2i(rv).(map[uint16]int64), false, d) } -func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, d *Decoder) { + if v, changed := f.DecMapUint16Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, d *Decoder) (_ map[uint16]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26702,6 +25451,14 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -26713,35 +25470,25 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]float32) - v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]float32) - fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Float32V(rv2i(rv).(map[uint16]float32), false, d) } -func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, d *Decoder) { + if v, changed := f.DecMapUint16Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, d *Decoder) (_ map[uint16]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -26766,6 +25513,14 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -26777,35 +25532,25 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]float64) - v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]float64) - fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16Float64V(rv2i(rv).(map[uint16]float64), false, d) } -func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, d *Decoder) { + if v, changed := f.DecMapUint16Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, d *Decoder) (_ map[uint16]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -26830,6 +25575,14 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -26841,35 +25594,25 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint16]bool) - v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint16]bool) - fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint16BoolV(rv2i(rv).(map[uint16]bool), false, d) } -func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, d *Decoder) { + if v, changed := f.DecMapUint16BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, d *Decoder) (_ map[uint16]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -26894,6 +25637,14 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -26905,35 +25656,25 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]interface{}) - v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]interface{}) - fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), false, d) } -func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, d *Decoder) { + if v, changed := f.DecMapUint32IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, d *Decoder) (_ map[uint32]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -26958,6 +25699,14 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -26974,35 +25723,25 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]string) - v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]string) - fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32StringV(rv2i(rv).(map[uint32]string), false, d) } -func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, d *Decoder) { + if v, changed := f.DecMapUint32StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, d *Decoder) (_ map[uint32]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -27027,6 +25766,14 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -27038,35 +25785,25 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uint) - v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uint) - fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32UintV(rv2i(rv).(map[uint32]uint), false, d) } -func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, d *Decoder) { + if v, changed := f.DecMapUint32UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, d *Decoder) (_ map[uint32]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27091,6 +25828,14 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -27102,35 +25847,25 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uint8) - v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uint8) - fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), false, d) } -func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, d *Decoder) { + if v, changed := f.DecMapUint32Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, d *Decoder) (_ map[uint32]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -27155,6 +25890,14 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -27166,35 +25909,25 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uint16) - v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uint16) - fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), false, d) } -func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, d *Decoder) { + if v, changed := f.DecMapUint32Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, d *Decoder) (_ map[uint32]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -27219,6 +25952,14 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -27230,35 +25971,25 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uint32) - v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uint32) - fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), false, d) } -func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, d *Decoder) { + if v, changed := f.DecMapUint32Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, d *Decoder) (_ map[uint32]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -27283,6 +26014,14 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -27294,35 +26033,25 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uint64) - v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uint64) - fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), false, d) } -func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, d *Decoder) { + if v, changed := f.DecMapUint32Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, d *Decoder) (_ map[uint32]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27347,6 +26076,14 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -27358,35 +26095,25 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint32UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]uintptr) - v, changed := fastpathTV.DecMapUint32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]uintptr) - fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), false, d) } -func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, d *Decoder) { + if v, changed := f.DecMapUint32UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, d *Decoder) (_ map[uint32]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27411,6 +26138,14 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -27422,35 +26157,25 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]int) - v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]int) - fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32IntV(rv2i(rv).(map[uint32]int), false, d) } -func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, d *Decoder) { + if v, changed := f.DecMapUint32IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, d *Decoder) (_ map[uint32]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27475,6 +26200,14 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -27486,35 +26219,25 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]int8) - v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]int8) - fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Int8V(rv2i(rv).(map[uint32]int8), false, d) } -func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, d *Decoder) { + if v, changed := f.DecMapUint32Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, d *Decoder) (_ map[uint32]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -27539,6 +26262,14 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -27550,35 +26281,25 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]int16) - v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]int16) - fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Int16V(rv2i(rv).(map[uint32]int16), false, d) } -func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, d *Decoder) { + if v, changed := f.DecMapUint32Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, d *Decoder) (_ map[uint32]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -27603,6 +26324,14 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -27614,35 +26343,25 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]int32) - v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]int32) - fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Int32V(rv2i(rv).(map[uint32]int32), false, d) } -func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, d *Decoder) { + if v, changed := f.DecMapUint32Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, d *Decoder) (_ map[uint32]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -27667,6 +26386,14 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -27678,35 +26405,25 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]int64) - v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]int64) - fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Int64V(rv2i(rv).(map[uint32]int64), false, d) } -func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, d *Decoder) { + if v, changed := f.DecMapUint32Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, d *Decoder) (_ map[uint32]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27731,6 +26448,14 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -27742,35 +26467,25 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]float32) - v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]float32) - fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Float32V(rv2i(rv).(map[uint32]float32), false, d) } -func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, d *Decoder) { + if v, changed := f.DecMapUint32Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, d *Decoder) (_ map[uint32]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -27795,6 +26510,14 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -27806,35 +26529,25 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]float64) - v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]float64) - fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32Float64V(rv2i(rv).(map[uint32]float64), false, d) } -func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, d *Decoder) { + if v, changed := f.DecMapUint32Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, d *Decoder) (_ map[uint32]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -27859,6 +26572,14 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -27870,35 +26591,25 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint32]bool) - v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint32]bool) - fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint32BoolV(rv2i(rv).(map[uint32]bool), false, d) } -func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, d *Decoder) { + if v, changed := f.DecMapUint32BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, d *Decoder) (_ map[uint32]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -27923,6 +26634,14 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -27934,35 +26653,25 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]interface{}) - v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]interface{}) - fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), false, d) } -func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) { + if v, changed := f.DecMapUint64IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, d *Decoder) (_ map[uint64]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -27987,6 +26696,14 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, ca if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -28003,35 +26720,25 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, ca return v, changed } -func (f *decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]string) - v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]string) - fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64StringV(rv2i(rv).(map[uint64]string), false, d) } -func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) { + if v, changed := f.DecMapUint64StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, d *Decoder) (_ map[uint64]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -28056,6 +26763,14 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -28067,35 +26782,25 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uint) - v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uint) - fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64UintV(rv2i(rv).(map[uint64]uint), false, d) } -func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) { + if v, changed := f.DecMapUint64UintV(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, + d *Decoder) (_ map[uint64]uint, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28120,6 +26825,14 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -28131,35 +26844,25 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uint8) - v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uint8) - fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), false, d) } -func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) { + if v, changed := f.DecMapUint64Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, d *Decoder) (_ map[uint64]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28184,6 +26887,14 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -28195,35 +26906,25 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uint16) - v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uint16) - fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), false, d) } -func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, d *Decoder) { + if v, changed := f.DecMapUint64Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, d *Decoder) (_ map[uint64]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -28248,6 +26949,14 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -28259,35 +26968,25 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uint32) - v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uint32) - fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), false, d) } -func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, d *Decoder) { + if v, changed := f.DecMapUint64Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, d *Decoder) (_ map[uint64]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -28312,6 +27011,14 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -28323,35 +27030,25 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uint64) - v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uint64) - fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), false, d) } -func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) { + if v, changed := f.DecMapUint64Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, d *Decoder) (_ map[uint64]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28376,6 +27073,14 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -28387,35 +27092,25 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUint64UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]uintptr) - v, changed := fastpathTV.DecMapUint64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]uintptr) - fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), false, d) } -func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, d *Decoder) { + if v, changed := f.DecMapUint64UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, d *Decoder) (_ map[uint64]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28440,6 +27135,14 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -28451,35 +27154,25 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]int) - v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]int) - fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64IntV(rv2i(rv).(map[uint64]int), false, d) } -func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) { + if v, changed := f.DecMapUint64IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, d *Decoder) (_ map[uint64]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28504,6 +27197,14 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -28515,35 +27216,25 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]int8) - v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]int8) - fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Int8V(rv2i(rv).(map[uint64]int8), false, d) } -func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, d *Decoder) { + if v, changed := f.DecMapUint64Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, d *Decoder) (_ map[uint64]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28568,6 +27259,14 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -28579,35 +27278,25 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]int16) - v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]int16) - fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Int16V(rv2i(rv).(map[uint64]int16), false, d) } -func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, d *Decoder) { + if v, changed := f.DecMapUint64Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, d *Decoder) (_ map[uint64]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -28632,6 +27321,14 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -28643,35 +27340,25 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]int32) - v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]int32) - fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Int32V(rv2i(rv).(map[uint64]int32), false, d) } -func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, d *Decoder) { + if v, changed := f.DecMapUint64Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, d *Decoder) (_ map[uint64]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -28696,6 +27383,14 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -28707,35 +27402,25 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]int64) - v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]int64) - fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Int64V(rv2i(rv).(map[uint64]int64), false, d) } -func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) { + if v, changed := f.DecMapUint64Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, d *Decoder) (_ map[uint64]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28760,6 +27445,14 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -28771,35 +27464,25 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]float32) - v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]float32) - fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Float32V(rv2i(rv).(map[uint64]float32), false, d) } -func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) { + if v, changed := f.DecMapUint64Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, d *Decoder) (_ map[uint64]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -28824,6 +27507,14 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -28835,35 +27526,25 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]float64) - v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]float64) - fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64Float64V(rv2i(rv).(map[uint64]float64), false, d) } -func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) { + if v, changed := f.DecMapUint64Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, d *Decoder) (_ map[uint64]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -28888,6 +27569,14 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -28899,35 +27588,25 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uint64]bool) - v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uint64]bool) - fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUint64BoolV(rv2i(rv).(map[uint64]bool), false, d) } -func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) { + if v, changed := f.DecMapUint64BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, d *Decoder) (_ map[uint64]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -28952,6 +27631,14 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -28963,35 +27650,25 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]interface{}) - v, changed := fastpathTV.DecMapUintptrIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]interface{}) - fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), false, d) } -func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, d *Decoder) { + if v, changed := f.DecMapUintptrIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, d *Decoder) (_ map[uintptr]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -29016,6 +27693,14 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -29032,35 +27717,25 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]string) - v, changed := fastpathTV.DecMapUintptrStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]string) - fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrStringV(rv2i(rv).(map[uintptr]string), false, d) } -func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, d *Decoder) { + if v, changed := f.DecMapUintptrStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, d *Decoder) (_ map[uintptr]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -29085,6 +27760,14 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -29096,35 +27779,25 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uint) - v, changed := fastpathTV.DecMapUintptrUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uint) - fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUintV(rv2i(rv).(map[uintptr]uint), false, d) } -func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, d *Decoder) { + if v, changed := f.DecMapUintptrUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, d *Decoder) (_ map[uintptr]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29149,6 +27822,14 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -29160,35 +27841,25 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uint8) - v, changed := fastpathTV.DecMapUintptrUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uint8) - fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), false, d) } -func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, d *Decoder) { + if v, changed := f.DecMapUintptrUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, d *Decoder) (_ map[uintptr]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -29213,6 +27884,14 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -29224,35 +27903,25 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uint16) - v, changed := fastpathTV.DecMapUintptrUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uint16) - fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), false, d) } -func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, d *Decoder) { + if v, changed := f.DecMapUintptrUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, d *Decoder) (_ map[uintptr]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29277,6 +27946,14 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -29288,35 +27965,25 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uint32) - v, changed := fastpathTV.DecMapUintptrUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uint32) - fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), false, d) } -func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, d *Decoder) { + if v, changed := f.DecMapUintptrUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, d *Decoder) (_ map[uintptr]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -29341,6 +28008,14 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -29352,35 +28027,25 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uint64) - v, changed := fastpathTV.DecMapUintptrUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uint64) - fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), false, d) } -func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, d *Decoder) { + if v, changed := f.DecMapUintptrUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, d *Decoder) (_ map[uintptr]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29405,6 +28070,14 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, can if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -29416,35 +28089,25 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, can return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]uintptr) - v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]uintptr) - fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), false, d) } -func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, d *Decoder) { + if v, changed := f.DecMapUintptrUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, d *Decoder) (_ map[uintptr]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29469,6 +28132,14 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -29480,35 +28151,25 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]int) - v, changed := fastpathTV.DecMapUintptrIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]int) - fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrIntV(rv2i(rv).(map[uintptr]int), false, d) } -func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, d *Decoder) { + if v, changed := f.DecMapUintptrIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, d *Decoder) (_ map[uintptr]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29533,6 +28194,14 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -29544,35 +28213,25 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]int8) - v, changed := fastpathTV.DecMapUintptrInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]int8) - fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), false, d) } -func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, d *Decoder) { + if v, changed := f.DecMapUintptrInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, d *Decoder) (_ map[uintptr]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -29597,6 +28256,14 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -29608,35 +28275,25 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]int16) - v, changed := fastpathTV.DecMapUintptrInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]int16) - fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), false, d) } -func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, d *Decoder) { + if v, changed := f.DecMapUintptrInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, d *Decoder) (_ map[uintptr]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -29661,6 +28318,14 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -29672,35 +28337,25 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]int32) - v, changed := fastpathTV.DecMapUintptrInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]int32) - fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), false, d) } -func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, d *Decoder) { + if v, changed := f.DecMapUintptrInt32V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uintptr]int32, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, + d *Decoder) (_ map[uintptr]int32, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -29725,6 +28380,14 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -29736,35 +28399,25 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]int64) - v, changed := fastpathTV.DecMapUintptrInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]int64) - fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), false, d) } -func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, d *Decoder) { + if v, changed := f.DecMapUintptrInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, d *Decoder) (_ map[uintptr]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29789,6 +28442,14 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -29800,35 +28461,25 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]float32) - v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]float32) - fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), false, d) } -func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, d *Decoder) { + if v, changed := f.DecMapUintptrFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, d *Decoder) (_ map[uintptr]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -29853,6 +28504,14 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -29864,35 +28523,25 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]float64) - v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]float64) - fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), false, d) } -func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, d *Decoder) { + if v, changed := f.DecMapUintptrFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, d *Decoder) (_ map[uintptr]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -29917,6 +28566,14 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, c if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -29928,35 +28585,25 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, c return v, changed } -func (f *decFnInfo) fastpathDecMapUintptrBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[uintptr]bool) - v, changed := fastpathTV.DecMapUintptrBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[uintptr]bool) - fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), false, d) } -func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintptrBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, d *Decoder) { + if v, changed := f.DecMapUintptrBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, d *Decoder) (_ map[uintptr]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -29981,6 +28628,14 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -29992,35 +28647,25 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]interface{}) - v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]interface{}) - fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntIntfV(rv2i(rv).(map[int]interface{}), false, d) } -func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) { + if v, changed := f.DecMapIntIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, d *Decoder) (_ map[int]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -30045,6 +28690,14 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChang if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -30061,35 +28714,25 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChang return v, changed } -func (f *decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]string) - v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]string) - fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntStringV(rv2i(rv).(map[int]string), false, d) } -func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) { + if v, changed := f.DecMapIntStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, d *Decoder) (_ map[int]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -30114,6 +28757,14 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -30125,35 +28776,25 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uint) - v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uint) - fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUintV(rv2i(rv).(map[int]uint), false, d) } -func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) { + if v, changed := f.DecMapIntUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, d *Decoder) (_ map[int]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30178,6 +28819,14 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -30189,35 +28838,25 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uint8) - v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uint8) - fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUint8V(rv2i(rv).(map[int]uint8), false, d) } -func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) { + if v, changed := f.DecMapIntUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, d *Decoder) (_ map[int]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -30242,6 +28881,14 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -30253,35 +28900,25 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uint16) - v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uint16) - fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUint16V(rv2i(rv).(map[int]uint16), false, d) } -func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, d *Decoder) { + if v, changed := f.DecMapIntUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, d *Decoder) (_ map[int]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -30306,6 +28943,14 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -30317,35 +28962,25 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uint32) - v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uint32) - fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUint32V(rv2i(rv).(map[int]uint32), false, d) } -func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, d *Decoder) { + if v, changed := f.DecMapIntUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, d *Decoder) (_ map[int]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30370,6 +29005,14 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -30381,35 +29024,25 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uint64) - v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uint64) - fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUint64V(rv2i(rv).(map[int]uint64), false, d) } -func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) { + if v, changed := f.DecMapIntUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, d *Decoder) (_ map[int]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30434,6 +29067,14 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -30445,35 +29086,25 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapIntUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]uintptr) - v, changed := fastpathTV.DecMapIntUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]uintptr) - fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntUintptrV(rv2i(rv).(map[int]uintptr), false, d) } -func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, d *Decoder) { + if v, changed := f.DecMapIntUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, d *Decoder) (_ map[int]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30498,6 +29129,14 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -30509,35 +29148,25 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]int) - v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]int) - fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntIntV(rv2i(rv).(map[int]int), false, d) } -func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) { + if v, changed := f.DecMapIntIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, d *Decoder) (_ map[int]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30562,6 +29191,14 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -30573,35 +29210,25 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]int8) - v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]int8) - fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntInt8V(rv2i(rv).(map[int]int8), false, d) } -func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, d *Decoder) { + if v, changed := f.DecMapIntInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, d *Decoder) (_ map[int]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -30626,6 +29253,14 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -30637,35 +29272,25 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]int16) - v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]int16) - fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntInt16V(rv2i(rv).(map[int]int16), false, d) } -func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, d *Decoder) { + if v, changed := f.DecMapIntInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, d *Decoder) (_ map[int]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -30690,6 +29315,14 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -30701,35 +29334,25 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]int32) - v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]int32) - fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntInt32V(rv2i(rv).(map[int]int32), false, d) } -func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, d *Decoder) { + if v, changed := f.DecMapIntInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, d *Decoder) (_ map[int]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30754,6 +29377,14 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -30765,35 +29396,25 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]int64) - v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]int64) - fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntInt64V(rv2i(rv).(map[int]int64), false, d) } -func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) { + if v, changed := f.DecMapIntInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, d *Decoder) (_ map[int]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30818,6 +29439,14 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -30829,35 +29458,25 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]float32) - v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]float32) - fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntFloat32V(rv2i(rv).(map[int]float32), false, d) } -func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) { + if v, changed := f.DecMapIntFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, d *Decoder) (_ map[int]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -30882,6 +29501,14 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -30893,35 +29520,25 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]float64) - v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]float64) - fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntFloat64V(rv2i(rv).(map[int]float64), false, d) } -func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) { + if v, changed := f.DecMapIntFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, d *Decoder) (_ map[int]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -30946,6 +29563,14 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -30957,35 +29582,25 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int]bool) - v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int]bool) - fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapIntBoolV(rv2i(rv).(map[int]bool), false, d) } -func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) { + if v, changed := f.DecMapIntBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, d *Decoder) (_ map[int]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31010,6 +29625,14 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -31021,35 +29644,25 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]interface{}) - v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]interface{}) - fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8IntfV(rv2i(rv).(map[int8]interface{}), false, d) } -func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, d *Decoder) { + if v, changed := f.DecMapInt8IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, d *Decoder) (_ map[int8]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -31074,6 +29687,14 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -31090,35 +29711,25 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]string) - v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]string) - fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8StringV(rv2i(rv).(map[int8]string), false, d) } -func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, d *Decoder) { + if v, changed := f.DecMapInt8StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, d *Decoder) (_ map[int8]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -31143,6 +29754,14 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -31154,35 +29773,25 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uint) - v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uint) - fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8UintV(rv2i(rv).(map[int8]uint), false, d) } -func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, d *Decoder) { + if v, changed := f.DecMapInt8UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, d *Decoder) (_ map[int8]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31207,6 +29816,14 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -31218,35 +29835,25 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uint8) - v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uint8) - fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Uint8V(rv2i(rv).(map[int8]uint8), false, d) } -func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, d *Decoder) { + if v, changed := f.DecMapInt8Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, d *Decoder) (_ map[int8]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -31271,6 +29878,14 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -31282,35 +29897,25 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uint16) - v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uint16) - fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Uint16V(rv2i(rv).(map[int8]uint16), false, d) } -func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, d *Decoder) { + if v, changed := f.DecMapInt8Uint16V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[int8]uint16, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, + d *Decoder) (_ map[int8]uint16, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -31335,6 +29940,14 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -31346,35 +29959,25 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uint32) - v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uint32) - fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Uint32V(rv2i(rv).(map[int8]uint32), false, d) } -func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, d *Decoder) { + if v, changed := f.DecMapInt8Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, d *Decoder) (_ map[int8]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -31399,6 +30002,14 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -31410,35 +30021,25 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uint64) - v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uint64) - fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Uint64V(rv2i(rv).(map[int8]uint64), false, d) } -func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, d *Decoder) { + if v, changed := f.DecMapInt8Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, d *Decoder) (_ map[int8]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31463,6 +30064,14 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -31474,35 +30083,25 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt8UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]uintptr) - v, changed := fastpathTV.DecMapInt8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]uintptr) - fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), false, d) } -func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, d *Decoder) { + if v, changed := f.DecMapInt8UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, d *Decoder) (_ map[int8]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31527,6 +30126,14 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -31538,35 +30145,25 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]int) - v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]int) - fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8IntV(rv2i(rv).(map[int8]int), false, d) } -func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, d *Decoder) { + if v, changed := f.DecMapInt8IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, d *Decoder) (_ map[int8]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31591,6 +30188,14 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -31602,35 +30207,25 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]int8) - v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]int8) - fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Int8V(rv2i(rv).(map[int8]int8), false, d) } -func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, d *Decoder) { + if v, changed := f.DecMapInt8Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, d *Decoder) (_ map[int8]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -31655,6 +30250,14 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -31666,35 +30269,25 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]int16) - v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]int16) - fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Int16V(rv2i(rv).(map[int8]int16), false, d) } -func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, d *Decoder) { + if v, changed := f.DecMapInt8Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, d *Decoder) (_ map[int8]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -31719,6 +30312,14 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -31730,35 +30331,25 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]int32) - v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]int32) - fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Int32V(rv2i(rv).(map[int8]int32), false, d) } -func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, d *Decoder) { + if v, changed := f.DecMapInt8Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, d *Decoder) (_ map[int8]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -31783,6 +30374,14 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -31794,35 +30393,25 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]int64) - v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]int64) - fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Int64V(rv2i(rv).(map[int8]int64), false, d) } -func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, d *Decoder) { + if v, changed := f.DecMapInt8Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, d *Decoder) (_ map[int8]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31847,6 +30436,14 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -31858,35 +30455,25 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]float32) - v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]float32) - fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Float32V(rv2i(rv).(map[int8]float32), false, d) } -func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, d *Decoder) { + if v, changed := f.DecMapInt8Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, d *Decoder) (_ map[int8]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -31911,6 +30498,14 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -31922,35 +30517,25 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]float64) - v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]float64) - fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8Float64V(rv2i(rv).(map[int8]float64), false, d) } -func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, d *Decoder) { + if v, changed := f.DecMapInt8Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, d *Decoder) (_ map[int8]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -31975,6 +30560,14 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -31986,35 +30579,25 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int8]bool) - v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int8]bool) - fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt8BoolV(rv2i(rv).(map[int8]bool), false, d) } -func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt8BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, d *Decoder) { + if v, changed := f.DecMapInt8BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, d *Decoder) (_ map[int8]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -32039,6 +30622,14 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -32050,35 +30641,25 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]interface{}) - v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]interface{}) - fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16IntfV(rv2i(rv).(map[int16]interface{}), false, d) } -func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, d *Decoder) { + if v, changed := f.DecMapInt16IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, d *Decoder) (_ map[int16]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -32103,6 +30684,14 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -32119,35 +30708,25 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]string) - v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]string) - fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16StringV(rv2i(rv).(map[int16]string), false, d) } -func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, d *Decoder) { + if v, changed := f.DecMapInt16StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, d *Decoder) (_ map[int16]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 18) @@ -32172,6 +30751,14 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -32183,35 +30770,25 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uint) - v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uint) - fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16UintV(rv2i(rv).(map[int16]uint), false, d) } -func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, d *Decoder) { + if v, changed := f.DecMapInt16UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, d *Decoder) (_ map[int16]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -32236,6 +30813,14 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -32247,35 +30832,25 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uint8) - v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uint8) - fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Uint8V(rv2i(rv).(map[int16]uint8), false, d) } -func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, d *Decoder) { + if v, changed := f.DecMapInt16Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, d *Decoder) (_ map[int16]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -32300,6 +30875,14 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -32311,35 +30894,25 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uint16) - v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uint16) - fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Uint16V(rv2i(rv).(map[int16]uint16), false, d) } -func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, d *Decoder) { + if v, changed := f.DecMapInt16Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, d *Decoder) (_ map[int16]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -32364,6 +30937,14 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -32375,35 +30956,25 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uint32) - v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uint32) - fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Uint32V(rv2i(rv).(map[int16]uint32), false, d) } -func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, d *Decoder) { + if v, changed := f.DecMapInt16Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, d *Decoder) (_ map[int16]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -32428,6 +30999,14 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -32439,35 +31018,25 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uint64) - v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uint64) - fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Uint64V(rv2i(rv).(map[int16]uint64), false, d) } -func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, d *Decoder) { + if v, changed := f.DecMapInt16Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, d *Decoder) (_ map[int16]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -32492,6 +31061,14 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -32503,35 +31080,25 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt16UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]uintptr) - v, changed := fastpathTV.DecMapInt16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]uintptr) - fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), false, d) } -func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, d *Decoder) { + if v, changed := f.DecMapInt16UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, d *Decoder) (_ map[int16]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -32556,6 +31123,14 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -32567,35 +31142,25 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]int) - v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]int) - fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16IntV(rv2i(rv).(map[int16]int), false, d) } -func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, d *Decoder) { + if v, changed := f.DecMapInt16IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, d *Decoder) (_ map[int16]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -32620,6 +31185,14 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -32631,35 +31204,25 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]int8) - v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]int8) - fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Int8V(rv2i(rv).(map[int16]int8), false, d) } -func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, d *Decoder) { + if v, changed := f.DecMapInt16Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, d *Decoder) (_ map[int16]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -32684,6 +31247,14 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -32695,35 +31266,25 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]int16) - v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]int16) - fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Int16V(rv2i(rv).(map[int16]int16), false, d) } -func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, d *Decoder) { + if v, changed := f.DecMapInt16Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, d *Decoder) (_ map[int16]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 4) @@ -32748,6 +31309,14 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -32759,35 +31328,25 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]int32) - v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]int32) - fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Int32V(rv2i(rv).(map[int16]int32), false, d) } -func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, d *Decoder) { + if v, changed := f.DecMapInt16Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, d *Decoder) (_ map[int16]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -32812,6 +31371,14 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -32823,35 +31390,25 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]int64) - v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]int64) - fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Int64V(rv2i(rv).(map[int16]int64), false, d) } -func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, d *Decoder) { + if v, changed := f.DecMapInt16Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, d *Decoder) (_ map[int16]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -32876,6 +31433,14 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -32887,35 +31452,25 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]float32) - v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]float32) - fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Float32V(rv2i(rv).(map[int16]float32), false, d) } -func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, d *Decoder) { + if v, changed := f.DecMapInt16Float32V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[int16]float32, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, + d *Decoder) (_ map[int16]float32, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -32940,6 +31495,14 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -32951,35 +31514,25 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]float64) - v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]float64) - fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16Float64V(rv2i(rv).(map[int16]float64), false, d) } -func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, d *Decoder) { + if v, changed := f.DecMapInt16Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, d *Decoder) (_ map[int16]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -33004,6 +31557,14 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -33015,35 +31576,25 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int16]bool) - v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int16]bool) - fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt16BoolV(rv2i(rv).(map[int16]bool), false, d) } -func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt16BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, d *Decoder) { + if v, changed := f.DecMapInt16BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, d *Decoder) (_ map[int16]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -33068,6 +31619,14 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -33079,35 +31638,25 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]interface{}) - v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]interface{}) - fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32IntfV(rv2i(rv).(map[int32]interface{}), false, d) } -func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, d *Decoder) { + if v, changed := f.DecMapInt32IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, d *Decoder) (_ map[int32]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -33132,6 +31681,14 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -33148,35 +31705,25 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]string) - v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]string) - fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32StringV(rv2i(rv).(map[int32]string), false, d) } -func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, d *Decoder) { + if v, changed := f.DecMapInt32StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, d *Decoder) (_ map[int32]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 20) @@ -33201,6 +31748,14 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -33212,35 +31767,25 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uint) - v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uint) - fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32UintV(rv2i(rv).(map[int32]uint), false, d) } -func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, d *Decoder) { + if v, changed := f.DecMapInt32UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, d *Decoder) (_ map[int32]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -33265,6 +31810,14 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -33276,35 +31829,25 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uint8) - v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uint8) - fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Uint8V(rv2i(rv).(map[int32]uint8), false, d) } -func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, d *Decoder) { + if v, changed := f.DecMapInt32Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, d *Decoder) (_ map[int32]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -33329,6 +31872,14 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -33340,35 +31891,25 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uint16) - v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uint16) - fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Uint16V(rv2i(rv).(map[int32]uint16), false, d) } -func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, d *Decoder) { + if v, changed := f.DecMapInt32Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, d *Decoder) (_ map[int32]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -33393,6 +31934,14 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -33404,35 +31953,25 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uint32) - v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uint32) - fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Uint32V(rv2i(rv).(map[int32]uint32), false, d) } -func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, d *Decoder) { + if v, changed := f.DecMapInt32Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, d *Decoder) (_ map[int32]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -33457,6 +31996,14 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -33468,35 +32015,25 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uint64) - v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uint64) - fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Uint64V(rv2i(rv).(map[int32]uint64), false, d) } -func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, d *Decoder) { + if v, changed := f.DecMapInt32Uint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, d *Decoder) (_ map[int32]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -33521,6 +32058,14 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -33532,35 +32077,25 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt32UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]uintptr) - v, changed := fastpathTV.DecMapInt32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]uintptr) - fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), false, d) } -func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, d *Decoder) { + if v, changed := f.DecMapInt32UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, d *Decoder) (_ map[int32]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -33585,6 +32120,14 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -33596,35 +32139,25 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]int) - v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]int) - fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32IntV(rv2i(rv).(map[int32]int), false, d) } -func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, d *Decoder) { + if v, changed := f.DecMapInt32IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, d *Decoder) (_ map[int32]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -33649,6 +32182,14 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -33660,35 +32201,25 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]int8) - v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]int8) - fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Int8V(rv2i(rv).(map[int32]int8), false, d) } -func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, d *Decoder) { + if v, changed := f.DecMapInt32Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, d *Decoder) (_ map[int32]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -33713,6 +32244,14 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -33724,35 +32263,25 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]int16) - v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]int16) - fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Int16V(rv2i(rv).(map[int32]int16), false, d) } -func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, d *Decoder) { + if v, changed := f.DecMapInt32Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, d *Decoder) (_ map[int32]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 6) @@ -33777,6 +32306,14 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -33788,35 +32325,25 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]int32) - v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]int32) - fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Int32V(rv2i(rv).(map[int32]int32), false, d) } -func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, d *Decoder) { + if v, changed := f.DecMapInt32Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, d *Decoder) (_ map[int32]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -33841,6 +32368,14 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -33852,35 +32387,25 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]int64) - v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]int64) - fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Int64V(rv2i(rv).(map[int32]int64), false, d) } -func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, d *Decoder) { + if v, changed := f.DecMapInt32Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, d *Decoder) (_ map[int32]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -33905,6 +32430,14 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -33916,35 +32449,25 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]float32) - v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]float32) - fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Float32V(rv2i(rv).(map[int32]float32), false, d) } -func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, d *Decoder) { + if v, changed := f.DecMapInt32Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, d *Decoder) (_ map[int32]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 8) @@ -33969,6 +32492,14 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -33980,35 +32511,25 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]float64) - v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]float64) - fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32Float64V(rv2i(rv).(map[int32]float64), false, d) } -func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, d *Decoder) { + if v, changed := f.DecMapInt32Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, d *Decoder) (_ map[int32]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -34033,6 +32554,14 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -34044,35 +32573,25 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int32]bool) - v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int32]bool) - fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt32BoolV(rv2i(rv).(map[int32]bool), false, d) } -func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, d *Decoder) { + if v, changed := f.DecMapInt32BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, d *Decoder) (_ map[int32]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -34097,6 +32616,14 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -34108,35 +32635,25 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]interface{}) - v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]interface{}) - fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64IntfV(rv2i(rv).(map[int64]interface{}), false, d) } -func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64IntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) { + if v, changed := f.DecMapInt64IntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, d *Decoder) (_ map[int64]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -34161,6 +32678,14 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canC if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -34177,35 +32702,25 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canC return v, changed } -func (f *decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]string) - v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]string) - fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64StringV(rv2i(rv).(map[int64]string), false, d) } -func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64StringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) { + if v, changed := f.DecMapInt64StringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, d *Decoder) (_ map[int64]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 24) @@ -34230,6 +32745,14 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -34241,35 +32764,25 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uint) - v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uint) - fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64UintV(rv2i(rv).(map[int64]uint), false, d) } -func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64UintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) { + if v, changed := f.DecMapInt64UintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, d *Decoder) (_ map[int64]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -34294,6 +32807,14 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -34305,35 +32826,25 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uint8) - v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uint8) - fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Uint8V(rv2i(rv).(map[int64]uint8), false, d) } -func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Uint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) { + if v, changed := f.DecMapInt64Uint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, d *Decoder) (_ map[int64]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -34358,6 +32869,14 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -34369,35 +32888,25 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uint16) - v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uint16) - fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Uint16V(rv2i(rv).(map[int64]uint16), false, d) } -func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Uint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, d *Decoder) { + if v, changed := f.DecMapInt64Uint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, d *Decoder) (_ map[int64]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -34422,6 +32931,14 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -34433,35 +32950,25 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uint32) - v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uint32) - fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Uint32V(rv2i(rv).(map[int64]uint32), false, d) } -func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Uint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, d *Decoder) { + if v, changed := f.DecMapInt64Uint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, d *Decoder) (_ map[int64]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -34486,6 +32993,14 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -34497,35 +33012,25 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uint64) - v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uint64) - fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Uint64V(rv2i(rv).(map[int64]uint64), false, d) } -func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Uint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) { + if v, changed := f.DecMapInt64Uint64V(*vp, true, d); changed { *vp = v } -} -func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[int64]uint64, changed bool) { - dd := d.d - cr := d.cr - - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } +} +func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, + d *Decoder) (_ map[int64]uint64, changed bool) { + dd, cr := d.d, d.cr + containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -34550,6 +33055,14 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -34561,35 +33074,25 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapInt64UintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]uintptr) - v, changed := fastpathTV.DecMapInt64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]uintptr) - fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), false, d) } -func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64UintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, d *Decoder) { + if v, changed := f.DecMapInt64UintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, d *Decoder) (_ map[int64]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -34614,6 +33117,14 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -34625,35 +33136,25 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]int) - v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]int) - fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64IntV(rv2i(rv).(map[int64]int), false, d) } -func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64IntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) { + if v, changed := f.DecMapInt64IntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, d *Decoder) (_ map[int64]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -34678,6 +33179,14 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -34689,35 +33198,25 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]int8) - v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]int8) - fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Int8V(rv2i(rv).(map[int64]int8), false, d) } -func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Int8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, d *Decoder) { + if v, changed := f.DecMapInt64Int8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, d *Decoder) (_ map[int64]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -34742,6 +33241,14 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -34753,35 +33260,25 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]int16) - v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]int16) - fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Int16V(rv2i(rv).(map[int64]int16), false, d) } -func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Int16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, d *Decoder) { + if v, changed := f.DecMapInt64Int16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, d *Decoder) (_ map[int64]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 10) @@ -34806,6 +33303,14 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -34817,35 +33322,25 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]int32) - v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]int32) - fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Int32V(rv2i(rv).(map[int64]int32), false, d) } -func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Int32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, d *Decoder) { + if v, changed := f.DecMapInt64Int32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, d *Decoder) (_ map[int64]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -34870,6 +33365,14 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -34881,35 +33384,25 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]int64) - v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]int64) - fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Int64V(rv2i(rv).(map[int64]int64), false, d) } -func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Int64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) { + if v, changed := f.DecMapInt64Int64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, d *Decoder) (_ map[int64]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -34934,6 +33427,14 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -34945,35 +33446,25 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]float32) - v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]float32) - fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Float32V(rv2i(rv).(map[int64]float32), false, d) } -func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Float32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) { + if v, changed := f.DecMapInt64Float32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, d *Decoder) (_ map[int64]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 12) @@ -34998,6 +33489,14 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -35009,35 +33508,25 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]float64) - v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]float64) - fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64Float64V(rv2i(rv).(map[int64]float64), false, d) } -func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64Float64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) { + if v, changed := f.DecMapInt64Float64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, d *Decoder) (_ map[int64]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 16) @@ -35062,6 +33551,14 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -35073,35 +33570,25 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh return v, changed } -func (f *decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[int64]bool) - v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[int64]bool) - fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapInt64BoolV(rv2i(rv).(map[int64]bool), false, d) } -func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt64BoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) { + if v, changed := f.DecMapInt64BoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, d *Decoder) (_ map[int64]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35126,6 +33613,14 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -35137,35 +33632,25 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]interface{}) - v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]interface{}) - fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolIntfV(rv2i(rv).(map[bool]interface{}), false, d) } -func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolIntfV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, d *Decoder) { + if v, changed := f.DecMapBoolIntfV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, d *Decoder) (_ map[bool]interface{}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -35190,6 +33675,14 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canCha if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = nil + } + continue + } if mapGet { mv = v[mk] } else { @@ -35206,35 +33699,25 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canCha return v, changed } -func (f *decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]string) - v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]string) - fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolStringV(rv2i(rv).(map[bool]string), false, d) } -func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolStringV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, d *Decoder) { + if v, changed := f.DecMapBoolStringV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, d *Decoder) (_ map[bool]string, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 17) @@ -35259,6 +33742,14 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = "" + } + continue + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -35270,35 +33761,25 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uint) - v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uint) - fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUintV(rv2i(rv).(map[bool]uint), false, d) } -func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUintV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, d *Decoder) { + if v, changed := f.DecMapBoolUintV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, d *Decoder) (_ map[bool]uint, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35323,6 +33804,14 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -35334,35 +33823,25 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uint8) - v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uint8) - fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUint8V(rv2i(rv).(map[bool]uint8), false, d) } -func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUint8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, d *Decoder) { + if v, changed := f.DecMapBoolUint8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, d *Decoder) (_ map[bool]uint8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -35387,6 +33866,14 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -35398,35 +33885,25 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uint16) - v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uint16) - fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUint16V(rv2i(rv).(map[bool]uint16), false, d) } -func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUint16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, d *Decoder) { + if v, changed := f.DecMapBoolUint16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, d *Decoder) (_ map[bool]uint16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -35451,6 +33928,14 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -35462,35 +33947,25 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uint32) - v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uint32) - fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUint32V(rv2i(rv).(map[bool]uint32), false, d) } -func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUint32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, d *Decoder) { + if v, changed := f.DecMapBoolUint32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, d *Decoder) (_ map[bool]uint32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -35515,6 +33990,14 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -35526,35 +34009,25 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uint64) - v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uint64) - fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUint64V(rv2i(rv).(map[bool]uint64), false, d) } -func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUint64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, d *Decoder) { + if v, changed := f.DecMapBoolUint64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, d *Decoder) (_ map[bool]uint64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35579,6 +34052,14 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -35590,35 +34071,25 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange return v, changed } -func (f *decFnInfo) fastpathDecMapBoolUintptrR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]uintptr) - v, changed := fastpathTV.DecMapBoolUintptrV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]uintptr) - fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), false, d) } -func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolUintptrV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, d *Decoder) { + if v, changed := f.DecMapBoolUintptrV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, d *Decoder) (_ map[bool]uintptr, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35643,6 +34114,14 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -35654,35 +34133,25 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]int) - v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]int) - fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolIntV(rv2i(rv).(map[bool]int), false, d) } -func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolIntV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, d *Decoder) { + if v, changed := f.DecMapBoolIntV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, d *Decoder) (_ map[bool]int, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35707,6 +34176,14 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -35718,35 +34195,25 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, return v, changed } -func (f *decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]int8) - v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]int8) - fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolInt8V(rv2i(rv).(map[bool]int8), false, d) } -func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolInt8V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, d *Decoder) { + if v, changed := f.DecMapBoolInt8V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, d *Decoder) (_ map[bool]int8, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -35771,6 +34238,14 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -35782,35 +34257,25 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo return v, changed } -func (f *decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]int16) - v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]int16) - fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolInt16V(rv2i(rv).(map[bool]int16), false, d) } -func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolInt16V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, d *Decoder) { + if v, changed := f.DecMapBoolInt16V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, d *Decoder) (_ map[bool]int16, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 3) @@ -35835,6 +34300,14 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -35846,35 +34319,25 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]int32) - v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]int32) - fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolInt32V(rv2i(rv).(map[bool]int32), false, d) } -func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolInt32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, d *Decoder) { + if v, changed := f.DecMapBoolInt32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, d *Decoder) (_ map[bool]int32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -35899,6 +34362,14 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -35910,35 +34381,25 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]int64) - v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]int64) - fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolInt64V(rv2i(rv).(map[bool]int64), false, d) } -func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolInt64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, d *Decoder) { + if v, changed := f.DecMapBoolInt64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, d *Decoder) (_ map[bool]int64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -35963,6 +34424,14 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -35974,35 +34443,25 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b return v, changed } -func (f *decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]float32) - v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]float32) - fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolFloat32V(rv2i(rv).(map[bool]float32), false, d) } -func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolFloat32V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, d *Decoder) { + if v, changed := f.DecMapBoolFloat32V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, d *Decoder) (_ map[bool]float32, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 5) @@ -36027,6 +34486,14 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -36038,35 +34505,25 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]float64) - v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]float64) - fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolFloat64V(rv2i(rv).(map[bool]float64), false, d) } -func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolFloat64V(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, d *Decoder) { + if v, changed := f.DecMapBoolFloat64V(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, d *Decoder) (_ map[bool]float64, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 9) @@ -36091,6 +34548,14 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = 0 + } + continue + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -36102,35 +34567,25 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan return v, changed } -func (f *decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[bool]bool) - v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 { *vp = v } - } else { - v := rv2i(rv).(map[bool]bool) - fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.DecMapBoolBoolV(rv2i(rv).(map[bool]bool), false, d) } -func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapBoolBoolV(*vp, checkNil, true, d) - if changed { +func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, d *Decoder) { + if v, changed := f.DecMapBoolBoolV(*vp, true, d); changed { *vp = v } } -func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool, +func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, d *Decoder) (_ map[bool]bool, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr - if checkNil && dd.TryDecodeAsNil() { - if v != nil { - changed = true - } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, 2) @@ -36155,6 +34610,14 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange boo if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + if d.h.DeleteOnNilMapValue { + delete(v, mk) + } else { + v[mk] = false + } + continue + } mv = dd.DecodeBool() if v != nil { v[mk] = mv diff --git a/codec/fast-path.go.tmpl b/codec/fast-path.go.tmpl index 0ce15ded..388f0541 100644 --- a/codec/fast-path.go.tmpl +++ b/codec/fast-path.go.tmpl @@ -40,9 +40,6 @@ import ( const fastpathEnabled = true -const fastpathCheckNilFalse = false // for reflect -const fastpathCheckNilTrue = true // for type switch - type fastpathT struct {} var fastpathTV fastpathT @@ -50,8 +47,8 @@ var fastpathTV fastpathT type fastpathE struct { rtid uintptr rt reflect.Type - encfn func(*encFnInfo, reflect.Value) - decfn func(*decFnInfo, reflect.Value) + encfn func(*Encoder, *codecFnInfo, reflect.Value) + decfn func(*Decoder, *codecFnInfo, reflect.Value) } type fastpathA [{{ .FastpathLen }}]fastpathE @@ -84,19 +81,25 @@ var fastpathAV fastpathA // due to possible initialization loop error, make fastpath in an init() func init() { i := 0 - fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + 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), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + fn([]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} {{range .Values}}{{if not .Primitive}}{{if .MapKey }} - fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*Encoder).{{ .MethodNamePfx "fastpathEnc" false }}R, (*Decoder).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} sort.Sort(fastpathAslice(fastpathAV[:])) } @@ -109,10 +112,10 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}:{{else}} case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if not .MapKey }} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e){{if not .MapKey }} case *[]{{ .Elem }}:{{else}} case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, e) {{end}}{{end}} default: _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) @@ -125,9 +128,9 @@ func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { switch v := iv.(type) { {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}: - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) case *[]{{ .Elem }}: - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) + 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) @@ -140,9 +143,9 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { switch v := iv.(type) { {{range .Values}}{{if not .Primitive}}{{if .MapKey }} case map[{{ .MapKey }}]{{ .Elem }}: - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, e) case *map[{{ .MapKey }}]{{ .Elem }}: - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) + 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) @@ -154,20 +157,15 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { // -- -- fast path functions {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} -func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { +func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { if f.ti.mbs { - fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv2i(rv).([]{{ .Elem }}), fastpathCheckNilFalse, f.e) + fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv2i(rv).([]{{ .Elem }}), e) } else { - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).([]{{ .Elem }}), fastpathCheckNilFalse, f.e) + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).([]{{ .Elem }}), e) } } -func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeArrayStart(len(v)) for _, v2 := range v { if cr != nil { cr.sendContainerState(containerArrayElem) } @@ -176,13 +174,8 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil b if cr != nil { cr.sendContainerState(containerArrayEnd) }{{/* ee.EncodeEnd() */}} } -func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *Encoder) { + ee, cr := e.e, e.cr if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return @@ -205,16 +198,11 @@ func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, check {{range .Values}}{{if not .Primitive}}{{if .MapKey }} -func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e) +func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), e) } -func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) { - ee := e.e - cr := e.cr - if checkNil && v == nil { - ee.EncodeNil() - return - } +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, e *Encoder) { + ee, cr := e.e, e.cr ee.EncodeMapStart(len(v)) {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 {{end}}if e.h.Canonical { @@ -280,11 +268,10 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}:{{else}} case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if not .MapKey }} - case *[]{{ .Elem }}:{{else}} - case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} - v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d) - if changed2 { + 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 } {{end}}{{end}} @@ -295,6 +282,20 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return true } +func fastpathDecodeSetZeroTypeSwitch(iv interface{}, d *Decoder) 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}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + // -- -- fast path functions {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} {{/* @@ -303,33 +304,25 @@ Slices can change if they - are addressable (from a ptr) - are settable (e.g. contained in an interface{}) */}} -func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { {{/* // CanSet => CanAddr + Exported */}} - vp := rv2i(rv.Addr()).(*[]{{ .Elem }}) - v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d) - if changed { - *vp = v +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 } } else { - v := rv2i(rv).([]{{ .Elem }}) - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(rv2i(rv).([]{{ .Elem }}), !array, d) } } -func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil bool, d *Decoder) { - v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) - if changed { +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 } } -func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { dd := d.d {{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}} - if checkNil && dd.TryDecodeAsNil() { - if v != nil { changed = true } - return nil, changed - } slh, containerLenS := d.decSliceHelperStart() if containerLenS == 0 { if canChange { @@ -411,33 +404,25 @@ Maps can change if they are - addressable (from a ptr) - settable (e.g. contained in an interface{}) */}} -func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv2i(rv.Addr()).(*map[{{ .MapKey }}]{{ .Elem }}) - v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d) - if changed { +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 } - } else { - v := rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}) - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + return } + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), false, d) } -func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, d *Decoder) { - v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) - if changed { +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 } } -func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, canChange bool, d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { - dd := d.d - cr := d.cr + dd, cr := d.d, d.cr {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} - if checkNil && dd.TryDecodeAsNil() { - if v != nil { changed = true } - return nil, changed - } containerLen := dd.ReadMapStart() if canChange && v == nil { xlen := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }}) @@ -460,6 +445,10 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} }{{ else }}mk = {{ decmd .MapKey }}{{ end }} if cr != nil { cr.sendContainerState(containerMapValue) } + if dd.TryDecodeAsNil() { + 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 { diff --git a/codec/fast-path.not.go b/codec/fast-path.not.go index 63e59114..9573d64a 100644 --- a/codec/fast-path.not.go +++ b/codec/fast-path.not.go @@ -14,17 +14,18 @@ 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 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 } type fastpathT struct{} type fastpathE struct { rtid uintptr rt reflect.Type - encfn func(*encFnInfo, reflect.Value) - decfn func(*decFnInfo, reflect.Value) + encfn func(*Encoder, *codecFnInfo, reflect.Value) + decfn func(*Decoder, *codecFnInfo, reflect.Value) } type fastpathA [0]fastpathE diff --git a/codec/gen-dec-array.go.tmpl b/codec/gen-dec-array.go.tmpl index f4f0cdd2..d9940c0a 100644 --- a/codec/gen-dec-array.go.tmpl +++ b/codec/gen-dec-array.go.tmpl @@ -15,7 +15,7 @@ if {{var "l"}} == 0 { } {{end}} } else { {{var "hl"}} := {{var "l"}} > 0 - var {{var "rl"}} int + var {{var "rl"}} int; _ = {{var "rl"}} {{if isSlice }} if {{var "hl"}} { if {{var "l"}} > cap({{var "v"}}) { {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) @@ -30,9 +30,10 @@ if {{var "l"}} == 0 { {{var "c"}} = true } } {{end}} - {{var "j"}} := 0 + var {{var "j"}} int + // var {{var "dn"}} bool for ; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { - if {{var "j"}} == 0 && len({{var "v"}}) == 0 { + {{if not isArray}} if {{var "j"}} == 0 && len({{var "v"}}) == 0 { if {{var "hl"}} { {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) } else { @@ -40,20 +41,26 @@ if {{var "l"}} == 0 { } {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) {{var "c"}} = true - } + }{{end}} + {{var "h"}}.ElemContainerState({{var "j"}}) + // {{var "dn"}} = r.TryDecodeAsNil() + {{if isChan}}{{ $x := printf "%[1]vv%[2]v" .TempVar .Rand }}var {{var $x}} {{ .Typ }} + {{ decLineVar $x }} + {{var "v"}} <- {{ $x }} + {{else}} // if indefinite, etc, then expand the slice if necessary var {{var "db"}} bool if {{var "j"}} >= len({{var "v"}}) { {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}); {{var "c"}} = true - {{end}} {{if isArray}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true + {{else}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true {{end}} } - {{var "h"}}.ElemContainerState({{var "j"}}) if {{var "db"}} { z.DecSwallow() } else { {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } + {{end}} } {{if isSlice}} if {{var "j"}} < len({{var "v"}}) { {{var "v"}} = {{var "v"}}[:{{var "j"}}] diff --git a/codec/gen-dec-map.go.tmpl b/codec/gen-dec-map.go.tmpl index 423d6385..ad1236ef 100644 --- a/codec/gen-dec-map.go.tmpl +++ b/codec/gen-dec-map.go.tmpl @@ -8,7 +8,7 @@ if {{var "v"}} == nil { } var {{var "mk"}} {{ .KTyp }} var {{var "mv"}} {{ .Typ }} -var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +var {{var "mg"}}, {{var "mdn"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool if {{var "bh"}}.MapValueReset { {{if decElemKindPtr}}{{var "mg"}} = true {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } @@ -30,8 +30,11 @@ if {{var "l"}} != 0 { } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) - {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "mdn"}} = false + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y }} + if {{var "mdn"}} { + if {{ var "bh" }}.DeleteOnNilMapValue { delete({{var "v"}}, {{var "mk"}}) } else { {{var "v"}}[{{var "mk"}}] = {{decElemZero}} } + } else if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } diff --git a/codec/gen-helper.generated.go b/codec/gen-helper.generated.go index fee017a2..ae55f631 100644 --- a/codec/gen-helper.generated.go +++ b/codec/gen-helper.generated.go @@ -61,13 +61,14 @@ 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.be // f.e.hh.isBinaryEncoding() + return f.e.cf.be // f.e.hh.isBinaryEncoding() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncFallback(iv interface{}) { // println(">>>>>>>>> EncFallback") - f.e.encodeI(iv, false, false) + // f.e.encodeI(iv, false, false) + f.e.encodeValue(reflect.ValueOf(iv), nil, false) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -90,7 +91,7 @@ func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncRaw(iv Raw) { - f.e.raw(iv) + f.e.rawBytes(iv) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -103,7 +104,7 @@ func (f genHelperEncoder) TimeRtidIfBinc() uintptr { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) IsJSONHandle() bool { - return f.e.js + return f.e.cf.js } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -157,7 +158,12 @@ func (f genHelperDecoder) DecScratchBuffer() []byte { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { // println(">>>>>>>>> DecFallback") - f.d.decodeI(iv, chkPtr, false, false, false) + rv := reflect.ValueOf(iv) + if chkPtr { + rv = f.d.ensureDecodeable(rv) + } + f.d.decodeValue(rv, nil, false, false) + // f.d.decodeValueFallback(rv) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -203,7 +209,7 @@ 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.raw() + return f.d.rawBytes() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* diff --git a/codec/gen-helper.go.tmpl b/codec/gen-helper.go.tmpl index 2d801c81..d7d4967c 100644 --- a/codec/gen-helper.go.tmpl +++ b/codec/gen-helper.go.tmpl @@ -61,12 +61,13 @@ 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.be // f.e.hh.isBinaryEncoding() + return f.e.cf.be // f.e.hh.isBinaryEncoding() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncFallback(iv interface{}) { // println(">>>>>>>>> EncFallback") - f.e.encodeI(iv, false, false) + // f.e.encodeI(iv, false, false) + f.e.encodeValue(reflect.ValueOf(iv), nil, false) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { @@ -85,7 +86,7 @@ func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncRaw(iv Raw) { - f.e.raw(iv) + f.e.rawBytes(iv) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) TimeRtidIfBinc() uintptr { @@ -96,7 +97,7 @@ func (f genHelperEncoder) TimeRtidIfBinc() uintptr { } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) IsJSONHandle() bool { - return f.e.js + return f.e.cf.js } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) HasExtensions() bool { @@ -143,7 +144,12 @@ func (f genHelperDecoder) DecScratchBuffer() []byte { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { // println(">>>>>>>>> DecFallback") - f.d.decodeI(iv, chkPtr, false, false, false) + rv := reflect.ValueOf(iv) + if chkPtr { + rv = f.d.ensureDecodeable(rv) + } + f.d.decodeValue(rv, nil, false, false) + // f.d.decodeValueFallback(rv) } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { @@ -182,7 +188,7 @@ 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.raw() + return f.d.rawBytes() } // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) TimeRtidIfBinc() uintptr { diff --git a/codec/gen.generated.go b/codec/gen.generated.go index 2a6123da..7e2b2bdc 100644 --- a/codec/gen.generated.go +++ b/codec/gen.generated.go @@ -16,7 +16,7 @@ if {{var "v"}} == nil { } var {{var "mk"}} {{ .KTyp }} var {{var "mv"}} {{ .Typ }} -var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +var {{var "mg"}}, {{var "mdn"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool if {{var "bh"}}.MapValueReset { {{if decElemKindPtr}}{{var "mg"}} = true {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } @@ -38,8 +38,11 @@ if {{var "l"}} != 0 { } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) - {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "mdn"}} = false + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y }} + if {{var "mdn"}} { + if {{ var "bh" }}.DeleteOnNilMapValue { delete({{var "v"}}, {{var "mk"}}) } else { {{var "v"}}[{{var "mk"}}] = {{decElemZero}} } + } else if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } @@ -65,7 +68,7 @@ if {{var "l"}} == 0 { } {{end}} } else { {{var "hl"}} := {{var "l"}} > 0 - var {{var "rl"}} int + var {{var "rl"}} int; _ = {{var "rl"}} {{if isSlice }} if {{var "hl"}} { if {{var "l"}} > cap({{var "v"}}) { {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) @@ -80,9 +83,10 @@ if {{var "l"}} == 0 { {{var "c"}} = true } } {{end}} - {{var "j"}} := 0 + var {{var "j"}} int + // var {{var "dn"}} bool for ; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { - if {{var "j"}} == 0 && len({{var "v"}}) == 0 { + {{if not isArray}} if {{var "j"}} == 0 && len({{var "v"}}) == 0 { if {{var "hl"}} { {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) } else { @@ -90,20 +94,26 @@ if {{var "l"}} == 0 { } {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) {{var "c"}} = true - } + }{{end}} + {{var "h"}}.ElemContainerState({{var "j"}}) + // {{var "dn"}} = r.TryDecodeAsNil() + {{if isChan}}{{ $x := printf "%[1]vv%[2]v" .TempVar .Rand }}var {{var $x}} {{ .Typ }} + {{ decLineVar $x }} + {{var "v"}} <- {{ $x }} + {{else}} // if indefinite, etc, then expand the slice if necessary var {{var "db"}} bool if {{var "j"}} >= len({{var "v"}}) { {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}); {{var "c"}} = true - {{end}} {{if isArray}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true + {{else}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = true {{end}} } - {{var "h"}}.ElemContainerState({{var "j"}}) if {{var "db"}} { z.DecSwallow() } else { {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } + {{end}} } {{if isSlice}} if {{var "j"}} < len({{var "v"}}) { {{var "v"}} = {{var "v"}}[:{{var "j"}}] diff --git a/codec/gen.go b/codec/gen.go index 8f1fd4f6..944c0358 100644 --- a/codec/gen.go +++ b/codec/gen.go @@ -163,13 +163,16 @@ type genRunner struct { ti *TypeInfos // rr *rand.Rand // random generator for file-specific types + + nx bool // no extensions } // 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. -func Gen(w io.Writer, buildTags, pkgName, uid string, ti *TypeInfos, typ ...reflect.Type) { +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. // codecgen already checks the AST and skips any types that define the codec.Selfer methods. // Consequently, there's no need to check and trim them if they implement codec.Selfer @@ -190,6 +193,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, ti *TypeInfos, typ ...refl bp: genImportPath(typ[0]), xs: uid, ti: ti, + nx: noExtensions, } if x.ti == nil { x.ti = defTypeInfos @@ -713,7 +717,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) } // only check for extensions if the type is named, and has a packagePath. - if genImportPath(t) != "" && t.Name() != "" { + 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) } @@ -773,7 +777,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") } else if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) - x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { x.xtraSM(varname, true, t) // x.encListFallback(varname, rtid, t) @@ -787,7 +791,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) - x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", e)") } else { x.xtraSM(varname, true, t) // x.encMapFallback(varname, rtid, t) @@ -845,55 +849,64 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { // 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. - x.linef("var %s [%v]bool", numfieldsvar, len(tisfi)) - x.linef("_, _, _ = %s, %s, %s", sepVarname, numfieldsvar, struct2arrvar) + 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) - nn := 0 - for j, si := range tisfi { - if !si.omitEmpty { - nn++ - continue - } - var t2 reflect.StructField - var omitline string - if si.i != -1 { - t2 = t.Field(int(si.i)) - } else { - t2typ := t - varname3 := varname - for _, ix := range si.is { - for t2typ.Kind() == reflect.Ptr { - t2typ = t2typ.Elem() - } - t2 = t2typ.Field(ix) - t2typ = t2.Type - varname3 = varname3 + "." + t2.Name - if t2typ.Kind() == reflect.Ptr { - omitline += varname3 + " != nil && " + var nn int + if ti.anyOmitEmpty { + for j, si := range tisfi { + if !si.omitEmpty { + nn++ + continue + } + var t2 reflect.StructField + var omitline string + { + 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 { + omitline += varname3 + " != 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) } - // 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.linef("var %snn%s int", genTempVarPfx, i) + // x.linef("var %snn%s int", genTempVarPfx, i) x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.linef("r.EncodeArrayStart(%d)", len(tisfi)) x.linef("} else {") // if not ti.toArray - x.linef("%snn%s = %v", genTempVarPfx, i, nn) - x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) - x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) - x.linef("%snn%s = %v", genTempVarPfx, i, 0) - // x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + if ti.anyOmitEmpty { + x.linef("var %snn%s = %v", genTempVarPfx, i, nn) + x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) + x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + x.linef("%snn%s = %v", genTempVarPfx, i, 0) + } else { + x.linef("r.EncodeMapStart(%d)", len(tisfi)) + } x.line("}") // close if not StructToArray for j, si := range tisfi { @@ -901,17 +914,18 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { isNilVarName := genTempVarPfx + "n" + i var labelUsed bool var t2 reflect.StructField - if si.i != -1 { - t2 = t.Field(int(si.i)) - } else { + { t2typ := t varname3 := varname - for _, ix := range si.is { + for ij, ix := range si.is { + if uint8(ij) == si.nis { + break + } // fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix) for t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } - t2 = t2typ.Field(ix) + t2 = t2typ.Field(int(ix)) t2typ = t2.Type varname3 = varname3 + "." + t2.Name if t2typ.Kind() == reflect.Ptr { @@ -934,7 +948,7 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray if labelUsed { - x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + x.linef("if %s { z.EncSendContainerState(codecSelfer_containerArrayElem%s); r.EncodeNil() } else { ", isNilVarName, x.xs) } x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) if si.omitEmpty { @@ -1018,7 +1032,7 @@ func (x *genRunner) encMapFallback(varname string, t reflect.Type) { x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) } -func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { +func (x *genRunner) decVar(varname, decodedNilVarname string, t reflect.Type, canBeNil 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 @@ -1031,7 +1045,9 @@ func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { } if canBeNil { x.line("if r.TryDecodeAsNil() {") - if t.Kind() == reflect.Ptr { + 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), @@ -1149,7 +1165,7 @@ func (x *genRunner) dec(varname string, t reflect.Type) { x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) } // only check for extensions if the type is named, and has a packagePath. - if genImportPath(t) != "" && t.Name() != "" { + 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) } @@ -1227,7 +1243,7 @@ func (x *genRunner) dec(varname string, t reflect.Type) { x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false)") } else if fastpathAV.index(rtid) != -1 { g := x.newGenV(t) - x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", d)") } else { x.xtraSM(varname, false, t) // x.decListFallback(varname, rtid, false, t) @@ -1239,7 +1255,7 @@ 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 + ", false, d)") + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", d)") } else { x.xtraSM(varname, false, t) // x.decMapFallback(varname, rtid, t) @@ -1333,13 +1349,13 @@ 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) - return "" - } - funcs["decLine"] = func(pfx string) string { - x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + x.decVar(varname, "", telem, 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 } @@ -1395,21 +1411,21 @@ 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) return "" } - funcs["decLineVar"] = func(varname string) string { - x.decVar(varname, telem, false) - 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) + funcs["decLineVar"] = func(varname, decodedNilVarname string) string { + x.decVar(varname, decodedNilVarname, telem, false) 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 } @@ -1430,18 +1446,19 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt for _, si := range tisfi { x.line("case \"" + si.encName + "\":") var t2 reflect.StructField - if si.i != -1 { - t2 = t.Field(int(si.i)) - } else { + { //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 _, ix := range si.is { + for ij, ix := range si.is { + if uint8(ij) == si.nis { + break + } for t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } - t2 = t2typ.Field(ix) + t2 = t2typ.Field(int(ix)) t2typ = t2.Type varname3 = varname3 + "." + t2.Name if t2typ.Kind() == reflect.Ptr { @@ -1449,7 +1466,7 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt } } } - x.decVar(varname+"."+t2.Name, t2.Type, false) + x.decVar(varname+"."+t2.Name, "", t2.Type, false) } x.line("default:") // pass the slice here, so that the string will not escape, and maybe save allocation @@ -1501,18 +1518,19 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length for _, si := range tisfi { var t2 reflect.StructField - if si.i != -1 { - t2 = t.Field(int(si.i)) - } else { + { //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 _, ix := range si.is { + for ij, ix := range si.is { + if uint8(ij) == si.nis { + break + } for t2typ.Kind() == reflect.Ptr { t2typ = t2typ.Elem() } - t2 = t2typ.Field(ix) + t2 = t2typ.Field(int(ix)) t2typ = t2.Type varname3 = varname3 + "." + t2.Name if t2typ.Kind() == reflect.Ptr { @@ -1527,7 +1545,7 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", tpfx, i, x.xs, breakString) x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) - x.decVar(varname+"."+t2.Name, t2.Type, true) + x.decVar(varname+"."+t2.Name, "", t2.Type, true) } // read remaining values and throw away. x.line("for {") diff --git a/codec/helper.go b/codec/helper.go index 541256cb..f1930c63 100644 --- a/codec/helper.go +++ b/codec/helper.go @@ -103,8 +103,10 @@ import ( "errors" "fmt" "math" + "os" "reflect" "sort" + "strconv" "strings" "sync" "time" @@ -112,32 +114,56 @@ import ( const ( scratchByteArrayLen = 32 - initCollectionCap = 32 // 32 is defensive. 16 is preferred. + // initCollectionCap = 16 // 32 is defensive. 16 is preferred. // Support encoding.(Binary|Text)(Unm|M)arshaler. // This constant flag will enable or disable it. supportMarshalInterfaces = true - // Each Encoder or Decoder uses a cache of functions based on conditionals, - // so that the conditionals are not run every time. - // - // Either a map or a slice is used to keep track of the functions. - // The map is more natural, but has a higher cost than a slice/array. - // This flag (useMapForCodecCache) controls which is used. - // - // From benchmarks, slices with linear search perform better with < 32 entries. - // We have typically seen a high threshold of about 24 entries. - useMapForCodecCache = false - // for debugging, set this to false, to catch panic traces. // Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic. recoverPanicToErr = true - // resetSliceElemToZeroValue: on decoding a slice, reset the element to a zero value first. - // concern: if the slice already contained some garbage, we will decode into that garbage. - // The chances of this are slim, so leave this "optimization". - // TODO: should this be true, to ensure that we always decode into a "zero" "empty" value? - resetSliceElemToZeroValue = false + // arrayCacheLen is the length of the cache used in encoder or decoder for + // 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 + + // 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) + + // always set xDebug = false before releasing software + xDebug = true ) var ( @@ -145,6 +171,20 @@ var ( zeroByteSlice = oneByteArr[:0:0] ) +var pool pooler + +func init() { + pool.init() +} + +// type findCodecFnMode uint8 + +// const ( +// findCodecFnModeMap findCodecFnMode = iota +// findCodecFnModeBinarySearch +// findCodecFnModeLinearSearch +// ) + type charEncoding uint8 const ( @@ -177,6 +217,36 @@ const ( // valueTypeInvalid = 0xff ) +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" + } + return strconv.FormatInt(int64(x), 10) +} + type seqType uint8 const ( @@ -216,25 +286,21 @@ const rgetMaxRecursion = 2 // Anecdotally, we believe most types have <= 12 fields. // Java's PMD rules set TooManyFields threshold to 15. -const rgetPoolTArrayLen = 12 +const typeInfoLoadArrayLen = 12 -type rgetT struct { +type typeInfoLoad struct { fNames []string encNames []string etypes []uintptr sfis []*structFieldInfo } -type rgetPoolT struct { - fNames [rgetPoolTArrayLen]string - encNames [rgetPoolTArrayLen]string - etypes [rgetPoolTArrayLen]uintptr - sfis [rgetPoolTArrayLen]*structFieldInfo - sfiidx [rgetPoolTArrayLen]sfiIdx -} - -var rgetPool = sync.Pool{ - New: func() interface{} { return new(rgetPoolT) }, +type typeInfoLoadArray struct { + fNames [typeInfoLoadArrayLen]string + encNames [typeInfoLoadArrayLen]string + etypes [typeInfoLoadArrayLen]uintptr + sfis [typeInfoLoadArrayLen]*structFieldInfo + sfiidx [typeInfoLoadArrayLen]sfiIdx } type containerStateRecv interface { @@ -306,21 +372,96 @@ var ( var defTypeInfos = NewTypeInfos([]string{"codec", "json"}) var immutableKindsSet = [32]bool{ - reflect.Int: true, - reflect.Int8: true, - reflect.Int16: true, - reflect.Int32: true, - reflect.Int64: true, - reflect.Uint: true, - reflect.Uint8: true, - reflect.Uint16: true, - reflect.Uint32: true, - reflect.Uint64: true, - reflect.Uintptr: true, - reflect.Float32: true, - reflect.Float64: true, - reflect.Bool: true, - reflect.String: true, + // reflect.Invalid: , + reflect.Bool: true, + reflect.Int: true, + reflect.Int8: true, + reflect.Int16: true, + reflect.Int32: true, + reflect.Int64: true, + reflect.Uint: true, + reflect.Uint8: true, + reflect.Uint16: true, + reflect.Uint32: true, + reflect.Uint64: true, + reflect.Uintptr: true, + reflect.Float32: true, + reflect.Float64: true, + reflect.Complex64: true, + reflect.Complex128: true, + // reflect.Array + // reflect.Chan + // reflect.Func: true, + // reflect.Interface + // reflect.Map + // reflect.Ptr + // reflect.Slice + reflect.String: true, + // reflect.Struct + // reflect.UnsafePointer +} + +var recognizedRtids []uintptr +var recognizedRtidPtrs []uintptr +var recognizedRtidOrPtrs []uintptr + +func init() { + if !useLookupRecognizedTypes { + return + } + 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))) + } +} + +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. @@ -356,6 +497,7 @@ type BasicHandle struct { extHandle EncodeOptions DecodeOptions + noBuiltInTypeChecker } func (x *BasicHandle) getBasicHandle() *BasicHandle { @@ -379,6 +521,7 @@ type Handle interface { newEncDriver(w *Encoder) encDriver newDecDriver(r *Decoder) decDriver isBinary() bool + IsBuiltinType(rtid uintptr) bool } // Raw represents raw formatted bytes. @@ -506,9 +649,13 @@ func (_ textEncodingType) isBinary() bool { return false } // noBuiltInTypes is embedded into many types which do not support builtins // e.g. msgpack, simple, cbor. -type noBuiltInTypes struct{} -func (_ noBuiltInTypes) IsBuiltinType(rt uintptr) bool { return false } +type noBuiltInTypeChecker struct{} + +func (_ noBuiltInTypeChecker) IsBuiltinType(rt uintptr) bool { return false } + +type noBuiltInTypes struct{ noBuiltInTypeChecker } + func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} @@ -613,14 +760,14 @@ func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { return nil } +const maxLevelsEmbedding = 16 + type structFieldInfo struct { encName string // encode name fieldName string // field name - // only one of 'i' or 'is' can be set. If 'i' is -1, then 'is' has been set. - - is []int // (recursive/embedded) field index in struct - i int16 // field index in struct + 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? } @@ -629,48 +776,31 @@ type structFieldInfo struct { // return si.encName == "" && len(si.is) == 0 && si.i == 0 && !si.omitEmpty && !si.toArray // } +func (si *structFieldInfo) setToZeroValue(v reflect.Value) { + if v, valid := si.field(v, false); valid { + v.Set(reflect.Zero(v.Type())) + } +} + // rv returns the field of the struct. // If anonymous, it returns an Invalid -func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value) { - if si.i != -1 { - v = v.Field(int(si.i)) - return v - } +func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value, valid bool) { // replicate FieldByIndex - for _, x := range si.is { - for v.Kind() == reflect.Ptr { - if v.IsNil() { - if !update { - return - } - v.Set(reflect.New(v.Type().Elem())) - } - v = v.Elem() + for i, x := range si.is { + if uint8(i) == si.nis { + break + } + if v, valid = baseStructRv(v, update); !valid { + return } - v = v.Field(x) + v = v.Field(int(x)) } - return v + return v, true } -func (si *structFieldInfo) setToZeroValue(v reflect.Value) { - if si.i != -1 { - v = v.Field(int(si.i)) - v.Set(reflect.Zero(v.Type())) - // v.Set(reflect.New(v.Type()).Elem()) - // v.Set(reflect.New(v.Type())) - } else { - // replicate FieldByIndex - for _, x := range si.is { - for v.Kind() == reflect.Ptr { - if v.IsNil() { - return - } - v = v.Elem() - } - v = v.Field(x) - } - v.Set(reflect.Zero(v.Type())) - } +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 { @@ -714,6 +844,97 @@ func (p sfiSortedByEncName) Swap(i, j int) { p[i], p[j] = p[j], p[i] } +const structFieldNodeNumToCache = 4 + +type structFieldNodeCache struct { + rv [structFieldNodeNumToCache]reflect.Value + idx [structFieldNodeNumToCache]uint32 + num uint8 +} + +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 + } + if key == k { + return x.rv[i], true + } + } + return +} + +func (x *structFieldNodeCache) tryAdd(fv reflect.Value, key uint32) { + if x.num < structFieldNodeNumToCache { + x.rv[x.num] = fv + x.idx[x.num] = key + x.num++ + return + } +} + +type structFieldNode struct { + v reflect.Value + cache2 structFieldNodeCache + cache3 structFieldNodeCache + update bool +} + +func (x *structFieldNode) field(si *structFieldInfo) (fv reflect.Value) { + // return si.fieldval(x.v, x.update) + // Note: we only cache if nis=2 or nis=3 i.e. up to 2 levels of embedding + // This mostly saves us time on the repeated calls to v.Elem, v.Field, etc. + var valid bool + switch si.nis { + case 1: + fv = x.v.Field(int(si.is[0])) + case 2: + if fv, valid = x.cache2.get(uint32(si.is[0])); valid { + fv = fv.Field(int(si.is[1])) + return + } + fv = x.v.Field(int(si.is[0])) + if fv, valid = baseStructRv(fv, x.update); !valid { + return + } + x.cache2.tryAdd(fv, uint32(si.is[0])) + fv = fv.Field(int(si.is[1])) + case 3: + var key uint32 = uint32(si.is[0])<<16 | uint32(si.is[1]) + if fv, valid = x.cache3.get(key); valid { + fv = fv.Field(int(si.is[2])) + return + } + fv = x.v.Field(int(si.is[0])) + if fv, valid = baseStructRv(fv, x.update); !valid { + return + } + fv = fv.Field(int(si.is[1])) + if fv, valid = baseStructRv(fv, x.update); !valid { + return + } + x.cache3.tryAdd(fv, key) + fv = fv.Field(int(si.is[2])) + default: + fv, _ = si.field(x.v, x.update) + } + return +} + +func baseStructRv(v reflect.Value, update bool) (v2 reflect.Value, valid bool) { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + if !update { + return + } + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + return v, true +} + // typeInfo keeps information about each type referenced in the encode/decode sequence. // // During an encode/decode sequence, we work as below: @@ -738,6 +959,8 @@ type typeInfo struct { baseId uintptr baseIndir int8 // number of indirections to get to base + anyOmitEmpty bool + mbs bool // base type (T or *T) is a MapBySlice bm bool // base type (T or *T) is a binaryMarshaler @@ -761,14 +984,16 @@ type typeInfo struct { toArray bool // whether this (struct) type should be encoded as an array } -// linear search. faster than binary search in my testing up to 16-field structs. -const binarySearchThreshold = 8 // similar to what python does for hashtables +// 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) 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 < binarySearchThreshold { + if sfilen < indexForEncNameBinarySearchThreshold { for i, si := range ti.sfi { if si.encName == name { return i @@ -829,7 +1054,6 @@ func (x *TypeInfos) structTag(t reflect.StructTag) (s string) { func (x *TypeInfos) find(sp *[]rtid2ti, rtid uintptr) (idx int, ti *typeInfo) { // binary search. adapted from sort/search.go. - // fmt.Printf(">>>> calling typeinfos.find ... \n") // if sp == nil { // return -1, nil // } @@ -850,7 +1074,6 @@ func (x *TypeInfos) find(sp *[]rtid2ti, rtid uintptr) (idx int, ti *typeInfo) { } func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { - // fmt.Printf(">>>> calling typeinfos.get ... \n") sp := x.infos.load() var idx int if sp != nil { @@ -916,13 +1139,13 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { ti.toArray = siInfo.toArray omitEmpty = siInfo.omitEmpty } - pi := rgetPool.Get() - pv := pi.(*rgetPoolT) + pp, pi := pool.tiLoad() + pv := pi.(*typeInfoLoadArray) pv.etypes[0] = ti.baseId - vv := rgetT{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]} x.rget(rt, rtid, omitEmpty, nil, &vv) - ti.sfip, ti.sfi = rgetResolveSFI(vv.sfis, pv.sfiidx[:0]) - rgetPool.Put(pi) + ti.sfip, ti.sfi, ti.anyOmitEmpty = rgetResolveSFI(vv.sfis, pv.sfiidx[:0]) + pp.Put(pi) } // sfi = sfip @@ -930,7 +1153,6 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { x.mu.Lock() sp = x.infos.load() if sp == nil { - // fmt.Printf(">>>> in typeinfos.get: sp == nil\n") pti = &ti vs = []rtid2ti{{rtid, pti}} x.infos.store(&vs) @@ -947,12 +1169,11 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { } } x.mu.Unlock() - // fmt.Printf(">>>>>>> TypeInfos: Num Elements: %v\n", len(*(x.infos.load()))) return } func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, omitEmpty bool, - indexstack []int, pv *rgetT, + indexstack []uint16, pv *typeInfoLoad, ) { // Read up fields and store how to access the value. // @@ -962,10 +1183,13 @@ func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, omitEmpty bool, // Note: we consciously use slices, not a map, to simulate a set. // Typically, types have < 16 fields, // and iteration using equals is faster than maps there - + flen := rt.NumField() + if flen > (1<<16 - 1) { + panic(fmt.Errorf("codec: types with more than %v fields are not supported - has %v fields", (1<<16 - 1), flen)) + } LOOP: - for j, jlen := 0, rt.NumField(); j < jlen; j++ { - f := rt.Field(j) + for j, jlen := uint16(0), uint16(flen); j < jlen; j++ { + f := rt.Field(int(j)) fkind := f.Type.Kind() // skip if a func type, or is unexported, or structTag value == "-" switch fkind { @@ -1017,7 +1241,7 @@ LOOP: } if processIt { pv.etypes = append(pv.etypes, ftid) - indexstack2 := make([]int, len(indexstack)+1) + indexstack2 := make([]uint16, len(indexstack)+1) copy(indexstack2, indexstack) indexstack2[len(indexstack)] = j // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) @@ -1049,15 +1273,12 @@ LOOP: pv.encNames = append(pv.encNames, si.encName) // si.ikind = int(f.Type.Kind()) - if len(indexstack) == 0 { - si.i = int16(j) - } else { - si.i = -1 - si.is = make([]int, len(indexstack)+1) - copy(si.is, indexstack) - si.is[len(indexstack)] = j - // si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + if len(indexstack) > maxLevelsEmbedding-1 { + panic(fmt.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 @@ -1068,7 +1289,7 @@ LOOP: // 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) { +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. @@ -1105,6 +1326,9 @@ func rgetResolveSFI(x []*structFieldInfo, pv []sfiIdx) (y, z []*structFieldInfo) if v == nil { continue } + if !anyOmitEmpty && v.omitEmpty { + anyOmitEmpty = true + } y[n] = v n++ } @@ -1115,15 +1339,33 @@ func rgetResolveSFI(x []*structFieldInfo, pv []sfiIdx) (y, z []*structFieldInfo) return } +func xprintf(format string, a ...interface{}) { + if xDebug { + fmt.Fprintf(os.Stderr, format, a...) + } +} + func panicToErr(err *error) { if recoverPanicToErr { if x := recover(); x != nil { - //debug.PrintStack() + // if false && xDebug { + // fmt.Printf("panic'ing with: %v\n", x) + // debug.PrintStack() + // } panicValToErr(x, err) } } } +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 @@ -1151,6 +1393,247 @@ func isImmutableKind(k reflect.Kind) (v bool) { // k == reflect.String } +// ---- + +type codecFnInfo struct { + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType + addr bool +} + +// codecFn encapsulates the captured variables and the encode function. +// This way, we only do some calculations one times, and pass to the +// code block that should be called (encapsulated in a function) +// instead of executing the checks every time. +type codecFn struct { + i codecFnInfo + fe func(*Encoder, *codecFnInfo, reflect.Value) + fd func(*Decoder, *codecFnInfo, reflect.Value) +} + +type codecRtidFn struct { + rtid uintptr + fn codecFn +} + +type codecFner struct { + hh Handle + h *BasicHandle + cs [arrayCacheLen]*[arrayCacheLen]codecRtidFn + s []*[arrayCacheLen]codecRtidFn + sn uint32 + be bool + js bool + cf [arrayCacheLen]codecRtidFn +} + +func (c *codecFner) reset(hh Handle) { + c.hh = hh + c.h = hh.getBasicHandle() + _, c.js = hh.(*JsonHandle) + c.be = hh.isBinary() +} + +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++ + } + } + sx, sy := sn/arrayCacheLen, sn%arrayCacheLen + if sy == 0 { + c.s = append(c.s, &[arrayCacheLen]codecRtidFn{}) + } + c.s[sx][sy].rtid = rtid + fn = &(c.s[sx][sy].fn) + c.sn++ + } + + ti := c.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.ti = ti + + if checkCodecSelfer && ti.cs { + fn.fe = (*Encoder).selferMarshal + fn.fd = (*Decoder).selferUnmarshal + } else if rtid == rawTypId { + fn.fe = (*Encoder).raw + fn.fd = (*Decoder).raw + } else if rtid == rawExtTypId { + fn.fe = (*Encoder).rawExt + fn.fd = (*Decoder).rawExt + fn.i.addr = true + } else if c.hh.IsBuiltinType(rtid) { + fn.fe = (*Encoder).builtin + fn.fd = (*Decoder).builtin + fn.i.addr = 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 + fn.i.addr = true + } else if supportMarshalInterfaces && c.be && ti.bm { + fn.fe = (*Encoder).binaryMarshal + fn.fd = (*Decoder).binaryUnmarshal + } else if supportMarshalInterfaces && !c.be && c.js && ti.jm { + //If JSON, we should check JSONMarshal before textMarshal + fn.fe = (*Encoder).jsonMarshal + fn.fd = (*Decoder).jsonUnmarshal + } else if supportMarshalInterfaces && !c.be && ti.tm { + fn.fe = (*Encoder).textMarshal + fn.fd = (*Decoder).textUnmarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { // un-named slice or map + if idx := fastpathAV.index(rtid); idx != -1 { + fn.fe = fastpathAV[idx].encfn + fn.fd = fastpathAV[idx].decfn + fn.i.addr = true + } + } else { + // use mapping for underlying type if there + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := rt2id(rtu) + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].encfn + xrt := fastpathAV[idx].rt + fn.fe = func(e *Encoder, xf *codecFnInfo, xrv reflect.Value) { + xfnf(e, xf, xrv.Convert(xrt)) + } + fn.i.addr = true + xfnf2 := fastpathAV[idx].decfn + fn.fd = func(d *Decoder, xf *codecFnInfo, xrv reflect.Value) { + xfnf2(d, xf, xrv.Convert(reflect.PtrTo(xrt))) + } + } + } + } + if fn.fe == nil && fn.fd == nil { + switch rk { + case reflect.Bool: + fn.fe = (*Encoder).kBool + fn.fd = (*Decoder).kBool + case reflect.String: + fn.fe = (*Encoder).kString + fn.fd = (*Decoder).kString + case reflect.Int: + fn.fd = (*Decoder).kInt + fn.fe = (*Encoder).kInt + case reflect.Int8: + fn.fe = (*Encoder).kInt + fn.fd = (*Decoder).kInt8 + case reflect.Int16: + fn.fe = (*Encoder).kInt + fn.fd = (*Decoder).kInt16 + case reflect.Int32: + fn.fe = (*Encoder).kInt + fn.fd = (*Decoder).kInt32 + case reflect.Int64: + fn.fe = (*Encoder).kInt + fn.fd = (*Decoder).kInt64 + case reflect.Uint: + fn.fd = (*Decoder).kUint + fn.fe = (*Encoder).kUint + case reflect.Uint8: + fn.fe = (*Encoder).kUint + fn.fd = (*Decoder).kUint8 + case reflect.Uint16: + fn.fe = (*Encoder).kUint + fn.fd = (*Decoder).kUint16 + case reflect.Uint32: + fn.fe = (*Encoder).kUint + fn.fd = (*Decoder).kUint32 + case reflect.Uint64: + fn.fe = (*Encoder).kUint + fn.fd = (*Decoder).kUint64 + // case reflect.Ptr: + // fn.fd = (*Decoder).kPtr + case reflect.Uintptr: + fn.fe = (*Encoder).kUint + fn.fd = (*Decoder).kUintptr + case reflect.Float32: + fn.fe = (*Encoder).kFloat32 + fn.fd = (*Decoder).kFloat32 + case reflect.Float64: + fn.fe = (*Encoder).kFloat64 + fn.fd = (*Decoder).kFloat64 + case reflect.Invalid: + fn.fe = (*Encoder).kInvalid + case reflect.Chan: + fi.seq = seqTypeChan + fn.fe = (*Encoder).kSlice + fn.fd = (*Decoder).kSlice + case reflect.Slice: + fi.seq = seqTypeSlice + fn.fe = (*Encoder).kSlice + fn.fd = (*Decoder).kSlice + case reflect.Array: + fi.seq = seqTypeArray + fn.fe = (*Encoder).kSlice + fi.addr = false + rt2 := reflect.SliceOf(rt.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") + } + // fn.fd = (*Decoder).kArray + case reflect.Struct: + if ti.anyOmitEmpty { + fn.fe = (*Encoder).kStruct + } else { + 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 + case reflect.Interface: + // encode: reflect.Interface are handled already by preEncodeValue + fn.fd = (*Decoder).kInterface + default: + fn.fe = (*Encoder).kErr + fn.fd = (*Decoder).kErr + } + } + } + + return +} + +// ---- + // these functions must be inlinable, and not call anybody type checkOverflow struct{} @@ -1208,6 +1691,7 @@ func isNaN(f float64) bool { return f != f } type intSlice []int64 type uintSlice []uint64 +type uintptrSlice []uintptr type floatSlice []float64 type boolSlice []bool type stringSlice []string @@ -1221,6 +1705,10 @@ 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 floatSlice) Len() int { return len(p) } func (p floatSlice) Less(i, j int) bool { return p[i] < p[j] || isNaN(p[i]) && !isNaN(p[j]) @@ -1317,7 +1805,6 @@ type set []uintptr func (s *set) add(v uintptr) (exists bool) { // e.ci is always nil, or len >= 1 - // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Add: %v, exists: %v\n", v, exists) }() x := *s if x == nil { x = make([]uintptr, 1, 8) @@ -1358,7 +1845,6 @@ func (s *set) add(v uintptr) (exists bool) { } func (s *set) remove(v uintptr) (exists bool) { - // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Rm: %v, exists: %v\n", v, exists) }() x := *s if len(x) == 0 { return @@ -1380,3 +1866,77 @@ func (s *set) remove(v uintptr) (exists bool) { } return } + +// ------ + +// bitset types are better than [256]bool, because they permit the whole +// bitset array being on a single cache line and use less memory. + +// given x > 0 and n > 0 and x is exactly 2^n, then pos/x === pos>>n AND pos%x === pos&(x-1). +// consequently, pos/32 === pos>>5, pos/16 === pos>>4, pos/8 === pos>>3, pos%8 == pos&7 + +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 +} + +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 +} + +// ------------ + +type pooler struct { + // for stringRV + strRv8, strRv16, strRv32, strRv64, strRv128 sync.Pool + // for the decNaked + dn sync.Pool + tiload sync.Pool +} + +func (p *pooler) init() { + p.strRv8.New = func() interface{} { return new([8]stringRv) } + p.strRv16.New = func() interface{} { return new([16]stringRv) } + p.strRv32.New = func() interface{} { return new([32]stringRv) } + p.strRv64.New = func() interface{} { return new([64]stringRv) } + 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) } +} + +func (p *pooler) stringRv8() (sp *sync.Pool, v interface{}) { + return &p.strRv8, p.strRv8.Get() +} +func (p *pooler) stringRv16() (sp *sync.Pool, v interface{}) { + return &p.strRv16, p.strRv16.Get() +} +func (p *pooler) stringRv32() (sp *sync.Pool, v interface{}) { + return &p.strRv32, p.strRv32.Get() +} +func (p *pooler) stringRv64() (sp *sync.Pool, v interface{}) { + return &p.strRv64, p.strRv64.Get() +} +func (p *pooler) stringRv128() (sp *sync.Pool, v interface{}) { + return &p.strRv128, p.strRv128.Get() +} +func (p *pooler) decNaked() (sp *sync.Pool, v interface{}) { + return &p.dn, p.dn.Get() +} +func (p *pooler) tiLoad() (sp *sync.Pool, v interface{}) { + return &p.tiload, p.tiload.Get() +} diff --git a/codec/helper_not_unsafe.go b/codec/helper_not_unsafe.go index d80e18f6..9d9d048e 100644 --- a/codec/helper_not_unsafe.go +++ b/codec/helper_not_unsafe.go @@ -30,6 +30,19 @@ func bytesView(v string) []byte { return []byte(v) } +func definitelyNil(v interface{}) bool { + 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. @@ -48,13 +61,17 @@ func rt2id(rt reflect.Type) uintptr { return reflect.ValueOf(rt).Pointer() } +func rv2rtid(rv reflect.Value) uintptr { + return reflect.ValueOf(rv.Type()).Pointer() +} + // -------------------------- -type ptrToRvMap struct{} +// type ptrToRvMap struct{} -func (_ *ptrToRvMap) init() {} -func (_ *ptrToRvMap) get(i interface{}) reflect.Value { - return reflect.ValueOf(i).Elem() -} +// func (_ *ptrToRvMap) init() {} +// func (_ *ptrToRvMap) get(i interface{}) reflect.Value { +// return reflect.ValueOf(i).Elem() +// } // -------------------------- type atomicTypeInfoSlice struct { @@ -74,70 +91,66 @@ func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) { } // -------------------------- -func (f *decFnInfo) raw(rv reflect.Value) { - rv.SetBytes(f.d.raw()) +func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { + rv.SetBytes(d.rawBytes()) } -func (f *decFnInfo) kString(rv reflect.Value) { - rv.SetString(f.d.d.DecodeString()) +func (d *Decoder) kString(f *codecFnInfo, rv reflect.Value) { + rv.SetString(d.d.DecodeString()) } -func (f *decFnInfo) kBool(rv reflect.Value) { - rv.SetBool(f.d.d.DecodeBool()) +func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { + rv.SetBool(d.d.DecodeBool()) } -func (f *decFnInfo) kFloat32(rv reflect.Value) { - rv.SetFloat(f.d.d.DecodeFloat(true)) +func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { + rv.SetFloat(d.d.DecodeFloat(true)) } -func (f *decFnInfo) kFloat64(rv reflect.Value) { - rv.SetFloat(f.d.d.DecodeFloat(false)) +func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { + rv.SetFloat(d.d.DecodeFloat(false)) } -func (f *decFnInfo) kInt(rv reflect.Value) { - rv.SetInt(f.d.d.DecodeInt(intBitsize)) +func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { + rv.SetInt(d.d.DecodeInt(intBitsize)) } -func (f *decFnInfo) kInt8(rv reflect.Value) { - rv.SetInt(f.d.d.DecodeInt(8)) +func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { + rv.SetInt(d.d.DecodeInt(8)) } -func (f *decFnInfo) kInt16(rv reflect.Value) { - rv.SetInt(f.d.d.DecodeInt(16)) +func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { + rv.SetInt(d.d.DecodeInt(16)) } -func (f *decFnInfo) kInt32(rv reflect.Value) { - rv.SetInt(f.d.d.DecodeInt(32)) +func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { + rv.SetInt(d.d.DecodeInt(32)) } -func (f *decFnInfo) kInt64(rv reflect.Value) { - rv.SetInt(f.d.d.DecodeInt(64)) +func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { + rv.SetInt(d.d.DecodeInt(64)) } -func (f *decFnInfo) kUint(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(uintBitsize)) } -func (f *decFnInfo) kUintptr(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(uintBitsize)) } -func (f *decFnInfo) kUint8(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(8)) +func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(8)) } -func (f *decFnInfo) kUint16(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(16)) +func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(16)) } -func (f *decFnInfo) kUint32(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(32)) +func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(32)) } -func (f *decFnInfo) kUint64(rv reflect.Value) { - rv.SetUint(f.d.d.DecodeUint(64)) +func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { + rv.SetUint(d.d.DecodeUint(64)) } - -// func i2rv(i interface{}) reflect.Value { -// return reflect.ValueOf(i) -// } diff --git a/codec/helper_unsafe.go b/codec/helper_unsafe.go index d23e6e46..c7c01b81 100644 --- a/codec/helper_unsafe.go +++ b/codec/helper_unsafe.go @@ -18,6 +18,8 @@ import ( // var zeroRTv [4]uintptr +const unsafeFlagIndir = 1 << 7 // keep in sync with GO_ROOT/src/reflect/value.go + type unsafeString struct { Data uintptr Len int @@ -60,6 +62,10 @@ func bytesView(v string) []byte { return *(*[]byte)(unsafe.Pointer(&bx)) } +func definitelyNil(v interface{}) bool { + return (*unsafeIntf)(unsafe.Pointer(&v)).word == nil +} + // func keepAlive4BytesView(v string) { // runtime.KeepAlive(v) // } @@ -68,21 +74,19 @@ func bytesView(v string) []byte { // runtime.KeepAlive(v) // } -const _unsafe_rv2i_is_safe = false - // 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{} { - if _unsafe_rv2i_is_safe { + if false { return rv.Interface() } urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) // references that are single-words (map, ptr) may be double-referenced as flagIndir kk := urv.flag & (1<<5 - 1) - if (kk == uintptr(reflect.Map) || kk == uintptr(reflect.Ptr)) && urv.flag&(1<<7) != 0 { + if (kk == uintptr(reflect.Map) || kk == uintptr(reflect.Ptr)) && urv.flag&unsafeFlagIndir != 0 { return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ})) } return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ})) @@ -92,6 +96,10 @@ func rt2id(rt reflect.Type) uintptr { return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word) } +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 @@ -99,48 +107,6 @@ func rt2id(rt reflect.Type) uintptr { // return *(*reflect.Value)(unsafe.Pointer(&uv}) // } -type ptrToRVKV struct { - k uintptr - v reflect.Value -} - -type ptrToRvMap struct { - // m map[uintptr]reflect.Value - a [4]ptrToRVKV - v []ptrToRVKV -} - -func (p *ptrToRvMap) init() { - // fmt.Printf(">>>> new ptr to rv map\n") - // p.m = make(map[uintptr]reflect.Value, 32) - p.v = p.a[:0] -} - -func (p *ptrToRvMap) get(intf interface{}) (rv reflect.Value) { - word := uintptr(((*unsafeIntf)(unsafe.Pointer(&intf))).word) - // binary search. adapted from sort/search.go. - h, i, j := 0, 0, len(p.v) - for i < j { - h = i + (j-i)/2 - if p.v[h].k < word { - i = h + 1 - } else { - j = h - } - } - if i < len(p.v) && p.v[i].k == word { - return p.v[i].v - } - - // insert into position i - // fmt.Printf(">>>> resetting rv for word: %x, interface: %v\n", word, intf) - rv = reflect.ValueOf(intf).Elem() - p.v = append(p.v, ptrToRVKV{}) - copy(p.v[i+1:len(p.v)], p.v[i:len(p.v)-1]) - p.v[i].k, p.v[i].v = word, rv - return -} - // -------------------------- type atomicTypeInfoSlice struct { v unsafe.Pointer @@ -155,95 +121,90 @@ func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) { } // -------------------------- -func (f *decFnInfo) raw(rv reflect.Value) { +func (d *Decoder) raw(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*[]byte)(urv.ptr) = f.d.raw() + // if urv.flag&unsafeFlagIndir != 0 { + // urv.ptr = *(*unsafe.Pointer)(urv.ptr) + // } + *(*[]byte)(urv.ptr) = d.rawBytes() } -func (f *decFnInfo) kString(rv reflect.Value) { +func (d *Decoder) kString(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*string)(urv.ptr) = f.d.d.DecodeString() + *(*string)(urv.ptr) = d.d.DecodeString() } -func (f *decFnInfo) kBool(rv reflect.Value) { +func (d *Decoder) kBool(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*bool)(urv.ptr) = f.d.d.DecodeBool() + *(*bool)(urv.ptr) = d.d.DecodeBool() } -func (f *decFnInfo) kFloat32(rv reflect.Value) { +func (d *Decoder) kFloat32(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float32)(urv.ptr) = float32(f.d.d.DecodeFloat(true)) + *(*float32)(urv.ptr) = float32(d.d.DecodeFloat(true)) } -func (f *decFnInfo) kFloat64(rv reflect.Value) { +func (d *Decoder) kFloat64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*float64)(urv.ptr) = f.d.d.DecodeFloat(false) + *(*float64)(urv.ptr) = d.d.DecodeFloat(false) } -func (f *decFnInfo) kInt(rv reflect.Value) { +func (d *Decoder) kInt(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int)(urv.ptr) = int(f.d.d.DecodeInt(intBitsize)) + *(*int)(urv.ptr) = int(d.d.DecodeInt(intBitsize)) } -func (f *decFnInfo) kInt8(rv reflect.Value) { +func (d *Decoder) kInt8(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int8)(urv.ptr) = int8(f.d.d.DecodeInt(8)) + *(*int8)(urv.ptr) = int8(d.d.DecodeInt(8)) } -func (f *decFnInfo) kInt16(rv reflect.Value) { +func (d *Decoder) kInt16(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int16)(urv.ptr) = int16(f.d.d.DecodeInt(16)) + *(*int16)(urv.ptr) = int16(d.d.DecodeInt(16)) } -func (f *decFnInfo) kInt32(rv reflect.Value) { +func (d *Decoder) kInt32(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int32)(urv.ptr) = int32(f.d.d.DecodeInt(32)) + *(*int32)(urv.ptr) = int32(d.d.DecodeInt(32)) } -func (f *decFnInfo) kInt64(rv reflect.Value) { +func (d *Decoder) kInt64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*int64)(urv.ptr) = f.d.d.DecodeInt(64) + *(*int64)(urv.ptr) = d.d.DecodeInt(64) } -func (f *decFnInfo) kUint(rv reflect.Value) { +func (d *Decoder) kUint(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint)(urv.ptr) = uint(f.d.d.DecodeUint(uintBitsize)) + *(*uint)(urv.ptr) = uint(d.d.DecodeUint(uintBitsize)) } -func (f *decFnInfo) kUintptr(rv reflect.Value) { +func (d *Decoder) kUintptr(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uintptr)(urv.ptr) = uintptr(f.d.d.DecodeUint(uintBitsize)) + *(*uintptr)(urv.ptr) = uintptr(d.d.DecodeUint(uintBitsize)) } -func (f *decFnInfo) kUint8(rv reflect.Value) { +func (d *Decoder) kUint8(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint8)(urv.ptr) = uint8(f.d.d.DecodeUint(8)) + *(*uint8)(urv.ptr) = uint8(d.d.DecodeUint(8)) } -func (f *decFnInfo) kUint16(rv reflect.Value) { +func (d *Decoder) kUint16(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint16)(urv.ptr) = uint16(f.d.d.DecodeUint(16)) + *(*uint16)(urv.ptr) = uint16(d.d.DecodeUint(16)) } -func (f *decFnInfo) kUint32(rv reflect.Value) { +func (d *Decoder) kUint32(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint32)(urv.ptr) = uint32(f.d.d.DecodeUint(32)) + *(*uint32)(urv.ptr) = uint32(d.d.DecodeUint(32)) } -func (f *decFnInfo) kUint64(rv reflect.Value) { + +func (d *Decoder) kUint64(f *codecFnInfo, rv reflect.Value) { urv := (*unsafeReflectValue)(unsafe.Pointer(&rv)) - *(*uint64)(urv.ptr) = f.d.d.DecodeUint(64) + *(*uint64)(urv.ptr) = d.d.DecodeUint(64) } -// func (p *ptrToRvMap) get(i interface{}) (rv reflect.Value) { -// word := uintptr(((*unsafeIntf)(unsafe.Pointer(&i))).word) -// rv, exists := p.m[word] -// if !exists { -// fmt.Printf(">>>> resetting rv for word: %x, interface: %v\n", word, i) -// rv = reflect.ValueOf(i).Elem() -// p.m[word] = rv -// } -// return -// } +// ------------ // func rt2id(rt reflect.Type) uintptr { // return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word) @@ -455,8 +416,3 @@ func (f *decFnInfo) kUint64(rv reflect.Value) { // return *(*interface{})(unsafe.Pointer(&ui)) // // return i // } - -// func i2rv(i interface{}) reflect.Value { -// // u := *(*unsafeIntf)(unsafe.Pointer(&i)) -// return reflect.ValueOf(i) -// } diff --git a/codec/json.go b/codec/json.go index 06e882d4..d5583f92 100644 --- a/codec/json.go +++ b/codec/json.go @@ -43,7 +43,7 @@ import ( //-------------------------------- var ( - jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} + // jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} jsonFloat64Pow10 = [...]float64{ 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, @@ -59,10 +59,10 @@ var ( // jsonTabs and jsonSpaces are used as caches for indents jsonTabs, jsonSpaces string - jsonCharHtmlSafeSet [utf8.RuneSelf]bool - jsonCharSafeSet [utf8.RuneSelf]bool - jsonCharWhitespaceSet [256]bool - jsonNumSet [256]bool + jsonCharHtmlSafeSet bitset128 + jsonCharSafeSet bitset128 + jsonCharWhitespaceSet bitset256 + jsonNumSet bitset256 ) const ( @@ -100,25 +100,23 @@ func init() { // populate the safe values as true: note: ASCII control characters are (0-31) // jsonCharSafeSet: all true except (0-31) " \ // jsonCharHtmlSafeSet: all true except (0-31) " \ < > & - for i := 32; i < utf8.RuneSelf; i++ { + var i byte + for i = 32; i < utf8.RuneSelf; i++ { switch i { case '"', '\\': - jsonCharSafeSet[i] = false - jsonCharHtmlSafeSet[i] = false case '<', '>', '&': - jsonCharHtmlSafeSet[i] = false - jsonCharSafeSet[i] = true + jsonCharSafeSet.set(i) // = true default: - jsonCharSafeSet[i] = true - jsonCharHtmlSafeSet[i] = true + jsonCharSafeSet.set(i) + jsonCharHtmlSafeSet.set(i) } } - for i := 0; i < 256; i++ { + for i = 0; i <= utf8.RuneSelf; i++ { switch i { case ' ', '\t', '\r', '\n': - jsonCharWhitespaceSet[i] = true + jsonCharWhitespaceSet.set(i) case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'e', 'E', '.', '+', '-': - jsonNumSet[i] = true + jsonNumSet.set(i) } } } @@ -145,20 +143,21 @@ type jsonEncDriver struct { func (e *jsonEncDriver) sendContainerState(c containerState) { // determine whether to output separators - if c == containerMapKey { + switch c { + case containerMapKey: if e.c != containerMapStart { e.w.writen1(',') } if e.d { e.writeIndent() } - } else if c == containerMapValue { + case containerMapValue: if e.d { e.w.writen2(':', ' ') } else { e.w.writen1(':') } - } else if c == containerMapEnd { + case containerMapEnd: if e.d { e.dl-- if e.c != containerMapStart { @@ -166,14 +165,14 @@ func (e *jsonEncDriver) sendContainerState(c containerState) { } } e.w.writen1('}') - } else if c == containerArrayElem { + case containerArrayElem: if e.c != containerArrayStart { e.w.writen1(',') } if e.d { e.writeIndent() } - } else if c == containerArrayEnd { + case containerArrayEnd: if e.d { e.dl-- if e.c != containerArrayStart { @@ -201,14 +200,14 @@ func (e *jsonEncDriver) writeIndent() { } func (e *jsonEncDriver) EncodeNil() { - e.w.writeb(jsonLiterals[9:13]) // null + e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null } func (e *jsonEncDriver) EncodeBool(b bool) { if b { - e.w.writeb(jsonLiterals[0:4]) // true + e.w.writen4('t', 'r', 'u', 'e') // e.w.writeb(jsonLiterals[0:4]) // true } else { - e.w.writeb(jsonLiterals[4:9]) // false + e.w.writen5('f', 'a', 'l', 's', 'e') // e.w.writeb(jsonLiterals[4:9]) // false } } @@ -217,7 +216,6 @@ func (e *jsonEncDriver) EncodeFloat32(f float32) { } func (e *jsonEncDriver) EncodeFloat64(f float64) { - // e.w.writestr(strconv.FormatFloat(f, 'E', -1, 64)) e.encodeFloat(f, 64) } @@ -230,7 +228,6 @@ func (e *jsonEncDriver) encodeFloat(f float64, numbits int) { } func (e *jsonEncDriver) EncodeInt(v int64) { - // if e.h.IntegerAsString == 'A' || e.h.IntegerAsString == 'L' && (v > 1<<53 || v < -(1<<53)) { if x := e.h.IntegerAsString; x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) { e.w.writen1('"') e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) @@ -241,7 +238,6 @@ func (e *jsonEncDriver) EncodeInt(v int64) { } func (e *jsonEncDriver) EncodeUint(v uint64) { - // if e.h.IntegerAsString == 'A' || e.h.IntegerAsString == 'L' && v > 1<<53 { if x := e.h.IntegerAsString; x == 'A' || x == 'L' && v > 1<<53 { e.w.writen1('"') e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) @@ -253,7 +249,7 @@ func (e *jsonEncDriver) EncodeUint(v uint64) { func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { if v := ext.ConvertExt(rv); v == nil { - e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() + e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() } else { en.encode(v) } @@ -262,7 +258,7 @@ func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Enco func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { // only encodes re.Value (never re.Data) if re.Value == nil { - e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() + e.w.writen4('n', 'u', 'l', 'l') // e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() } else { en.encode(re.Value) } @@ -285,12 +281,10 @@ func (e *jsonEncDriver) EncodeMapStart(length int) { } func (e *jsonEncDriver) EncodeString(c charEncoding, v string) { - // e.w.writestr(strconv.Quote(v)) e.quoteStr(v) } func (e *jsonEncDriver) EncodeSymbol(v string) { - // e.EncodeString(c_UTF8, v) e.quoteStr(v) } @@ -312,7 +306,6 @@ func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) { e.w.writeb(e.bs) e.w.writen1('"') } else { - // e.EncodeString(c, string(v)) e.quoteStr(stringView(v)) } } @@ -332,7 +325,7 @@ 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[b] || (e.h.HTMLCharsAsIs && jsonCharSafeSet[b]) { + if jsonCharHtmlSafeSet.isset(b) || (e.h.HTMLCharsAsIs && jsonCharSafeSet.isset(b)) { i++ continue } @@ -400,6 +393,8 @@ type jsonDecDriver struct { // 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) @@ -412,7 +407,7 @@ type jsonDecDriver struct { func jsonIsWS(b byte) bool { // return b == ' ' || b == '\t' || b == '\r' || b == '\n' - return jsonCharWhitespaceSet[b] + return jsonCharWhitespaceSet.isset(b) } func (d *jsonDecDriver) uncacheRead() { @@ -427,19 +422,20 @@ func (d *jsonDecDriver) sendContainerState(c containerState) { d.tok = d.r.skip(&jsonCharWhitespaceSet) } var xc uint8 // char expected - if c == containerMapKey { + switch c { + case containerMapKey: if d.c != containerMapStart { xc = ',' } - } else if c == containerMapValue { + case containerMapValue: xc = ':' - } else if c == containerMapEnd { + case containerMapEnd: xc = '}' - } else if c == containerArrayElem { + case containerArrayElem: if d.c != containerArrayStart { xc = ',' } - } else if c == containerArrayEnd { + case containerArrayEnd: xc = ']' } if xc != 0 { @@ -458,11 +454,29 @@ func (d *jsonDecDriver) CheckBreak() bool { return d.tok == '}' || d.tok == ']' } -func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) { - bs := d.r.readx(int(toIdx - fromIdx)) +// func (d *jsonDecDriver) readLiteralIdx(fromIdx, toIdx uint8) { +// bs := d.r.readx(int(toIdx - fromIdx)) +// d.tok = 0 +// if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { +// d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) +// return +// } +// } + +func (d *jsonDecDriver) readSymbol3(v1, v2, v3 uint8) { + b1, b2, b3 := d.r.readn3() + d.tok = 0 + if jsonValidateSymbols && (b1 != v1 || b2 != v2 || b3 != v3) { + d.d.errorf("json: expecting %c, %c, %c: got %c, %c, %c", b1, b2, b3, v1, v2, v3) + return + } +} + +func (d *jsonDecDriver) readSymbol4(v1, v2, v3, v4 uint8) { + b1, b2, b3, b4 := d.r.readn4() d.tok = 0 - if jsonValidateSymbols && !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { - d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) + if jsonValidateSymbols && (b1 != v1 || b2 != v2 || b3 != v3 || b4 != v4) { + d.d.errorf("json: expecting %c, %c, %c, %c: got %c, %c, %c, %c", b1, b2, b3, b4, v1, v2, v3, v4) return } } @@ -472,7 +486,7 @@ func (d *jsonDecDriver) TryDecodeAsNil() bool { d.tok = d.r.skip(&jsonCharWhitespaceSet) } if d.tok == 'n' { - d.readStrIdx(10, 13) // ull + d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull return true } return false @@ -483,11 +497,11 @@ func (d *jsonDecDriver) DecodeBool() bool { d.tok = d.r.skip(&jsonCharWhitespaceSet) } if d.tok == 'f' { - d.readStrIdx(5, 9) // alse + d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse return false } if d.tok == 't' { - d.readStrIdx(1, 4) // rue + d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue return true } d.d.errorf("json: decode bool: got first char %c", d.tok) @@ -548,10 +562,8 @@ func (d *jsonDecDriver) decNumBytes() (bs []byte) { } else { d.r.unreadn1() bs = d.r.readTo(d.bs[:0], &jsonNumSet) - // bs = d.r.readbUntilAny(d.bs[:0], " \t\n:,{}[]") } d.tok = 0 - // fmt.Printf(">>>> decNumBytes: returning: '%s'\n", bs) return bs } @@ -567,10 +579,6 @@ func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) { func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) { bs := d.decNumBytes() - // if bytes.ContainsAny(bs, ".eE") { - // d.d.errorf("json: decoding int, but found one or more of the chars: .eE: %s", bs) - // return - // } i, err := strconv.ParseInt(stringView(bs), 10, int(bitsize)) if err != nil { d.d.errorf("json: decode int from %s: %v", bs, err) @@ -614,10 +622,15 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) { return } d.appendStringAsBytes() - // if appendStringAsBytes returned a zero-len slice, then treat as nil. - // This should only happen for null, and "". + // 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{}. + // appendStringAsBytes returns a zero-len slice for both, so as not to reset d.bs. + // However, it sets a fnull field to true, so we can check if a null was found. if len(d.bs) == 0 { - return nil + if d.fnull { + return nil + } + return []byte{} } bs0 := d.bs slen := base64.StdEncoding.DecodedLen(len(bs0)) @@ -660,19 +673,21 @@ func (d *jsonDecDriver) appendStringAsBytes() { d.tok = d.r.skip(&jsonCharWhitespaceSet) } + d.fnull = false if d.tok != '"' { // d.d.errorf("json: 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.readStrIdx(10, 13) // ull + d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull d.bs = d.bs[:0] + d.fnull = true case 'f': - d.readStrIdx(5, 9) // alse + d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse d.bs = d.bs[:5] copy(d.bs, "false") case 't': - d.readStrIdx(1, 4) // rue + d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue d.bs = d.bs[:4] copy(d.bs, "true") default: @@ -688,24 +703,26 @@ func (d *jsonDecDriver) appendStringAsBytes() { r := d.r var cs []byte v := d.bs[:0] - // var c uint8 + var c uint8 for i := 0; ; i++ { if i == len(cs) { cs = r.readUntil(d.b2[:0], '"') i = 0 } - if cs[i] == '"' { + c = cs[i] + if c == '"' { break } - if cs[i] != '\\' { - v = append(v, cs[i]) + if c != '\\' { + v = append(v, c) continue } // cs[i] == '\\' i++ - switch cs[i] { + c = cs[i] + switch c { case '"', '\\', '/', '\'': - v = append(v, cs[i]) + v = append(v, c) case 'b': v = append(v, '\b') case 'f': @@ -719,9 +736,7 @@ func (d *jsonDecDriver) appendStringAsBytes() { case 'u': rr := d.jsonU4Arr([4]byte{cs[i+1], cs[i+2], cs[i+3], cs[i+4]}) i += 4 - // fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr)) if utf16.IsSurrogate(rr) { - // fmt.Printf(">>>> checking utf16 surrogate\n") if !(cs[i+1] == '\\' && cs[i+2] == 'u') { d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`) return @@ -733,7 +748,7 @@ func (d *jsonDecDriver) appendStringAsBytes() { w2 := utf8.EncodeRune(d.bstr[:], rr) v = append(v, d.bstr[:w2]...) default: - d.d.errorf("json: unsupported escaped value: %c", cs[i]) + d.d.errorf("json: unsupported escaped value: %c", c) } } d.bs = v @@ -755,12 +770,11 @@ func (d *jsonDecDriver) jsonU4Arr(bs [4]byte) (r rune) { } u = u*16 + uint32(v) } - // fmt.Printf(">>>>>>>> jsonU4Arr: %v, %s\n", rune(u), string(rune(u))) return rune(u) } func (d *jsonDecDriver) DecodeNaked() { - z := &d.d.n + z := d.d.n // var decodeFurther bool if d.tok == 0 { @@ -768,24 +782,20 @@ func (d *jsonDecDriver) DecodeNaked() { } switch d.tok { case 'n': - d.readStrIdx(10, 13) // ull + d.readSymbol3('u', 'l', 'l') // d.readLiteralIdx(10, 13) // ull z.v = valueTypeNil case 'f': - d.readStrIdx(5, 9) // alse + d.readSymbol4('a', 'l', 's', 'e') // d.readLiteralIdx(5, 9) // alse z.v = valueTypeBool z.b = false case 't': - d.readStrIdx(1, 4) // rue + d.readSymbol3('r', 'u', 'e') // d.readLiteralIdx(1, 4) // rue z.v = valueTypeBool z.b = true case '{': - z.v = valueTypeMap - // d.tok = 0 // don't consume. kInterfaceNaked will call ReadMapStart - // decodeFurther = true + z.v = valueTypeMap // don't consume. kInterfaceNaked will call ReadMapStart case '[': - z.v = valueTypeArray - // d.tok = 0 // don't consume. kInterfaceNaked will call ReadArrayStart - // decodeFurther = true + z.v = valueTypeArray // don't consume. kInterfaceNaked will call ReadArrayStart case '"': z.v = valueTypeString z.s = d.DecodeString() @@ -821,7 +831,6 @@ func (d *jsonDecDriver) DecodeNaked() { return } } - // fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v) } // if decodeFurther { // d.s.sc.retryRead() @@ -829,14 +838,6 @@ func (d *jsonDecDriver) DecodeNaked() { return } -// func jsonAcceptNonWS(b byte) bool { -// return !jsonCharWhitespaceSet[b] -// } - -// func jsonAcceptDQuote(b byte) bool { -// return b == '"' -// } - //---------------------- // JsonHandle is a handle for JSON encoding format. diff --git a/codec/msgpack.go b/codec/msgpack.go index 3c58daf3..7d0466df 100644 --- a/codec/msgpack.go +++ b/codec/msgpack.go @@ -286,7 +286,7 @@ func (d *msgpackDecDriver) DecodeNaked() { d.readNextBd() } bd := d.bd - n := &d.d.n + n := d.d.n var decodeFurther bool switch bd { @@ -529,12 +529,42 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) if !d.bdRead { d.readNextBd() } + + // DecodeBytes could be from: bin str fixstr fixarray array ... var clen int - if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { - clen = d.readContainerLen(msgpackContainerBin) - } else { + 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 { + clen = d.readContainerLen(msgpackContainerBin) + } else { + clen = d.readContainerLen(msgpackContainerStr) + } + 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 + } + } + d.bdRead = false + return bs + default: + d.d.errorf("invalid container type: expecting bin|str|array") + 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. diff --git a/codec/noop.go b/codec/noop.go index a7825156..015af581 100644 --- a/codec/noop.go +++ b/codec/noop.go @@ -1,6 +1,8 @@ // 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. +// +build ignore + package codec import ( diff --git a/codec/shared_test.go b/codec/shared_test.go index 27b621d1..6071a307 100644 --- a/codec/shared_test.go +++ b/codec/shared_test.go @@ -43,6 +43,7 @@ package codec import ( "bytes" "flag" + "io" "sync" ) @@ -54,8 +55,24 @@ type testHED struct { D *Decoder } +type ioReaderWrapper struct { + r io.Reader +} + +func (x ioReaderWrapper) Read(p []byte) (n int, err error) { + return x.r.Read(p) +} + +type ioWriterWrapper struct { + w io.Writer +} + +func (x ioWriterWrapper) Write(p []byte) (n int, err error) { + return x.w.Write(p) +} + var ( - testNoopH = NoopHandle(8) + // testNoopH = NoopHandle(8) testMsgpackH = &MsgpackHandle{} testBincH = &BincHandle{} testSimpleH = &SimpleHandle{} @@ -73,9 +90,10 @@ var ( // flag variables used by tests (and bench) var ( + testDepth int + testVerbose bool testInitDebug bool - testUseIoEncDec bool testStructToArray bool testCanonical bool testUseReset bool @@ -84,13 +102,23 @@ var ( testInternStr bool testUseMust bool testCheckCircRef bool - testJsonIndent int - testMaxInitLen int + + testUseIoEncDec bool + testUseIoWrapper bool + + testJsonIndent int + testMaxInitLen int testJsonHTMLCharsAsIs bool testJsonPreferFloat bool ) +// variables that are not flags, but which can configure the handles +var ( + testEncodeOptions EncodeOptions + testDecodeOptions DecodeOptions +) + // flag variables used by bench var ( benchDoInitBench bool @@ -106,7 +134,8 @@ var ( func init() { testHEDs = make([]testHED, 0, 32) testHandles = append(testHandles, - testNoopH, testMsgpackH, testBincH, testSimpleH, + // testNoopH, + testMsgpackH, testBincH, testSimpleH, testCborH, testJsonH) testInitFlags() benchInitFlags() @@ -114,9 +143,11 @@ 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(&testInitDebug, "tg", false, "Test Init Debug") flag.BoolVar(&testUseIoEncDec, "ti", false, "Use IO Reader/Writer for Marshal/Unmarshal") + flag.BoolVar(&testUseIoWrapper, "tiw", false, "Wrap the IO Reader/Writer with a base pass-through reader/writer") flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option") flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option") flag.BoolVar(&testCanonical, "tc", false, "Set Canonical option") @@ -181,7 +212,11 @@ func testCodecEncode(ts interface{}, bsIn []byte, } if testUseIoEncDec { buf = fn(bsIn) - e.Reset(buf) + if testUseIoWrapper { + e.Reset(ioWriterWrapper{buf}) + } else { + e.Reset(buf) + } } else { bs = bsIn e.ResetBytes(&bs) @@ -199,15 +234,19 @@ func testCodecEncode(ts interface{}, bsIn []byte, func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) { var d *Decoder - var buf *bytes.Reader + // var buf *bytes.Reader if testUseReset { d = testHEDGet(h).D } else { d = NewDecoder(nil, h) } if testUseIoEncDec { - buf = bytes.NewReader(bs) - d.Reset(buf) + buf := bytes.NewReader(bs) + if testUseIoWrapper { + d.Reset(ioReaderWrapper{buf}) + } else { + d.Reset(buf) + } } else { d.ResetBytes(bs) } diff --git a/codec/simple.go b/codec/simple.go index 209e9887..bf4a8ede 100644 --- a/codec/simple.go +++ b/codec/simple.go @@ -433,7 +433,7 @@ func (d *simpleDecDriver) DecodeNaked() { d.readNextBd() } - n := &d.d.n + n := d.d.n var decodeFurther bool switch d.bd { diff --git a/codec/time.go b/codec/time.go index 3401cf94..55841d4c 100644 --- a/codec/time.go +++ b/codec/time.go @@ -197,24 +197,24 @@ func decodeTime(bs []byte) (tt time.Time, err error) { 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) -} +// 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/codec/values_flex_test.go b/codec/values_flex_test.go new file mode 100644 index 00000000..9e06e443 --- /dev/null +++ b/codec/values_flex_test.go @@ -0,0 +1,69 @@ +/* // +build testing */ + +// 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 + +// This file contains values used by tests and benchmarks. + +type TestStrucFlex struct { + _struct struct{} `codec:",omitempty"` //set omitempty for every field + testStrucCommon + + Mis map[int]string + Miwu64s map[int]wrapUint64Slice + Mfwss map[float64]wrapStringSlice + Mf32wss map[float32]wrapStringSlice + Mui2wss map[uint64]wrapStringSlice + Msu2wss map[stringUint64T]wrapStringSlice + + //M map[interface{}]interface{} `json:"-",bson:"-"` + Mtsptr map[string]*TestStrucFlex + Mts map[string]TestStrucFlex + Its []*TestStrucFlex + Nteststruc *TestStrucFlex +} + +func newTestStrucFlex(depth int, bench, useInterface, useStringKeyOnly bool) (ts *TestStrucFlex) { + ts = &TestStrucFlex{ + Miwu64s: map[int]wrapUint64Slice{ + 5: []wrapUint64{1, 2, 3, 4, 5}, + 3: []wrapUint64{1, 2, 3}, + }, + + Mf32wss: map[float32]wrapStringSlice{ + 5.0: []wrapString{"1.0", "2.0", "3.0", "4.0", "5.0"}, + 3.0: []wrapString{"1.0", "2.0", "3.0"}, + }, + + Mui2wss: map[uint64]wrapStringSlice{ + 5: []wrapString{"1.0", "2.0", "3.0", "4.0", "5.0"}, + 3: []wrapString{"1.0", "2.0", "3.0"}, + }, + + Mfwss: map[float64]wrapStringSlice{ + 5.0: []wrapString{"1.0", "2.0", "3.0", "4.0", "5.0"}, + 3.0: []wrapString{"1.0", "2.0", "3.0"}, + }, + Mis: map[int]string{ + 1: "one", + 22: "twenty two", + -44: "minus forty four", + }, + } + populateTestStrucCommon(&ts.testStrucCommon, bench, useInterface, useStringKeyOnly) + if depth > 0 { + depth-- + if ts.Mtsptr == nil { + ts.Mtsptr = make(map[string]*TestStrucFlex) + } + if ts.Mts == nil { + ts.Mts = make(map[string]TestStrucFlex) + } + ts.Mtsptr["0"] = newTestStrucFlex(depth, bench, useInterface, useStringKeyOnly) + ts.Mts["0"] = *(ts.Mtsptr["0"]) + ts.Its = append(ts.Its, ts.Mtsptr["0"]) + } + return +} diff --git a/codec/values_test.go b/codec/values_test.go index 2c0d4b03..6996db67 100644 --- a/codec/values_test.go +++ b/codec/values_test.go @@ -14,7 +14,17 @@ import ( "time" ) -var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() +type wrapSliceUint64 []uint64 +type wrapSliceString []string +type wrapUint64 uint64 +type wrapString string +type wrapUint64Slice []wrapUint64 +type wrapStringSlice []wrapString + +type stringUint64T struct { + S string + U uint64 +} type AnonInTestStruc struct { AS string @@ -36,16 +46,29 @@ type AnonInTestStrucIntf struct { T time.Time } -type TestStruc struct { - _struct struct{} `codec:",omitempty"` //set omitempty for every field +type testSimpleFields struct { + S string + + I64 int64 + I32 int32 + I16 int16 + I8 int8 + + I64n int64 + I32n int32 + I16n int16 + I8n int8 - S string - I64 int64 - I16 int16 Ui64 uint64 + Ui32 uint32 + Ui16 uint16 Ui8 uint8 - B bool - By uint8 // byte: msgp doesn't like byte + + F64 float64 + F32 float32 + + B bool + By uint8 // byte: msgp doesn't like byte Sslice []string I64slice []int64 @@ -59,22 +82,80 @@ type TestStruc struct { // 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 - AnonInTestStruc + Ui64array [4]uint64 + Ui64slicearray []*[4]uint64 + WrapSliceInt64 wrapSliceUint64 + WrapSliceString wrapSliceString + + Msi64 map[string]int64 +} + +type testStrucCommon 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 + + 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 - //M map[interface{}]interface{} `json:"-",bson:"-"` Msi64 map[string]int64 + Simplef testSimpleFields + + 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 included if nil). + // make this one omitempty (so it is excluded if nil). *AnonInTestStrucIntf `codec:",omitempty"` - 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 - Nint64 *int64 //don't set this, so we can test for nil + 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 + Nint64 *int64 //don't set this, so we can test for nil +} + +type TestStruc struct { + _struct struct{} `codec:",omitempty"` //set omitempty for every field + + testStrucCommon + Mtsptr map[string]*TestStruc Mts map[string]TestStruc Its []*TestStruc @@ -89,17 +170,94 @@ type tLowerFirstLetter struct { b []byte } -func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (ts *TestStruc) { +// 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, bench, useInterface, useStringKeyOnly bool) { var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464 - ts = &TestStruc{ - S: "some string", + var a = AnonInTestStruc{ + // There's more leeway in altering this. + AS: "A-String", + AI64: -64646464, + AI16: 1616, + AUi64: 64646464, + // (U+1D11E)G-clef character may be represented in json as "\uD834\uDD1E". + // single reverse solidus character may be represented in json as "\u005C". + // include these in ASslice below. + ASslice: []string{"Aone", "Atwo", "Athree", + "Afour.reverse_solidus.\u005c", "Afive.Gclef.\U0001d11E"}, + AI64slice: []int64{1, -22, 333, -4444, 55555, -666666}, + AMSU16: map[string]uint16{"1": 1, "22": 2, "333": 3, "4444": 4}, + AF64slice: []float64{ + 11.11e-11, -11.11e+11, + 2.222E+12, -2.222E-12, + -555.55E-5, 555.55E+5, + 666.66E-6, -666.66E+6, + 7777.7777E-7, -7777.7777E-7, + -8888.8888E+8, 8888.8888E+8, + -99999.9999E+9, 99999.9999E+9, + // these below are hairy enough to need strconv.ParseFloat + 33.33E-33, -33.33E+33, + 44.44e+44, -44.44e-44, + }, + } + + *ts = testStrucCommon{ + S: "some string", + + // 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, - I16: 1616, - Ui64: uint64(int64(math.MaxInt64 * 2 / 3)), // 64, //don't use MaxUint64, as bson can't write it - Ui8: 160, - B: true, - By: 5, + I64n: math.MinInt64 * 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, Sslice: []string{"one", "two", "three"}, I64slice: []int64{1111, 2222, 3333}, @@ -113,33 +271,70 @@ func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (t "one": 1, "two": 2, }, - AnonInTestStruc: AnonInTestStruc{ - // There's more leeway in altering this. - AS: "A-String", - AI64: -64646464, - AI16: 1616, - AUi64: 64646464, - // (U+1D11E)G-clef character may be represented in json as "\uD834\uDD1E". - // single reverse solidus character may be represented in json as "\u005C". - // include these in ASslice below. - ASslice: []string{"Aone", "Atwo", "Athree", - "Afour.reverse_solidus.\u005c", "Afive.Gclef.\U0001d11E"}, - AI64slice: []int64{1, -22, 333, -4444, 55555, -666666}, - AMSU16: map[string]uint16{"1": 1, "22": 2, "333": 3, "4444": 4}, - AF64slice: []float64{ - 11.11e-11, -11.11e+11, - 2.222E+12, -2.222E-12, - -555.55E-5, 555.55E+5, - 666.66E-6, -666.66E+6, - 7777.7777E-7, -7777.7777E-7, - -8888.8888E+8, 8888.8888E+8, - -99999.9999E+9, 99999.9999E+9, - // these below are hairy enough to need strconv.ParseFloat - 33.33E-33, -33.33E+33, - 44.44e+44, -44.44e-44, + + Ui64array: [4]uint64{4, 16, 64, 256}, + + WrapSliceInt64: []uint64{4, 16, 64, 256}, + WrapSliceString: []string{"4", "16", "64", "256"}, + + // 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. + // Msu2wss: map[stringUint64T]wrapStringSlice{ + // {"5", 5}: []wrapString{"1", "2", "3", "4", "5"}, + // {"3", 3}: []wrapString{"1", "2", "3"}, + // }, + + // make Simplef same as top-level + Simplef: testSimpleFields{ + S: "some string", + + // 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, + + 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, + + Sslice: []string{"one", "two", "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{ + "one": 1, + "two": 2, }, + + Ui64array: [4]uint64{4, 16, 64, 256}, + + WrapSliceInt64: []uint64{4, 16, 64, 256}, + WrapSliceString: []string{"4", "16", "64", "256"}, }, + + AnonInTestStruc: a, + NotAnon: a, } + + ts.Ui64slicearray = []*[4]uint64{&ts.Ui64array, &ts.Ui64array} + if useInterface { ts.AnonInTestStrucIntf = &AnonInTestStrucIntf{ Islice: []interface{}{"true", true, "no", false, uint64(288), float64(0.4)}, @@ -165,6 +360,11 @@ func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (t if !useStringKeyOnly { // ts.AnonInTestStruc.AMU32F64 = map[uint32]float64{1: 1, 2: 2, 3: 3} // Json/Bson barf } +} + +func newTestStruc(depth int, bench, useInterface, useStringKeyOnly bool) (ts *TestStruc) { + ts = &TestStruc{} + populateTestStrucCommon(&ts.testStrucCommon, bench, useInterface, useStringKeyOnly) if depth > 0 { depth-- if ts.Mtsptr == nil { @@ -179,36 +379,3 @@ func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (t } return } - -// 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() -} diff --git a/codec/z.go b/codec/z.go new file mode 100644 index 00000000..b6ac0769 --- /dev/null +++ b/codec/z.go @@ -0,0 +1,23 @@ +// 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 "sort" + +// TODO: this is brittle, as it depends on z.go's init() being called last. +// The current build tools all honor that files are passed in lexical order. +// However, we should consider using an init_channel, +// that each person doing init will write to. + +func init() { + if !useLookupRecognizedTypes { + return + } + 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)) +} diff --git a/codec/z_all_test.go b/codec/z_all_test.go index 364cbd7e..1e1820c4 100644 --- a/codec/z_all_test.go +++ b/codec/z_all_test.go @@ -35,6 +35,9 @@ func testSuite(t *testing.T, f func(t *testing.T)) { testReinit() // so flag.Parse() is called first, and never called again + testDecodeOptions = DecodeOptions{} + testEncodeOptions = EncodeOptions{} + testUseMust = false testCanonical = false testUseMust = false @@ -47,6 +50,7 @@ func testSuite(t *testing.T, f func(t *testing.T)) { testUseReset = false testMaxInitLen = 0 testJsonIndent = 0 + testUseIoWrapper = false testReinit() t.Run("optionsFalse", f) @@ -70,8 +74,28 @@ func testSuite(t *testing.T, f func(t *testing.T)) { testCheckCircRef = true testJsonHTMLCharsAsIs = true testUseReset = true + testDecodeOptions.MapValueReset = true testReinit() t.Run("optionsTrue", f) + + testUseIoWrapper = true + testReinit() + t.Run("optionsTrue-ioWrapper", f) + + testDepth = 6 + testReinit() + t.Run("optionsTrue-deepstruct", f) + + // The following here MUST be tested individually, as they create + // side effects i.e. the decoded value is different. + // testDecodeOptions.MapValueReset = true // ok - no side effects + // testDecodeOptions.InterfaceReset = true // error??? because we do deepEquals to verify + // testDecodeOptions.ErrorIfNoField = true // error, as expected, as fields not there + // testDecodeOptions.ErrorIfNoArrayExpand = true // no error, but no error case either + // testDecodeOptions.PreferArrayOverSlice = true // error??? because slice != array. + // .... however, update deepEqual to take this option + // testReinit() + // t.Run("optionsTrue-resetOptions", f) } /* @@ -84,6 +108,7 @@ find . -name "$z" | xargs grep -e '^func Test' | \ func testCodecGroup(t *testing.T) { // println("running testcodecsuite") // + t.Run("TestBincCodecsTable", TestBincCodecsTable) t.Run("TestBincCodecsMisc", TestBincCodecsMisc) t.Run("TestBincCodecsEmbeddedPointer", TestBincCodecsEmbeddedPointer)