// Code generated by internal/cmd/generator. DO NOT EDIT!
package vm_indent import ( ) func ( *encoder.RuntimeContext, []byte, *encoder.OpcodeSet) ([]byte, error) { := 0 := uintptr(0) := .Ptr() var *encoder.Opcode if (.Option.Flag & encoder.HTMLEscapeOption) != 0 { = .EscapeKeyCode } else { = .NoescapeKeyCode } for { switch .Op { default: return nil, errUnimplementedOp(.Op) case encoder.OpPtr: := load(, .Idx) = .Next store(, .Idx, ptrToPtr()) case encoder.OpIntPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpInt: = appendInt(, , load(, .Idx), ) = appendComma(, ) = .Next case encoder.OpUintPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpUint: = appendUint(, , load(, .Idx), ) = appendComma(, ) = .Next case encoder.OpIntString: = append(, '"') = appendInt(, , load(, .Idx), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpUintString: = append(, '"') = appendUint(, , load(, .Idx), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpFloat32Ptr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNull(, ) = appendComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpFloat32: = appendFloat32(, , ptrToFloat32(load(, .Idx))) = appendComma(, ) = .Next case encoder.OpFloat64Ptr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpFloat64: := ptrToFloat64(load(, .Idx)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendComma(, ) = .Next case encoder.OpStringPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpString: = appendString(, , ptrToString(load(, .Idx))) = appendComma(, ) = .Next case encoder.OpBoolPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpBool: = appendBool(, , ptrToBool(load(, .Idx))) = appendComma(, ) = .Next case encoder.OpBytesPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpBytes: = appendByteSlice(, , ptrToBytes(load(, .Idx))) = appendComma(, ) = .Next case encoder.OpNumberPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpNumber: , := appendNumber(, , ptrToNumber(load(, .Idx))) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpInterfacePtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ) fallthrough case encoder.OpInterface: := load(, .Idx) if == 0 { = appendNullComma(, ) = .Next break } if > encoder.StartDetectingCyclesAfter { for , := range .SeenPtr { if == { return nil, errUnsupportedValue(, ) } } } .SeenPtr = append(.SeenPtr, ) var ( *runtime.Type unsafe.Pointer ) := ptrToUnsafePtr() if .Flags&encoder.NonEmptyInterfaceFlags != 0 { := (*nonEmptyInterface)() = .ptr if .itab != nil { = .itab.typ } } else { := (*emptyInterface)() = .ptr = .typ } if == nil { := != nil && .Kind() == reflect.Struct && !runtime.IfaceIndir() if ! { = appendNullComma(, ) = .Next break } } .KeepRefs = append(.KeepRefs, ) , := encoder.CompileToGetCodeSet(, uintptr(unsafe.Pointer())) if != nil { return nil, } := uintptr(.Length) + 3 := uintptr(.CodeLength) + 3 var *encoder.Opcode if (.Option.Flag & encoder.HTMLEscapeOption) != 0 { = .InterfaceEscapeKeyCode } else { = .InterfaceNoescapeKeyCode } := uintptr(len(.Ptrs)) := / uintptrSize := += * uintptrSize := .BaseIndent .BaseIndent += .Indent := + + if < { .Ptrs = append(.Ptrs, make([]uintptr, -)...) } = .Ptr() + // assign new ctxptr := .EndCode store(, .Idx, uintptr()) store(, .Idx, ) store(, .ElemIdx, uintptr(unsafe.Pointer(.Next))) storeIndent(, , uintptr()) = ++ case encoder.OpInterfaceEnd: -- // restore ctxptr := load(, .Idx) restoreIndent(, , ) .SeenPtr = .SeenPtr[:len(.SeenPtr)-1] := load(, .ElemIdx) = (*encoder.Opcode)(ptrToUnsafePtr()) = .Ptr() + = case encoder.OpMarshalJSONPtr: := load(, .Idx) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ptrToPtr()) fallthrough case encoder.OpMarshalJSON: := load(, .Idx) if == 0 { = appendNullComma(, ) = .Next break } if (.Flags&encoder.IsNilableTypeFlags) != 0 && (.Flags&encoder.IndirectFlags) != 0 { = ptrToPtr() } , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpMarshalTextPtr: := load(, .Idx) if == 0 { = appendNullComma(, ) = .Next break } store(, .Idx, ptrToPtr()) fallthrough case encoder.OpMarshalText: := load(, .Idx) if == 0 { = append(, `""`...) = appendComma(, ) = .Next break } if (.Flags&encoder.IsNilableTypeFlags) != 0 && (.Flags&encoder.IndirectFlags) != 0 { = ptrToPtr() } , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpSlicePtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .End.Next break } store(, .Idx, ) fallthrough case encoder.OpSlice: := load(, .Idx) := ptrToSlice() if == 0 || .Data == nil { = appendNullComma(, ) = .End.Next break } store(, .ElemIdx, 0) store(, .Length, uintptr(.Len)) store(, .Idx, uintptr(.Data)) if .Len > 0 { = appendArrayHead(, , ) = .Next store(, .Idx, uintptr(.Data)) } else { = appendEmptyArray(, ) = .End.Next } case encoder.OpSliceElem: := load(, .ElemIdx) := load(, .Length) ++ if < { = appendArrayElemIndent(, , ) store(, .ElemIdx, ) := load(, .Idx) := uintptr(.Size) = .Next store(, .Idx, +*) } else { = appendArrayEnd(, , ) = .End.Next } case encoder.OpArrayPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .End.Next break } store(, .Idx, ) fallthrough case encoder.OpArray: := load(, .Idx) if == 0 { = appendNullComma(, ) = .End.Next break } if .Length > 0 { = appendArrayHead(, , ) store(, .ElemIdx, 0) = .Next store(, .Idx, ) } else { = appendEmptyArray(, ) = .End.Next } case encoder.OpArrayElem: := load(, .ElemIdx) ++ if < uintptr(.Length) { = appendArrayElemIndent(, , ) store(, .ElemIdx, ) := load(, .Idx) := uintptr(.Size) = .Next store(, .Idx, +*) } else { = appendArrayEnd(, , ) = .End.Next } case encoder.OpMapPtr: := loadNPtr(, .Idx, .PtrNum) if == 0 { = appendNullComma(, ) = .End.Next break } store(, .Idx, ) fallthrough case encoder.OpMap: := load(, .Idx) if == 0 { = appendNullComma(, ) = .End.Next break } := ptrToUnsafePtr() := maplen() if <= 0 { = appendEmptyObject(, ) = .End.Next break } = appendStructHead(, ) := (.Option.Flag & encoder.UnorderedMapOption) != 0 := encoder.NewMapContext(, ) mapiterinit(.Type, , &.Iter) store(, .Idx, uintptr(unsafe.Pointer())) .KeepRefs = append(.KeepRefs, unsafe.Pointer()) if { = appendMapKeyIndent(, .Next, ) } else { .Start = len() .First = len() } := mapiterkey(&.Iter) store(, .Next.Idx, uintptr()) = .Next case encoder.OpMapKey: := (*encoder.MapContext)(ptrToUnsafePtr(load(, .Idx))) := .Idx ++ if (.Option.Flag & encoder.UnorderedMapOption) != 0 { if < .Len { = appendMapKeyIndent(, , ) .Idx = int() := mapiterkey(&.Iter) store(, .Next.Idx, uintptr()) = .Next } else { = appendObjectEnd(, , ) encoder.ReleaseMapContext() = .End.Next } } else { .Slice.Items[.Idx].Value = [.Start:len()] if < .Len { .Idx = int() .Start = len() := mapiterkey(&.Iter) store(, .Next.Idx, uintptr()) = .Next } else { = .End } } case encoder.OpMapValue: := (*encoder.MapContext)(ptrToUnsafePtr(load(, .Idx))) if (.Option.Flag & encoder.UnorderedMapOption) != 0 { = appendColon(, ) } else { .Slice.Items[.Idx].Key = [.Start:len()] .Start = len() } := mapitervalue(&.Iter) store(, .Next.Idx, uintptr()) mapiternext(&.Iter) = .Next case encoder.OpMapEnd: // this operation only used by sorted map. := (*encoder.MapContext)(ptrToUnsafePtr(load(, .Idx))) sort.Sort(.Slice) := .Buf for , := range .Slice.Items { = appendMapKeyValue(, , , .Key, .Value) } = appendMapEnd(, , ) = [:.First] = append(, ...) .Buf = encoder.ReleaseMapContext() = .Next case encoder.OpRecursivePtr: := load(, .Idx) if == 0 { = .Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpRecursive: := load(, .Idx) if != 0 { if > encoder.StartDetectingCyclesAfter { for , := range .SeenPtr { if == { return nil, errUnsupportedValue(, ) } } } } .SeenPtr = append(.SeenPtr, ) := .Jmp.Code := uintptr(len(.Ptrs)) := / uintptrSize := += .Jmp.CurLen * uintptrSize := .BaseIndent := .Indent - 1 .BaseIndent += .Indent - := + .Jmp.CurLen + .Jmp.NextLen if < { .Ptrs = append(.Ptrs, make([]uintptr, -)...) } = .Ptr() + // assign new ctxptr store(, .Idx, ) store(, .End.Next.Idx, ) store(, .End.Next.ElemIdx, uintptr(unsafe.Pointer(.Next))) storeIndent(, .End.Next, uintptr()) = ++ case encoder.OpRecursiveEnd: -- // restore ctxptr restoreIndent(, , ) := load(, .Idx) .SeenPtr = .SeenPtr[:len(.SeenPtr)-1] := load(, .ElemIdx) = (*encoder.Opcode)(ptrToUnsafePtr()) = .Ptr() + = case encoder.OpStructPtrHead: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHead: := load(, .Idx) if == 0 && ((.Flags&encoder.IndirectFlags) != 0 || .Next.Op == encoder.OpStructEnd) { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if len(.Key) > 0 { if (.Flags&encoder.IsTaggedKeyFlags) != 0 || .Flags&encoder.AnonymousKeyFlags == 0 { = appendStructKey(, , ) } } += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructPtrHeadOmitEmpty: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmpty: := load(, .Idx) if == 0 && ((.Flags&encoder.IndirectFlags) != 0 || .Next.Op == encoder.OpStructEnd) { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) if == 0 || (ptrToPtr() == 0 && (.Flags&encoder.IsNextOpPtrTypeFlags) != 0) { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadInt: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadInt: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyInt: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyInt: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if == 0 { = .NextField } else { = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadIntString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadIntString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = append(, '"') = appendInt(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyIntString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyIntString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) := ptrToUint64(, .NumBitSize) := & ((1 << .NumBitSize) - 1) if == 0 { = .NextField } else { = appendStructKey(, , ) = append(, '"') = appendInt(, , , ) = append(, '"') = appendComma(, ) = .Next } case encoder.OpStructPtrHeadIntPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadIntPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendInt(, , , ) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyIntPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyIntPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendInt(, , , ) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadIntPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadIntPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') = appendInt(, , , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyIntPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyIntPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') = appendInt(, , , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadUint: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadUint: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyUint: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyUint: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if == 0 { = .NextField } else { = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadUintString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadUintString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyUintString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyUintString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if == 0 { = .NextField } else { = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) = .Next } case encoder.OpStructPtrHeadUintPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadUintPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendUint(, , , ) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyUintPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyUintPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendUint(, , , ) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadUintPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadUintPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') = appendUint(, , , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyUintPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyUintPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') = appendUint(, , , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadFloat32: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadFloat32: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat32: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyFloat32: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToFloat32( + uintptr(.Offset)) if == 0 { = .NextField } else { = appendStructKey(, , ) = appendFloat32(, , ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadFloat32String: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadFloat32String: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat32String: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyFloat32String: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToFloat32( + uintptr(.Offset)) if == 0 { = .NextField } else { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ) = append(, '"') = appendComma(, ) = .Next } case encoder.OpStructPtrHeadFloat32Ptr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadFloat32Ptr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendFloat32(, , ptrToFloat32()) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat32Ptr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyFloat32Ptr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32()) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadFloat32PtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadFloat32PtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat32PtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyFloat32PtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadFloat64: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadFloat64: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendFloat64(, , ) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat64: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyFloat64: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToFloat64( + uintptr(.Offset)) if == 0 { = .NextField } else { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = appendFloat64(, , ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadFloat64String: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadFloat64String: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat64String: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyFloat64String: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToFloat64( + uintptr(.Offset)) if == 0 { = .NextField } else { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendComma(, ) = .Next } case encoder.OpStructPtrHeadFloat64Ptr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadFloat64Ptr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat64Ptr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyFloat64Ptr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadFloat64PtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadFloat64PtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyFloat64PtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyFloat64PtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNull(, ) = appendComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendString(, , ptrToString(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToString( + uintptr(.Offset)) if == "" { = .NextField } else { = appendStructKey(, , ) = appendString(, , ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadStringString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadStringString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ptrToString(+uintptr(.Offset))))) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyStringString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyStringString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToString( + uintptr(.Offset)) if == "" { = .NextField } else { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ))) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadStringPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadStringPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendString(, , ptrToString()) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyStringPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyStringPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendString(, , ptrToString()) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadStringPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadStringPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendString(, , string(appendString(, []byte{}, ptrToString()))) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyStringPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyStringPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ptrToString()))) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadBool: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadBool: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendBool(, , ptrToBool(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBool: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyBool: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = appendBool(, , ) = appendComma(, ) = .Next } else { = .NextField } case encoder.OpStructPtrHeadBoolString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadBoolString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool(+uintptr(.Offset))) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBoolString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyBoolString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = append(, '"') = appendBool(, , ) = append(, '"') = appendComma(, ) = .Next } else { = .NextField } case encoder.OpStructPtrHeadBoolPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadBoolPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendBool(, , ptrToBool()) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBoolPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyBoolPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendBool(, , ptrToBool()) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadBoolPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadBoolPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBoolPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyBoolPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadBytes: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadBytes: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBytes: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyBytes: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToBytes( + uintptr(.Offset)) if len() == 0 { = .NextField } else { = appendStructKey(, , ) = appendByteSlice(, , ) = appendComma(, ) = .Next } case encoder.OpStructPtrHeadBytesPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadBytesPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = appendByteSlice(, , ptrToBytes()) } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyBytesPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyBytesPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes()) = appendComma(, ) } = .Next case encoder.OpStructPtrHeadNumber: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadNumber: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyNumber: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyNumber: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToNumber( + uintptr(.Offset)) if == "" { = .NextField } else { = appendStructKey(, , ) , := appendNumber(, , ) if != nil { return nil, } = appendComma(, ) = .Next } case encoder.OpStructPtrHeadNumberString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadNumberString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = append(, '"') = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyNumberString: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyNumberString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } := ptrToNumber( + uintptr(.Offset)) if == "" { = .NextField } else { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ) if != nil { return nil, } = append(, '"') = appendComma(, ) = .Next } case encoder.OpStructPtrHeadNumberPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadNumberPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyNumberPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyNumberPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = appendComma(, ) } = .Next case encoder.OpStructPtrHeadNumberPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadNumberPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyNumberPtrString: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyNumberPtrString: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if != 0 { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructPtrHeadArray, encoder.OpStructPtrHeadSlice: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadArray, encoder.OpStructHeadSlice: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructPtrHeadOmitEmptyArray: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyArray: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) = appendStructKey(, , ) = .Next store(, .Idx, ) case encoder.OpStructPtrHeadOmitEmptySlice: if (.Flags & encoder.IndirectFlags) != 0 { := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptySlice: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) := ptrToSlice() if .Len == 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadArrayPtr, encoder.OpStructPtrHeadSlicePtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadArrayPtr, encoder.OpStructHeadSlicePtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNullComma(, ) = .NextField } else { = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadOmitEmptyArrayPtr, encoder.OpStructPtrHeadOmitEmptySlicePtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyArrayPtr, encoder.OpStructHeadOmitEmptySlicePtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadMap: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadMap: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if != 0 && (.Flags&encoder.IndirectFlags) != 0 { = ptrToPtr( + uintptr(.Offset)) } = .Next store(, .Idx, ) case encoder.OpStructPtrHeadOmitEmptyMap: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyMap: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if != 0 && (.Flags&encoder.IndirectFlags) != 0 { = ptrToPtr( + uintptr(.Offset)) } if maplen(ptrToUnsafePtr()) == 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadMapPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadMapPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if == 0 { = appendNullComma(, ) = .NextField break } = ptrToPtr( + uintptr(.Offset)) if == 0 { = appendNullComma(, ) = .NextField } else { if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(, .PtrNum) } = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadOmitEmptyMapPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyMapPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if == 0 { = .NextField break } = ptrToPtr( + uintptr(.Offset)) if == 0 { = .NextField } else { if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(, .PtrNum) } = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructPtrHeadMarshalJSON: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadMarshalJSON: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { if (.Flags&encoder.IndirectFlags) != 0 || .Op == encoder.OpStructPtrHeadMarshalJSON { = ptrToPtr() } } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = appendNull(, ) } else { , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyMarshalJSON: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyMarshalJSON: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { if (.Flags&encoder.IndirectFlags) != 0 || .Op == encoder.OpStructPtrHeadOmitEmptyMarshalJSON { = ptrToPtr() } } := ptrToInterface(, ) if (.Flags&encoder.NilCheckFlags) != 0 && encoder.IsNilForMarshaler() { = .NextField } else { = appendStructKey(, , ) , := appendMarshalJSON(, , , ) if != nil { return nil, } = = appendComma(, ) = .Next } case encoder.OpStructPtrHeadMarshalJSONPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadMarshalJSONPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyMarshalJSONPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyMarshalJSONPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if == 0 { = .NextField } else { = appendStructKey(, , ) , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = = appendComma(, ) = .Next } case encoder.OpStructPtrHeadMarshalText: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadMarshalText: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { if (.Flags&encoder.IndirectFlags) != 0 || .Op == encoder.OpStructPtrHeadMarshalText { = ptrToPtr() } } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = appendNull(, ) } else { , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyMarshalText: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { store(, .Idx, ptrToNPtr(, .PtrNum)) } fallthrough case encoder.OpStructHeadOmitEmptyMarshalText: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { if (.Flags&encoder.IndirectFlags) != 0 || .Op == encoder.OpStructPtrHeadOmitEmptyMarshalText { = ptrToPtr() } } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = .NextField } else { = appendStructKey(, , ) , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = = appendComma(, ) = .Next } case encoder.OpStructPtrHeadMarshalTextPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadMarshalTextPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } = appendStructKey(, , ) if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if == 0 { = appendNull(, ) } else { , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructPtrHeadOmitEmptyMarshalTextPtr: := load(, .Idx) if == 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } store(, .Idx, ptrToNPtr(, .PtrNum)) fallthrough case encoder.OpStructHeadOmitEmptyMarshalTextPtr: := load(, .Idx) if == 0 && (.Flags&encoder.IndirectFlags) != 0 { if .Flags&encoder.AnonymousHeadFlags == 0 { = appendNullComma(, ) } = .End.Next break } if (.Flags & encoder.IndirectFlags) != 0 { = ptrToNPtr(+uintptr(.Offset), .PtrNum) } if .Flags&encoder.AnonymousHeadFlags == 0 { = appendStructHead(, ) } if == 0 { = .NextField } else { = appendStructKey(, , ) , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = = appendComma(, ) = .Next } case encoder.OpStructField: if .Flags&encoder.IsTaggedKeyFlags != 0 || .Flags&encoder.AnonymousKeyFlags == 0 { = appendStructKey(, , ) } := load(, .Idx) + uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmpty: := load(, .Idx) += uintptr(.Offset) if ptrToPtr() == 0 && (.Flags&encoder.IsNextOpPtrTypeFlags) != 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructFieldInt: := load(, .Idx) = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyInt: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendComma(, ) } = .Next case encoder.OpStructFieldIntString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendInt(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyIntString: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = append(, '"') = appendInt(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldIntPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendInt(, , , ) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyIntPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendInt(, , , ) = appendComma(, ) } = .Next case encoder.OpStructFieldIntPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = append(, '"') = appendInt(, , , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyIntPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendInt(, , , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldUint: := load(, .Idx) = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyUint: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendComma(, ) } = .Next case encoder.OpStructFieldUintString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyUintString: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldUintPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendUint(, , , ) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyUintPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendUint(, , , ) = appendComma(, ) } = .Next case encoder.OpStructFieldUintPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = append(, '"') = appendUint(, , , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyUintPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendUint(, , , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldFloat32: := load(, .Idx) = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat32: := load(, .Idx) := ptrToFloat32( + uintptr(.Offset)) if != 0 { = appendStructKey(, , ) = appendFloat32(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldFloat32String: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat32String: := load(, .Idx) := ptrToFloat32( + uintptr(.Offset)) if != 0 { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldFloat32Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendFloat32(, , ptrToFloat32()) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat32Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32()) = appendComma(, ) } = .Next case encoder.OpStructFieldFloat32PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat32PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldFloat64: := load(, .Idx) = appendStructKey(, , ) := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat64: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if != 0 { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = appendFloat64(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldFloat64String: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat64String: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if != 0 { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldFloat64Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNullComma(, ) = .Next break } := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat64Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldFloat64PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = append(, '"') = appendFloat64(, , ) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyFloat64PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldString: := load(, .Idx) = appendStructKey(, , ) = appendString(, , ptrToString(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyString: := load(, .Idx) := ptrToString( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = appendString(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldStringString: := load(, .Idx) := ptrToString( + uintptr(.Offset)) = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ))) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyStringString: := load(, .Idx) := ptrToString( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ))) = appendComma(, ) } = .Next case encoder.OpStructFieldStringPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendString(, , ptrToString()) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyStringPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendString(, , ptrToString()) = appendComma(, ) } = .Next case encoder.OpStructFieldStringPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendString(, , string(appendString(, []byte{}, ptrToString()))) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyStringPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ptrToString()))) = appendComma(, ) } = .Next case encoder.OpStructFieldBool: := load(, .Idx) = appendStructKey(, , ) = appendBool(, , ptrToBool(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBool: := load(, .Idx) := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = appendBool(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldBoolString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool(+uintptr(.Offset))) = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBoolString: := load(, .Idx) := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = append(, '"') = appendBool(, , ) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldBoolPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendBool(, , ptrToBool()) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBoolPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendBool(, , ptrToBool()) = appendComma(, ) } = .Next case encoder.OpStructFieldBoolPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBoolPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldBytes: := load(, .Idx) = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes(+uintptr(.Offset))) = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBytes: := load(, .Idx) := ptrToBytes( + uintptr(.Offset)) if len() > 0 { = appendStructKey(, , ) = appendByteSlice(, , ) = appendComma(, ) } = .Next case encoder.OpStructFieldBytesPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = appendByteSlice(, , ptrToBytes()) } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyBytesPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes()) = appendComma(, ) } = .Next case encoder.OpStructFieldNumber: := load(, .Idx) = appendStructKey(, , ) , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyNumber: := load(, .Idx) := ptrToNumber( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) , := appendNumber(, , ) if != nil { return nil, } = appendComma(, ) } = .Next case encoder.OpStructFieldNumberString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = append(, '"') = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyNumberString: := load(, .Idx) := ptrToNumber( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ) if != nil { return nil, } = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldNumberPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyNumberPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = appendComma(, ) } = .Next case encoder.OpStructFieldNumberPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = appendStructKey(, , ) if == 0 { = appendNull(, ) } else { = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyNumberPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') = appendComma(, ) } = .Next case encoder.OpStructFieldMarshalJSON: := load(, .Idx) = appendStructKey(, , ) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { = ptrToPtr() } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = appendNull(, ) } else { , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyMarshalJSON: := load(, .Idx) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { = ptrToPtr() } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = .NextField break } := ptrToInterface(, ) if (.Flags&encoder.NilCheckFlags) != 0 && encoder.IsNilForMarshaler() { = .NextField break } = appendStructKey(, , ) , := appendMarshalJSON(, , , ) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpStructFieldMarshalJSONPtr: := load(, .Idx) = appendStructKey(, , ) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyMarshalJSONPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) , := appendMarshalJSON(, , , ptrToInterface(, )) if != nil { return nil, } = appendComma(, ) } = .Next case encoder.OpStructFieldMarshalText: := load(, .Idx) = appendStructKey(, , ) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { = ptrToPtr() } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = appendNull(, ) } else { , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyMarshalText: := load(, .Idx) += uintptr(.Offset) if (.Flags & encoder.IsNilableTypeFlags) != 0 { = ptrToPtr() } if == 0 && (.Flags&encoder.NilCheckFlags) != 0 { = .NextField break } = appendStructKey(, , ) , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = appendComma(, ) = .Next case encoder.OpStructFieldMarshalTextPtr: := load(, .Idx) = appendStructKey(, , ) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = } = appendComma(, ) = .Next case encoder.OpStructFieldOmitEmptyMarshalTextPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) , := appendMarshalText(, , , ptrToInterface(, )) if != nil { return nil, } = appendComma(, ) } = .Next case encoder.OpStructFieldArray: = appendStructKey(, , ) := load(, .Idx) += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptyArray: = appendStructKey(, , ) := load(, .Idx) += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructFieldArrayPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptyArrayPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = .Next store(, .Idx, ) } else { = .NextField } case encoder.OpStructFieldSlice: = appendStructKey(, , ) := load(, .Idx) += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptySlice: := load(, .Idx) += uintptr(.Offset) := ptrToSlice() if .Len == 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructFieldSlicePtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptySlicePtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = .Next store(, .Idx, ) } else { = .NextField } case encoder.OpStructFieldMap: = appendStructKey(, , ) := load(, .Idx) = ptrToPtr( + uintptr(.Offset)) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptyMap: := load(, .Idx) = ptrToPtr( + uintptr(.Offset)) if == 0 || maplen(ptrToUnsafePtr()) == 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructFieldMapPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToPtr( + uintptr(.Offset)) if != 0 { = ptrToNPtr(, .PtrNum) } = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptyMapPtr: := load(, .Idx) = ptrToPtr( + uintptr(.Offset)) if != 0 { = ptrToNPtr(, .PtrNum) } if != 0 { = appendStructKey(, , ) = .Next store(, .Idx, ) } else { = .NextField } case encoder.OpStructFieldStruct: = appendStructKey(, , ) := load(, .Idx) += uintptr(.Offset) = .Next store(, .Idx, ) case encoder.OpStructFieldOmitEmptyStruct: := load(, .Idx) += uintptr(.Offset) if ptrToPtr() == 0 && (.Flags&encoder.IsNextOpPtrTypeFlags) != 0 { = .NextField } else { = appendStructKey(, , ) = .Next store(, .Idx, ) } case encoder.OpStructEnd: = appendStructEndSkipLast(, , ) = .Next case encoder.OpStructEndInt: := load(, .Idx) = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyInt: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = appendInt(, , +uintptr(.Offset), ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndIntString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendInt(, , +uintptr(.Offset), ) = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyIntString: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = append(, '"') = appendInt(, , +uintptr(.Offset), ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndIntPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendInt(, , , ) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyIntPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendInt(, , , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndIntPtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') = appendInt(, , , ) = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyIntPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendInt(, , , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndUint: := load(, .Idx) = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyUint: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = appendUint(, , +uintptr(.Offset), ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndUintString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyUintString: := load(, .Idx) := ptrToUint64(+uintptr(.Offset), .NumBitSize) := & ((1 << .NumBitSize) - 1) if != 0 { = appendStructKey(, , ) = append(, '"') = appendUint(, , +uintptr(.Offset), ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndUintPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendUint(, , , ) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyUintPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendUint(, , , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndUintPtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') = appendUint(, , , ) = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyUintPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendUint(, , , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat32: := load(, .Idx) = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat32: := load(, .Idx) := ptrToFloat32( + uintptr(.Offset)) if != 0 { = appendStructKey(, , ) = appendFloat32(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat32String: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32(+uintptr(.Offset))) = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat32String: := load(, .Idx) := ptrToFloat32( + uintptr(.Offset)) if != 0 { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat32Ptr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendFloat32(, , ptrToFloat32()) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat32Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendFloat32(, , ptrToFloat32()) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat32PtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat32PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendFloat32(, , ptrToFloat32()) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat64: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = appendFloat64(, , ) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat64: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if != 0 { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = appendFloat64(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat64String: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat64String: := load(, .Idx) := ptrToFloat64( + uintptr(.Offset)) if != 0 { if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendStructKey(, , ) = append(, '"') = appendFloat64(, , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat64Ptr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) = appendStructEnd(, , ) = .Next break } := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat64Ptr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndFloat64PtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = appendFloat64(, , ) = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyFloat64PtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) := ptrToFloat64() if math.IsInf(, 0) || math.IsNaN() { return nil, errUnsupportedFloat() } = append(, '"') = appendFloat64(, , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndString: := load(, .Idx) = appendStructKey(, , ) = appendString(, , ptrToString(+uintptr(.Offset))) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyString: := load(, .Idx) := ptrToString( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = appendString(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndStringString: := load(, .Idx) = appendStructKey(, , ) := ptrToString( + uintptr(.Offset)) = appendString(, , string(appendString(, []byte{}, ))) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyStringString: := load(, .Idx) := ptrToString( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ))) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndStringPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendString(, , ptrToString()) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyStringPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendString(, , ptrToString()) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndStringPtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendString(, , string(appendString(, []byte{}, ptrToString()))) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyStringPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendString(, , string(appendString(, []byte{}, ptrToString()))) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBool: := load(, .Idx) = appendStructKey(, , ) = appendBool(, , ptrToBool(+uintptr(.Offset))) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBool: := load(, .Idx) := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = appendBool(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBoolString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool(+uintptr(.Offset))) = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBoolString: := load(, .Idx) := ptrToBool( + uintptr(.Offset)) if { = appendStructKey(, , ) = append(, '"') = appendBool(, , ) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBoolPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendBool(, , ptrToBool()) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBoolPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendBool(, , ptrToBool()) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBoolPtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBoolPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') = appendBool(, , ptrToBool()) = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBytes: := load(, .Idx) = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes(+uintptr(.Offset))) = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBytes: := load(, .Idx) := ptrToBytes( + uintptr(.Offset)) if len() > 0 { = appendStructKey(, , ) = appendByteSlice(, , ) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndBytesPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = appendByteSlice(, , ptrToBytes()) } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyBytesPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = appendByteSlice(, , ptrToBytes()) = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndNumber: := load(, .Idx) = appendStructKey(, , ) , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyNumber: := load(, .Idx) := ptrToNumber( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) , := appendNumber(, , ) if != nil { return nil, } = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndNumberString: := load(, .Idx) = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber(+uintptr(.Offset))) if != nil { return nil, } = append(, '"') = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyNumberString: := load(, .Idx) := ptrToNumber( + uintptr(.Offset)) if != "" { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ) if != nil { return nil, } = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndNumberPtr: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyNumberPtr: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpStructEndNumberPtrString: = appendStructKey(, , ) := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if == 0 { = appendNull(, ) } else { = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') } = appendStructEnd(, , ) = .Next case encoder.OpStructEndOmitEmptyNumberPtrString: := load(, .Idx) = ptrToNPtr(+uintptr(.Offset), .PtrNum) if != 0 { = appendStructKey(, , ) = append(, '"') , := appendNumber(, , ptrToNumber()) if != nil { return nil, } = append(, '"') = appendStructEnd(, , ) } else { = appendStructEndSkipLast(, , ) } = .Next case encoder.OpEnd: goto } } : return , nil }