From c3953defa8f202d85a6d73eead7b77073bf5701a Mon Sep 17 00:00:00 2001 From: Ugorji Nwoke Date: Wed, 18 Oct 2017 18:09:16 -0400 Subject: [PATCH] codec: streamline library: refactor sendContainerState and clean up handle-specific test flags refactor sendContainerState to be methods on (en|de)cDriver Basically, move from sendContainerState to roughly (Read|Write)(Array|Map)(Elem)(Key|Value)(Start|End) Support IndefiniteLength in cbor during encoding test: make testUseIoEncDec an int flag, which specifies buffer size It defaults to -1, which means do not use io. if >= 0, then we use io.Reader/io.Writer with a buffer in front. test: do not use flags for handle-specific configuration Instead, create suite groups for each handle, and modify the configuration for the test group, and execute the handle-specific tests. --- codec/binc.go | 13 +- codec/cbor.go | 38 +- codec/codec_test.go | 20 +- codec/decode.go | 144 +- codec/encode.go | 217 +- codec/fast-path.generated.go | 11142 ++++++++++++++------------------ codec/fast-path.go.tmpl | 48 +- codec/gen-dec-map.go.tmpl | 6 +- codec/gen-helper.generated.go | 19 +- codec/gen-helper.go.tmpl | 9 + codec/gen.generated.go | 6 +- codec/gen.go | 55 +- codec/helper.go | 15 +- codec/json.go | 322 +- codec/msgpack.go | 13 +- codec/shared_test.go | 53 +- codec/simple.go | 14 +- codec/values_test.go | 2 - codec/x_bench_gen_test.go | 8 +- codec/z_all_test.go | 138 +- 20 files changed, 5459 insertions(+), 6823 deletions(-) diff --git a/codec/binc.go b/codec/binc.go index e257db56..be5b7d33 100644 --- a/codec/binc.go +++ b/codec/binc.go @@ -61,7 +61,8 @@ type bincEncDriver struct { m map[string]uint16 // symbols b [scratchByteArrayLen]byte s uint16 // symbols sequencer - encNoSeparator + // encNoSeparator + encDriverNoopContainerWriter } func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool { @@ -195,11 +196,11 @@ func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { e.w.writen1(xtag) } -func (e *bincEncDriver) EncodeArrayStart(length int) { +func (e *bincEncDriver) WriteArrayStart(length int) { e.encLen(bincVdArray<<4, uint64(length)) } -func (e *bincEncDriver) EncodeMapStart(length int) { +func (e *bincEncDriver) WriteMapStart(length int) { e.encLen(bincVdMap<<4, uint64(length)) } @@ -332,13 +333,14 @@ type bincDecDriver struct { bd byte vd byte vs byte - noStreamingCodec - decNoSeparator + // noStreamingCodec + // decNoSeparator b [scratchByteArrayLen]byte // linear searching on this slice is ok, // because we typically expect < 32 symbols in each stream. s []bincDecSymbol + decDriverNoopContainerReader } func (d *bincDecDriver) readNextBd() { @@ -909,6 +911,7 @@ func (d *bincDecDriver) DecodeNaked() { type BincHandle struct { BasicHandle binaryEncodingType + noElemSeparators } func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { diff --git a/codec/cbor.go b/codec/cbor.go index 703ce13b..592cee85 100644 --- a/codec/cbor.go +++ b/codec/cbor.go @@ -61,7 +61,8 @@ const ( type cborEncDriver struct { noBuiltInTypes - encNoSeparator + encDriverNoopContainerWriter + // encNoSeparator e *Encoder w encWriter h *CborHandle @@ -143,12 +144,32 @@ func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { } } -func (e *cborEncDriver) EncodeArrayStart(length int) { - e.encLen(cborBaseArray, length) +func (e *cborEncDriver) WriteArrayStart(length int) { + if e.h.IndefiniteLength { + e.w.writen1(cborBdIndefiniteArray) + } else { + e.encLen(cborBaseArray, length) + } } -func (e *cborEncDriver) EncodeMapStart(length int) { - e.encLen(cborBaseMap, length) +func (e *cborEncDriver) WriteMapStart(length int) { + if e.h.IndefiniteLength { + e.w.writen1(cborBdIndefiniteMap) + } else { + e.encLen(cborBaseMap, length) + } +} + +func (e *cborEncDriver) WriteMapEnd() { + if e.h.IndefiniteLength { + e.w.writen1(cborBdBreak) + } +} + +func (e *cborEncDriver) WriteArrayEnd() { + if e.h.IndefiniteLength { + e.w.writen1(cborBdBreak) + } } func (e *cborEncDriver) EncodeString(c charEncoding, v string) { @@ -180,7 +201,8 @@ type cborDecDriver struct { bdRead bool bd byte noBuiltInTypes - decNoSeparator + // decNoSeparator + decDriverNoopContainerReader } func (d *cborDecDriver) readNextBd() { @@ -577,7 +599,11 @@ func (d *cborDecDriver) DecodeNaked() { // type CborHandle struct { binaryEncodingType + noElemSeparators BasicHandle + + // IndefiniteLength=true, means that we encode using indefinitelength + IndefiniteLength bool } func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { diff --git a/codec/codec_test.go b/codec/codec_test.go index 368a833d..af553287 100644 --- a/codec/codec_test.go +++ b/codec/codec_test.go @@ -42,11 +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(), - ) + // 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 @@ -349,18 +349,8 @@ func testInit() { bh.CheckCircularRef = testCheckCircRef bh.StructToArray = testStructToArray bh.MaxInitLen = testMaxInitLen - // mostly doing this for binc - if testWriteNoSymbols { - bh.AsSymbols = AsSymbolNone - } else { - bh.AsSymbols = AsSymbolAll - } } - testJsonH.Indent = int8(testJsonIndent) - testJsonH.HTMLCharsAsIs = testJsonHTMLCharsAsIs - testJsonH.PreferFloat = testJsonPreferFloat - testMsgpackH.RawToString = true // testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt) diff --git a/codec/decode.go b/codec/decode.go index 7f3422a3..246533f3 100644 --- a/codec/decode.go +++ b/codec/decode.go @@ -104,17 +104,31 @@ type decDriver interface { // decodeExt will decode into a *RawExt or into an extension. DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) - ReadMapStart() int ReadArrayStart() int + ReadArrayElem() + ReadArrayEnd() + ReadMapStart() int + ReadMapElemKey() + ReadMapElemValue() + ReadMapEnd() reset() uncacheRead() } -type decNoSeparator struct { -} +// type decNoSeparator struct {} +// func (_ decNoSeparator) ReadEnd() {} + +type decDriverNoopContainerReader struct{} -func (_ decNoSeparator) ReadEnd() {} +func (_ decDriverNoopContainerReader) ReadArrayStart() (v int) { return } +func (_ decDriverNoopContainerReader) ReadArrayElem() {} +func (_ decDriverNoopContainerReader) ReadArrayEnd() {} +func (_ decDriverNoopContainerReader) ReadMapStart() (v int) { return } +func (_ decDriverNoopContainerReader) ReadMapElemKey() {} +func (_ decDriverNoopContainerReader) ReadMapElemValue() {} +func (_ decDriverNoopContainerReader) ReadMapEnd() {} +func (_ decDriverNoopContainerReader) CheckBreak() (v bool) { return } // func (_ decNoSeparator) uncacheRead() {} @@ -363,17 +377,17 @@ func (z *bufioDecReader) readb(bs []byte) { } } -func (z *bufioDecReader) readn1eof() (b uint8, eof bool) { - b, err := z.ReadByte() - if err != nil { - if err == io.EOF { - eof = true - } else { - panic(err) - } - } - return -} +// func (z *bufioDecReader) readn1eof() (b uint8, eof bool) { +// b, err := z.ReadByte() +// if err != nil { +// if err == io.EOF { +// eof = true +// } else { +// panic(err) +// } +// } +// return +// } func (z *bufioDecReader) readn1() (b uint8) { b, err := z.ReadByte() @@ -1181,15 +1195,13 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { fti := f.ti dd := d.d - cr := d.cr + elemsep := d.hh.hasElemSeparators() sfn := structFieldNode{v: rv, update: true} ctyp := dd.ContainerType() if ctyp == valueTypeMap { containerLen := dd.ReadMapStart() if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return } tisfi := fti.sfi @@ -1197,14 +1209,14 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { // rvkencname := dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + dd.ReadMapElemKey() } rvkencnameB := dd.DecodeStringAsBytes() rvkencname := stringView(rvkencnameB) // rvksi := ti.getForEncName(rvkencname) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + dd.ReadMapElemValue() } if k := fti.indexForEncName(rvkencname); k > -1 { si := tisfi[k] @@ -1218,15 +1230,11 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { } // keepAlive4StringView(rvkencnameB) // maintain ref 4 stringView // not needed, as reference is outside loop } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() } else if ctyp == valueTypeArray { containerLen := dd.ReadArrayStart() if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + dd.ReadArrayEnd() return } // Not much gain from doing it two ways for array. @@ -1236,8 +1244,8 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { if (hasLen && j == containerLen) || (!hasLen && dd.CheckBreak()) { break } - if cr != nil { - cr.sendContainerState(containerArrayElem) + if elemsep { + dd.ReadArrayElem() } if dd.TryDecodeAsNil() { si.setToZeroValue(rv) @@ -1248,15 +1256,13 @@ func (d *Decoder) kStruct(f *codecFnInfo, rv reflect.Value) { if containerLen > len(fti.sfip) { // read remaining values and throw away for j := len(fti.sfip); j < containerLen; j++ { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if elemsep { + dd.ReadArrayElem() } d.structFieldNotFound(j, "") } } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + dd.ReadArrayEnd() } else { d.error(onlyMapOrArrayCanDecodeIntoStructErr) return @@ -1492,16 +1498,14 @@ func (d *Decoder) kSlice(f *codecFnInfo, rv reflect.Value) { func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { dd := d.d containerLen := dd.ReadMapStart() - cr := d.cr + elemsep := d.hh.hasElemSeparators() ti := f.ti if rv.IsNil() { rv.Set(makeMapReflect(ti.rt, containerLen)) } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return } @@ -1550,13 +1554,13 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { hasLen := containerLen > 0 var kstrbs []byte for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + dd.ReadMapElemKey() } // if a nil key, just ignore the mapped value and continue if dd.TryDecodeAsNil() { - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + dd.ReadMapElemValue() } d.swallow() continue @@ -1591,8 +1595,8 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { } } - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + dd.ReadMapElemValue() } // Brittle, but OK per TryDecodeAsNil() contract. @@ -1668,9 +1672,7 @@ func (d *Decoder) kMap(f *codecFnInfo, rv reflect.Value) { // } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() } // decNaked is used to keep track of the primitives decoded. @@ -1799,7 +1801,7 @@ type Decoder struct { ri ioDecReader bi bufioDecReader - cr containerStateRecv + // cr containerStateRecv n *decNaked nsp *sync.Pool @@ -1852,7 +1854,7 @@ func newDecoder(h Handle) *Decoder { d.is = make(map[string]string, 32) } d.d = h.newDecDriver(d) - d.cr, _ = d.d.(containerStateRecv) + // d.cr, _ = d.d.(containerStateRecv) return d } @@ -2012,37 +2014,33 @@ func (d *Decoder) swallow() { if dd.TryDecodeAsNil() { return } - cr := d.cr + elemsep := d.hh.hasElemSeparators() switch dd.ContainerType() { case valueTypeMap: containerLen := dd.ReadMapStart() hasLen := containerLen >= 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { // if clenGtEqualZero {if j >= containerLen {break} } else if dd.CheckBreak() {break} - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + dd.ReadMapElemKey() } d.swallow() - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + dd.ReadMapElemValue() } d.swallow() } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() case valueTypeArray: containerLen := dd.ReadArrayStart() hasLen := containerLen >= 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if elemsep { + dd.ReadArrayElem() } d.swallow() } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + dd.ReadArrayEnd() case valueTypeBytes: dd.DecodeBytes(d.b[:], true) case valueTypeString: @@ -2389,29 +2387,21 @@ func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { } func (x decSliceHelper) End() { - cr := x.d.cr - if cr == nil { - return - } if x.array { - cr.sendContainerState(containerArrayEnd) + x.d.d.ReadArrayEnd() } else { - cr.sendContainerState(containerMapEnd) + x.d.d.ReadMapEnd() } } func (x decSliceHelper) ElemContainerState(index int) { - cr := x.d.cr - if cr == nil { - return - } if x.array { - cr.sendContainerState(containerArrayElem) + x.d.d.ReadArrayElem() } else { if index%2 == 0 { - cr.sendContainerState(containerMapKey) + x.d.d.ReadMapElemKey() } else { - cr.sendContainerState(containerMapValue) + x.d.d.ReadMapElemValue() } } } diff --git a/codec/encode.go b/codec/encode.go index 036a2c26..1e5d5f1b 100644 --- a/codec/encode.go +++ b/codec/encode.go @@ -61,8 +61,13 @@ type encDriver interface { // encodeExtPreamble(xtag byte, length int) EncodeRawExt(re *RawExt, e *Encoder) EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) - EncodeArrayStart(length int) - EncodeMapStart(length int) + WriteArrayStart(length int) + WriteArrayElem() + WriteArrayEnd() + WriteMapStart(length int) + WriteMapElemKey() + WriteMapElemValue() + WriteMapEnd() EncodeString(c charEncoding, v string) EncodeSymbol(v string) EncodeStringBytes(c charEncoding, v []byte) @@ -73,14 +78,6 @@ type encDriver interface { reset() } -type encDriverAsis interface { - EncodeAsis(v []byte) -} - -type encNoSeparator struct{} - -func (_ encNoSeparator) EncodeEnd() {} - type ioEncStringWriter interface { WriteString(s string) (n int, err error) } @@ -89,6 +86,23 @@ type ioEncFlusher interface { Flush() error } +type encDriverAsis interface { + EncodeAsis(v []byte) +} + +// type encNoSeparator struct{} +// func (_ encNoSeparator) EncodeEnd() {} + +type encDriverNoopContainerWriter struct{} + +func (_ encDriverNoopContainerWriter) WriteArrayStart(length int) {} +func (_ encDriverNoopContainerWriter) WriteArrayElem() {} +func (_ encDriverNoopContainerWriter) WriteArrayEnd() {} +func (_ encDriverNoopContainerWriter) WriteMapStart(length int) {} +func (_ encDriverNoopContainerWriter) WriteMapElemKey() {} +func (_ encDriverNoopContainerWriter) WriteMapElemValue() {} +func (_ encDriverNoopContainerWriter) WriteMapEnd() {} + // type ioEncWriterWriter interface { // WriteByte(c byte) error // WriteString(s string) (n int, err error) @@ -198,16 +212,16 @@ type ioEncWriter struct { b [8]byte } -func (x *ioEncWriter) WriteByte(b byte) (err error) { +func (z *ioEncWriter) WriteByte(b byte) (err error) { // x.bs[0] = b // _, err = x.ww.Write(x.bs[:]) - var ba = [1]byte{b} - _, err = x.w.Write(ba[:]) + z.b[0] = b + _, err = z.w.Write(z.b[:1]) return } -func (x *ioEncWriter) WriteString(s string) (n int, err error) { - return x.w.Write(bytesView(s)) +func (z *ioEncWriter) WriteString(s string) (n int, err error) { + return z.w.Write(bytesView(s)) } func (z *ioEncWriter) writeb(bs []byte) { @@ -477,30 +491,31 @@ func (e *Encoder) kErr(f *codecFnInfo, rv reflect.Value) { func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { ti := f.ti + ee := e.e // 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". if f.seq != seqTypeArray { if rv.IsNil() { - e.e.EncodeNil() + ee.EncodeNil() return } // If in this method, then there was no extension function defined. // So it's okay to treat as []byte. if ti.rtid == uint8SliceTypId { - e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + ee.EncodeStringBytes(c_RAW, rv.Bytes()) return } } - cr := e.cr + elemsep := e.hh.hasElemSeparators() rtelem := ti.rt.Elem() l := rv.Len() if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { switch f.seq { case seqTypeArray: if rv.CanAddr() { - e.e.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + ee.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) } else { var bs []byte if l <= cap(e.b) { @@ -509,11 +524,11 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { bs = make([]byte, l) } reflect.Copy(reflect.ValueOf(bs), rv) - e.e.EncodeStringBytes(c_RAW, bs) + ee.EncodeStringBytes(c_RAW, bs) } return case seqTypeSlice: - e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + ee.EncodeStringBytes(c_RAW, rv.Bytes()) return } } @@ -526,7 +541,7 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { for i := 0; i < l; i++ { bs = append(bs, <-ch) } - e.e.EncodeStringBytes(c_RAW, bs) + ee.EncodeStringBytes(c_RAW, bs) return } @@ -535,9 +550,9 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { e.errorf("mapBySlice requires even slice length, but got %v", l) return } - e.e.EncodeMapStart(l / 2) + ee.WriteMapStart(l / 2) } else { - e.e.EncodeArrayStart(l) + ee.WriteArrayStart(l) } if l > 0 { @@ -556,15 +571,15 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { } // TODO: Consider perf implication of encoding odd index values as symbols if type is string for j := 0; j < l; j++ { - if cr != nil { + if elemsep { if ti.mbs { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } else { - cr.sendContainerState(containerArrayElem) + ee.WriteArrayElem() } } if f.seq == seqTypeChan { @@ -575,7 +590,7 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { e.encodeValue(rv2, fn, true) } } else { - e.e.EncodeNil() // WE HAVE TO DO SOMETHING, so nil if nothing received. + ee.EncodeNil() // WE HAVE TO DO SOMETHING, so nil if nothing received. } } else { if useLookupRecognizedTypes && recognizedVtyp { @@ -587,18 +602,16 @@ func (e *Encoder) kSlice(f *codecFnInfo, rv reflect.Value) { } } - if cr != nil { - if ti.mbs { - cr.sendContainerState(containerMapEnd) - } else { - cr.sendContainerState(containerArrayEnd) - } + if ti.mbs { + ee.WriteMapEnd() + } else { + ee.WriteArrayEnd() } } func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { fti := f.ti - cr := e.cr + elemsep := e.hh.hasElemSeparators() tisfi := fti.sfip toMap := !(fti.toArray || e.h.StructToArray) if toMap { @@ -608,10 +621,10 @@ func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { sfn := structFieldNode{v: rv, update: false} if toMap { - ee.EncodeMapStart(len(tisfi)) + ee.WriteMapStart(len(tisfi)) // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - if cr == nil { + if !elemsep { for _, si := range tisfi { if asSymbols { ee.EncodeSymbol(si.encName) @@ -622,36 +635,36 @@ func (e *Encoder) kStructNoOmitempty(f *codecFnInfo, rv reflect.Value) { } } else { for _, si := range tisfi { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() if asSymbols { ee.EncodeSymbol(si.encName) } else { ee.EncodeString(c_UTF8, si.encName) } - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() e.encodeValue(sfn.field(si), nil, true) } - cr.sendContainerState(containerMapEnd) } + ee.WriteMapEnd() } else { - ee.EncodeArrayStart(len(tisfi)) - if cr == nil { + ee.WriteArrayStart(len(tisfi)) + if !elemsep { for _, si := range tisfi { e.encodeValue(sfn.field(si), nil, true) } } else { for _, si := range tisfi { - cr.sendContainerState(containerArrayElem) + ee.WriteArrayElem() e.encodeValue(sfn.field(si), nil, true) } - cr.sendContainerState(containerArrayEnd) } + ee.WriteArrayEnd() } } func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { fti := f.ti - cr := e.cr + elemsep := e.hh.hasElemSeparators() 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) @@ -722,10 +735,10 @@ func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { } if toMap { - ee.EncodeMapStart(newlen) + ee.WriteMapStart(newlen) // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 - if cr == nil { + if !elemsep { for j := 0; j < newlen; j++ { kv = fkvs[j] if asSymbols { @@ -738,30 +751,30 @@ func (e *Encoder) kStruct(f *codecFnInfo, rv reflect.Value) { } else { for j := 0; j < newlen; j++ { kv = fkvs[j] - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() if asSymbols { ee.EncodeSymbol(kv.v) } else { ee.EncodeString(c_UTF8, kv.v) } - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() e.encodeValue(kv.r, nil, true) } - cr.sendContainerState(containerMapEnd) } + ee.WriteMapEnd() } else { - ee.EncodeArrayStart(newlen) - if cr == nil { + ee.WriteArrayStart(newlen) + if !elemsep { for j := 0; j < newlen; j++ { e.encodeValue(fkvs[j].r, nil, true) } } else { for j := 0; j < newlen; j++ { - cr.sendContainerState(containerArrayElem) + ee.WriteArrayElem() e.encodeValue(fkvs[j].r, nil, true) } - cr.sendContainerState(containerArrayEnd) } + ee.WriteArrayEnd() } // do not use defer. Instead, use explicit pool return at end of function. @@ -780,12 +793,10 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { } l := rv.Len() - ee.EncodeMapStart(l) - cr := e.cr + ee.WriteMapStart(l) + elemsep := e.hh.hasElemSeparators() if l == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() return } var asSymbols bool @@ -814,9 +825,7 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { if e.h.Canonical { e.kMapCanonical(rtkey, rv, mks, valFn, asSymbols) - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() return } @@ -843,8 +852,8 @@ func (e *Encoder) kMap(f *codecFnInfo, rv reflect.Value) { LABEL1: recognizedVtyp = useLookupRecognizedTypes && isRecognizedRtidOrPtr(rtvalid) for j := range mks { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } if keyTypeIsString { if asSymbols { @@ -857,8 +866,8 @@ LABEL1: } else { e.encodeValue(mks[j], keyFn, true) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } if useLookupRecognizedTypes && recognizedVtyp { e.encode(rv2i(rv.MapIndex(mks[j]))) @@ -866,14 +875,12 @@ LABEL1: e.encodeValue(rv.MapIndex(mks[j]), valFn, true) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *codecFn, asSymbols bool) { ee := e.e - cr := e.cr + elemsep := e.hh.hasElemSeparators() // we previously did out-of-band if an extension was registered. // This is not necessary, as the natural kind is sufficient for ordering. @@ -887,12 +894,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl // } // sort.Sort(bytesRvSlice(mksv)) // for i := range mksv { - // if cr != nil { - // cr.sendContainerState(containerMapKey) + // if elemsep { + // ee.WriteMapElemKey() // } // ee.EncodeStringBytes(c_RAW, mksv[i].v) - // if cr != nil { - // cr.sendContainerState(containerMapValue) + // if elemsep { + // ee.WriteMapElemValue() // } // e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) // } @@ -909,12 +916,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(boolRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } ee.EncodeBool(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -927,16 +934,16 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(stringRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(mksv[i].v) } else { ee.EncodeString(c_UTF8, mksv[i].v) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -949,12 +956,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(uintRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } ee.EncodeUint(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -967,12 +974,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(intRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } ee.EncodeInt(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -985,12 +992,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(floatRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(mksv[i].v)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -1003,12 +1010,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(floatRvSlice(mksv)) for i := range mksv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } ee.EncodeFloat64(mksv[i].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksv[i].r), valFn, true) } @@ -1027,12 +1034,12 @@ func (e *Encoder) kMapCanonical(rtkey reflect.Type, rv reflect.Value, mks []refl } sort.Sort(bytesRvSlice(mksbv)) for j := range mksbv { - if cr != nil { - cr.sendContainerState(containerMapKey) + if elemsep { + ee.WriteMapElemKey() } e.asis(mksbv[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if elemsep { + ee.WriteMapElemValue() } e.encodeValue(rv.MapIndex(mksbv[j].r), valFn, true) } @@ -1058,7 +1065,7 @@ type Encoder struct { wb bytesEncWriter bw bufio.Writer - cr containerStateRecv + // cr containerStateRecv as encDriverAsis // ---- cpu cache line boundary? @@ -1094,7 +1101,7 @@ func newEncoder(h Handle) *Encoder { e := &Encoder{hh: h, h: h.getBasicHandle()} e.e = h.newEncDriver(e) e.as, _ = e.e.(encDriverAsis) - e.cr, _ = e.e.(containerStateRecv) + // e.cr, _ = e.e.(containerStateRecv) return e } diff --git a/codec/fast-path.generated.go b/codec/fast-path.generated.go index 5a426130..69b11fcf 100644 --- a/codec/fast-path.generated.go +++ b/codec/fast-path.generated.go @@ -3124,39 +3124,35 @@ func (e *Encoder) fastpathEncSliceIntfR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceIntfV(v []interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } e.encode(v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } e.encode(v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) { @@ -3167,39 +3163,35 @@ func (e *Encoder) fastpathEncSliceStringR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceStringV(v []string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeString(c_UTF8, v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceStringV(v []string, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeString(c_UTF8, v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) { @@ -3210,39 +3202,35 @@ func (e *Encoder) fastpathEncSliceFloat32R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceFloat32V(v []float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeFloat32(v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeFloat32(v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) { @@ -3253,39 +3241,35 @@ func (e *Encoder) fastpathEncSliceFloat64R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceFloat64V(v []float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeFloat64(v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeFloat64(v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) { @@ -3296,39 +3280,35 @@ func (e *Encoder) fastpathEncSliceUintR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceUintV(v []uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceUintV(v []uint, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) { @@ -3339,39 +3319,35 @@ func (e *Encoder) fastpathEncSliceUint16R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceUint16V(v []uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) { @@ -3382,39 +3358,35 @@ func (e *Encoder) fastpathEncSliceUint32R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceUint32V(v []uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) { @@ -3425,39 +3397,35 @@ func (e *Encoder) fastpathEncSliceUint64R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceUint64V(v []uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeUint(uint64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceUintptrR(f *codecFnInfo, rv reflect.Value) { @@ -3468,39 +3436,35 @@ func (e *Encoder) fastpathEncSliceUintptrR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceUintptrV(v []uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } e.encode(v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } e.encode(v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) { @@ -3511,39 +3475,35 @@ func (e *Encoder) fastpathEncSliceIntR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceIntV(v []int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceIntV(v []int, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) { @@ -3554,39 +3514,35 @@ func (e *Encoder) fastpathEncSliceInt8R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceInt8V(v []int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceInt8V(v []int8, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) { @@ -3597,39 +3553,35 @@ func (e *Encoder) fastpathEncSliceInt16R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceInt16V(v []int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceInt16V(v []int16, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) { @@ -3640,39 +3592,35 @@ func (e *Encoder) fastpathEncSliceInt32R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceInt32V(v []int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceInt32V(v []int32, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) { @@ -3683,39 +3631,35 @@ func (e *Encoder) fastpathEncSliceInt64R(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceInt64V(v []int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceInt64V(v []int64, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeInt(int64(v2)) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) { @@ -3726,47 +3670,43 @@ func (e *Encoder) fastpathEncSliceBoolR(f *codecFnInfo, rv reflect.Value) { } } func (_ fastpathT) EncSliceBoolV(v []bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { - cr.sendContainerState(containerArrayElem) + if esep { + ee.WriteArrayElem() } ee.EncodeBool(v2) } - if cr != nil { - cr.sendContainerState(containerArrayEnd) - } + ee.WriteArrayEnd() } func (_ fastpathT) EncAsMapSliceBoolV(v []bool, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } ee.EncodeBool(v2) } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), e) } func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -3783,38 +3723,36 @@ func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), e) } func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -3831,38 +3769,36 @@ func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), e) } func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -3879,38 +3815,36 @@ func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), e) } func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -3927,38 +3861,36 @@ func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), e) } func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -3975,38 +3907,36 @@ func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), e) } func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4023,38 +3953,36 @@ func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), e) } func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4071,38 +3999,36 @@ func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), e) } func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4119,38 +4045,36 @@ func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), e) } func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4167,38 +4091,36 @@ func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), e) } func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4215,38 +4137,36 @@ func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), e) } func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4263,38 +4183,36 @@ func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), e) } func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4311,38 +4229,36 @@ func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), e) } func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4359,38 +4275,36 @@ func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), e) } func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4407,38 +4321,36 @@ func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), e) } func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4455,38 +4367,36 @@ func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntfBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), e) } func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding e2 := NewEncoderBytes(&mksv, e.hh) @@ -4503,38 +4413,36 @@ func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, e *Encoder) { } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), e) } func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4545,46 +4453,44 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), e) } func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4595,46 +4501,44 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), e) } func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4645,46 +4549,44 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), e) } func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4695,46 +4597,44 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), e) } func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4745,46 +4645,44 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), e) } func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4795,46 +4693,44 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), e) } func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4845,46 +4741,44 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), e) } func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4895,46 +4789,44 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), e) } func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4945,46 +4837,44 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), e) } func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -4995,46 +4885,44 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), e) } func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5045,46 +4933,44 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), e) } func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5095,46 +4981,44 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), e) } func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5145,46 +5029,44 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[string(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), e) } func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5195,46 +5077,44 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), e) } func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5245,46 +5125,44 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapStringBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), e) } func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 if e.h.Canonical { v2 := make([]string, len(v)) @@ -5295,46 +5173,44 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, e *Encoder) { } sort.Sort(stringSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[string(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), e) } func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5344,38 +5220,36 @@ func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), e) } func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5385,38 +5259,36 @@ func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), e) } func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5426,38 +5298,36 @@ func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), e) } func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5467,38 +5337,36 @@ func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), e) } func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5508,38 +5376,36 @@ func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), e) } func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5549,38 +5415,36 @@ func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), e) } func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5590,38 +5454,36 @@ func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), e) } func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5631,38 +5493,36 @@ func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), e) } func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5672,38 +5532,36 @@ func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), e) } func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5713,38 +5571,36 @@ func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), e) } func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5754,38 +5610,36 @@ func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), e) } func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5795,38 +5649,36 @@ func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), e) } func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5836,38 +5688,36 @@ func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), e) } func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5877,38 +5727,36 @@ func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), e) } func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5918,38 +5766,36 @@ func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat32BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), e) } func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -5959,38 +5805,36 @@ func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(float32(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[float32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat32(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), e) } func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6000,38 +5844,36 @@ func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), e) } func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6041,38 +5883,36 @@ func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), e) } func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6082,38 +5922,36 @@ func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), e) } func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6123,38 +5961,36 @@ func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), e) } func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6164,38 +6000,36 @@ func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), e) } func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6205,38 +6039,36 @@ func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), e) } func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6246,38 +6078,36 @@ func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), e) } func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6287,38 +6117,36 @@ func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), e) } func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6328,38 +6156,36 @@ func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), e) } func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6369,38 +6195,36 @@ func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), e) } func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6410,38 +6234,36 @@ func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), e) } func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6451,38 +6273,36 @@ func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), e) } func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6492,38 +6312,36 @@ func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[float64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), e) } func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6533,38 +6351,36 @@ func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), e) } func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6574,38 +6390,36 @@ func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapFloat64BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), e) } func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]float64, len(v)) var i int @@ -6615,38 +6429,36 @@ func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, e *Encoder) { } sort.Sort(floatSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(float64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[float64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeFloat64(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), e) } func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6656,38 +6468,36 @@ func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), e) } func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6697,38 +6507,36 @@ func (_ fastpathT) EncMapUintStringV(v map[uint]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), e) } func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6738,38 +6546,36 @@ func (_ fastpathT) EncMapUintUintV(v map[uint]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), e) } func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6779,38 +6585,36 @@ func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), e) } func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6820,38 +6624,36 @@ func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), e) } func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6861,38 +6663,36 @@ func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), e) } func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6902,38 +6702,36 @@ func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), e) } func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6943,38 +6741,36 @@ func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), e) } func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -6984,38 +6780,36 @@ func (_ fastpathT) EncMapUintIntV(v map[uint]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), e) } func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7025,38 +6819,36 @@ func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), e) } func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7066,38 +6858,36 @@ func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), e) } func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7107,38 +6897,36 @@ func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), e) } func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7148,38 +6936,36 @@ func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), e) } func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7189,38 +6975,36 @@ func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), e) } func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7230,38 +7014,36 @@ func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), e) } func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7271,38 +7053,36 @@ func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uint(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), e) } func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7312,38 +7092,36 @@ func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), e) } func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7353,38 +7131,36 @@ func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), e) } func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7394,38 +7170,36 @@ func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), e) } func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7435,38 +7209,36 @@ func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), e) } func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7476,38 +7248,36 @@ func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), e) } func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7517,38 +7287,36 @@ func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), e) } func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7558,38 +7326,36 @@ func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), e) } func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7599,38 +7365,36 @@ func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), e) } func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7640,38 +7404,36 @@ func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), e) } func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7681,38 +7443,36 @@ func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), e) } func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7722,38 +7482,36 @@ func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), e) } func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7763,38 +7521,36 @@ func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), e) } func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7804,38 +7560,36 @@ func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), e) } func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7845,38 +7599,36 @@ func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), e) } func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7886,38 +7638,36 @@ func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint8BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), e) } func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7927,38 +7677,36 @@ func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uint8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), e) } func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -7968,38 +7716,36 @@ func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), e) } func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8009,38 +7755,36 @@ func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), e) } func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8050,38 +7794,36 @@ func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), e) } func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8091,38 +7833,36 @@ func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), e) } func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8132,38 +7872,36 @@ func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), e) } func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8173,38 +7911,36 @@ func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), e) } func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8214,38 +7950,36 @@ func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), e) } func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8255,38 +7989,36 @@ func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), e) } func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8296,38 +8028,36 @@ func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), e) } func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8337,38 +8067,36 @@ func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), e) } func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8378,38 +8106,36 @@ func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), e) } func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8419,38 +8145,36 @@ func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), e) } func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8460,38 +8184,36 @@ func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), e) } func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8501,38 +8223,36 @@ func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), e) } func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8542,38 +8262,36 @@ func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint16BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), e) } func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8583,38 +8301,36 @@ func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uint16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), e) } func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8624,38 +8340,36 @@ func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), e) } func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8665,38 +8379,36 @@ func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), e) } func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8706,38 +8418,36 @@ func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), e) } func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8747,38 +8457,36 @@ func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), e) } func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8788,38 +8496,36 @@ func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), e) } func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8829,38 +8535,36 @@ func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), e) } func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8870,38 +8574,36 @@ func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), e) } func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8911,38 +8613,36 @@ func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), e) } func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8952,38 +8652,36 @@ func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), e) } func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -8993,38 +8691,36 @@ func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), e) } func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9034,38 +8730,36 @@ func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), e) } func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9075,38 +8769,36 @@ func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), e) } func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9116,38 +8808,36 @@ func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), e) } func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9157,38 +8847,36 @@ func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), e) } func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9198,38 +8886,36 @@ func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint32BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), e) } func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9239,38 +8925,36 @@ func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uint32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), e) } func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9280,38 +8964,36 @@ func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), e) } func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9321,38 +9003,36 @@ func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), e) } func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9362,38 +9042,36 @@ func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), e) } func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9403,38 +9081,36 @@ func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), e) } func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9444,38 +9120,36 @@ func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), e) } func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9485,38 +9159,36 @@ func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), e) } func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9526,38 +9198,36 @@ func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), e) } func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9567,38 +9237,36 @@ func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), e) } func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9608,38 +9276,36 @@ func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), e) } func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9649,38 +9315,36 @@ func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), e) } func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9690,38 +9354,36 @@ func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), e) } func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9731,38 +9393,36 @@ func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), e) } func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9772,38 +9432,36 @@ func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uint64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), e) } func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9813,38 +9471,36 @@ func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), e) } func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9854,38 +9510,36 @@ func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUint64BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), e) } func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9895,38 +9549,36 @@ func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(uint64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uint64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeUint(uint64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), e) } func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9936,38 +9588,36 @@ func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), e) } func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -9977,38 +9627,36 @@ func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), e) } func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10018,38 +9666,36 @@ func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), e) } func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10059,38 +9705,36 @@ func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), e) } func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10100,38 +9744,36 @@ func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), e) } func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10141,38 +9783,36 @@ func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), e) } func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10182,38 +9822,36 @@ func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), e) } func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10223,38 +9861,36 @@ func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), e) } func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10264,38 +9900,36 @@ func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), e) } func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10305,38 +9939,36 @@ func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), e) } func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10346,38 +9978,36 @@ func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), e) } func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10387,38 +10017,36 @@ func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), e) } func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10428,38 +10056,36 @@ func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[uintptr(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), e) } func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10469,38 +10095,36 @@ func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), e) } func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10510,38 +10134,36 @@ func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapUintptrBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), e) } func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int @@ -10551,38 +10173,36 @@ func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, e *Encoder) { } sort.Sort(uintSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(uintptr(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[uintptr(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } e.encode(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), e) } func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10592,38 +10212,36 @@ func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), e) } func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10633,38 +10251,36 @@ func (_ fastpathT) EncMapIntStringV(v map[int]string, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), e) } func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10674,38 +10290,36 @@ func (_ fastpathT) EncMapIntUintV(v map[int]uint, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), e) } func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10715,38 +10329,36 @@ func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), e) } func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10756,38 +10368,36 @@ func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), e) } func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10797,38 +10407,36 @@ func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), e) } func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10838,38 +10446,36 @@ func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), e) } func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10879,38 +10485,36 @@ func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), e) } func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10920,38 +10524,36 @@ func (_ fastpathT) EncMapIntIntV(v map[int]int, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), e) } func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -10961,38 +10563,36 @@ func (_ fastpathT) EncMapIntInt8V(v map[int]int8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), e) } func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11002,38 +10602,36 @@ func (_ fastpathT) EncMapIntInt16V(v map[int]int16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), e) } func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11043,38 +10641,36 @@ func (_ fastpathT) EncMapIntInt32V(v map[int]int32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), e) } func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11084,38 +10680,36 @@ func (_ fastpathT) EncMapIntInt64V(v map[int]int64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), e) } func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11125,38 +10719,36 @@ func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), e) } func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11166,38 +10758,36 @@ func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapIntBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), e) } func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11207,38 +10797,36 @@ func (_ fastpathT) EncMapIntBoolV(v map[int]bool, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[int(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), e) } func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11248,38 +10836,36 @@ func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), e) } func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11289,38 +10875,36 @@ func (_ fastpathT) EncMapInt8StringV(v map[int8]string, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), e) } func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11330,38 +10914,36 @@ func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), e) } func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11371,38 +10953,36 @@ func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), e) } func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11412,38 +10992,36 @@ func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), e) } func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11453,38 +11031,36 @@ func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), e) } func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11494,38 +11070,36 @@ func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), e) } func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11535,38 +11109,36 @@ func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), e) } func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11576,38 +11148,36 @@ func (_ fastpathT) EncMapInt8IntV(v map[int8]int, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), e) } func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11617,38 +11187,36 @@ func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), e) } func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11658,38 +11226,36 @@ func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), e) } func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11699,38 +11265,36 @@ func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), e) } func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11740,38 +11304,36 @@ func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int8(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), e) } func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11781,38 +11343,36 @@ func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), e) } func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11822,38 +11382,36 @@ func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt8BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), e) } func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11863,38 +11421,36 @@ func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int8(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[int8(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), e) } func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11904,38 +11460,36 @@ func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), e) } func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11945,38 +11499,36 @@ func (_ fastpathT) EncMapInt16StringV(v map[int16]string, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), e) } func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -11986,38 +11538,36 @@ func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), e) } func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12027,38 +11577,36 @@ func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), e) } func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12068,38 +11616,36 @@ func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), e) } func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12109,38 +11655,36 @@ func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), e) } func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12150,38 +11694,36 @@ func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), e) } func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12191,38 +11733,36 @@ func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), e) } func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12232,38 +11772,36 @@ func (_ fastpathT) EncMapInt16IntV(v map[int16]int, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), e) } func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12273,38 +11811,36 @@ func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), e) } func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12314,38 +11850,36 @@ func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), e) } func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12355,38 +11889,36 @@ func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), e) } func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12396,38 +11928,36 @@ func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int16(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), e) } func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12437,38 +11967,36 @@ func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), e) } func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12478,38 +12006,36 @@ func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt16BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), e) } func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12519,38 +12045,36 @@ func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int16(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[int16(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), e) } func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12560,38 +12084,36 @@ func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), e) } func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12601,38 +12123,36 @@ func (_ fastpathT) EncMapInt32StringV(v map[int32]string, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), e) } func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12642,38 +12162,36 @@ func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), e) } func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12683,38 +12201,36 @@ func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), e) } func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12724,38 +12240,36 @@ func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), e) } func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12765,38 +12279,36 @@ func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), e) } func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12806,38 +12318,36 @@ func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), e) } func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12847,38 +12357,36 @@ func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), e) } func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12888,38 +12396,36 @@ func (_ fastpathT) EncMapInt32IntV(v map[int32]int, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), e) } func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12929,38 +12435,36 @@ func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), e) } func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -12970,38 +12474,36 @@ func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), e) } func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13011,38 +12513,36 @@ func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), e) } func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13052,38 +12552,36 @@ func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int32(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), e) } func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13093,38 +12591,36 @@ func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), e) } func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13134,38 +12630,36 @@ func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt32BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), e) } func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13175,38 +12669,36 @@ func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int32(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[int32(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64IntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), e) } func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13216,38 +12708,36 @@ func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64StringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), e) } func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13257,38 +12747,36 @@ func (_ fastpathT) EncMapInt64StringV(v map[int64]string, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64UintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), e) } func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13298,38 +12786,36 @@ func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Uint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), e) } func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13339,38 +12825,36 @@ func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Uint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), e) } func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13380,38 +12864,36 @@ func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Uint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), e) } func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13421,38 +12903,36 @@ func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Uint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), e) } func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13462,38 +12942,36 @@ func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64UintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), e) } func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13503,38 +12981,36 @@ func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64IntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), e) } func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13544,38 +13020,36 @@ func (_ fastpathT) EncMapInt64IntV(v map[int64]int, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Int8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), e) } func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13585,38 +13059,36 @@ func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Int16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), e) } func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13626,38 +13098,36 @@ func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Int32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), e) } func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13667,38 +13137,36 @@ func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Int64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), e) } func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13708,38 +13176,36 @@ func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[int64(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Float32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), e) } func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13749,38 +13215,36 @@ func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64Float64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), e) } func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13790,38 +13254,36 @@ func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapInt64BoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), e) } func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]int64, len(v)) var i int @@ -13831,38 +13293,36 @@ func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, e *Encoder) { } sort.Sort(intSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(int64(k2))) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[int64(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeInt(int64(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolIntfR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), e) } func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -13872,38 +13332,36 @@ func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolStringR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), e) } func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -13913,38 +13371,36 @@ func (_ fastpathT) EncMapBoolStringV(v map[bool]string, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeString(c_UTF8, v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUintR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), e) } func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -13954,38 +13410,36 @@ func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUint8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), e) } func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -13995,38 +13449,36 @@ func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUint16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), e) } func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14036,38 +13488,36 @@ func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUint32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), e) } func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14077,38 +13527,36 @@ func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUint64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), e) } func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14118,38 +13566,36 @@ func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeUint(uint64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolUintptrR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), e) } func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14159,38 +13605,36 @@ func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } e.encode(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolIntR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), e) } func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14200,38 +13644,36 @@ func (_ fastpathT) EncMapBoolIntV(v map[bool]int, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolInt8R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), e) } func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14241,38 +13683,36 @@ func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolInt16R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), e) } func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14282,38 +13722,36 @@ func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolInt32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), e) } func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14323,38 +13761,36 @@ func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolInt64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), e) } func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14364,38 +13800,36 @@ func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v[bool(k2)])) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeInt(int64(v2)) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolFloat32R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), e) } func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14405,38 +13839,36 @@ func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat32(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolFloat64R(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), e) } func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14446,38 +13878,36 @@ func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeFloat64(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } func (e *Encoder) fastpathEncMapBoolBoolR(f *codecFnInfo, rv reflect.Value) { fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), e) } func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) if e.h.Canonical { v2 := make([]bool, len(v)) var i int @@ -14487,30 +13917,28 @@ func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, e *Encoder) { } sort.Sort(boolSlice(v2)) for _, k2 := range v2 { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(bool(k2)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v[bool(k2)]) } } else { for k2, v2 := range v { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + ee.WriteMapElemKey() } ee.EncodeBool(k2) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + ee.WriteMapElemValue() } ee.EncodeBool(v2) } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + ee.WriteMapEnd() } // -- decode @@ -18630,7 +18058,7 @@ func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, d *Decoder) } func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool, d *Decoder) (_ map[interface{}]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18639,9 +18067,7 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -18649,16 +18075,16 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -18678,9 +18104,7 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, canChange bool v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18701,7 +18125,7 @@ func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, d *Decoder) { } func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, d *Decoder) (_ map[interface{}]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18710,9 +18134,7 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18720,16 +18142,16 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -18744,9 +18166,7 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18767,7 +18187,7 @@ func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, d *Decoder) { } func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, d *Decoder) (_ map[interface{}]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18776,9 +18196,7 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18786,16 +18204,16 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -18810,9 +18228,7 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18833,7 +18249,7 @@ func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, d *Decoder) { } func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, d *Decoder) (_ map[interface{}]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18842,9 +18258,7 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18852,16 +18266,16 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -18876,9 +18290,7 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18899,7 +18311,7 @@ func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, d *Decoder) { } func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, d *Decoder) (_ map[interface{}]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18908,9 +18320,7 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18918,16 +18328,16 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -18942,9 +18352,7 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18965,7 +18373,7 @@ func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, d *Decoder) { } func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, d *Decoder) (_ map[interface{}]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -18974,9 +18382,7 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -18984,16 +18390,16 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19008,9 +18414,7 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19031,7 +18435,7 @@ func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, d *Decoder) { } func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, d *Decoder) (_ map[interface{}]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19040,9 +18444,7 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19050,16 +18452,16 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19074,9 +18476,7 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19097,7 +18497,7 @@ func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, d *Decoder) { } func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, d *Decoder) (_ map[interface{}]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19106,9 +18506,7 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19116,16 +18514,16 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19140,9 +18538,7 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19163,7 +18559,7 @@ func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, d *Decoder) { } func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, d *Decoder) (_ map[interface{}]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19172,9 +18568,7 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19182,16 +18576,16 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19206,9 +18600,7 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19229,7 +18621,7 @@ func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, d *Decoder) { } func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, d *Decoder) (_ map[interface{}]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19238,9 +18630,7 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19248,16 +18638,16 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19272,9 +18662,7 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19295,7 +18683,7 @@ func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, d *Decoder) { } func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, d *Decoder) (_ map[interface{}]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19304,9 +18692,7 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19314,16 +18700,16 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19338,9 +18724,7 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19361,7 +18745,7 @@ func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, d *Decoder) { } func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, d *Decoder) (_ map[interface{}]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19370,9 +18754,7 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19380,16 +18762,16 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19404,9 +18786,7 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19427,7 +18807,7 @@ func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, d *Decoder) { } func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, d *Decoder) (_ map[interface{}]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19436,9 +18816,7 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19446,16 +18824,16 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19470,9 +18848,7 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19493,7 +18869,7 @@ func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, d *Decoder) { } func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, d *Decoder) (_ map[interface{}]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19502,9 +18878,7 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19512,16 +18886,16 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19536,9 +18910,7 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19559,7 +18931,7 @@ func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, d *Decoder) { } func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, d *Decoder) (_ map[interface{}]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19568,9 +18940,7 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19578,16 +18948,16 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19602,9 +18972,7 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19625,7 +18993,7 @@ func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, d *Decoder) { } func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, d *Decoder) (_ map[interface{}]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19634,9 +19002,7 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19644,16 +19010,16 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { mk = d.string(bv) } - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19668,9 +19034,7 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19691,7 +19055,7 @@ func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, d *Decoder) { } func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, d *Decoder) (_ map[string]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19700,9 +19064,7 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -19710,12 +19072,12 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19735,9 +19097,7 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19758,7 +19118,7 @@ func (f fastpathT) DecMapStringStringX(vp *map[string]string, d *Decoder) { } func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, d *Decoder) (_ map[string]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19767,9 +19127,7 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19777,12 +19135,12 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19797,9 +19155,7 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19820,7 +19176,7 @@ func (f fastpathT) DecMapStringUintX(vp *map[string]uint, d *Decoder) { } func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, d *Decoder) (_ map[string]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19829,9 +19185,7 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19839,12 +19193,12 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19859,9 +19213,7 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19882,7 +19234,7 @@ func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, d *Decoder) { } func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, d *Decoder) (_ map[string]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19891,9 +19243,7 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19901,12 +19251,12 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19921,9 +19271,7 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19944,7 +19292,7 @@ func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, d *Decoder) { } func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, d *Decoder) (_ map[string]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -19953,9 +19301,7 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -19963,12 +19309,12 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -19983,9 +19329,7 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20006,7 +19350,7 @@ func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, d *Decoder) { } func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, d *Decoder) (_ map[string]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20015,9 +19359,7 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20025,12 +19367,12 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20045,9 +19387,7 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20068,7 +19408,7 @@ func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, d *Decoder) { } func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, d *Decoder) (_ map[string]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20077,9 +19417,7 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20087,12 +19425,12 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20107,9 +19445,7 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20130,7 +19466,7 @@ func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, d *Decoder) { } func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, d *Decoder) (_ map[string]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20139,9 +19475,7 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20149,12 +19483,12 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20169,9 +19503,7 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20192,7 +19524,7 @@ func (f fastpathT) DecMapStringIntX(vp *map[string]int, d *Decoder) { } func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, d *Decoder) (_ map[string]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20201,9 +19533,7 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20211,12 +19541,12 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20231,9 +19561,7 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20254,7 +19582,7 @@ func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, d *Decoder) { } func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, d *Decoder) (_ map[string]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20263,9 +19591,7 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20273,12 +19599,12 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20293,9 +19619,7 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20316,7 +19640,7 @@ func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, d *Decoder) { } func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, d *Decoder) (_ map[string]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20325,9 +19649,7 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20335,12 +19657,12 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20355,9 +19677,7 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20378,7 +19698,7 @@ func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, d *Decoder) { } func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, d *Decoder) (_ map[string]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20387,9 +19707,7 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20397,12 +19715,12 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20417,9 +19735,7 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20440,7 +19756,7 @@ func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, d *Decoder) { } func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, d *Decoder) (_ map[string]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20449,9 +19765,7 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20459,12 +19773,12 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20479,9 +19793,7 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20502,7 +19814,7 @@ func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, d *Decoder) { } func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, d *Decoder) (_ map[string]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20511,9 +19823,7 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20521,12 +19831,12 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20541,9 +19851,7 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20564,7 +19872,7 @@ func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, d *Decoder) { } func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, d *Decoder) (_ map[string]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20573,9 +19881,7 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20583,12 +19889,12 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20603,9 +19909,7 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20626,7 +19930,7 @@ func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, d *Decoder) { } func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, d *Decoder) (_ map[string]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20635,9 +19939,7 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20645,12 +19947,12 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeString() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20665,9 +19967,7 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20688,7 +19988,7 @@ func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, d *Decoder) { } func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, d *Decoder) (_ map[float32]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20697,9 +19997,7 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -20707,12 +20005,12 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20732,9 +20030,7 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20755,7 +20051,7 @@ func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, d *Decoder) { } func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, d *Decoder) (_ map[float32]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20764,9 +20060,7 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20774,12 +20068,12 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20794,9 +20088,7 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20817,7 +20109,7 @@ func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, d *Decoder) { } func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, d *Decoder) (_ map[float32]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20826,9 +20118,7 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20836,12 +20126,12 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20856,9 +20146,7 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20879,7 +20167,7 @@ func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, d *Decoder) { } func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, d *Decoder) (_ map[float32]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20888,9 +20176,7 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20898,12 +20184,12 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20918,9 +20204,7 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20941,7 +20225,7 @@ func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, d *Decoder) { } func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, d *Decoder) (_ map[float32]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -20950,9 +20234,7 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -20960,12 +20242,12 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -20980,9 +20262,7 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21003,7 +20283,7 @@ func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, d *Decoder) { } func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, d *Decoder) (_ map[float32]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21012,9 +20292,7 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21022,12 +20300,12 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21042,9 +20320,7 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21065,7 +20341,7 @@ func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, d *Decoder) { } func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, d *Decoder) (_ map[float32]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21074,9 +20350,7 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21084,12 +20358,12 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21104,9 +20378,7 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21127,7 +20399,7 @@ func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, d *Decoder) { } func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, d *Decoder) (_ map[float32]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21136,9 +20408,7 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21146,12 +20416,12 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21166,9 +20436,7 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21189,7 +20457,7 @@ func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, d *Decoder) { } func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, d *Decoder) (_ map[float32]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21198,9 +20466,7 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21208,12 +20474,12 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21228,9 +20494,7 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21251,7 +20515,7 @@ func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, d *Decoder) { } func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, d *Decoder) (_ map[float32]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21260,9 +20524,7 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21270,12 +20532,12 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21290,9 +20552,7 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21313,7 +20573,7 @@ func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, d *Decoder) { } func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, d *Decoder) (_ map[float32]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21322,9 +20582,7 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21332,12 +20590,12 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21352,9 +20610,7 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21375,7 +20631,7 @@ func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, d *Decoder) { } func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, d *Decoder) (_ map[float32]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21384,9 +20640,7 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21394,12 +20648,12 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21414,9 +20668,7 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21437,7 +20689,7 @@ func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, d *Decoder) { } func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, d *Decoder) (_ map[float32]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21446,9 +20698,7 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21456,12 +20706,12 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21476,9 +20726,7 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21499,7 +20747,7 @@ func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, d *Decoder) { } func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, d *Decoder) (_ map[float32]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21508,9 +20756,7 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21518,12 +20764,12 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21538,9 +20784,7 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21561,7 +20805,7 @@ func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, d *Decoder) { } func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, d *Decoder) (_ map[float32]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21570,9 +20814,7 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21580,12 +20822,12 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21600,9 +20842,7 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21623,7 +20863,7 @@ func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, d *Decoder) { } func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, d *Decoder) (_ map[float32]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21632,9 +20872,7 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21642,12 +20880,12 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = float32(dd.DecodeFloat(true)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21662,9 +20900,7 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21685,7 +20921,7 @@ func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, d *Decoder) { } func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, d *Decoder) (_ map[float64]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21694,9 +20930,7 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -21704,12 +20938,12 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21729,9 +20963,7 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21752,7 +20984,7 @@ func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, d *Decoder) { } func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, d *Decoder) (_ map[float64]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21761,9 +20993,7 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21771,12 +21001,12 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21791,9 +21021,7 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21814,7 +21042,7 @@ func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, d *Decoder) { } func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, d *Decoder) (_ map[float64]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21823,9 +21051,7 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21833,12 +21059,12 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21853,9 +21079,7 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21876,7 +21100,7 @@ func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, d *Decoder) { } func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, d *Decoder) (_ map[float64]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21885,9 +21109,7 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21895,12 +21117,12 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21915,9 +21137,7 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21938,7 +21158,7 @@ func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, d *Decoder) { } func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, d *Decoder) (_ map[float64]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -21947,9 +21167,7 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -21957,12 +21175,12 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -21977,9 +21195,7 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22000,7 +21216,7 @@ func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, d *Decoder) { } func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, d *Decoder) (_ map[float64]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22009,9 +21225,7 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22019,12 +21233,12 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22039,9 +21253,7 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22062,7 +21274,7 @@ func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, d *Decoder) { } func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, d *Decoder) (_ map[float64]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22071,9 +21283,7 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22081,12 +21291,12 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22101,9 +21311,7 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22124,7 +21332,7 @@ func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, d *Decoder) { } func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, d *Decoder) (_ map[float64]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22133,9 +21341,7 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22143,12 +21349,12 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22163,9 +21369,7 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22186,7 +21390,7 @@ func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, d *Decoder) { } func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, d *Decoder) (_ map[float64]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22195,9 +21399,7 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22205,12 +21407,12 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22225,9 +21427,7 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22248,7 +21448,7 @@ func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, d *Decoder) { } func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, d *Decoder) (_ map[float64]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22257,9 +21457,7 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22267,12 +21465,12 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22287,9 +21485,7 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22310,7 +21506,7 @@ func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, d *Decoder) { } func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, d *Decoder) (_ map[float64]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22319,9 +21515,7 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22329,12 +21523,12 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22349,9 +21543,7 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22372,7 +21564,7 @@ func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, d *Decoder) { } func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, d *Decoder) (_ map[float64]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22381,9 +21573,7 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22391,12 +21581,12 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22411,9 +21601,7 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22434,7 +21622,7 @@ func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, d *Decoder) { } func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, d *Decoder) (_ map[float64]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22443,9 +21631,7 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22453,12 +21639,12 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22473,9 +21659,7 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22496,7 +21680,7 @@ func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, d *Decoder) { } func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, d *Decoder) (_ map[float64]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22505,9 +21689,7 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22515,12 +21697,12 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22535,9 +21717,7 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22558,7 +21738,7 @@ func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, d *Decoder) { } func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, d *Decoder) (_ map[float64]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22567,9 +21747,7 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22577,12 +21755,12 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22597,9 +21775,7 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22620,7 +21796,7 @@ func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, d *Decoder) { } func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, d *Decoder) (_ map[float64]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22629,9 +21805,7 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22639,12 +21813,12 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeFloat(false) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22659,9 +21833,7 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22682,7 +21854,7 @@ func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, d *Decoder) (_ map[uint]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22691,9 +21863,7 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -22701,12 +21871,12 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22726,9 +21896,7 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22749,7 +21917,7 @@ func (f fastpathT) DecMapUintStringX(vp *map[uint]string, d *Decoder) { } func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, d *Decoder) (_ map[uint]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22758,9 +21926,7 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22768,12 +21934,12 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22788,9 +21954,7 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22811,7 +21975,7 @@ func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, d *Decoder) { } func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, d *Decoder) (_ map[uint]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22820,9 +21984,7 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22830,12 +21992,12 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22850,9 +22012,7 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22873,7 +22033,7 @@ func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, d *Decoder) { } func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, d *Decoder) (_ map[uint]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22882,9 +22042,7 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22892,12 +22050,12 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22912,9 +22070,7 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22935,7 +22091,7 @@ func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, d *Decoder) { } func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, d *Decoder) (_ map[uint]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -22944,9 +22100,7 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22954,12 +22108,12 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -22974,9 +22128,7 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -22997,7 +22149,7 @@ func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, d *Decoder) { } func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, d *Decoder) (_ map[uint]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23006,9 +22158,7 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23016,12 +22166,12 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23036,9 +22186,7 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23059,7 +22207,7 @@ func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, d *Decoder) { } func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, d *Decoder) (_ map[uint]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23068,9 +22216,7 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23078,12 +22224,12 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23098,9 +22244,7 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23121,7 +22265,7 @@ func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, d *Decoder) (_ map[uint]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23130,9 +22274,7 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23140,12 +22282,12 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23160,9 +22302,7 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23183,7 +22323,7 @@ func (f fastpathT) DecMapUintIntX(vp *map[uint]int, d *Decoder) { } func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, d *Decoder) (_ map[uint]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23192,9 +22332,7 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23202,12 +22340,12 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23222,9 +22360,7 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23245,7 +22381,7 @@ func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, d *Decoder) { } func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, d *Decoder) (_ map[uint]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23254,9 +22390,7 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23264,12 +22398,12 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23284,9 +22418,7 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23307,7 +22439,7 @@ func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, d *Decoder) { } func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, d *Decoder) (_ map[uint]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23316,9 +22448,7 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23326,12 +22456,12 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23346,9 +22476,7 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23369,7 +22497,7 @@ func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, d *Decoder) { } func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, d *Decoder) (_ map[uint]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23378,9 +22506,7 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23388,12 +22514,12 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23408,9 +22534,7 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23431,7 +22555,7 @@ func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, d *Decoder) { } func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, d *Decoder) (_ map[uint]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23440,9 +22564,7 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23450,12 +22572,12 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23470,9 +22592,7 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23493,7 +22613,7 @@ func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, d *Decoder) { } func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, d *Decoder) (_ map[uint]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23502,9 +22622,7 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23512,12 +22630,12 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23532,9 +22650,7 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23555,7 +22671,7 @@ func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, d *Decoder) { } func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, d *Decoder) (_ map[uint]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23564,9 +22680,7 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23574,12 +22688,12 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23594,9 +22708,7 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23617,7 +22729,7 @@ func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, d *Decoder) { } func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, d *Decoder) (_ map[uint]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23626,9 +22738,7 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23636,12 +22746,12 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23656,9 +22766,7 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23679,7 +22787,7 @@ func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, d *Decoder) (_ map[uint8]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23688,9 +22796,7 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -23698,12 +22804,12 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23723,9 +22829,7 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23746,7 +22850,7 @@ func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, d *Decoder) { } func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, d *Decoder) (_ map[uint8]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23755,9 +22859,7 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23765,12 +22867,12 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23785,9 +22887,7 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23808,7 +22908,7 @@ func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, d *Decoder) { } func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, d *Decoder) (_ map[uint8]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23817,9 +22917,7 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23827,12 +22925,12 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23847,9 +22945,7 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23870,7 +22966,7 @@ func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, d *Decoder) { } func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, d *Decoder) (_ map[uint8]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23879,9 +22975,7 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23889,12 +22983,12 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23909,9 +23003,7 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23932,7 +23024,7 @@ func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, d *Decoder) { } func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, d *Decoder) (_ map[uint8]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -23941,9 +23033,7 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23951,12 +23041,12 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -23971,9 +23061,7 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -23994,7 +23082,7 @@ func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, d *Decoder) { } func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, d *Decoder) (_ map[uint8]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24003,9 +23091,7 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24013,12 +23099,12 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24033,9 +23119,7 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24056,7 +23140,7 @@ func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, d *Decoder) { } func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, d *Decoder) (_ map[uint8]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24065,9 +23149,7 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24075,12 +23157,12 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24095,9 +23177,7 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24118,7 +23198,7 @@ func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, d *Decoder) (_ map[uint8]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24127,9 +23207,7 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24137,12 +23215,12 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24157,9 +23235,7 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24180,7 +23256,7 @@ func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, d *Decoder) { } func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, d *Decoder) (_ map[uint8]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24189,9 +23265,7 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24199,12 +23273,12 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24219,9 +23293,7 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24242,7 +23314,7 @@ func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, d *Decoder) { } func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, d *Decoder) (_ map[uint8]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24251,9 +23323,7 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24261,12 +23331,12 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24281,9 +23351,7 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24304,7 +23372,7 @@ func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, d *Decoder) { } func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, d *Decoder) (_ map[uint8]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24313,9 +23381,7 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24323,12 +23389,12 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24343,9 +23409,7 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24366,7 +23430,7 @@ func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, d *Decoder) { } func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, d *Decoder) (_ map[uint8]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24375,9 +23439,7 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24385,12 +23447,12 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24405,9 +23467,7 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24428,7 +23488,7 @@ func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, d *Decoder) { } func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, d *Decoder) (_ map[uint8]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24437,9 +23497,7 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24447,12 +23505,12 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24467,9 +23525,7 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24490,7 +23546,7 @@ func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, d *Decoder) { } func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, d *Decoder) (_ map[uint8]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24499,9 +23555,7 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24509,12 +23563,12 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24529,9 +23583,7 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24552,7 +23604,7 @@ func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, d *Decoder) { } func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, d *Decoder) (_ map[uint8]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24561,9 +23613,7 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24571,12 +23621,12 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24591,9 +23641,7 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24614,7 +23662,7 @@ func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, d *Decoder) { } func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, d *Decoder) (_ map[uint8]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24623,9 +23671,7 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24633,12 +23679,12 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint8(dd.DecodeUint(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24653,9 +23699,7 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24676,7 +23720,7 @@ func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, d *Decoder) (_ map[uint16]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24685,9 +23729,7 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -24695,12 +23737,12 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24720,9 +23762,7 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24743,7 +23783,7 @@ func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, d *Decoder) { } func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, d *Decoder) (_ map[uint16]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24752,9 +23792,7 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24762,12 +23800,12 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24782,9 +23820,7 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24805,7 +23841,7 @@ func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, d *Decoder) { } func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, d *Decoder) (_ map[uint16]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24814,9 +23850,7 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24824,12 +23858,12 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24844,9 +23878,7 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24867,7 +23899,7 @@ func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, d *Decoder) { } func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, d *Decoder) (_ map[uint16]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24876,9 +23908,7 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24886,12 +23916,12 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24906,9 +23936,7 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24929,7 +23957,7 @@ func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, d *Decoder) { } func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, d *Decoder) (_ map[uint16]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -24938,9 +23966,7 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24948,12 +23974,12 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -24968,9 +23994,7 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -24991,7 +24015,7 @@ func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, d *Decoder) { } func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, d *Decoder) (_ map[uint16]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25000,9 +24024,7 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25010,12 +24032,12 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25030,9 +24052,7 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25053,7 +24073,7 @@ func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, d *Decoder) { } func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, d *Decoder) (_ map[uint16]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25062,9 +24082,7 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25072,12 +24090,12 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25092,9 +24110,7 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25115,7 +24131,7 @@ func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, d *Decoder) (_ map[uint16]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25124,9 +24140,7 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25134,12 +24148,12 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25154,9 +24168,7 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25177,7 +24189,7 @@ func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, d *Decoder) { } func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, d *Decoder) (_ map[uint16]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25186,9 +24198,7 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25196,12 +24206,12 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25216,9 +24226,7 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25239,7 +24247,7 @@ func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, d *Decoder) { } func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, d *Decoder) (_ map[uint16]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25248,9 +24256,7 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25258,12 +24264,12 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25278,9 +24284,7 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25301,7 +24305,7 @@ func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, d *Decoder) { } func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, d *Decoder) (_ map[uint16]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25310,9 +24314,7 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25320,12 +24322,12 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25340,9 +24342,7 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25363,7 +24363,7 @@ func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, d *Decoder) { } func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, d *Decoder) (_ map[uint16]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25372,9 +24372,7 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25382,12 +24380,12 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25402,9 +24400,7 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25425,7 +24421,7 @@ func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, d *Decoder) { } func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, d *Decoder) (_ map[uint16]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25434,9 +24430,7 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25444,12 +24438,12 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25464,9 +24458,7 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25487,7 +24479,7 @@ func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, d *Decoder) { } func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, d *Decoder) (_ map[uint16]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25496,9 +24488,7 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25506,12 +24496,12 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25526,9 +24516,7 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25549,7 +24537,7 @@ func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, d *Decoder) { } func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, d *Decoder) (_ map[uint16]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25558,9 +24546,7 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25568,12 +24554,12 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25588,9 +24574,7 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25611,7 +24595,7 @@ func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, d *Decoder) { } func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, d *Decoder) (_ map[uint16]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25620,9 +24604,7 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25630,12 +24612,12 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint16(dd.DecodeUint(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25650,9 +24632,7 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25673,7 +24653,7 @@ func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, d *Decoder) (_ map[uint32]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25682,9 +24662,7 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -25692,12 +24670,12 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25717,9 +24695,7 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25740,7 +24716,7 @@ func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, d *Decoder) { } func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, d *Decoder) (_ map[uint32]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25749,9 +24725,7 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25759,12 +24733,12 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25779,9 +24753,7 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25802,7 +24774,7 @@ func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, d *Decoder) { } func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, d *Decoder) (_ map[uint32]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25811,9 +24783,7 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25821,12 +24791,12 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25841,9 +24811,7 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25864,7 +24832,7 @@ func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, d *Decoder) { } func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, d *Decoder) (_ map[uint32]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25873,9 +24841,7 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25883,12 +24849,12 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25903,9 +24869,7 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25926,7 +24890,7 @@ func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, d *Decoder) { } func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, d *Decoder) (_ map[uint32]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25935,9 +24899,7 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25945,12 +24907,12 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -25965,9 +24927,7 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -25988,7 +24948,7 @@ func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, d *Decoder) { } func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, d *Decoder) (_ map[uint32]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -25997,9 +24957,7 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26007,12 +24965,12 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26027,9 +24985,7 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26050,7 +25006,7 @@ func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, d *Decoder) { } func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, d *Decoder) (_ map[uint32]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26059,9 +25015,7 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26069,12 +25023,12 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26089,9 +25043,7 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26112,7 +25064,7 @@ func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, d *Decoder) (_ map[uint32]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26121,9 +25073,7 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26131,12 +25081,12 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26151,9 +25101,7 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26174,7 +25122,7 @@ func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, d *Decoder) { } func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, d *Decoder) (_ map[uint32]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26183,9 +25131,7 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26193,12 +25139,12 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26213,9 +25159,7 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26236,7 +25180,7 @@ func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, d *Decoder) { } func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, d *Decoder) (_ map[uint32]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26245,9 +25189,7 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26255,12 +25197,12 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26275,9 +25217,7 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26298,7 +25238,7 @@ func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, d *Decoder) { } func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, d *Decoder) (_ map[uint32]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26307,9 +25247,7 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26317,12 +25255,12 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26337,9 +25275,7 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26360,7 +25296,7 @@ func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, d *Decoder) { } func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, d *Decoder) (_ map[uint32]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26369,9 +25305,7 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26379,12 +25313,12 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26399,9 +25333,7 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26422,7 +25354,7 @@ func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, d *Decoder) { } func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, d *Decoder) (_ map[uint32]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26431,9 +25363,7 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26441,12 +25371,12 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26461,9 +25391,7 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26484,7 +25412,7 @@ func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, d *Decoder) { } func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, d *Decoder) (_ map[uint32]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26493,9 +25421,7 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26503,12 +25429,12 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26523,9 +25449,7 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26546,7 +25470,7 @@ func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, d *Decoder) { } func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, d *Decoder) (_ map[uint32]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26555,9 +25479,7 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26565,12 +25487,12 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26585,9 +25507,7 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26608,7 +25528,7 @@ func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, d *Decoder) { } func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, d *Decoder) (_ map[uint32]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26617,9 +25537,7 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26627,12 +25545,12 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uint32(dd.DecodeUint(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26647,9 +25565,7 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26670,7 +25586,7 @@ func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, d *Decoder) (_ map[uint64]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26679,9 +25595,7 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -26689,12 +25603,12 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26714,9 +25628,7 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26737,7 +25649,7 @@ func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, d *Decoder) { } func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, d *Decoder) (_ map[uint64]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26746,9 +25658,7 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26756,12 +25666,12 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26776,9 +25686,7 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26799,7 +25707,7 @@ func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, d *Decoder) { } func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, d *Decoder) (_ map[uint64]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26808,9 +25716,7 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26818,12 +25724,12 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26838,9 +25744,7 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26861,7 +25765,7 @@ func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, d *Decoder) { } func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, d *Decoder) (_ map[uint64]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26870,9 +25774,7 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26880,12 +25782,12 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26900,9 +25802,7 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26923,7 +25823,7 @@ func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, d *Decoder) { } func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, d *Decoder) (_ map[uint64]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26932,9 +25832,7 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26942,12 +25840,12 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -26962,9 +25860,7 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -26985,7 +25881,7 @@ func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, d *Decoder) { } func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, d *Decoder) (_ map[uint64]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -26994,9 +25890,7 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27004,12 +25898,12 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27024,9 +25918,7 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27047,7 +25939,7 @@ func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, d *Decoder) { } func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, d *Decoder) (_ map[uint64]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27056,9 +25948,7 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27066,12 +25956,12 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27086,9 +25976,7 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27109,7 +25997,7 @@ func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, d *Decoder) (_ map[uint64]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27118,9 +26006,7 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27128,12 +26014,12 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27148,9 +26034,7 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27171,7 +26055,7 @@ func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, d *Decoder) { } func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, d *Decoder) (_ map[uint64]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27180,9 +26064,7 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27190,12 +26072,12 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27210,9 +26092,7 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27233,7 +26113,7 @@ func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, d *Decoder) { } func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, d *Decoder) (_ map[uint64]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27242,9 +26122,7 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27252,12 +26130,12 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27272,9 +26150,7 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27295,7 +26171,7 @@ func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, d *Decoder) { } func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, d *Decoder) (_ map[uint64]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27304,9 +26180,7 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27314,12 +26188,12 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27334,9 +26208,7 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27357,7 +26229,7 @@ func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, d *Decoder) { } func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, d *Decoder) (_ map[uint64]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27366,9 +26238,7 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27376,12 +26246,12 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27396,9 +26266,7 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27419,7 +26287,7 @@ func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, d *Decoder) { } func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, d *Decoder) (_ map[uint64]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27428,9 +26296,7 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27438,12 +26304,12 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27458,9 +26324,7 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27481,7 +26345,7 @@ func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, d *Decoder) { } func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, d *Decoder) (_ map[uint64]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27490,9 +26354,7 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27500,12 +26362,12 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27520,9 +26382,7 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27543,7 +26403,7 @@ func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, d *Decoder) { } func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, d *Decoder) (_ map[uint64]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27552,9 +26412,7 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27562,12 +26420,12 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27582,9 +26440,7 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27605,7 +26461,7 @@ func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, d *Decoder) { } func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, d *Decoder) (_ map[uint64]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27614,9 +26470,7 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27624,12 +26478,12 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeUint(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27644,9 +26498,7 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27667,7 +26519,7 @@ func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, d *Decoder) { } func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, d *Decoder) (_ map[uintptr]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27676,9 +26528,7 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -27686,12 +26536,12 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27711,9 +26561,7 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27734,7 +26582,7 @@ func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, d *Decoder) { } func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, d *Decoder) (_ map[uintptr]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27743,9 +26591,7 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27753,12 +26599,12 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27773,9 +26619,7 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27796,7 +26640,7 @@ func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, d *Decoder) { } func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, d *Decoder) (_ map[uintptr]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27805,9 +26649,7 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27815,12 +26657,12 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27835,9 +26677,7 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27858,7 +26698,7 @@ func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, d *Decoder) { } func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, d *Decoder) (_ map[uintptr]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27867,9 +26707,7 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27877,12 +26715,12 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27897,9 +26735,7 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27920,7 +26756,7 @@ func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, d *Decoder) { } func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, d *Decoder) (_ map[uintptr]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27929,9 +26765,7 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27939,12 +26773,12 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -27959,9 +26793,7 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -27982,7 +26814,7 @@ func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, d *Decoder) { } func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, d *Decoder) (_ map[uintptr]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -27991,9 +26823,7 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28001,12 +26831,12 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28021,9 +26851,7 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28044,7 +26872,7 @@ func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, d *Decoder) { } func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, d *Decoder) (_ map[uintptr]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28053,9 +26881,7 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28063,12 +26889,12 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28083,9 +26909,7 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28106,7 +26930,7 @@ func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, d *Decoder) { } func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, d *Decoder) (_ map[uintptr]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28115,9 +26939,7 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28125,12 +26947,12 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28145,9 +26967,7 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28168,7 +26988,7 @@ func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, d *Decoder) { } func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, d *Decoder) (_ map[uintptr]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28177,9 +26997,7 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28187,12 +27005,12 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28207,9 +27025,7 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28230,7 +27046,7 @@ func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, d *Decoder) { } func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, d *Decoder) (_ map[uintptr]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28239,9 +27055,7 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28249,12 +27063,12 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28269,9 +27083,7 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28292,7 +27104,7 @@ func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, d *Decoder) { } func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, d *Decoder) (_ map[uintptr]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28301,9 +27113,7 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28311,12 +27121,12 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28331,9 +27141,7 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28354,7 +27162,7 @@ func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, d *Decoder) { } func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, d *Decoder) (_ map[uintptr]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28363,9 +27171,7 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28373,12 +27179,12 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28393,9 +27199,7 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28416,7 +27220,7 @@ func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, d *Decoder) { } func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, d *Decoder) (_ map[uintptr]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28425,9 +27229,7 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28435,12 +27237,12 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28455,9 +27257,7 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28478,7 +27278,7 @@ func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, d *Decoder) { } func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, d *Decoder) (_ map[uintptr]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28487,9 +27287,7 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28497,12 +27295,12 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28517,9 +27315,7 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28540,7 +27336,7 @@ func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, d *Decoder) { } func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, d *Decoder) (_ map[uintptr]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28549,9 +27345,7 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28559,12 +27353,12 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28579,9 +27373,7 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28602,7 +27394,7 @@ func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, d *Decoder) { } func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, d *Decoder) (_ map[uintptr]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28611,9 +27403,7 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28621,12 +27411,12 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = uintptr(dd.DecodeUint(uintBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28641,9 +27431,7 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28664,7 +27452,7 @@ func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, d *Decoder) { } func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, d *Decoder) (_ map[int]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28673,9 +27461,7 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -28683,12 +27469,12 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28708,9 +27494,7 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28731,7 +27515,7 @@ func (f fastpathT) DecMapIntStringX(vp *map[int]string, d *Decoder) { } func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, d *Decoder) (_ map[int]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28740,9 +27524,7 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28750,12 +27532,12 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28770,9 +27552,7 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28793,7 +27573,7 @@ func (f fastpathT) DecMapIntUintX(vp *map[int]uint, d *Decoder) { } func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, d *Decoder) (_ map[int]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28802,9 +27582,7 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28812,12 +27590,12 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28832,9 +27610,7 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28855,7 +27631,7 @@ func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, d *Decoder) { } func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, d *Decoder) (_ map[int]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28864,9 +27640,7 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28874,12 +27648,12 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28894,9 +27668,7 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28917,7 +27689,7 @@ func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, d *Decoder) { } func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, d *Decoder) (_ map[int]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28926,9 +27698,7 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28936,12 +27706,12 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -28956,9 +27726,7 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28979,7 +27747,7 @@ func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, d *Decoder) { } func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, d *Decoder) (_ map[int]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -28988,9 +27756,7 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -28998,12 +27764,12 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29018,9 +27784,7 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29041,7 +27805,7 @@ func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, d *Decoder) { } func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, d *Decoder) (_ map[int]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29050,9 +27814,7 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29060,12 +27822,12 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29080,9 +27842,7 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29103,7 +27863,7 @@ func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, d *Decoder) { } func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, d *Decoder) (_ map[int]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29112,9 +27872,7 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29122,12 +27880,12 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29142,9 +27900,7 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29165,7 +27921,7 @@ func (f fastpathT) DecMapIntIntX(vp *map[int]int, d *Decoder) { } func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, d *Decoder) (_ map[int]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29174,9 +27930,7 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29184,12 +27938,12 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29204,9 +27958,7 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29227,7 +27979,7 @@ func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, d *Decoder) { } func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, d *Decoder) (_ map[int]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29236,9 +27988,7 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29246,12 +27996,12 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29266,9 +28016,7 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29289,7 +28037,7 @@ func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, d *Decoder) { } func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, d *Decoder) (_ map[int]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29298,9 +28046,7 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29308,12 +28054,12 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29328,9 +28074,7 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29351,7 +28095,7 @@ func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, d *Decoder) { } func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, d *Decoder) (_ map[int]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29360,9 +28104,7 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29370,12 +28112,12 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29390,9 +28132,7 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29413,7 +28153,7 @@ func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, d *Decoder) { } func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, d *Decoder) (_ map[int]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29422,9 +28162,7 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29432,12 +28170,12 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29452,9 +28190,7 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29475,7 +28211,7 @@ func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, d *Decoder) { } func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, d *Decoder) (_ map[int]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29484,9 +28220,7 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29494,12 +28228,12 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29514,9 +28248,7 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29537,7 +28269,7 @@ func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, d *Decoder) { } func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, d *Decoder) (_ map[int]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29546,9 +28278,7 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29556,12 +28286,12 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29576,9 +28306,7 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29599,7 +28327,7 @@ func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, d *Decoder) { } func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, d *Decoder) (_ map[int]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29608,9 +28336,7 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29618,12 +28344,12 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int(dd.DecodeInt(intBitsize)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29638,9 +28364,7 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29661,7 +28385,7 @@ func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, d *Decoder) { } func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, d *Decoder) (_ map[int8]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29670,9 +28394,7 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -29680,12 +28402,12 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29705,9 +28427,7 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29728,7 +28448,7 @@ func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, d *Decoder) { } func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, d *Decoder) (_ map[int8]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29737,9 +28457,7 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29747,12 +28465,12 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29767,9 +28485,7 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29790,7 +28506,7 @@ func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, d *Decoder) { } func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, d *Decoder) (_ map[int8]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29799,9 +28515,7 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29809,12 +28523,12 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29829,9 +28543,7 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29852,7 +28564,7 @@ func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, d *Decoder) { } func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, d *Decoder) (_ map[int8]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29861,9 +28573,7 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29871,12 +28581,12 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29891,9 +28601,7 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29914,7 +28622,7 @@ func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, d *Decoder) { } func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, d *Decoder) (_ map[int8]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29923,9 +28631,7 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29933,12 +28639,12 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -29953,9 +28659,7 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29976,7 +28680,7 @@ func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, d *Decoder) { } func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, d *Decoder) (_ map[int8]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -29985,9 +28689,7 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -29995,12 +28697,12 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30015,9 +28717,7 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30038,7 +28738,7 @@ func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, d *Decoder) { } func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, d *Decoder) (_ map[int8]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30047,9 +28747,7 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30057,12 +28755,12 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30077,9 +28775,7 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30100,7 +28796,7 @@ func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, d *Decoder) { } func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, d *Decoder) (_ map[int8]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30109,9 +28805,7 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30119,12 +28813,12 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30139,9 +28833,7 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30162,7 +28854,7 @@ func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, d *Decoder) { } func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, d *Decoder) (_ map[int8]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30171,9 +28863,7 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30181,12 +28871,12 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30201,9 +28891,7 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30224,7 +28912,7 @@ func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, d *Decoder) { } func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, d *Decoder) (_ map[int8]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30233,9 +28921,7 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30243,12 +28929,12 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30263,9 +28949,7 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30286,7 +28970,7 @@ func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, d *Decoder) { } func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, d *Decoder) (_ map[int8]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30295,9 +28979,7 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30305,12 +28987,12 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30325,9 +29007,7 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30348,7 +29028,7 @@ func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, d *Decoder) { } func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, d *Decoder) (_ map[int8]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30357,9 +29037,7 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30367,12 +29045,12 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30387,9 +29065,7 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30410,7 +29086,7 @@ func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, d *Decoder) { } func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, d *Decoder) (_ map[int8]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30419,9 +29095,7 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30429,12 +29103,12 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30449,9 +29123,7 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30472,7 +29144,7 @@ func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, d *Decoder) { } func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, d *Decoder) (_ map[int8]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30481,9 +29153,7 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30491,12 +29161,12 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30511,9 +29181,7 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30534,7 +29202,7 @@ func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, d *Decoder) { } func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, d *Decoder) (_ map[int8]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30543,9 +29211,7 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30553,12 +29219,12 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30573,9 +29239,7 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30596,7 +29260,7 @@ func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, d *Decoder) { } func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, d *Decoder) (_ map[int8]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30605,9 +29269,7 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30615,12 +29277,12 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int8(dd.DecodeInt(8)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30635,9 +29297,7 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30658,7 +29318,7 @@ func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, d *Decoder) { } func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, d *Decoder) (_ map[int16]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30667,9 +29327,7 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -30677,12 +29335,12 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30702,9 +29360,7 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30725,7 +29381,7 @@ func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, d *Decoder) { } func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, d *Decoder) (_ map[int16]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30734,9 +29390,7 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30744,12 +29398,12 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30764,9 +29418,7 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30787,7 +29439,7 @@ func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, d *Decoder) { } func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, d *Decoder) (_ map[int16]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30796,9 +29448,7 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30806,12 +29456,12 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30826,9 +29476,7 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30849,7 +29497,7 @@ func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, d *Decoder) { } func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, d *Decoder) (_ map[int16]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30858,9 +29506,7 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30868,12 +29514,12 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30888,9 +29534,7 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30911,7 +29555,7 @@ func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, d *Decoder) { } func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, d *Decoder) (_ map[int16]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30920,9 +29564,7 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30930,12 +29572,12 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -30950,9 +29592,7 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30973,7 +29613,7 @@ func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, d *Decoder) { } func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, d *Decoder) (_ map[int16]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -30982,9 +29622,7 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -30992,12 +29630,12 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31012,9 +29650,7 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31035,7 +29671,7 @@ func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, d *Decoder) { } func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, d *Decoder) (_ map[int16]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31044,9 +29680,7 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31054,12 +29688,12 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31074,9 +29708,7 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31097,7 +29729,7 @@ func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, d *Decoder) { } func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, d *Decoder) (_ map[int16]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31106,9 +29738,7 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31116,12 +29746,12 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31136,9 +29766,7 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31159,7 +29787,7 @@ func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, d *Decoder) { } func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, d *Decoder) (_ map[int16]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31168,9 +29796,7 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31178,12 +29804,12 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31198,9 +29824,7 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31221,7 +29845,7 @@ func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, d *Decoder) { } func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, d *Decoder) (_ map[int16]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31230,9 +29854,7 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31240,12 +29862,12 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31260,9 +29882,7 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31283,7 +29903,7 @@ func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, d *Decoder) { } func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, d *Decoder) (_ map[int16]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31292,9 +29912,7 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31302,12 +29920,12 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31322,9 +29940,7 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31345,7 +29961,7 @@ func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, d *Decoder) { } func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, d *Decoder) (_ map[int16]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31354,9 +29970,7 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31364,12 +29978,12 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31384,9 +29998,7 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31407,7 +30019,7 @@ func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, d *Decoder) { } func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, d *Decoder) (_ map[int16]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31416,9 +30028,7 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31426,12 +30036,12 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31446,9 +30056,7 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31469,7 +30077,7 @@ func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, d *Decoder) { } func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, d *Decoder) (_ map[int16]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31478,9 +30086,7 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31488,12 +30094,12 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31508,9 +30114,7 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31531,7 +30135,7 @@ func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, d *Decoder) { } func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, d *Decoder) (_ map[int16]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31540,9 +30144,7 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31550,12 +30152,12 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31570,9 +30172,7 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31593,7 +30193,7 @@ func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, d *Decoder) { } func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, d *Decoder) (_ map[int16]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31602,9 +30202,7 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31612,12 +30210,12 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int16(dd.DecodeInt(16)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31632,9 +30230,7 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31655,7 +30251,7 @@ func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, d *Decoder) { } func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, d *Decoder) (_ map[int32]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31664,9 +30260,7 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -31674,12 +30268,12 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31699,9 +30293,7 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31722,7 +30314,7 @@ func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, d *Decoder) { } func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, d *Decoder) (_ map[int32]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31731,9 +30323,7 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31741,12 +30331,12 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31761,9 +30351,7 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31784,7 +30372,7 @@ func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, d *Decoder) { } func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, d *Decoder) (_ map[int32]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31793,9 +30381,7 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31803,12 +30389,12 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31823,9 +30409,7 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31846,7 +30430,7 @@ func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, d *Decoder) { } func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, d *Decoder) (_ map[int32]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31855,9 +30439,7 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31865,12 +30447,12 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31885,9 +30467,7 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31908,7 +30488,7 @@ func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, d *Decoder) { } func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, d *Decoder) (_ map[int32]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31917,9 +30497,7 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31927,12 +30505,12 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -31947,9 +30525,7 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31970,7 +30546,7 @@ func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, d *Decoder) { } func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, d *Decoder) (_ map[int32]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -31979,9 +30555,7 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -31989,12 +30563,12 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32009,9 +30583,7 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32032,7 +30604,7 @@ func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, d *Decoder) { } func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, d *Decoder) (_ map[int32]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32041,9 +30613,7 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32051,12 +30621,12 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32071,9 +30641,7 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32094,7 +30662,7 @@ func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, d *Decoder) { } func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, d *Decoder) (_ map[int32]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32103,9 +30671,7 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32113,12 +30679,12 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32133,9 +30699,7 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32156,7 +30720,7 @@ func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, d *Decoder) { } func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, d *Decoder) (_ map[int32]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32165,9 +30729,7 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32175,12 +30737,12 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32195,9 +30757,7 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32218,7 +30778,7 @@ func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, d *Decoder) { } func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, d *Decoder) (_ map[int32]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32227,9 +30787,7 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32237,12 +30795,12 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32257,9 +30815,7 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32280,7 +30836,7 @@ func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, d *Decoder) { } func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, d *Decoder) (_ map[int32]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32289,9 +30845,7 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32299,12 +30853,12 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32319,9 +30873,7 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32342,7 +30894,7 @@ func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, d *Decoder) { } func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, d *Decoder) (_ map[int32]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32351,9 +30903,7 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32361,12 +30911,12 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32381,9 +30931,7 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32404,7 +30952,7 @@ func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, d *Decoder) { } func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, d *Decoder) (_ map[int32]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32413,9 +30961,7 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32423,12 +30969,12 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32443,9 +30989,7 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32466,7 +31010,7 @@ func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, d *Decoder) { } func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, d *Decoder) (_ map[int32]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32475,9 +31019,7 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32485,12 +31027,12 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32505,9 +31047,7 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32528,7 +31068,7 @@ func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, d *Decoder) { } func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, d *Decoder) (_ map[int32]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32537,9 +31077,7 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32547,12 +31085,12 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32567,9 +31105,7 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32590,7 +31126,7 @@ func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, d *Decoder) { } func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, d *Decoder) (_ map[int32]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32599,9 +31135,7 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32609,12 +31143,12 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = int32(dd.DecodeInt(32)) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32629,9 +31163,7 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32652,7 +31184,7 @@ func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, d *Decoder) { } func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, d *Decoder) (_ map[int64]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32661,9 +31193,7 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -32671,12 +31201,12 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32696,9 +31226,7 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32719,7 +31247,7 @@ func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, d *Decoder) { } func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, d *Decoder) (_ map[int64]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32728,9 +31256,7 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32738,12 +31264,12 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32758,9 +31284,7 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32781,7 +31305,7 @@ func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, d *Decoder) { } func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, d *Decoder) (_ map[int64]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32790,9 +31314,7 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32800,12 +31322,12 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32820,9 +31342,7 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32843,7 +31363,7 @@ func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, d *Decoder) { } func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, d *Decoder) (_ map[int64]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32852,9 +31372,7 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32862,12 +31380,12 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32882,9 +31400,7 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32905,7 +31421,7 @@ func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, d *Decoder) { } func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, d *Decoder) (_ map[int64]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32914,9 +31430,7 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32924,12 +31438,12 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -32944,9 +31458,7 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32967,7 +31479,7 @@ func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, d *Decoder) { } func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, d *Decoder) (_ map[int64]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -32976,9 +31488,7 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -32986,12 +31496,12 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33006,9 +31516,7 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33029,7 +31537,7 @@ func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, d *Decoder) { } func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, d *Decoder) (_ map[int64]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33038,9 +31546,7 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33048,12 +31554,12 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33068,9 +31574,7 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33091,7 +31595,7 @@ func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, d *Decoder) { } func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, d *Decoder) (_ map[int64]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33100,9 +31604,7 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33110,12 +31612,12 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33130,9 +31632,7 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33153,7 +31653,7 @@ func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, d *Decoder) { } func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, d *Decoder) (_ map[int64]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33162,9 +31662,7 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33172,12 +31670,12 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33192,9 +31690,7 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33215,7 +31711,7 @@ func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, d *Decoder) { } func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, d *Decoder) (_ map[int64]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33224,9 +31720,7 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33234,12 +31728,12 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33254,9 +31748,7 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33277,7 +31769,7 @@ func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, d *Decoder) { } func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, d *Decoder) (_ map[int64]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33286,9 +31778,7 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33296,12 +31786,12 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33316,9 +31806,7 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33339,7 +31827,7 @@ func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, d *Decoder) { } func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, d *Decoder) (_ map[int64]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33348,9 +31836,7 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33358,12 +31844,12 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33378,9 +31864,7 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33401,7 +31885,7 @@ func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, d *Decoder) { } func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, d *Decoder) (_ map[int64]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33410,9 +31894,7 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33420,12 +31902,12 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33440,9 +31922,7 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33463,7 +31943,7 @@ func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, d *Decoder) { } func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, d *Decoder) (_ map[int64]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33472,9 +31952,7 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33482,12 +31960,12 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33502,9 +31980,7 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33525,7 +32001,7 @@ func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, d *Decoder) { } func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, d *Decoder) (_ map[int64]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33534,9 +32010,7 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33544,12 +32018,12 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33564,9 +32038,7 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33587,7 +32059,7 @@ func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, d *Decoder) { } func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, d *Decoder) (_ map[int64]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33596,9 +32068,7 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33606,12 +32076,12 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeInt(64) - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33626,9 +32096,7 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33649,7 +32117,7 @@ func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, d *Decoder) { } func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, d *Decoder) (_ map[bool]interface{}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33658,9 +32126,7 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } mapGet := !d.h.MapValueReset && !d.h.InterfaceReset @@ -33668,12 +32134,12 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, var mv interface{} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33693,9 +32159,7 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33716,7 +32180,7 @@ func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, d *Decoder) { } func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, d *Decoder) (_ map[bool]string, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33725,9 +32189,7 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33735,12 +32197,12 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, var mv string hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33755,9 +32217,7 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33778,7 +32238,7 @@ func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, d *Decoder) { } func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, d *Decoder) (_ map[bool]uint, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33787,9 +32247,7 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33797,12 +32255,12 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, var mv uint hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33817,9 +32275,7 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33840,7 +32296,7 @@ func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, d *Decoder) { } func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, d *Decoder) (_ map[bool]uint8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33849,9 +32305,7 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33859,12 +32313,12 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, var mv uint8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33879,9 +32333,7 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33902,7 +32354,7 @@ func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, d *Decoder) { } func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, d *Decoder) (_ map[bool]uint16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33911,9 +32363,7 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33921,12 +32371,12 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, var mv uint16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -33941,9 +32391,7 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33964,7 +32412,7 @@ func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, d *Decoder) { } func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, d *Decoder) (_ map[bool]uint32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -33973,9 +32421,7 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -33983,12 +32429,12 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, var mv uint32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34003,9 +32449,7 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34026,7 +32470,7 @@ func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, d *Decoder) { } func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, d *Decoder) (_ map[bool]uint64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34035,9 +32479,7 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34045,12 +32487,12 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, var mv uint64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34065,9 +32507,7 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34088,7 +32528,7 @@ func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, d *Decoder) { } func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, d *Decoder) (_ map[bool]uintptr, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34097,9 +32537,7 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34107,12 +32545,12 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, var mv uintptr hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34127,9 +32565,7 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34150,7 +32586,7 @@ func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, d *Decoder) { } func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, d *Decoder) (_ map[bool]int, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34159,9 +32595,7 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34169,12 +32603,12 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, var mv int hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34189,9 +32623,7 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34212,7 +32644,7 @@ func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, d *Decoder) { } func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, d *Decoder) (_ map[bool]int8, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34221,9 +32653,7 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34231,12 +32661,12 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, var mv int8 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34251,9 +32681,7 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34274,7 +32702,7 @@ func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, d *Decoder) { } func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, d *Decoder) (_ map[bool]int16, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34283,9 +32711,7 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34293,12 +32719,12 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, var mv int16 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34313,9 +32739,7 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34336,7 +32760,7 @@ func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, d *Decoder) { } func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, d *Decoder) (_ map[bool]int32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34345,9 +32769,7 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34355,12 +32777,12 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, var mv int32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34375,9 +32797,7 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34398,7 +32818,7 @@ func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, d *Decoder) { } func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, d *Decoder) (_ map[bool]int64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34407,9 +32827,7 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34417,12 +32835,12 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, var mv int64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34437,9 +32855,7 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34460,7 +32876,7 @@ func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, d *Decoder) { } func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, d *Decoder) (_ map[bool]float32, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34469,9 +32885,7 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34479,12 +32893,12 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, var mv float32 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34499,9 +32913,7 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34522,7 +32934,7 @@ func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, d *Decoder) { } func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, d *Decoder) (_ map[bool]float64, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34531,9 +32943,7 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34541,12 +32951,12 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, var mv float64 hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34561,9 +32971,7 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34584,7 +32992,7 @@ func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, d *Decoder) { } func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, d *Decoder) (_ map[bool]bool, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -34593,9 +33001,7 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, changed = true } if containerLen == 0 { - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } @@ -34603,12 +33009,12 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, var mv bool hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { - cr.sendContainerState(containerMapKey) + if esep { + dd.ReadMapElemKey() } mk = dd.DecodeBool() - if cr != nil { - cr.sendContainerState(containerMapValue) + if esep { + dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { @@ -34623,8 +33029,6 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, canChange bool, v[mk] = mv } } - if cr != nil { - cr.sendContainerState(containerMapEnd) - } + dd.ReadMapEnd() return v, changed } diff --git a/codec/fast-path.go.tmpl b/codec/fast-path.go.tmpl index 388f0541..eebc31b3 100644 --- a/codec/fast-path.go.tmpl +++ b/codec/fast-path.go.tmpl @@ -165,33 +165,33 @@ func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv r } } func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeArrayStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteArrayStart(len(v)) for _, v2 := range v { - if cr != nil { cr.sendContainerState(containerArrayElem) } + if esep { ee.WriteArrayElem() } {{ encmd .Elem "v2"}} } - if cr != nil { cr.sendContainerState(containerArrayEnd) }{{/* ee.EncodeEnd() */}} + ee.WriteArrayEnd() } func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, e *Encoder) { - ee, cr := e.e, e.cr + ee, esep := e.e, e.hh.hasElemSeparators() if len(v)%2 == 1 { e.errorf("mapBySlice requires even slice length, but got %v", len(v)) return } - ee.EncodeMapStart(len(v) / 2) + ee.WriteMapStart(len(v) / 2) for j, v2 := range v { - if cr != nil { + if esep { if j%2 == 0 { - cr.sendContainerState(containerMapKey) + ee.WriteMapElemKey() } else { - cr.sendContainerState(containerMapValue) + ee.WriteMapElemValue() } } {{ encmd .Elem "v2"}} } - if cr != nil { cr.sendContainerState(containerMapEnd) } + ee.WriteMapEnd() } {{end}}{{end}}{{end}} @@ -202,8 +202,8 @@ func (e *Encoder) {{ .MethodNamePfx "fastpathEnc" false }}R(f *codecFnInfo, rv r fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), e) } func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, e *Encoder) { - ee, cr := e.e, e.cr - ee.EncodeMapStart(len(v)) + ee, esep := e.e, e.hh.hasElemSeparators() + ee.WriteMapStart(len(v)) {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 {{end}}if e.h.Canonical { {{if eq .MapKey "interface{}"}}{{/* out of band @@ -222,9 +222,9 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Ele } sort.Sort(bytesISlice(v2)) for j := range v2 { - if cr != nil { cr.sendContainerState(containerMapKey) } + if esep { ee.WriteMapElemKey() } e.asis(v2[j].v) - if cr != nil { cr.sendContainerState(containerMapValue) } + if esep { ee.WriteMapElemValue() } e.encode(v[v2[j].i]) } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) var i int @@ -234,28 +234,28 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Ele } sort.Sort({{ sorttype .MapKey false}}(v2)) for _, k2 := range v2 { - if cr != nil { cr.sendContainerState(containerMapKey) } + if esep { ee.WriteMapElemKey() } {{if eq .MapKey "string"}}if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) }{{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} - if cr != nil { cr.sendContainerState(containerMapValue) } + if esep { ee.WriteMapElemValue() } {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} } {{end}} } else { for k2, v2 := range v { - if cr != nil { cr.sendContainerState(containerMapKey) } + if esep { ee.WriteMapElemKey() } {{if eq .MapKey "string"}}if asSymbols { ee.EncodeSymbol(k2) } else { ee.EncodeString(c_UTF8, k2) }{{else}}{{ encmd .MapKey "k2"}}{{end}} - if cr != nil { cr.sendContainerState(containerMapValue) } + if esep { ee.WriteMapElemValue() } {{ encmd .Elem "v2"}} } } - if cr != nil { cr.sendContainerState(containerMapEnd) }{{/* ee.EncodeEnd() */}} + ee.WriteMapEnd() } {{end}}{{end}}{{end}} @@ -421,7 +421,7 @@ func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .E } func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, canChange bool, d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { - dd, cr := d.d, d.cr + dd, esep := d.d, d.hh.hasElemSeparators() {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} containerLen := dd.ReadMapStart() if canChange && v == nil { @@ -430,7 +430,7 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele changed = true } if containerLen == 0 { - if cr != nil { cr.sendContainerState(containerMapEnd) } + dd.ReadMapEnd() return v, changed } {{ if eq .Elem "interface{}" }}mapGet := !d.h.MapValueReset && !d.h.InterfaceReset{{end}} @@ -438,13 +438,13 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele var mv {{ .Elem }} hasLen := containerLen > 0 for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ { - if cr != nil { cr.sendContainerState(containerMapKey) } + if esep { dd.ReadMapElemKey() } {{ if eq .MapKey "interface{}" }}mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { 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 esep { dd.ReadMapElemValue() } if dd.TryDecodeAsNil() { if d.h.DeleteOnNilMapValue { delete(v, mk) } else { v[mk] = {{ zerocmd .Elem }} } continue @@ -455,7 +455,7 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele v[mk] = mv } } - if cr != nil { cr.sendContainerState(containerMapEnd) } + dd.ReadMapEnd() return v, changed } diff --git a/codec/gen-dec-map.go.tmpl b/codec/gen-dec-map.go.tmpl index ad1236ef..8323b549 100644 --- a/codec/gen-dec-map.go.tmpl +++ b/codec/gen-dec-map.go.tmpl @@ -17,7 +17,7 @@ if {{var "bh"}}.MapValueReset { if {{var "l"}} != 0 { {{var "hl"}} := {{var "l"}} > 0 for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { - z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + r.ReadMapElemKey() {{/* z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) */}} {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} {{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) @@ -29,7 +29,7 @@ if {{var "l"}} != 0 { {{var "ms"}} = false } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} - z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + r.ReadMapElemValue() {{/* z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) */}} {{var "mdn"}} = false {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y }} if {{var "mdn"}} { @@ -39,4 +39,4 @@ if {{var "l"}} != 0 { } } } // else len==0: TODO: Should we clear map entries? -z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) +r.ReadMapEnd() {{/* z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) */}} diff --git a/codec/gen-helper.generated.go b/codec/gen-helper.generated.go index ae55f631..891a771c 100644 --- a/codec/gen-helper.generated.go +++ b/codec/gen-helper.generated.go @@ -42,6 +42,11 @@ func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { return genHelperDecoder{d: d}, d.d } +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func BasicHandleDoNotUse(h Handle) *BasicHandle { + return h.getBasicHandle() +} + // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperEncoder struct { e *Encoder @@ -126,13 +131,6 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) { return false } -// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperEncoder) EncSendContainerState(c containerState) { - if f.e.cr != nil { - f.e.cr.sendContainerState(c) - } -} - // ---------------- DECODER FOLLOWS ----------------- // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* @@ -250,10 +248,3 @@ func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } - -// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* -func (f genHelperDecoder) DecSendContainerState(c containerState) { - if f.d.cr != nil { - f.d.cr.sendContainerState(c) - } -} diff --git a/codec/gen-helper.go.tmpl b/codec/gen-helper.go.tmpl index d7d4967c..dfa1def2 100644 --- a/codec/gen-helper.go.tmpl +++ b/codec/gen-helper.go.tmpl @@ -42,6 +42,11 @@ func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { return genHelperDecoder{d:d}, d.d } +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func BasicHandleDoNotUse(h Handle) *BasicHandle { + return h.getBasicHandle() +} + // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* type genHelperEncoder struct { e *Encoder @@ -116,12 +121,14 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) { } return false } +{{/* // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperEncoder) EncSendContainerState(c containerState) { if f.e.cr != nil { f.e.cr.sendContainerState(c) } } +*/}} // ---------------- DECODER FOLLOWS ----------------- @@ -223,12 +230,14 @@ func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) { func (f genHelperDecoder) StringView(v []byte) string { return stringView(v) } +{{/* // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecSendContainerState(c containerState) { if f.d.cr != nil { f.d.cr.sendContainerState(c) } } +*/}} {{/* diff --git a/codec/gen.generated.go b/codec/gen.generated.go index 7e2b2bdc..b50a6024 100644 --- a/codec/gen.generated.go +++ b/codec/gen.generated.go @@ -25,7 +25,7 @@ if {{var "bh"}}.MapValueReset { if {{var "l"}} != 0 { {{var "hl"}} := {{var "l"}} > 0 for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ { - z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + r.ReadMapElemKey() {{/* z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) */}} {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} {{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) @@ -37,7 +37,7 @@ if {{var "l"}} != 0 { {{var "ms"}} = false } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} - z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + r.ReadMapElemValue() {{/* z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) */}} {{var "mdn"}} = false {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ $y := printf "%vmdn%v" .TempVar .Rand }}{{ decLineVar $x $y }} if {{var "mdn"}} { @@ -47,7 +47,7 @@ if {{var "l"}} != 0 { } } } // else len==0: TODO: Should we clear map entries? -z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) +r.ReadMapEnd() {{/* z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) */}} ` const genDecListTmpl = ` diff --git a/codec/gen.go b/codec/gen.go index 944c0358..a19521f9 100644 --- a/codec/gen.go +++ b/codec/gen.go @@ -897,15 +897,15 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { } // x.linef("var %snn%s int", genTempVarPfx, i) x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.linef("r.EncodeArrayStart(%d)", len(tisfi)) + x.linef("r.WriteArrayStart(%d)", len(tisfi)) x.linef("} else {") // if not ti.toArray if ti.anyOmitEmpty { x.linef("var %snn%s = %v", genTempVarPfx, i, nn) x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) - x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + x.linef("r.WriteMapStart(%snn%s)", genTempVarPfx, i) x.linef("%snn%s = %v", genTempVarPfx, i, 0) } else { - x.linef("r.EncodeMapStart(%d)", len(tisfi)) + x.linef("r.WriteMapStart(%d)", len(tisfi)) } x.line("}") // close if not StructToArray @@ -948,9 +948,10 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray if labelUsed { - x.linef("if %s { z.EncSendContainerState(codecSelfer_containerArrayElem%s); r.EncodeNil() } else { ", isNilVarName, x.xs) + x.linef("if %s { r.WriteArrayElem(); r.EncodeNil() } else { ", isNilVarName) + // x.linef("if %s { z.EncSendContainerState(codecSelfer_containerArrayElem%s); r.EncodeNil() } else { ", isNilVarName, x.xs) } - x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) if si.omitEmpty { x.linef("if %s[%v] {", numfieldsvar, j) } @@ -969,9 +970,9 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { if si.omitEmpty { x.linef("if %s[%v] {", numfieldsvar, j) } - x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.WriteMapElemKey()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") - x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.WriteMapElemValue()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) if labelUsed { x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") x.encVar(varname+"."+t2.Name, t2.Type) @@ -985,9 +986,9 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("} ") // end if/else ti.toArray } x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { - x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.WriteArrayEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) x.line("} else {") - x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.WriteMapEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) x.line("}") } @@ -1003,33 +1004,33 @@ func (x *genRunner) encListFallback(varname string, t reflect.Type) { } i := x.varsfx() g := genTempVarPfx - x.line("r.EncodeArrayStart(len(" + varname + "))") + x.line("r.WriteArrayStart(len(" + varname + "))") if t.Kind() == reflect.Chan { x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) - x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.linef("%sv%s := <-%s", g, i, varname) } else { // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) - x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.WriteArrayElem()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) } x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.WriteArrayEnd()") // x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) } func (x *genRunner) encMapFallback(varname string, t reflect.Type) { // TODO: expand this to handle canonical. i := x.varsfx() - x.line("r.EncodeMapStart(len(" + varname + "))") + x.line("r.WriteMapStart(len(" + varname + "))") x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") - x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.WriteMapElemKey()") // f("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.encVar(genTempVarPfx+"k"+i, t.Key()) - x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.WriteMapElemValue()") // f("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.WriteMapEnd()") // f("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) } func (x *genRunner) decVar(varname, decodedNilVarname string, t reflect.Type, canBeNil bool) { @@ -1497,15 +1498,15 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) x.line("} else { if r.CheckBreak() { break }; }") } - x.linef("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.ReadMapElemKey()") // f("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.line(kName + "Slc = r.DecodeStringAsBytes()") // let string be scoped to this loop alone, so it doesn't escape. x.line(kName + " := string(" + kName + "Slc)") - x.linef("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.line("r.ReadMapElemValue()") // f("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) x.decStructMapSwitch(kName, varname, rtid, t) x.line("} // end for " + tpfx + "j" + i) - x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.ReadMapEnd()") // f("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) } func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { @@ -1542,9 +1543,9 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) - x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", - tpfx, i, x.xs, breakString) - x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.linef("if %sb%s { r.ReadArrayEnd(); %s }", tpfx, i, breakString) + // x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", tpfx, i, x.xs, breakString) + x.line("r.ReadArrayElem()") // f("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.decVar(varname+"."+t2.Name, "", t2.Type, true) } // read remaining values and throw away. @@ -1553,10 +1554,10 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) x.linef("if %sb%s { break }", tpfx, i) - x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.line("r.ReadArrayElem()") // f("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) x.line("}") - x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.ReadArrayEnd()") // f("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) } func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { @@ -1566,7 +1567,7 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("r.ReadMapEnd()") // f("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) if genUseOneFunctionForDecStructMap { x.line("} else { ") x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) @@ -1582,7 +1583,7 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("r.ReadArrayEnd()") // f("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) x.line("} else { ") x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) x.line("}") diff --git a/codec/helper.go b/codec/helper.go index 9bb6f003..b846df0d 100644 --- a/codec/helper.go +++ b/codec/helper.go @@ -303,9 +303,9 @@ type typeInfoLoadArray struct { sfiidx [typeInfoLoadArrayLen]sfiIdx } -type containerStateRecv interface { - sendContainerState(containerState) -} +// type containerStateRecv interface { +// sendContainerState(containerState) +// } // mirror json.Marshaler and json.Unmarshaler here, // so we don't import the encoding/json package @@ -521,6 +521,7 @@ type Handle interface { newEncDriver(w *Encoder) encDriver newDecDriver(r *Decoder) decDriver isBinary() bool + hasElemSeparators() bool IsBuiltinType(rtid uintptr) bool } @@ -659,9 +660,13 @@ type noBuiltInTypes struct{ noBuiltInTypeChecker } func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} -type noStreamingCodec struct{} +// type noStreamingCodec struct{} +// func (_ noStreamingCodec) CheckBreak() bool { return false } +// func (_ noStreamingCodec) hasElemSeparators() bool { return false } + +type noElemSeparators struct{} -func (_ noStreamingCodec) CheckBreak() bool { return false } +func (_ noElemSeparators) hasElemSeparators() (v bool) { return } // bigenHelper. // Users must already slice the x completely, because we will not reslice. diff --git a/codec/json.go b/codec/json.go index 82c0d46f..87903eed 100644 --- a/codec/json.go +++ b/codec/json.go @@ -158,49 +158,116 @@ type jsonEncDriver struct { // - newline and indent are added before each ending, // except there was no entry (so we can have {} or []) -func (e *jsonEncDriver) sendContainerState(c containerState) { - // determine whether to output separators - switch c { - case containerMapKey: - if e.c != containerMapStart { - e.w.writen1(',') - } - if e.d { - e.writeIndent() - } - case containerMapValue: - if e.d { - e.w.writen2(':', ' ') - } else { - e.w.writen1(':') - } - case containerMapEnd: - if e.d { - e.dl-- - if e.c != containerMapStart { - e.writeIndent() - } - } - e.w.writen1('}') - case containerArrayElem: +func (e *jsonEncDriver) WriteArrayStart(length int) { + if e.d { + e.dl++ + } + e.w.writen1('[') + e.c = containerArrayStart +} + +func (e *jsonEncDriver) WriteArrayElem() { + if e.c != containerArrayStart { + e.w.writen1(',') + } + if e.d { + e.writeIndent() + } + e.c = containerArrayElem +} + +func (e *jsonEncDriver) WriteArrayEnd() { + if e.d { + e.dl-- if e.c != containerArrayStart { - e.w.writen1(',') - } - if e.d { e.writeIndent() } - case containerArrayEnd: - if e.d { - e.dl-- - if e.c != containerArrayStart { - e.writeIndent() - } + } + e.w.writen1(']') + e.c = containerArrayEnd +} + +func (e *jsonEncDriver) WriteMapStart(length int) { + if e.d { + e.dl++ + } + e.w.writen1('{') + e.c = containerMapStart +} + +func (e *jsonEncDriver) WriteMapElemKey() { + if e.c != containerMapStart { + e.w.writen1(',') + } + if e.d { + e.writeIndent() + } + e.c = containerMapKey +} + +func (e *jsonEncDriver) WriteMapElemValue() { + if e.d { + e.w.writen2(':', ' ') + } else { + e.w.writen1(':') + } + e.c = containerMapValue +} + +func (e *jsonEncDriver) WriteMapEnd() { + if e.d { + e.dl-- + if e.c != containerMapStart { + e.writeIndent() } - e.w.writen1(']') } - e.c = c + e.w.writen1('}') + e.c = containerMapEnd } +// func (e *jsonEncDriver) sendContainerState(c containerState) { +// // determine whether to output separators +// switch c { +// case containerMapKey: +// if e.c != containerMapStart { +// e.w.writen1(',') +// } +// if e.d { +// e.writeIndent() +// } +// case containerMapValue: +// if e.d { +// e.w.writen2(':', ' ') +// } else { +// e.w.writen1(':') +// } +// case containerMapEnd: +// if e.d { +// e.dl-- +// if e.c != containerMapStart { +// e.writeIndent() +// } +// } +// e.w.writen1('}') +// case containerArrayElem: +// if e.c != containerArrayStart { +// e.w.writen1(',') +// } +// if e.d { +// e.writeIndent() +// } +// case containerArrayEnd: +// if e.d { +// e.dl-- +// if e.c != containerArrayStart { +// e.writeIndent() +// } +// } +// e.w.writen1(']') +// } +// e.c = c +// } + func (e *jsonEncDriver) writeIndent() { e.w.writen1('\n') if x := len(e.ds) * int(e.dl); x <= jsonSpacesOrTabsLen { @@ -281,22 +348,6 @@ func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { } } -func (e *jsonEncDriver) EncodeArrayStart(length int) { - if e.d { - e.dl++ - } - e.w.writen1('[') - e.c = containerArrayStart -} - -func (e *jsonEncDriver) EncodeMapStart(length int) { - if e.d { - e.dl++ - } - e.w.writen1('{') - e.c = containerMapStart -} - func (e *jsonEncDriver) EncodeString(c charEncoding, v string) { e.quoteStr(v) } @@ -434,43 +485,144 @@ func (d *jsonDecDriver) uncacheRead() { } } -func (d *jsonDecDriver) sendContainerState(c containerState) { +func (d *jsonDecDriver) ReadMapStart() int { if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - var xc uint8 // char expected - switch c { - case containerMapKey: - if d.c != containerMapStart { - xc = ',' - } - case containerMapValue: - xc = ':' - case containerMapEnd: - xc = '}' - case containerArrayElem: - if d.c != containerArrayStart { - xc = ',' + if d.tok != '{' { + d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) + } + d.tok = 0 + d.c = containerMapStart + return -1 +} + +func (d *jsonDecDriver) ReadArrayStart() int { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + if d.tok != '[' { + d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) + } + d.tok = 0 + d.c = containerArrayStart + return -1 +} + +func (d *jsonDecDriver) CheckBreak() bool { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + return d.tok == '}' || d.tok == ']' +} + +func (d *jsonDecDriver) ReadArrayElem() { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + if d.c != containerArrayStart { + const xc uint8 = ',' + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) } - case containerArrayEnd: - xc = ']' + d.tok = 0 + } + d.c = containerArrayElem +} + +func (d *jsonDecDriver) ReadArrayEnd() { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) } - if xc != 0 { + const xc uint8 = ']' + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 + d.c = containerArrayEnd +} + +func (d *jsonDecDriver) ReadMapElemKey() { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + if d.c != containerMapStart { + const xc uint8 = ',' if d.tok != xc { d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) } d.tok = 0 } - d.c = c + d.c = containerMapKey } -func (d *jsonDecDriver) CheckBreak() bool { +func (d *jsonDecDriver) ReadMapElemValue() { if d.tok == 0 { d.tok = d.r.skip(&jsonCharWhitespaceSet) } - return d.tok == '}' || d.tok == ']' + const xc uint8 = ':' + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 + d.c = containerMapValue } +func (d *jsonDecDriver) ReadMapEnd() { + if d.tok == 0 { + d.tok = d.r.skip(&jsonCharWhitespaceSet) + } + const xc uint8 = '}' + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 + d.c = containerMapEnd +} + +// func (d *jsonDecDriver) readContainerState(c containerState, xc uint8, check bool) { +// if d.tok == 0 { +// d.tok = d.r.skip(&jsonCharWhitespaceSet) +// } +// if check { +// if d.tok != xc { +// d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) +// } +// d.tok = 0 +// } +// d.c = c +// } + +// func (d *jsonDecDriver) sendContainerState(c containerState) { +// if d.tok == 0 { +// d.tok = d.r.skip(&jsonCharWhitespaceSet) +// } +// var xc uint8 // char expected +// switch c { +// case containerMapKey: +// if d.c != containerMapStart { +// xc = ',' +// } +// case containerMapValue: +// xc = ':' +// case containerMapEnd: +// xc = '}' +// case containerArrayElem: +// if d.c != containerArrayStart { +// xc = ',' +// } +// case containerArrayEnd: +// xc = ']' +// } +// if xc != 0 { +// if d.tok != xc { +// d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) +// } +// d.tok = 0 +// } +// d.c = c +// } + // func (d *jsonDecDriver) readLiteralIdx(fromIdx, toIdx uint8) { // bs := d.r.readx(int(toIdx - fromIdx)) // d.tok = 0 @@ -525,30 +677,6 @@ func (d *jsonDecDriver) DecodeBool() bool { return false // "unreachable" } -func (d *jsonDecDriver) ReadMapStart() int { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } - if d.tok != '{' { - d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) - } - d.tok = 0 - d.c = containerMapStart - return -1 -} - -func (d *jsonDecDriver) ReadArrayStart() int { - if d.tok == 0 { - d.tok = d.r.skip(&jsonCharWhitespaceSet) - } - if d.tok != '[' { - d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) - } - d.tok = 0 - d.c = containerArrayStart - return -1 -} - func (d *jsonDecDriver) ContainerType() (vt valueType) { // check container type by checking the first char if d.tok == 0 { @@ -939,6 +1067,8 @@ type JsonHandle struct { PreferFloat bool } +func (h *JsonHandle) hasElemSeparators() bool { return true } + func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { return h.SetExt(rt, tag, &setExtWrapper{i: ext}) } diff --git a/codec/msgpack.go b/codec/msgpack.go index 1784d522..fcc3177a 100644 --- a/codec/msgpack.go +++ b/codec/msgpack.go @@ -104,7 +104,8 @@ var ( type msgpackEncDriver struct { noBuiltInTypes - encNoSeparator + encDriverNoopContainerWriter + // encNoSeparator e *Encoder w encWriter h *MsgpackHandle @@ -213,11 +214,11 @@ func (e *msgpackEncDriver) encodeExtPreamble(xtag byte, l int) { } } -func (e *msgpackEncDriver) EncodeArrayStart(length int) { +func (e *msgpackEncDriver) WriteArrayStart(length int) { e.writeContainerLen(msgpackContainerList, length) } -func (e *msgpackEncDriver) EncodeMapStart(length int) { +func (e *msgpackEncDriver) WriteMapStart(length int) { e.writeContainerLen(msgpackContainerMap, length) } @@ -274,8 +275,9 @@ type msgpackDecDriver struct { bdRead bool br bool // bytes reader noBuiltInTypes - noStreamingCodec - decNoSeparator + // noStreamingCodec + // decNoSeparator + decDriverNoopContainerReader } // Note: This returns either a primitive (int, bool, etc) for non-containers, @@ -760,6 +762,7 @@ type MsgpackHandle struct { // a []byte or string based on the setting of RawToString. WriteExt bool binaryEncodingType + noElemSeparators } func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { diff --git a/codec/shared_test.go b/codec/shared_test.go index 9d99c8e7..d397ca1d 100644 --- a/codec/shared_test.go +++ b/codec/shared_test.go @@ -92,26 +92,21 @@ var ( var ( testDepth int - testVerbose bool - testInitDebug bool - testStructToArray bool - testCanonical bool - testUseReset bool - testWriteNoSymbols bool - testSkipIntf bool - testInternStr bool - testUseMust bool - testCheckCircRef bool - - testUseIoEncDec bool + testVerbose bool + testInitDebug bool + testStructToArray bool + testCanonical bool + testUseReset bool + testSkipIntf bool + testInternStr bool + testUseMust bool + testCheckCircRef bool + + testUseIoEncDec int testUseIoWrapper bool - testJsonIndent int testMaxInitLen int - testJsonHTMLCharsAsIs bool - testJsonPreferFloat bool - testNumRepeatString int ) @@ -148,21 +143,17 @@ func testInitFlags() { 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.IntVar(&testUseIoEncDec, "ti", -1, "Use IO Reader/Writer for Marshal/Unmarshal ie >= 0") flag.BoolVar(&testUseIoWrapper, "tiw", false, "Wrap the IO Reader/Writer with a base pass-through reader/writer") flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option") - flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option") flag.BoolVar(&testCanonical, "tc", false, "Set Canonical option") flag.BoolVar(&testInternStr, "te", false, "Set InternStr option") flag.BoolVar(&testSkipIntf, "tf", false, "Skip Interfaces") flag.BoolVar(&testUseReset, "tr", false, "Use Reset") - flag.IntVar(&testJsonIndent, "td", 0, "Use JSON Indent") flag.IntVar(&testNumRepeatString, "trs", 8, "Create string variables by repeating a string N times") flag.IntVar(&testMaxInitLen, "tx", 0, "Max Init Len") flag.BoolVar(&testUseMust, "tm", true, "Use Must(En|De)code") flag.BoolVar(&testCheckCircRef, "tl", false, "Use Check Circular Ref") - flag.BoolVar(&testJsonHTMLCharsAsIs, "tas", false, "Set JSON HTMLCharsAsIs") - flag.BoolVar(&testJsonPreferFloat, "tjf", false, "Prefer Float in json") } func benchInitFlags() { @@ -194,7 +185,6 @@ func testInitAll() { // only parse it once. if !flag.Parsed() { flag.Parse() - testNumRepeatStringMirror = testNumRepeatString } for _, f := range testPreInitFns { f() @@ -214,8 +204,13 @@ func testCodecEncode(ts interface{}, bsIn []byte, } else { e = NewEncoder(nil, h) } - if testUseIoEncDec { + bh := BasicHandleDoNotUse(h) + var oldWriteBufferSize int + if testUseIoEncDec >= 0 { buf = fn(bsIn) + // set the encode options for using a buffer + oldWriteBufferSize = bh.WriterBufferSize + bh.WriterBufferSize = testUseIoEncDec if testUseIoWrapper { e.Reset(ioWriterWrapper{buf}) } else { @@ -230,8 +225,9 @@ func testCodecEncode(ts interface{}, bsIn []byte, } else { err = e.Encode(ts) } - if testUseIoEncDec { + if testUseIoEncDec >= 0 { bs = buf.Bytes() + bh.WriterBufferSize = oldWriteBufferSize } return } @@ -244,8 +240,12 @@ func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) { } else { d = NewDecoder(nil, h) } - if testUseIoEncDec { + bh := BasicHandleDoNotUse(h) + var oldReadBufferSize int + if testUseIoEncDec >= 0 { buf := bytes.NewReader(bs) + oldReadBufferSize = bh.ReaderBufferSize + bh.ReaderBufferSize = testUseIoEncDec if testUseIoWrapper { d.Reset(ioReaderWrapper{buf}) } else { @@ -259,6 +259,9 @@ func testCodecDecode(bs []byte, ts interface{}, h Handle) (err error) { } else { err = d.Decode(ts) } + if testUseIoEncDec >= 0 { + bh.ReaderBufferSize = oldReadBufferSize + } return } diff --git a/codec/simple.go b/codec/simple.go index bf4a8ede..b69a15e7 100644 --- a/codec/simple.go +++ b/codec/simple.go @@ -30,7 +30,8 @@ const ( type simpleEncDriver struct { noBuiltInTypes - encNoSeparator + encDriverNoopContainerWriter + // encNoSeparator e *Encoder h *SimpleHandle w encWriter @@ -124,11 +125,11 @@ func (e *simpleEncDriver) encodeExtPreamble(xtag byte, length int) { e.w.writen1(xtag) } -func (e *simpleEncDriver) EncodeArrayStart(length int) { +func (e *simpleEncDriver) WriteArrayStart(length int) { e.encLen(simpleVdArray, length) } -func (e *simpleEncDriver) EncodeMapStart(length int) { +func (e *simpleEncDriver) WriteMapStart(length int) { e.encLen(simpleVdMap, length) } @@ -155,10 +156,10 @@ type simpleDecDriver struct { bdRead bool bd byte br bool // bytes reader + b [scratchByteArrayLen]byte noBuiltInTypes - noStreamingCodec - decNoSeparator - b [scratchByteArrayLen]byte + // noStreamingCodec + decDriverNoopContainerReader } func (d *simpleDecDriver) readNextBd() { @@ -512,6 +513,7 @@ func (d *simpleDecDriver) DecodeNaked() { type SimpleHandle struct { BasicHandle binaryEncodingType + noElemSeparators } func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { diff --git a/codec/values_test.go b/codec/values_test.go index 155a515f..f1892448 100644 --- a/codec/values_test.go +++ b/codec/values_test.go @@ -206,8 +206,6 @@ type Sinterface interface { var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() -var testNumRepeatStringMirror int = 8 - func populateTestStrucCommon(ts *testStrucCommon, n int, bench, useInterface, useStringKeyOnly bool) { var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464 diff --git a/codec/x_bench_gen_test.go b/codec/x_bench_gen_test.go index 507570ad..e7c52762 100644 --- a/codec/x_bench_gen_test.go +++ b/codec/x_bench_gen_test.go @@ -44,7 +44,7 @@ func fnEasyjsonEncodeFn(ts interface{}, bsIn []byte) ([]byte, error) { if _, ok := ts.(easyjson.Marshaler); !ok { return nil, errors.New("easyjson: input is not a easyjson.Marshaler") } - if testUseIoEncDec { + if testUseIoEncDec >= 0 { buf := new(bytes.Buffer) _, err := easyjson.MarshalToWriter(ts.(easyjson.Marshaler), buf) return buf.Bytes(), err @@ -57,7 +57,7 @@ func fnEasyjsonDecodeFn(buf []byte, ts interface{}) error { if _, ok := ts.(easyjson.Unmarshaler); !ok { return errors.New("easyjson: input is not a easyjson.Unmarshaler") } - if testUseIoEncDec { + if testUseIoEncDec >= 0 { return easyjson.UnmarshalFromReader(bytes.NewReader(buf), ts.(easyjson.Unmarshaler)) } return easyjson.Unmarshal(buf, ts.(easyjson.Unmarshaler)) @@ -78,7 +78,7 @@ func fnMsgpEncodeFn(ts interface{}, bsIn []byte) ([]byte, error) { if _, ok := ts.(msgp.Encodable); !ok { return nil, fmt.Errorf("msgp: input of type %T is not a msgp.Encodable", ts) } - if testUseIoEncDec { + if testUseIoEncDec >= 0 { buf := fnBenchmarkByteBuf(bsIn) err := ts.(msgp.Encodable).EncodeMsg(msgp.NewWriter(buf)) return buf.Bytes(), err @@ -90,7 +90,7 @@ func fnMsgpDecodeFn(buf []byte, ts interface{}) (err error) { if _, ok := ts.(msgp.Decodable); !ok { return fmt.Errorf("msgp: input of type %T is not a msgp.Decodable", ts) } - if testUseIoEncDec { + if testUseIoEncDec >= 0 { err = ts.(msgp.Decodable).DecodeMsg(msgp.NewReader(bytes.NewReader(buf))) return } diff --git a/codec/z_all_test.go b/codec/z_all_test.go index 02b583b5..b4a97fad 100644 --- a/codec/z_all_test.go +++ b/codec/z_all_test.go @@ -29,52 +29,40 @@ import "testing" // os.Exit(exitcode) // } -func testSuite(t *testing.T, f func(t *testing.T)) { - // find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test' - // Disregard the following: testVerbose, testInitDebug, testSkipIntf, testJsonIndent (Need a test for it) - - testReinit() // so flag.Parse() is called first, and never called again - - testDecodeOptions = DecodeOptions{} - testEncodeOptions = EncodeOptions{} - +func testGroupResetFlags() { testUseMust = false testCanonical = false testUseMust = false testInternStr = false - testUseIoEncDec = false + testUseIoEncDec = -1 testStructToArray = false - testWriteNoSymbols = false testCheckCircRef = false - testJsonHTMLCharsAsIs = false testUseReset = false testMaxInitLen = 0 - testJsonIndent = 0 testUseIoWrapper = false testNumRepeatString = 8 +} - testReinit() - t.Run("optionsFalse", f) +func testSuite(t *testing.T, f func(t *testing.T)) { + // find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test' + // Disregard the following: testVerbose, testInitDebug, testSkipIntf, testJsonIndent (Need a test for it) - testMaxInitLen = 10 - testJsonIndent = 8 - testReinit() - t.Run("initLen10-jsonSpaces", f) + testReinit() // so flag.Parse() is called first, and never called again + + testDecodeOptions = DecodeOptions{} + testEncodeOptions = EncodeOptions{} + + testGroupResetFlags() testReinit() - testMaxInitLen = 10 - testJsonIndent = -1 - testReinit() - t.Run("initLen10-jsonTabs", f) + t.Run("optionsFalse", f) testCanonical = true testUseMust = true testInternStr = true - testUseIoEncDec = true + testUseIoEncDec = 0 testStructToArray = true - testWriteNoSymbols = true testCheckCircRef = true - testJsonHTMLCharsAsIs = true testUseReset = true testDecodeOptions.MapValueReset = true testReinit() @@ -84,19 +72,22 @@ func testSuite(t *testing.T, f func(t *testing.T)) { testReinit() t.Run("optionsTrue-ioWrapper", f) + testUseIoEncDec = -1 + testDepth = 6 testReinit() t.Run("optionsTrue-deepstruct", f) // make buffer small enough so that we have to re-fill multiple times. testSkipRPCTests = true - testUseIoEncDec = true - testDecodeOptions.ReaderBufferSize = 128 - testEncodeOptions.WriterBufferSize = 128 + testUseIoEncDec = 128 + // testDecodeOptions.ReaderBufferSize = 128 + // testEncodeOptions.WriterBufferSize = 128 testReinit() t.Run("optionsTrue-bufio", f) - testDecodeOptions.ReaderBufferSize = 0 - testEncodeOptions.WriterBufferSize = 0 + // testDecodeOptions.ReaderBufferSize = 0 + // testEncodeOptions.WriterBufferSize = 0 + testUseIoEncDec = -1 testSkipRPCTests = false testNumRepeatString = 32 @@ -113,6 +104,8 @@ func testSuite(t *testing.T, f func(t *testing.T)) { // .... however, update deepEqual to take this option // testReinit() // t.Run("optionsTrue-resetOptions", f) + + testGroupResetFlags() } /* @@ -174,7 +167,88 @@ func testCodecGroup(t *testing.T) { // } -func TestCodecSuite(t *testing.T) { testSuite(t, testCodecGroup) } +func testJsonGroup(t *testing.T) { + t.Run("TestJsonCodecsTable", TestJsonCodecsTable) + t.Run("TestJsonCodecsMisc", TestJsonCodecsMisc) + t.Run("TestJsonCodecsEmbeddedPointer", TestJsonCodecsEmbeddedPointer) + t.Run("TestJsonCodecChan", TestJsonCodecChan) + t.Run("TestJsonStdEncIntf", TestJsonStdEncIntf) + t.Run("TestJsonMammoth", TestJsonMammoth) + t.Run("TestJsonRaw", TestJsonRaw) + t.Run("TestJsonRpcGo", TestJsonRpcGo) + t.Run("TestJsonLargeInteger", TestJsonLargeInteger) + t.Run("TestJsonDecodeNonStringScalarInStringContext", TestJsonDecodeNonStringScalarInStringContext) + t.Run("TestJsonEncodeIndent", TestJsonEncodeIndent) +} + +func testBincGroup(t *testing.T) { + t.Run("TestBincCodecsTable", TestBincCodecsTable) + t.Run("TestBincCodecsMisc", TestBincCodecsMisc) + t.Run("TestBincCodecsEmbeddedPointer", TestBincCodecsEmbeddedPointer) + t.Run("TestBincStdEncIntf", TestBincStdEncIntf) + t.Run("TestBincMammoth", TestBincMammoth) + t.Run("TestBincRaw", TestBincRaw) + t.Run("TestSimpleRpcGo", TestSimpleRpcGo) + t.Run("TestBincUnderlyingType", TestBincUnderlyingType) +} + +func testCborGroup(t *testing.T) { + t.Run("TestCborCodecsTable", TestCborCodecsTable) + t.Run("TestCborCodecsMisc", TestCborCodecsMisc) + t.Run("TestCborCodecsEmbeddedPointer", TestCborCodecsEmbeddedPointer) + t.Run("TestCborMapEncodeForCanonical", TestCborMapEncodeForCanonical) + t.Run("TestCborCodecChan", TestCborCodecChan) + t.Run("TestCborStdEncIntf", TestCborStdEncIntf) + t.Run("TestCborMammoth", TestCborMammoth) + t.Run("TestCborRaw", TestCborRaw) + t.Run("TestCborRpcGo", TestCborRpcGo) +} + +func TestCodecSuite(t *testing.T) { + testSuite(t, testCodecGroup) + + testGroupResetFlags() + + oldIndent, oldCharsAsis, oldPreferFloat := testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat + + testMaxInitLen = 10 + testJsonH.Indent = 8 + testJsonH.HTMLCharsAsIs = true + // testJsonH.PreferFloat = true + testReinit() + t.Run("json-spaces-htmlcharsasis-initLen10", testJsonGroup) + + testMaxInitLen = 10 + testJsonH.Indent = -1 + testJsonH.HTMLCharsAsIs = false + // testJsonH.PreferFloat = false + testReinit() + t.Run("json-tabs-initLen10", testJsonGroup) + + testJsonH.Indent, testJsonH.HTMLCharsAsIs, testJsonH.PreferFloat = oldIndent, oldCharsAsis, oldPreferFloat + + oldIndefLen := testCborH.IndefiniteLength + + testCborH.IndefiniteLength = true + testReinit() + t.Run("cbor-indefinitelength", testCborGroup) + + testCborH.IndefiniteLength = oldIndefLen + + oldSymbols := testBincH.getBasicHandle().AsSymbols + + testBincH.getBasicHandle().AsSymbols = AsSymbolNone + testReinit() + t.Run("binc-no-symbols", testBincGroup) + + testBincH.getBasicHandle().AsSymbols = AsSymbolAll + testReinit() + t.Run("binc-all-symbols", testBincGroup) + + testBincH.getBasicHandle().AsSymbols = oldSymbols + + testGroupResetFlags() +} // func TestCodecSuite(t *testing.T) { testSuite2(t, testCodecGroup2) } // func testCodecGroup2(t *testing.T) {