encoder

package
v0.0.0-...-9da53d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

This files's processing codes are inspired by https://github.com/segmentio/encoding. The license notation is as follows.

MIT License

Copyright (c) 2019 Segment.io, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Code generated by internal/cmd/generator. DO NOT EDIT!

This files's string processing codes are inspired by https://github.com/segmentio/encoding. The license notation is as follows.

MIT License

Copyright (c) 2019 Segment.io, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const StartDetectingCyclesAfter = 1000

Variables

View Source
var (
	Marshal   func(interface{}) ([]byte, error)
	Unmarshal func([]byte, interface{}) error
)

Functions

func AppendBool

func AppendBool(_ *RuntimeContext, b []byte, v bool) []byte

func AppendByteSlice

func AppendByteSlice(_ *RuntimeContext, b []byte, src []byte) []byte

func AppendComma

func AppendComma(_ *RuntimeContext, b []byte) []byte

func AppendCommaIndent

func AppendCommaIndent(_ *RuntimeContext, b []byte) []byte

func AppendFloat32

func AppendFloat32(_ *RuntimeContext, b []byte, v float32) []byte

func AppendFloat64

func AppendFloat64(_ *RuntimeContext, b []byte, v float64) []byte

func AppendIndent

func AppendIndent(ctx *RuntimeContext, b []byte, indent uint32) []byte

func AppendInt

func AppendInt(_ *RuntimeContext, out []byte, p uintptr, code *Opcode) []byte

func AppendMarshalJSON

func AppendMarshalJSON(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

func AppendMarshalJSONIndent

func AppendMarshalJSONIndent(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

func AppendMarshalText

func AppendMarshalText(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

func AppendMarshalTextIndent

func AppendMarshalTextIndent(ctx *RuntimeContext, code *Opcode, b []byte, v interface{}) ([]byte, error)

func AppendNull

func AppendNull(_ *RuntimeContext, b []byte) []byte

func AppendNumber

func AppendNumber(_ *RuntimeContext, b []byte, n json.Number) ([]byte, error)

func AppendString

func AppendString(ctx *RuntimeContext, buf []byte, s string) []byte

func AppendStructEnd

func AppendStructEnd(_ *RuntimeContext, b []byte) []byte

func AppendStructEndIndent

func AppendStructEndIndent(ctx *RuntimeContext, code *Opcode, b []byte) []byte

func AppendUint

func AppendUint(_ *RuntimeContext, out []byte, p uintptr, code *Opcode) []byte

func Compact

func Compact(buf *bytes.Buffer, src []byte, escape bool) error

func ErrMarshalerWithCode

func ErrMarshalerWithCode(code *Opcode, err error) *errors.MarshalerError

func ErrUnsupportedFloat

func ErrUnsupportedFloat(v float64) *errors.UnsupportedValueError

func ErrUnsupportedValue

func ErrUnsupportedValue(code *Opcode, ptr uintptr) *errors.UnsupportedValueError

func Indent

func Indent(buf *bytes.Buffer, src []byte, prefix, indentStr string) error

func IsNilForMarshaler

func IsNilForMarshaler(v interface{}) bool

func IsZero

func IsZero(code *Opcode, v interface{}) bool

func IsZeroNil

func IsZeroNil(code *Opcode, v interface{}) bool

func Load

func Load(base uintptr, idx uintptr) uintptr

func LoadNPtr

func LoadNPtr(base uintptr, idx uintptr, ptrNum int) uintptr

func MapIterInit

func MapIterInit(mapType *runtime.Type, m unsafe.Pointer, it *mapIter)

func MapIterKey

func MapIterKey(it *mapIter) unsafe.Pointer

func MapIterNext

func MapIterNext(it *mapIter)

func MapIterValue

func MapIterValue(it *mapIter) unsafe.Pointer

func MapLen

func MapLen(m unsafe.Pointer) int

func PtrToBool

func PtrToBool(p uintptr) bool

func PtrToBytes

func PtrToBytes(p uintptr) []byte

func PtrToFloat32

func PtrToFloat32(p uintptr) float32

func PtrToFloat64

func PtrToFloat64(p uintptr) float64

func PtrToInterface

func PtrToInterface(code *Opcode, p uintptr) interface{}

func PtrToNPtr

func PtrToNPtr(p uintptr, ptrNum int) uintptr

func PtrToNumber

func PtrToNumber(p uintptr) json.Number

func PtrToPtr

func PtrToPtr(p uintptr) uintptr

func PtrToSlice

func PtrToSlice(p uintptr) *runtime.SliceHeader

func PtrToString

func PtrToString(p uintptr) string

func PtrToUint64

func PtrToUint64(p uintptr) uint64

func PtrToUnsafePtr

func PtrToUnsafePtr(p uintptr) unsafe.Pointer

func ReleaseMapContext

func ReleaseMapContext(c *MapContext)

func ReleaseRuntimeContext

func ReleaseRuntimeContext(ctx *RuntimeContext)

func SetFieldQueryToContext

func SetFieldQueryToContext(ctx context.Context, query *FieldQuery) context.Context

func Store

func Store(base uintptr, idx uintptr, p uintptr)

Types

type AnonymousCode

type AnonymousCode interface {
	ToAnonymousOpcode(*compileContext) Opcodes
}

type ArrayCode

type ArrayCode struct {
	// contains filtered or unexported fields
}

func (*ArrayCode) Filter

func (c *ArrayCode) Filter(_ *FieldQuery) Code

func (*ArrayCode) Kind

func (c *ArrayCode) Kind() CodeKind

func (*ArrayCode) ToOpcode

func (c *ArrayCode) ToOpcode(ctx *compileContext) Opcodes

type BoolCode

type BoolCode struct {
	// contains filtered or unexported fields
}

func (*BoolCode) Filter

func (c *BoolCode) Filter(_ *FieldQuery) Code

func (*BoolCode) Kind

func (c *BoolCode) Kind() CodeKind

func (*BoolCode) ToOpcode

func (c *BoolCode) ToOpcode(ctx *compileContext) Opcodes

type BytesCode

type BytesCode struct {
	// contains filtered or unexported fields
}

func (*BytesCode) Filter

func (c *BytesCode) Filter(_ *FieldQuery) Code

func (*BytesCode) Kind

func (c *BytesCode) Kind() CodeKind

func (*BytesCode) ToOpcode

func (c *BytesCode) ToOpcode(ctx *compileContext) Opcodes

type Code

type Code interface {
	Kind() CodeKind
	ToOpcode(*compileContext) Opcodes
	Filter(*FieldQuery) Code
}

type CodeKind

type CodeKind int
const (
	CodeKindInterface CodeKind = iota
	CodeKindPtr
	CodeKindInt
	CodeKindUint
	CodeKindFloat
	CodeKindString
	CodeKindBool
	CodeKindStruct
	CodeKindMap
	CodeKindSlice
	CodeKindArray
	CodeKindBytes
	CodeKindMarshalJSON
	CodeKindMarshalText
	CodeKindRecursive
)

type CodeType

type CodeType int
const (
	CodeOp          CodeType = 0
	CodeArrayHead   CodeType = 1
	CodeArrayElem   CodeType = 2
	CodeSliceHead   CodeType = 3
	CodeSliceElem   CodeType = 4
	CodeMapHead     CodeType = 5
	CodeMapKey      CodeType = 6
	CodeMapValue    CodeType = 7
	CodeMapEnd      CodeType = 8
	CodeRecursive   CodeType = 9
	CodeStructField CodeType = 10
	CodeStructEnd   CodeType = 11
)

type ColorFormat

type ColorFormat = EncodeFormat

type ColorScheme

type ColorScheme = EncodeFormatScheme

type CompiledCode

type CompiledCode struct {
	Code    *Opcode
	Linked  bool // whether recursive code already have linked
	CurLen  uintptr
	NextLen uintptr
}

type Compiler

type Compiler struct {
	// contains filtered or unexported fields
}

type EncodeFormat

type EncodeFormat struct {
	Header string
	Footer string
}

type EncodeFormatScheme

type EncodeFormatScheme struct {
	Int       EncodeFormat
	Uint      EncodeFormat
	Float     EncodeFormat
	Bool      EncodeFormat
	String    EncodeFormat
	Binary    EncodeFormat
	ObjectKey EncodeFormat
	Null      EncodeFormat
}

type FieldQuery

type FieldQuery struct {
	Name   string
	Fields []*FieldQuery
	// contains filtered or unexported fields
}

func FieldQueryFromContext

func FieldQueryFromContext(ctx context.Context) *FieldQuery

func (*FieldQuery) Hash

func (q *FieldQuery) Hash() string

func (*FieldQuery) MarshalJSON

func (q *FieldQuery) MarshalJSON() ([]byte, error)

func (*FieldQuery) QueryString

func (q *FieldQuery) QueryString() (FieldQueryString, error)

type FieldQueryString

type FieldQueryString string

func (FieldQueryString) Build

func (s FieldQueryString) Build() (*FieldQuery, error)

type FloatCode

type FloatCode struct {
	// contains filtered or unexported fields
}

func (*FloatCode) Filter

func (c *FloatCode) Filter(_ *FieldQuery) Code

func (*FloatCode) Kind

func (c *FloatCode) Kind() CodeKind

func (*FloatCode) ToOpcode

func (c *FloatCode) ToOpcode(ctx *compileContext) Opcodes

type IntCode

type IntCode struct {
	// contains filtered or unexported fields
}

func (*IntCode) Filter

func (c *IntCode) Filter(_ *FieldQuery) Code

func (*IntCode) Kind

func (c *IntCode) Kind() CodeKind

func (*IntCode) ToOpcode

func (c *IntCode) ToOpcode(ctx *compileContext) Opcodes

type InterfaceCode

type InterfaceCode struct {
	// contains filtered or unexported fields
}

func (*InterfaceCode) Filter

func (c *InterfaceCode) Filter(query *FieldQuery) Code

func (*InterfaceCode) Kind

func (c *InterfaceCode) Kind() CodeKind

func (*InterfaceCode) ToOpcode

func (c *InterfaceCode) ToOpcode(ctx *compileContext) Opcodes

type MapCode

type MapCode struct {
	// contains filtered or unexported fields
}

func (*MapCode) Filter

func (c *MapCode) Filter(_ *FieldQuery) Code

func (*MapCode) Kind

func (c *MapCode) Kind() CodeKind

func (*MapCode) ToOpcode

func (c *MapCode) ToOpcode(ctx *compileContext) Opcodes

type MapContext

type MapContext struct {
	Start int
	First int
	Idx   int
	Slice *Mapslice
	Buf   []byte
	Len   int
	Iter  mapIter
}

func NewMapContext

func NewMapContext(mapLen int, unorderedMap bool) *MapContext

type MapItem

type MapItem struct {
	Key   []byte
	Value []byte
}

type Mapslice

type Mapslice struct {
	Items []MapItem
}

func (*Mapslice) Len

func (m *Mapslice) Len() int

func (*Mapslice) Less

func (m *Mapslice) Less(i, j int) bool

func (*Mapslice) Swap

func (m *Mapslice) Swap(i, j int)

type MarshalJSONCode

type MarshalJSONCode struct {
	// contains filtered or unexported fields
}

func (*MarshalJSONCode) Filter

func (c *MarshalJSONCode) Filter(query *FieldQuery) Code

func (*MarshalJSONCode) Kind

func (c *MarshalJSONCode) Kind() CodeKind

func (*MarshalJSONCode) ToOpcode

func (c *MarshalJSONCode) ToOpcode(ctx *compileContext) Opcodes

type MarshalTextCode

type MarshalTextCode struct {
	// contains filtered or unexported fields
}

func (*MarshalTextCode) Filter

func (c *MarshalTextCode) Filter(query *FieldQuery) Code

func (*MarshalTextCode) Kind

func (c *MarshalTextCode) Kind() CodeKind

func (*MarshalTextCode) ToOpcode

func (c *MarshalTextCode) ToOpcode(ctx *compileContext) Opcodes

type OpFlags

type OpFlags uint16
const (
	AnonymousHeadFlags     OpFlags = 1 << 0
	AnonymousKeyFlags      OpFlags = 1 << 1
	IndirectFlags          OpFlags = 1 << 2
	IsTaggedKeyFlags       OpFlags = 1 << 3
	NilCheckFlags          OpFlags = 1 << 4
	AddrForMarshalerFlags  OpFlags = 1 << 5
	IsNextOpPtrTypeFlags   OpFlags = 1 << 6
	IsNilableTypeFlags     OpFlags = 1 << 7
	MarshalerContextFlags  OpFlags = 1 << 8
	NonEmptyInterfaceFlags OpFlags = 1 << 9
	AddrForIsZeroFlags     OpFlags = 1 << 10
)

type OpType

type OpType uint16
const (
	OpEnd                                        OpType = 0
	OpInterface                                  OpType = 1
	OpPtr                                        OpType = 2
	OpSliceElem                                  OpType = 3
	OpSliceEnd                                   OpType = 4
	OpArrayElem                                  OpType = 5
	OpArrayEnd                                   OpType = 6
	OpMapKey                                     OpType = 7
	OpMapValue                                   OpType = 8
	OpMapEnd                                     OpType = 9
	OpRecursive                                  OpType = 10
	OpRecursivePtr                               OpType = 11
	OpRecursiveEnd                               OpType = 12
	OpInterfaceEnd                               OpType = 13
	OpInt                                        OpType = 14
	OpUint                                       OpType = 15
	OpFloat32                                    OpType = 16
	OpFloat64                                    OpType = 17
	OpBool                                       OpType = 18
	OpString                                     OpType = 19
	OpBytes                                      OpType = 20
	OpNumber                                     OpType = 21
	OpArray                                      OpType = 22
	OpMap                                        OpType = 23
	OpSlice                                      OpType = 24
	OpStruct                                     OpType = 25
	OpMarshalJSON                                OpType = 26
	OpMarshalText                                OpType = 27
	OpIntString                                  OpType = 28
	OpUintString                                 OpType = 29
	OpFloat32String                              OpType = 30
	OpFloat64String                              OpType = 31
	OpBoolString                                 OpType = 32
	OpStringString                               OpType = 33
	OpNumberString                               OpType = 34
	OpIntPtr                                     OpType = 35
	OpUintPtr                                    OpType = 36
	OpFloat32Ptr                                 OpType = 37
	OpFloat64Ptr                                 OpType = 38
	OpBoolPtr                                    OpType = 39
	OpStringPtr                                  OpType = 40
	OpBytesPtr                                   OpType = 41
	OpNumberPtr                                  OpType = 42
	OpArrayPtr                                   OpType = 43
	OpMapPtr                                     OpType = 44
	OpSlicePtr                                   OpType = 45
	OpMarshalJSONPtr                             OpType = 46
	OpMarshalTextPtr                             OpType = 47
	OpInterfacePtr                               OpType = 48
	OpIntPtrString                               OpType = 49
	OpUintPtrString                              OpType = 50
	OpFloat32PtrString                           OpType = 51
	OpFloat64PtrString                           OpType = 52
	OpBoolPtrString                              OpType = 53
	OpStringPtrString                            OpType = 54
	OpNumberPtrString                            OpType = 55
	OpStructHeadInt                              OpType = 56
	OpStructHeadOmitEmptyInt                     OpType = 57
	OpStructHeadOmitZeroInt                      OpType = 58
	OpStructHeadOmitEmptyZeroInt                 OpType = 59
	OpStructPtrHeadInt                           OpType = 60
	OpStructPtrHeadOmitEmptyInt                  OpType = 61
	OpStructPtrHeadOmitZeroInt                   OpType = 62
	OpStructPtrHeadOmitEmptyZeroInt              OpType = 63
	OpStructHeadUint                             OpType = 64
	OpStructHeadOmitEmptyUint                    OpType = 65
	OpStructHeadOmitZeroUint                     OpType = 66
	OpStructHeadOmitEmptyZeroUint                OpType = 67
	OpStructPtrHeadUint                          OpType = 68
	OpStructPtrHeadOmitEmptyUint                 OpType = 69
	OpStructPtrHeadOmitZeroUint                  OpType = 70
	OpStructPtrHeadOmitEmptyZeroUint             OpType = 71
	OpStructHeadFloat32                          OpType = 72
	OpStructHeadOmitEmptyFloat32                 OpType = 73
	OpStructHeadOmitZeroFloat32                  OpType = 74
	OpStructHeadOmitEmptyZeroFloat32             OpType = 75
	OpStructPtrHeadFloat32                       OpType = 76
	OpStructPtrHeadOmitEmptyFloat32              OpType = 77
	OpStructPtrHeadOmitZeroFloat32               OpType = 78
	OpStructPtrHeadOmitEmptyZeroFloat32          OpType = 79
	OpStructHeadFloat64                          OpType = 80
	OpStructHeadOmitEmptyFloat64                 OpType = 81
	OpStructHeadOmitZeroFloat64                  OpType = 82
	OpStructHeadOmitEmptyZeroFloat64             OpType = 83
	OpStructPtrHeadFloat64                       OpType = 84
	OpStructPtrHeadOmitEmptyFloat64              OpType = 85
	OpStructPtrHeadOmitZeroFloat64               OpType = 86
	OpStructPtrHeadOmitEmptyZeroFloat64          OpType = 87
	OpStructHeadBool                             OpType = 88
	OpStructHeadOmitEmptyBool                    OpType = 89
	OpStructHeadOmitZeroBool                     OpType = 90
	OpStructHeadOmitEmptyZeroBool                OpType = 91
	OpStructPtrHeadBool                          OpType = 92
	OpStructPtrHeadOmitEmptyBool                 OpType = 93
	OpStructPtrHeadOmitZeroBool                  OpType = 94
	OpStructPtrHeadOmitEmptyZeroBool             OpType = 95
	OpStructHeadString                           OpType = 96
	OpStructHeadOmitEmptyString                  OpType = 97
	OpStructHeadOmitZeroString                   OpType = 98
	OpStructHeadOmitEmptyZeroString              OpType = 99
	OpStructPtrHeadString                        OpType = 100
	OpStructPtrHeadOmitEmptyString               OpType = 101
	OpStructPtrHeadOmitZeroString                OpType = 102
	OpStructPtrHeadOmitEmptyZeroString           OpType = 103
	OpStructHeadBytes                            OpType = 104
	OpStructHeadOmitEmptyBytes                   OpType = 105
	OpStructHeadOmitZeroBytes                    OpType = 106
	OpStructHeadOmitEmptyZeroBytes               OpType = 107
	OpStructPtrHeadBytes                         OpType = 108
	OpStructPtrHeadOmitEmptyBytes                OpType = 109
	OpStructPtrHeadOmitZeroBytes                 OpType = 110
	OpStructPtrHeadOmitEmptyZeroBytes            OpType = 111
	OpStructHeadNumber                           OpType = 112
	OpStructHeadOmitEmptyNumber                  OpType = 113
	OpStructHeadOmitZeroNumber                   OpType = 114
	OpStructHeadOmitEmptyZeroNumber              OpType = 115
	OpStructPtrHeadNumber                        OpType = 116
	OpStructPtrHeadOmitEmptyNumber               OpType = 117
	OpStructPtrHeadOmitZeroNumber                OpType = 118
	OpStructPtrHeadOmitEmptyZeroNumber           OpType = 119
	OpStructHeadArray                            OpType = 120
	OpStructHeadOmitEmptyArray                   OpType = 121
	OpStructHeadOmitZeroArray                    OpType = 122
	OpStructHeadOmitEmptyZeroArray               OpType = 123
	OpStructPtrHeadArray                         OpType = 124
	OpStructPtrHeadOmitEmptyArray                OpType = 125
	OpStructPtrHeadOmitZeroArray                 OpType = 126
	OpStructPtrHeadOmitEmptyZeroArray            OpType = 127
	OpStructHeadMap                              OpType = 128
	OpStructHeadOmitEmptyMap                     OpType = 129
	OpStructHeadOmitZeroMap                      OpType = 130
	OpStructHeadOmitEmptyZeroMap                 OpType = 131
	OpStructPtrHeadMap                           OpType = 132
	OpStructPtrHeadOmitEmptyMap                  OpType = 133
	OpStructPtrHeadOmitZeroMap                   OpType = 134
	OpStructPtrHeadOmitEmptyZeroMap              OpType = 135
	OpStructHeadSlice                            OpType = 136
	OpStructHeadOmitEmptySlice                   OpType = 137
	OpStructHeadOmitZeroSlice                    OpType = 138
	OpStructHeadOmitEmptyZeroSlice               OpType = 139
	OpStructPtrHeadSlice                         OpType = 140
	OpStructPtrHeadOmitEmptySlice                OpType = 141
	OpStructPtrHeadOmitZeroSlice                 OpType = 142
	OpStructPtrHeadOmitEmptyZeroSlice            OpType = 143
	OpStructHeadStruct                           OpType = 144
	OpStructHeadOmitEmptyStruct                  OpType = 145
	OpStructHeadOmitZeroStruct                   OpType = 146
	OpStructHeadOmitEmptyZeroStruct              OpType = 147
	OpStructPtrHeadStruct                        OpType = 148
	OpStructPtrHeadOmitEmptyStruct               OpType = 149
	OpStructPtrHeadOmitZeroStruct                OpType = 150
	OpStructPtrHeadOmitEmptyZeroStruct           OpType = 151
	OpStructHeadMarshalJSON                      OpType = 152
	OpStructHeadOmitEmptyMarshalJSON             OpType = 153
	OpStructHeadOmitZeroMarshalJSON              OpType = 154
	OpStructHeadOmitEmptyZeroMarshalJSON         OpType = 155
	OpStructPtrHeadMarshalJSON                   OpType = 156
	OpStructPtrHeadOmitEmptyMarshalJSON          OpType = 157
	OpStructPtrHeadOmitZeroMarshalJSON           OpType = 158
	OpStructPtrHeadOmitEmptyZeroMarshalJSON      OpType = 159
	OpStructHeadMarshalText                      OpType = 160
	OpStructHeadOmitEmptyMarshalText             OpType = 161
	OpStructHeadOmitZeroMarshalText              OpType = 162
	OpStructHeadOmitEmptyZeroMarshalText         OpType = 163
	OpStructPtrHeadMarshalText                   OpType = 164
	OpStructPtrHeadOmitEmptyMarshalText          OpType = 165
	OpStructPtrHeadOmitZeroMarshalText           OpType = 166
	OpStructPtrHeadOmitEmptyZeroMarshalText      OpType = 167
	OpStructHeadIntString                        OpType = 168
	OpStructHeadOmitEmptyIntString               OpType = 169
	OpStructHeadOmitZeroIntString                OpType = 170
	OpStructHeadOmitEmptyZeroIntString           OpType = 171
	OpStructPtrHeadIntString                     OpType = 172
	OpStructPtrHeadOmitEmptyIntString            OpType = 173
	OpStructPtrHeadOmitZeroIntString             OpType = 174
	OpStructPtrHeadOmitEmptyZeroIntString        OpType = 175
	OpStructHeadUintString                       OpType = 176
	OpStructHeadOmitEmptyUintString              OpType = 177
	OpStructHeadOmitZeroUintString               OpType = 178
	OpStructHeadOmitEmptyZeroUintString          OpType = 179
	OpStructPtrHeadUintString                    OpType = 180
	OpStructPtrHeadOmitEmptyUintString           OpType = 181
	OpStructPtrHeadOmitZeroUintString            OpType = 182
	OpStructPtrHeadOmitEmptyZeroUintString       OpType = 183
	OpStructHeadFloat32String                    OpType = 184
	OpStructHeadOmitEmptyFloat32String           OpType = 185
	OpStructHeadOmitZeroFloat32String            OpType = 186
	OpStructHeadOmitEmptyZeroFloat32String       OpType = 187
	OpStructPtrHeadFloat32String                 OpType = 188
	OpStructPtrHeadOmitEmptyFloat32String        OpType = 189
	OpStructPtrHeadOmitZeroFloat32String         OpType = 190
	OpStructPtrHeadOmitEmptyZeroFloat32String    OpType = 191
	OpStructHeadFloat64String                    OpType = 192
	OpStructHeadOmitEmptyFloat64String           OpType = 193
	OpStructHeadOmitZeroFloat64String            OpType = 194
	OpStructHeadOmitEmptyZeroFloat64String       OpType = 195
	OpStructPtrHeadFloat64String                 OpType = 196
	OpStructPtrHeadOmitEmptyFloat64String        OpType = 197
	OpStructPtrHeadOmitZeroFloat64String         OpType = 198
	OpStructPtrHeadOmitEmptyZeroFloat64String    OpType = 199
	OpStructHeadBoolString                       OpType = 200
	OpStructHeadOmitEmptyBoolString              OpType = 201
	OpStructHeadOmitZeroBoolString               OpType = 202
	OpStructHeadOmitEmptyZeroBoolString          OpType = 203
	OpStructPtrHeadBoolString                    OpType = 204
	OpStructPtrHeadOmitEmptyBoolString           OpType = 205
	OpStructPtrHeadOmitZeroBoolString            OpType = 206
	OpStructPtrHeadOmitEmptyZeroBoolString       OpType = 207
	OpStructHeadStringString                     OpType = 208
	OpStructHeadOmitEmptyStringString            OpType = 209
	OpStructHeadOmitZeroStringString             OpType = 210
	OpStructHeadOmitEmptyZeroStringString        OpType = 211
	OpStructPtrHeadStringString                  OpType = 212
	OpStructPtrHeadOmitEmptyStringString         OpType = 213
	OpStructPtrHeadOmitZeroStringString          OpType = 214
	OpStructPtrHeadOmitEmptyZeroStringString     OpType = 215
	OpStructHeadNumberString                     OpType = 216
	OpStructHeadOmitEmptyNumberString            OpType = 217
	OpStructHeadOmitZeroNumberString             OpType = 218
	OpStructHeadOmitEmptyZeroNumberString        OpType = 219
	OpStructPtrHeadNumberString                  OpType = 220
	OpStructPtrHeadOmitEmptyNumberString         OpType = 221
	OpStructPtrHeadOmitZeroNumberString          OpType = 222
	OpStructPtrHeadOmitEmptyZeroNumberString     OpType = 223
	OpStructHeadIntPtr                           OpType = 224
	OpStructHeadOmitEmptyIntPtr                  OpType = 225
	OpStructHeadOmitZeroIntPtr                   OpType = 226
	OpStructHeadOmitEmptyZeroIntPtr              OpType = 227
	OpStructPtrHeadIntPtr                        OpType = 228
	OpStructPtrHeadOmitEmptyIntPtr               OpType = 229
	OpStructPtrHeadOmitZeroIntPtr                OpType = 230
	OpStructPtrHeadOmitEmptyZeroIntPtr           OpType = 231
	OpStructHeadUintPtr                          OpType = 232
	OpStructHeadOmitEmptyUintPtr                 OpType = 233
	OpStructHeadOmitZeroUintPtr                  OpType = 234
	OpStructHeadOmitEmptyZeroUintPtr             OpType = 235
	OpStructPtrHeadUintPtr                       OpType = 236
	OpStructPtrHeadOmitEmptyUintPtr              OpType = 237
	OpStructPtrHeadOmitZeroUintPtr               OpType = 238
	OpStructPtrHeadOmitEmptyZeroUintPtr          OpType = 239
	OpStructHeadFloat32Ptr                       OpType = 240
	OpStructHeadOmitEmptyFloat32Ptr              OpType = 241
	OpStructHeadOmitZeroFloat32Ptr               OpType = 242
	OpStructHeadOmitEmptyZeroFloat32Ptr          OpType = 243
	OpStructPtrHeadFloat32Ptr                    OpType = 244
	OpStructPtrHeadOmitEmptyFloat32Ptr           OpType = 245
	OpStructPtrHeadOmitZeroFloat32Ptr            OpType = 246
	OpStructPtrHeadOmitEmptyZeroFloat32Ptr       OpType = 247
	OpStructHeadFloat64Ptr                       OpType = 248
	OpStructHeadOmitEmptyFloat64Ptr              OpType = 249
	OpStructHeadOmitZeroFloat64Ptr               OpType = 250
	OpStructHeadOmitEmptyZeroFloat64Ptr          OpType = 251
	OpStructPtrHeadFloat64Ptr                    OpType = 252
	OpStructPtrHeadOmitEmptyFloat64Ptr           OpType = 253
	OpStructPtrHeadOmitZeroFloat64Ptr            OpType = 254
	OpStructPtrHeadOmitEmptyZeroFloat64Ptr       OpType = 255
	OpStructHeadBoolPtr                          OpType = 256
	OpStructHeadOmitEmptyBoolPtr                 OpType = 257
	OpStructHeadOmitZeroBoolPtr                  OpType = 258
	OpStructHeadOmitEmptyZeroBoolPtr             OpType = 259
	OpStructPtrHeadBoolPtr                       OpType = 260
	OpStructPtrHeadOmitEmptyBoolPtr              OpType = 261
	OpStructPtrHeadOmitZeroBoolPtr               OpType = 262
	OpStructPtrHeadOmitEmptyZeroBoolPtr          OpType = 263
	OpStructHeadStringPtr                        OpType = 264
	OpStructHeadOmitEmptyStringPtr               OpType = 265
	OpStructHeadOmitZeroStringPtr                OpType = 266
	OpStructHeadOmitEmptyZeroStringPtr           OpType = 267
	OpStructPtrHeadStringPtr                     OpType = 268
	OpStructPtrHeadOmitEmptyStringPtr            OpType = 269
	OpStructPtrHeadOmitZeroStringPtr             OpType = 270
	OpStructPtrHeadOmitEmptyZeroStringPtr        OpType = 271
	OpStructHeadBytesPtr                         OpType = 272
	OpStructHeadOmitEmptyBytesPtr                OpType = 273
	OpStructHeadOmitZeroBytesPtr                 OpType = 274
	OpStructHeadOmitEmptyZeroBytesPtr            OpType = 275
	OpStructPtrHeadBytesPtr                      OpType = 276
	OpStructPtrHeadOmitEmptyBytesPtr             OpType = 277
	OpStructPtrHeadOmitZeroBytesPtr              OpType = 278
	OpStructPtrHeadOmitEmptyZeroBytesPtr         OpType = 279
	OpStructHeadNumberPtr                        OpType = 280
	OpStructHeadOmitEmptyNumberPtr               OpType = 281
	OpStructHeadOmitZeroNumberPtr                OpType = 282
	OpStructHeadOmitEmptyZeroNumberPtr           OpType = 283
	OpStructPtrHeadNumberPtr                     OpType = 284
	OpStructPtrHeadOmitEmptyNumberPtr            OpType = 285
	OpStructPtrHeadOmitZeroNumberPtr             OpType = 286
	OpStructPtrHeadOmitEmptyZeroNumberPtr        OpType = 287
	OpStructHeadArrayPtr                         OpType = 288
	OpStructHeadOmitEmptyArrayPtr                OpType = 289
	OpStructHeadOmitZeroArrayPtr                 OpType = 290
	OpStructHeadOmitEmptyZeroArrayPtr            OpType = 291
	OpStructPtrHeadArrayPtr                      OpType = 292
	OpStructPtrHeadOmitEmptyArrayPtr             OpType = 293
	OpStructPtrHeadOmitZeroArrayPtr              OpType = 294
	OpStructPtrHeadOmitEmptyZeroArrayPtr         OpType = 295
	OpStructHeadMapPtr                           OpType = 296
	OpStructHeadOmitEmptyMapPtr                  OpType = 297
	OpStructHeadOmitZeroMapPtr                   OpType = 298
	OpStructHeadOmitEmptyZeroMapPtr              OpType = 299
	OpStructPtrHeadMapPtr                        OpType = 300
	OpStructPtrHeadOmitEmptyMapPtr               OpType = 301
	OpStructPtrHeadOmitZeroMapPtr                OpType = 302
	OpStructPtrHeadOmitEmptyZeroMapPtr           OpType = 303
	OpStructHeadSlicePtr                         OpType = 304
	OpStructHeadOmitEmptySlicePtr                OpType = 305
	OpStructHeadOmitZeroSlicePtr                 OpType = 306
	OpStructHeadOmitEmptyZeroSlicePtr            OpType = 307
	OpStructPtrHeadSlicePtr                      OpType = 308
	OpStructPtrHeadOmitEmptySlicePtr             OpType = 309
	OpStructPtrHeadOmitZeroSlicePtr              OpType = 310
	OpStructPtrHeadOmitEmptyZeroSlicePtr         OpType = 311
	OpStructHeadMarshalJSONPtr                   OpType = 312
	OpStructHeadOmitEmptyMarshalJSONPtr          OpType = 313
	OpStructHeadOmitZeroMarshalJSONPtr           OpType = 314
	OpStructHeadOmitEmptyZeroMarshalJSONPtr      OpType = 315
	OpStructPtrHeadMarshalJSONPtr                OpType = 316
	OpStructPtrHeadOmitEmptyMarshalJSONPtr       OpType = 317
	OpStructPtrHeadOmitZeroMarshalJSONPtr        OpType = 318
	OpStructPtrHeadOmitEmptyZeroMarshalJSONPtr   OpType = 319
	OpStructHeadMarshalTextPtr                   OpType = 320
	OpStructHeadOmitEmptyMarshalTextPtr          OpType = 321
	OpStructHeadOmitZeroMarshalTextPtr           OpType = 322
	OpStructHeadOmitEmptyZeroMarshalTextPtr      OpType = 323
	OpStructPtrHeadMarshalTextPtr                OpType = 324
	OpStructPtrHeadOmitEmptyMarshalTextPtr       OpType = 325
	OpStructPtrHeadOmitZeroMarshalTextPtr        OpType = 326
	OpStructPtrHeadOmitEmptyZeroMarshalTextPtr   OpType = 327
	OpStructHeadInterfacePtr                     OpType = 328
	OpStructHeadOmitEmptyInterfacePtr            OpType = 329
	OpStructHeadOmitZeroInterfacePtr             OpType = 330
	OpStructHeadOmitEmptyZeroInterfacePtr        OpType = 331
	OpStructPtrHeadInterfacePtr                  OpType = 332
	OpStructPtrHeadOmitEmptyInterfacePtr         OpType = 333
	OpStructPtrHeadOmitZeroInterfacePtr          OpType = 334
	OpStructPtrHeadOmitEmptyZeroInterfacePtr     OpType = 335
	OpStructHeadIntPtrString                     OpType = 336
	OpStructHeadOmitEmptyIntPtrString            OpType = 337
	OpStructHeadOmitZeroIntPtrString             OpType = 338
	OpStructHeadOmitEmptyZeroIntPtrString        OpType = 339
	OpStructPtrHeadIntPtrString                  OpType = 340
	OpStructPtrHeadOmitEmptyIntPtrString         OpType = 341
	OpStructPtrHeadOmitZeroIntPtrString          OpType = 342
	OpStructPtrHeadOmitEmptyZeroIntPtrString     OpType = 343
	OpStructHeadUintPtrString                    OpType = 344
	OpStructHeadOmitEmptyUintPtrString           OpType = 345
	OpStructHeadOmitZeroUintPtrString            OpType = 346
	OpStructHeadOmitEmptyZeroUintPtrString       OpType = 347
	OpStructPtrHeadUintPtrString                 OpType = 348
	OpStructPtrHeadOmitEmptyUintPtrString        OpType = 349
	OpStructPtrHeadOmitZeroUintPtrString         OpType = 350
	OpStructPtrHeadOmitEmptyZeroUintPtrString    OpType = 351
	OpStructHeadFloat32PtrString                 OpType = 352
	OpStructHeadOmitEmptyFloat32PtrString        OpType = 353
	OpStructHeadOmitZeroFloat32PtrString         OpType = 354
	OpStructHeadOmitEmptyZeroFloat32PtrString    OpType = 355
	OpStructPtrHeadFloat32PtrString              OpType = 356
	OpStructPtrHeadOmitEmptyFloat32PtrString     OpType = 357
	OpStructPtrHeadOmitZeroFloat32PtrString      OpType = 358
	OpStructPtrHeadOmitEmptyZeroFloat32PtrString OpType = 359
	OpStructHeadFloat64PtrString                 OpType = 360
	OpStructHeadOmitEmptyFloat64PtrString        OpType = 361
	OpStructHeadOmitZeroFloat64PtrString         OpType = 362
	OpStructHeadOmitEmptyZeroFloat64PtrString    OpType = 363
	OpStructPtrHeadFloat64PtrString              OpType = 364
	OpStructPtrHeadOmitEmptyFloat64PtrString     OpType = 365
	OpStructPtrHeadOmitZeroFloat64PtrString      OpType = 366
	OpStructPtrHeadOmitEmptyZeroFloat64PtrString OpType = 367
	OpStructHeadBoolPtrString                    OpType = 368
	OpStructHeadOmitEmptyBoolPtrString           OpType = 369
	OpStructHeadOmitZeroBoolPtrString            OpType = 370
	OpStructHeadOmitEmptyZeroBoolPtrString       OpType = 371
	OpStructPtrHeadBoolPtrString                 OpType = 372
	OpStructPtrHeadOmitEmptyBoolPtrString        OpType = 373
	OpStructPtrHeadOmitZeroBoolPtrString         OpType = 374
	OpStructPtrHeadOmitEmptyZeroBoolPtrString    OpType = 375
	OpStructHeadStringPtrString                  OpType = 376
	OpStructHeadOmitEmptyStringPtrString         OpType = 377
	OpStructHeadOmitZeroStringPtrString          OpType = 378
	OpStructHeadOmitEmptyZeroStringPtrString     OpType = 379
	OpStructPtrHeadStringPtrString               OpType = 380
	OpStructPtrHeadOmitEmptyStringPtrString      OpType = 381
	OpStructPtrHeadOmitZeroStringPtrString       OpType = 382
	OpStructPtrHeadOmitEmptyZeroStringPtrString  OpType = 383
	OpStructHeadNumberPtrString                  OpType = 384
	OpStructHeadOmitEmptyNumberPtrString         OpType = 385
	OpStructHeadOmitZeroNumberPtrString          OpType = 386
	OpStructHeadOmitEmptyZeroNumberPtrString     OpType = 387
	OpStructPtrHeadNumberPtrString               OpType = 388
	OpStructPtrHeadOmitEmptyNumberPtrString      OpType = 389
	OpStructPtrHeadOmitZeroNumberPtrString       OpType = 390
	OpStructPtrHeadOmitEmptyZeroNumberPtrString  OpType = 391
	OpStructHead                                 OpType = 392
	OpStructHeadOmitEmpty                        OpType = 393
	OpStructHeadOmitZero                         OpType = 394
	OpStructHeadOmitEmptyZero                    OpType = 395
	OpStructPtrHead                              OpType = 396
	OpStructPtrHeadOmitEmpty                     OpType = 397
	OpStructPtrHeadOmitZero                      OpType = 398
	OpStructPtrHeadOmitEmptyZero                 OpType = 399
	OpStructFieldInt                             OpType = 400
	OpStructFieldOmitEmptyInt                    OpType = 401
	OpStructFieldOmitZeroInt                     OpType = 402
	OpStructFieldOmitEmptyZeroInt                OpType = 403
	OpStructEndInt                               OpType = 404
	OpStructEndOmitEmptyInt                      OpType = 405
	OpStructEndOmitZeroInt                       OpType = 406
	OpStructEndOmitEmptyZeroInt                  OpType = 407
	OpStructFieldUint                            OpType = 408
	OpStructFieldOmitEmptyUint                   OpType = 409
	OpStructFieldOmitZeroUint                    OpType = 410
	OpStructFieldOmitEmptyZeroUint               OpType = 411
	OpStructEndUint                              OpType = 412
	OpStructEndOmitEmptyUint                     OpType = 413
	OpStructEndOmitZeroUint                      OpType = 414
	OpStructEndOmitEmptyZeroUint                 OpType = 415
	OpStructFieldFloat32                         OpType = 416
	OpStructFieldOmitEmptyFloat32                OpType = 417
	OpStructFieldOmitZeroFloat32                 OpType = 418
	OpStructFieldOmitEmptyZeroFloat32            OpType = 419
	OpStructEndFloat32                           OpType = 420
	OpStructEndOmitEmptyFloat32                  OpType = 421
	OpStructEndOmitZeroFloat32                   OpType = 422
	OpStructEndOmitEmptyZeroFloat32              OpType = 423
	OpStructFieldFloat64                         OpType = 424
	OpStructFieldOmitEmptyFloat64                OpType = 425
	OpStructFieldOmitZeroFloat64                 OpType = 426
	OpStructFieldOmitEmptyZeroFloat64            OpType = 427
	OpStructEndFloat64                           OpType = 428
	OpStructEndOmitEmptyFloat64                  OpType = 429
	OpStructEndOmitZeroFloat64                   OpType = 430
	OpStructEndOmitEmptyZeroFloat64              OpType = 431
	OpStructFieldBool                            OpType = 432
	OpStructFieldOmitEmptyBool                   OpType = 433
	OpStructFieldOmitZeroBool                    OpType = 434
	OpStructFieldOmitEmptyZeroBool               OpType = 435
	OpStructEndBool                              OpType = 436
	OpStructEndOmitEmptyBool                     OpType = 437
	OpStructEndOmitZeroBool                      OpType = 438
	OpStructEndOmitEmptyZeroBool                 OpType = 439
	OpStructFieldString                          OpType = 440
	OpStructFieldOmitEmptyString                 OpType = 441
	OpStructFieldOmitZeroString                  OpType = 442
	OpStructFieldOmitEmptyZeroString             OpType = 443
	OpStructEndString                            OpType = 444
	OpStructEndOmitEmptyString                   OpType = 445
	OpStructEndOmitZeroString                    OpType = 446
	OpStructEndOmitEmptyZeroString               OpType = 447
	OpStructFieldBytes                           OpType = 448
	OpStructFieldOmitEmptyBytes                  OpType = 449
	OpStructFieldOmitZeroBytes                   OpType = 450
	OpStructFieldOmitEmptyZeroBytes              OpType = 451
	OpStructEndBytes                             OpType = 452
	OpStructEndOmitEmptyBytes                    OpType = 453
	OpStructEndOmitZeroBytes                     OpType = 454
	OpStructEndOmitEmptyZeroBytes                OpType = 455
	OpStructFieldNumber                          OpType = 456
	OpStructFieldOmitEmptyNumber                 OpType = 457
	OpStructFieldOmitZeroNumber                  OpType = 458
	OpStructFieldOmitEmptyZeroNumber             OpType = 459
	OpStructEndNumber                            OpType = 460
	OpStructEndOmitEmptyNumber                   OpType = 461
	OpStructEndOmitZeroNumber                    OpType = 462
	OpStructEndOmitEmptyZeroNumber               OpType = 463
	OpStructFieldArray                           OpType = 464
	OpStructFieldOmitEmptyArray                  OpType = 465
	OpStructFieldOmitZeroArray                   OpType = 466
	OpStructFieldOmitEmptyZeroArray              OpType = 467
	OpStructEndArray                             OpType = 468
	OpStructEndOmitEmptyArray                    OpType = 469
	OpStructEndOmitZeroArray                     OpType = 470
	OpStructEndOmitEmptyZeroArray                OpType = 471
	OpStructFieldMap                             OpType = 472
	OpStructFieldOmitEmptyMap                    OpType = 473
	OpStructFieldOmitZeroMap                     OpType = 474
	OpStructFieldOmitEmptyZeroMap                OpType = 475
	OpStructEndMap                               OpType = 476
	OpStructEndOmitEmptyMap                      OpType = 477
	OpStructEndOmitZeroMap                       OpType = 478
	OpStructEndOmitEmptyZeroMap                  OpType = 479
	OpStructFieldSlice                           OpType = 480
	OpStructFieldOmitEmptySlice                  OpType = 481
	OpStructFieldOmitZeroSlice                   OpType = 482
	OpStructFieldOmitEmptyZeroSlice              OpType = 483
	OpStructEndSlice                             OpType = 484
	OpStructEndOmitEmptySlice                    OpType = 485
	OpStructEndOmitZeroSlice                     OpType = 486
	OpStructEndOmitEmptyZeroSlice                OpType = 487
	OpStructFieldStruct                          OpType = 488
	OpStructFieldOmitEmptyStruct                 OpType = 489
	OpStructFieldOmitZeroStruct                  OpType = 490
	OpStructFieldOmitEmptyZeroStruct             OpType = 491
	OpStructEndStruct                            OpType = 492
	OpStructEndOmitEmptyStruct                   OpType = 493
	OpStructEndOmitZeroStruct                    OpType = 494
	OpStructEndOmitEmptyZeroStruct               OpType = 495
	OpStructFieldMarshalJSON                     OpType = 496
	OpStructFieldOmitEmptyMarshalJSON            OpType = 497
	OpStructFieldOmitZeroMarshalJSON             OpType = 498
	OpStructFieldOmitEmptyZeroMarshalJSON        OpType = 499
	OpStructEndMarshalJSON                       OpType = 500
	OpStructEndOmitEmptyMarshalJSON              OpType = 501
	OpStructEndOmitZeroMarshalJSON               OpType = 502
	OpStructEndOmitEmptyZeroMarshalJSON          OpType = 503
	OpStructFieldMarshalText                     OpType = 504
	OpStructFieldOmitEmptyMarshalText            OpType = 505
	OpStructFieldOmitZeroMarshalText             OpType = 506
	OpStructFieldOmitEmptyZeroMarshalText        OpType = 507
	OpStructEndMarshalText                       OpType = 508
	OpStructEndOmitEmptyMarshalText              OpType = 509
	OpStructEndOmitZeroMarshalText               OpType = 510
	OpStructEndOmitEmptyZeroMarshalText          OpType = 511
	OpStructFieldIntString                       OpType = 512
	OpStructFieldOmitEmptyIntString              OpType = 513
	OpStructFieldOmitZeroIntString               OpType = 514
	OpStructFieldOmitEmptyZeroIntString          OpType = 515
	OpStructEndIntString                         OpType = 516
	OpStructEndOmitEmptyIntString                OpType = 517
	OpStructEndOmitZeroIntString                 OpType = 518
	OpStructEndOmitEmptyZeroIntString            OpType = 519
	OpStructFieldUintString                      OpType = 520
	OpStructFieldOmitEmptyUintString             OpType = 521
	OpStructFieldOmitZeroUintString              OpType = 522
	OpStructFieldOmitEmptyZeroUintString         OpType = 523
	OpStructEndUintString                        OpType = 524
	OpStructEndOmitEmptyUintString               OpType = 525
	OpStructEndOmitZeroUintString                OpType = 526
	OpStructEndOmitEmptyZeroUintString           OpType = 527
	OpStructFieldFloat32String                   OpType = 528
	OpStructFieldOmitEmptyFloat32String          OpType = 529
	OpStructFieldOmitZeroFloat32String           OpType = 530
	OpStructFieldOmitEmptyZeroFloat32String      OpType = 531
	OpStructEndFloat32String                     OpType = 532
	OpStructEndOmitEmptyFloat32String            OpType = 533
	OpStructEndOmitZeroFloat32String             OpType = 534
	OpStructEndOmitEmptyZeroFloat32String        OpType = 535
	OpStructFieldFloat64String                   OpType = 536
	OpStructFieldOmitEmptyFloat64String          OpType = 537
	OpStructFieldOmitZeroFloat64String           OpType = 538
	OpStructFieldOmitEmptyZeroFloat64String      OpType = 539
	OpStructEndFloat64String                     OpType = 540
	OpStructEndOmitEmptyFloat64String            OpType = 541
	OpStructEndOmitZeroFloat64String             OpType = 542
	OpStructEndOmitEmptyZeroFloat64String        OpType = 543
	OpStructFieldBoolString                      OpType = 544
	OpStructFieldOmitEmptyBoolString             OpType = 545
	OpStructFieldOmitZeroBoolString              OpType = 546
	OpStructFieldOmitEmptyZeroBoolString         OpType = 547
	OpStructEndBoolString                        OpType = 548
	OpStructEndOmitEmptyBoolString               OpType = 549
	OpStructEndOmitZeroBoolString                OpType = 550
	OpStructEndOmitEmptyZeroBoolString           OpType = 551
	OpStructFieldStringString                    OpType = 552
	OpStructFieldOmitEmptyStringString           OpType = 553
	OpStructFieldOmitZeroStringString            OpType = 554
	OpStructFieldOmitEmptyZeroStringString       OpType = 555
	OpStructEndStringString                      OpType = 556
	OpStructEndOmitEmptyStringString             OpType = 557
	OpStructEndOmitZeroStringString              OpType = 558
	OpStructEndOmitEmptyZeroStringString         OpType = 559
	OpStructFieldNumberString                    OpType = 560
	OpStructFieldOmitEmptyNumberString           OpType = 561
	OpStructFieldOmitZeroNumberString            OpType = 562
	OpStructFieldOmitEmptyZeroNumberString       OpType = 563
	OpStructEndNumberString                      OpType = 564
	OpStructEndOmitEmptyNumberString             OpType = 565
	OpStructEndOmitZeroNumberString              OpType = 566
	OpStructEndOmitEmptyZeroNumberString         OpType = 567
	OpStructFieldIntPtr                          OpType = 568
	OpStructFieldOmitEmptyIntPtr                 OpType = 569
	OpStructFieldOmitZeroIntPtr                  OpType = 570
	OpStructFieldOmitEmptyZeroIntPtr             OpType = 571
	OpStructEndIntPtr                            OpType = 572
	OpStructEndOmitEmptyIntPtr                   OpType = 573
	OpStructEndOmitZeroIntPtr                    OpType = 574
	OpStructEndOmitEmptyZeroIntPtr               OpType = 575
	OpStructFieldUintPtr                         OpType = 576
	OpStructFieldOmitEmptyUintPtr                OpType = 577
	OpStructFieldOmitZeroUintPtr                 OpType = 578
	OpStructFieldOmitEmptyZeroUintPtr            OpType = 579
	OpStructEndUintPtr                           OpType = 580
	OpStructEndOmitEmptyUintPtr                  OpType = 581
	OpStructEndOmitZeroUintPtr                   OpType = 582
	OpStructEndOmitEmptyZeroUintPtr              OpType = 583
	OpStructFieldFloat32Ptr                      OpType = 584
	OpStructFieldOmitEmptyFloat32Ptr             OpType = 585
	OpStructFieldOmitZeroFloat32Ptr              OpType = 586
	OpStructFieldOmitEmptyZeroFloat32Ptr         OpType = 587
	OpStructEndFloat32Ptr                        OpType = 588
	OpStructEndOmitEmptyFloat32Ptr               OpType = 589
	OpStructEndOmitZeroFloat32Ptr                OpType = 590
	OpStructEndOmitEmptyZeroFloat32Ptr           OpType = 591
	OpStructFieldFloat64Ptr                      OpType = 592
	OpStructFieldOmitEmptyFloat64Ptr             OpType = 593
	OpStructFieldOmitZeroFloat64Ptr              OpType = 594
	OpStructFieldOmitEmptyZeroFloat64Ptr         OpType = 595
	OpStructEndFloat64Ptr                        OpType = 596
	OpStructEndOmitEmptyFloat64Ptr               OpType = 597
	OpStructEndOmitZeroFloat64Ptr                OpType = 598
	OpStructEndOmitEmptyZeroFloat64Ptr           OpType = 599
	OpStructFieldBoolPtr                         OpType = 600
	OpStructFieldOmitEmptyBoolPtr                OpType = 601
	OpStructFieldOmitZeroBoolPtr                 OpType = 602
	OpStructFieldOmitEmptyZeroBoolPtr            OpType = 603
	OpStructEndBoolPtr                           OpType = 604
	OpStructEndOmitEmptyBoolPtr                  OpType = 605
	OpStructEndOmitZeroBoolPtr                   OpType = 606
	OpStructEndOmitEmptyZeroBoolPtr              OpType = 607
	OpStructFieldStringPtr                       OpType = 608
	OpStructFieldOmitEmptyStringPtr              OpType = 609
	OpStructFieldOmitZeroStringPtr               OpType = 610
	OpStructFieldOmitEmptyZeroStringPtr          OpType = 611
	OpStructEndStringPtr                         OpType = 612
	OpStructEndOmitEmptyStringPtr                OpType = 613
	OpStructEndOmitZeroStringPtr                 OpType = 614
	OpStructEndOmitEmptyZeroStringPtr            OpType = 615
	OpStructFieldBytesPtr                        OpType = 616
	OpStructFieldOmitEmptyBytesPtr               OpType = 617
	OpStructFieldOmitZeroBytesPtr                OpType = 618
	OpStructFieldOmitEmptyZeroBytesPtr           OpType = 619
	OpStructEndBytesPtr                          OpType = 620
	OpStructEndOmitEmptyBytesPtr                 OpType = 621
	OpStructEndOmitZeroBytesPtr                  OpType = 622
	OpStructEndOmitEmptyZeroBytesPtr             OpType = 623
	OpStructFieldNumberPtr                       OpType = 624
	OpStructFieldOmitEmptyNumberPtr              OpType = 625
	OpStructFieldOmitZeroNumberPtr               OpType = 626
	OpStructFieldOmitEmptyZeroNumberPtr          OpType = 627
	OpStructEndNumberPtr                         OpType = 628
	OpStructEndOmitEmptyNumberPtr                OpType = 629
	OpStructEndOmitZeroNumberPtr                 OpType = 630
	OpStructEndOmitEmptyZeroNumberPtr            OpType = 631
	OpStructFieldArrayPtr                        OpType = 632
	OpStructFieldOmitEmptyArrayPtr               OpType = 633
	OpStructFieldOmitZeroArrayPtr                OpType = 634
	OpStructFieldOmitEmptyZeroArrayPtr           OpType = 635
	OpStructEndArrayPtr                          OpType = 636
	OpStructEndOmitEmptyArrayPtr                 OpType = 637
	OpStructEndOmitZeroArrayPtr                  OpType = 638
	OpStructEndOmitEmptyZeroArrayPtr             OpType = 639
	OpStructFieldMapPtr                          OpType = 640
	OpStructFieldOmitEmptyMapPtr                 OpType = 641
	OpStructFieldOmitZeroMapPtr                  OpType = 642
	OpStructFieldOmitEmptyZeroMapPtr             OpType = 643
	OpStructEndMapPtr                            OpType = 644
	OpStructEndOmitEmptyMapPtr                   OpType = 645
	OpStructEndOmitZeroMapPtr                    OpType = 646
	OpStructEndOmitEmptyZeroMapPtr               OpType = 647
	OpStructFieldSlicePtr                        OpType = 648
	OpStructFieldOmitEmptySlicePtr               OpType = 649
	OpStructFieldOmitZeroSlicePtr                OpType = 650
	OpStructFieldOmitEmptyZeroSlicePtr           OpType = 651
	OpStructEndSlicePtr                          OpType = 652
	OpStructEndOmitEmptySlicePtr                 OpType = 653
	OpStructEndOmitZeroSlicePtr                  OpType = 654
	OpStructEndOmitEmptyZeroSlicePtr             OpType = 655
	OpStructFieldMarshalJSONPtr                  OpType = 656
	OpStructFieldOmitEmptyMarshalJSONPtr         OpType = 657
	OpStructFieldOmitZeroMarshalJSONPtr          OpType = 658
	OpStructFieldOmitEmptyZeroMarshalJSONPtr     OpType = 659
	OpStructEndMarshalJSONPtr                    OpType = 660
	OpStructEndOmitEmptyMarshalJSONPtr           OpType = 661
	OpStructEndOmitZeroMarshalJSONPtr            OpType = 662
	OpStructEndOmitEmptyZeroMarshalJSONPtr       OpType = 663
	OpStructFieldMarshalTextPtr                  OpType = 664
	OpStructFieldOmitEmptyMarshalTextPtr         OpType = 665
	OpStructFieldOmitZeroMarshalTextPtr          OpType = 666
	OpStructFieldOmitEmptyZeroMarshalTextPtr     OpType = 667
	OpStructEndMarshalTextPtr                    OpType = 668
	OpStructEndOmitEmptyMarshalTextPtr           OpType = 669
	OpStructEndOmitZeroMarshalTextPtr            OpType = 670
	OpStructEndOmitEmptyZeroMarshalTextPtr       OpType = 671
	OpStructFieldInterfacePtr                    OpType = 672
	OpStructFieldOmitEmptyInterfacePtr           OpType = 673
	OpStructFieldOmitZeroInterfacePtr            OpType = 674
	OpStructFieldOmitEmptyZeroInterfacePtr       OpType = 675
	OpStructEndInterfacePtr                      OpType = 676
	OpStructEndOmitEmptyInterfacePtr             OpType = 677
	OpStructEndOmitZeroInterfacePtr              OpType = 678
	OpStructEndOmitEmptyZeroInterfacePtr         OpType = 679
	OpStructFieldIntPtrString                    OpType = 680
	OpStructFieldOmitEmptyIntPtrString           OpType = 681
	OpStructFieldOmitZeroIntPtrString            OpType = 682
	OpStructFieldOmitEmptyZeroIntPtrString       OpType = 683
	OpStructEndIntPtrString                      OpType = 684
	OpStructEndOmitEmptyIntPtrString             OpType = 685
	OpStructEndOmitZeroIntPtrString              OpType = 686
	OpStructEndOmitEmptyZeroIntPtrString         OpType = 687
	OpStructFieldUintPtrString                   OpType = 688
	OpStructFieldOmitEmptyUintPtrString          OpType = 689
	OpStructFieldOmitZeroUintPtrString           OpType = 690
	OpStructFieldOmitEmptyZeroUintPtrString      OpType = 691
	OpStructEndUintPtrString                     OpType = 692
	OpStructEndOmitEmptyUintPtrString            OpType = 693
	OpStructEndOmitZeroUintPtrString             OpType = 694
	OpStructEndOmitEmptyZeroUintPtrString        OpType = 695
	OpStructFieldFloat32PtrString                OpType = 696
	OpStructFieldOmitEmptyFloat32PtrString       OpType = 697
	OpStructFieldOmitZeroFloat32PtrString        OpType = 698
	OpStructFieldOmitEmptyZeroFloat32PtrString   OpType = 699
	OpStructEndFloat32PtrString                  OpType = 700
	OpStructEndOmitEmptyFloat32PtrString         OpType = 701
	OpStructEndOmitZeroFloat32PtrString          OpType = 702
	OpStructEndOmitEmptyZeroFloat32PtrString     OpType = 703
	OpStructFieldFloat64PtrString                OpType = 704
	OpStructFieldOmitEmptyFloat64PtrString       OpType = 705
	OpStructFieldOmitZeroFloat64PtrString        OpType = 706
	OpStructFieldOmitEmptyZeroFloat64PtrString   OpType = 707
	OpStructEndFloat64PtrString                  OpType = 708
	OpStructEndOmitEmptyFloat64PtrString         OpType = 709
	OpStructEndOmitZeroFloat64PtrString          OpType = 710
	OpStructEndOmitEmptyZeroFloat64PtrString     OpType = 711
	OpStructFieldBoolPtrString                   OpType = 712
	OpStructFieldOmitEmptyBoolPtrString          OpType = 713
	OpStructFieldOmitZeroBoolPtrString           OpType = 714
	OpStructFieldOmitEmptyZeroBoolPtrString      OpType = 715
	OpStructEndBoolPtrString                     OpType = 716
	OpStructEndOmitEmptyBoolPtrString            OpType = 717
	OpStructEndOmitZeroBoolPtrString             OpType = 718
	OpStructEndOmitEmptyZeroBoolPtrString        OpType = 719
	OpStructFieldStringPtrString                 OpType = 720
	OpStructFieldOmitEmptyStringPtrString        OpType = 721
	OpStructFieldOmitZeroStringPtrString         OpType = 722
	OpStructFieldOmitEmptyZeroStringPtrString    OpType = 723
	OpStructEndStringPtrString                   OpType = 724
	OpStructEndOmitEmptyStringPtrString          OpType = 725
	OpStructEndOmitZeroStringPtrString           OpType = 726
	OpStructEndOmitEmptyZeroStringPtrString      OpType = 727
	OpStructFieldNumberPtrString                 OpType = 728
	OpStructFieldOmitEmptyNumberPtrString        OpType = 729
	OpStructFieldOmitZeroNumberPtrString         OpType = 730
	OpStructFieldOmitEmptyZeroNumberPtrString    OpType = 731
	OpStructEndNumberPtrString                   OpType = 732
	OpStructEndOmitEmptyNumberPtrString          OpType = 733
	OpStructEndOmitZeroNumberPtrString           OpType = 734
	OpStructEndOmitEmptyZeroNumberPtrString      OpType = 735
	OpStructField                                OpType = 736
	OpStructFieldOmitEmpty                       OpType = 737
	OpStructFieldOmitZero                        OpType = 738
	OpStructFieldOmitEmptyZero                   OpType = 739
	OpStructEnd                                  OpType = 740
	OpStructEndOmitEmpty                         OpType = 741
	OpStructEndOmitZero                          OpType = 742
	OpStructEndOmitEmptyZero                     OpType = 743
)

func (OpType) CodeType

func (t OpType) CodeType() CodeType

func (OpType) FieldToEnd

func (t OpType) FieldToEnd() OpType

func (OpType) FieldToOmitEmptyField

func (t OpType) FieldToOmitEmptyField() OpType

func (OpType) FieldToOmitEmptyZeroField

func (t OpType) FieldToOmitEmptyZeroField() OpType

func (OpType) FieldToOmitZeroField

func (t OpType) FieldToOmitZeroField() OpType

func (OpType) HeadToOmitEmptyHead

func (t OpType) HeadToOmitEmptyHead() OpType

func (OpType) HeadToOmitEmptyZeroHead

func (t OpType) HeadToOmitEmptyZeroHead() OpType

func (OpType) HeadToOmitZeroHead

func (t OpType) HeadToOmitZeroHead() OpType

func (OpType) HeadToPtrHead

func (t OpType) HeadToPtrHead() OpType

func (OpType) IsMultipleOpField

func (t OpType) IsMultipleOpField() bool

func (OpType) IsMultipleOpHead

func (t OpType) IsMultipleOpHead() bool

func (OpType) PtrHeadToHead

func (t OpType) PtrHeadToHead() OpType

func (OpType) String

func (t OpType) String() string

type Opcode

type Opcode struct {
	Op         OpType  // operation type
	Idx        uint32  // offset to access ptr
	Next       *Opcode // next opcode
	End        *Opcode // array/slice/struct/map end
	NextField  *Opcode // next struct field
	Key        string  // struct field key
	Offset     uint32  // offset size from struct header
	PtrNum     uint8   // pointer number: e.g. double pointer is 2.
	NumBitSize uint8
	Flags      OpFlags

	Type       *runtime.Type // go type
	Jmp        *CompiledCode // for recursive call
	FieldQuery *FieldQuery   // field query for Interface / MarshalJSON / MarshalText
	ElemIdx    uint32        // offset to access array/slice elem
	Length     uint32        // offset to access slice length or array length
	Indent     uint32        // indent number
	Size       uint32        // array/slice elem size
	DisplayIdx uint32        // opcode index
	DisplayKey string        // key text to display
}

func ToEndCode

func ToEndCode(code *Opcode) *Opcode

func (*Opcode) Dump

func (c *Opcode) Dump() string

func (*Opcode) DumpDOT

func (c *Opcode) DumpDOT() string

func (*Opcode) IsEnd

func (c *Opcode) IsEnd() bool

func (*Opcode) IterNext

func (c *Opcode) IterNext() *Opcode

func (*Opcode) MaxIdx

func (c *Opcode) MaxIdx() uint32

func (*Opcode) ToFieldType

func (c *Opcode) ToFieldType(isString bool) OpType

func (*Opcode) ToHeaderType

func (c *Opcode) ToHeaderType(isString bool) OpType

func (*Opcode) TotalLength

func (c *Opcode) TotalLength() int

func (*Opcode) Validate

func (c *Opcode) Validate() error

type OpcodeSet

type OpcodeSet struct {
	Type                     *runtime.Type
	NoescapeKeyCode          *Opcode
	EscapeKeyCode            *Opcode
	InterfaceNoescapeKeyCode *Opcode
	InterfaceEscapeKeyCode   *Opcode
	CodeLength               int
	EndCode                  *Opcode
	Code                     Code
	QueryCache               map[string]*OpcodeSet
	// contains filtered or unexported fields
}

func CompileToGetCodeSet

func CompileToGetCodeSet(ctx *RuntimeContext, typeptr uintptr) (*OpcodeSet, error)

type Opcodes

type Opcodes []*Opcode

func (Opcodes) Add

func (o Opcodes) Add(codes ...*Opcode) Opcodes

func (Opcodes) First

func (o Opcodes) First() *Opcode

func (Opcodes) Last

func (o Opcodes) Last() *Opcode

type Option

type Option struct {
	Flag        OptionFlag
	ColorScheme *ColorScheme
	Context     context.Context
	DebugOut    io.Writer
	DebugDOTOut io.WriteCloser
}

type OptionFlag

type OptionFlag uint8
const (
	HTMLEscapeOption OptionFlag = 1 << iota
	IndentOption
	UnorderedMapOption
	DebugOption
	ColorizeOption
	ContextOption
	NormalizeUTF8Option
	FieldQueryOption
)

type PtrCode

type PtrCode struct {
	// contains filtered or unexported fields
}

func (*PtrCode) Filter

func (c *PtrCode) Filter(query *FieldQuery) Code

func (*PtrCode) Kind

func (c *PtrCode) Kind() CodeKind

func (*PtrCode) ToAnonymousOpcode

func (c *PtrCode) ToAnonymousOpcode(ctx *compileContext) Opcodes

func (*PtrCode) ToOpcode

func (c *PtrCode) ToOpcode(ctx *compileContext) Opcodes

type RuntimeContext

type RuntimeContext struct {
	Context    context.Context
	Buf        []byte
	MarshalBuf []byte
	Ptrs       []uintptr
	KeepRefs   []unsafe.Pointer
	SeenPtr    []uintptr
	BaseIndent uint32
	Prefix     []byte
	IndentStr  []byte
	Option     *Option
}

func TakeRuntimeContext

func TakeRuntimeContext() *RuntimeContext

func (*RuntimeContext) Init

func (c *RuntimeContext) Init(p uintptr, codelen int)

func (*RuntimeContext) Ptr

func (c *RuntimeContext) Ptr() uintptr

type SliceCode

type SliceCode struct {
	// contains filtered or unexported fields
}

func (*SliceCode) Filter

func (c *SliceCode) Filter(_ *FieldQuery) Code

func (*SliceCode) Kind

func (c *SliceCode) Kind() CodeKind

func (*SliceCode) ToOpcode

func (c *SliceCode) ToOpcode(ctx *compileContext) Opcodes

type StringCode

type StringCode struct {
	// contains filtered or unexported fields
}

func (*StringCode) Filter

func (c *StringCode) Filter(_ *FieldQuery) Code

func (*StringCode) Kind

func (c *StringCode) Kind() CodeKind

func (*StringCode) ToOpcode

func (c *StringCode) ToOpcode(ctx *compileContext) Opcodes

type StructCode

type StructCode struct {
	// contains filtered or unexported fields
}

func (*StructCode) Filter

func (c *StructCode) Filter(query *FieldQuery) Code

func (*StructCode) Kind

func (c *StructCode) Kind() CodeKind

func (*StructCode) ToAnonymousOpcode

func (c *StructCode) ToAnonymousOpcode(ctx *compileContext) Opcodes

func (*StructCode) ToOpcode

func (c *StructCode) ToOpcode(ctx *compileContext) Opcodes

type StructFieldCode

type StructFieldCode struct {
	// contains filtered or unexported fields
}

func (*StructFieldCode) ToAnonymousOpcode

func (c *StructFieldCode) ToAnonymousOpcode(ctx *compileContext, isFirstField, isEndField bool) Opcodes

func (*StructFieldCode) ToOpcode

func (c *StructFieldCode) ToOpcode(ctx *compileContext, isFirstField, isEndField bool) Opcodes

type UintCode

type UintCode struct {
	// contains filtered or unexported fields
}

func (*UintCode) Filter

func (c *UintCode) Filter(_ *FieldQuery) Code

func (*UintCode) Kind

func (c *UintCode) Kind() CodeKind

func (*UintCode) ToOpcode

func (c *UintCode) ToOpcode(ctx *compileContext) Opcodes

Directories

Path Synopsis
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.
Code generated by internal/cmd/generator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL