Remove unnecessary code

This commit is contained in:
Masaaki Goshima 2021-03-12 00:43:48 +09:00
parent 7290b0d6c3
commit 4cdbd4e962
6 changed files with 473 additions and 530 deletions

View File

@ -247,9 +247,7 @@ func (t opType) fieldToStringTagField() opType {
createOpType("End", "Op"), createOpType("End", "Op"),
createOpType("Interface", "Op"), createOpType("Interface", "Op"),
createOpType("Ptr", "Op"), createOpType("Ptr", "Op"),
createOpType("RootSliceHead", "SliceHead"),
createOpType("SliceElem", "SliceElem"), createOpType("SliceElem", "SliceElem"),
createOpType("RootSliceElem", "SliceElem"),
createOpType("SliceEnd", "Op"), createOpType("SliceEnd", "Op"),
createOpType("ArrayElem", "ArrayElem"), createOpType("ArrayElem", "ArrayElem"),
createOpType("ArrayEnd", "Op"), createOpType("ArrayEnd", "Op"),

View File

@ -1836,7 +1836,6 @@ func TestUnmarshal(t *testing.T) {
// Check round trip also decodes correctly. // Check round trip also decodes correctly.
if tt.err == nil { if tt.err == nil {
//fmt.Println("iface = ", v.Interface(), v.Type())
enc, err := json.Marshal(v.Interface()) enc, err := json.Marshal(v.Interface())
if err != nil { if err != nil {
t.Errorf("#%d: error re-marshaling: %v", i, err) t.Errorf("#%d: error re-marshaling: %v", i, err)

View File

@ -1199,6 +1199,21 @@ func encodeOptimizeConflictAnonymousFields(anonymousFields map[string][]structFi
} }
} }
func encodeIsNilableType(typ *rtype) bool {
switch typ.Kind() {
case reflect.Ptr:
return true
case reflect.Interface:
return true
case reflect.Slice:
return true
case reflect.Map:
return true
default:
return false
}
}
func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error) { func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error) {
ctx.root = false ctx.root = false
if code := encodeCompiledCode(ctx); code != nil { if code := encodeCompiledCode(ctx); code != nil {
@ -1213,7 +1228,6 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
// |__________| // |__________|
fieldNum := typ.NumField() fieldNum := typ.NumField()
indirect := ifaceIndir(typ) indirect := ifaceIndir(typ)
//fmt.Println("indirect = ", indirect, "type = ", typ, "isPtr = ", isPtr)
fieldIdx := 0 fieldIdx := 0
disableIndirectConversion := false disableIndirectConversion := false
var ( var (
@ -1237,11 +1251,15 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
fieldOpcodeIndex := ctx.opcodeIndex fieldOpcodeIndex := ctx.opcodeIndex
fieldPtrIndex := ctx.ptrIndex fieldPtrIndex := ctx.ptrIndex
ctx.incIndex() ctx.incIndex()
nilcheck := true nilcheck := true
var valueCode *opcode
isNilValue := fieldType.Kind() == reflect.Ptr || fieldType.Kind() == reflect.Interface || fieldType.Kind() == reflect.Slice || fieldType.Kind() == reflect.Map
addrForMarshaler := false addrForMarshaler := false
if i == 0 && fieldNum == 1 && isPtr && !isNilValue && rtype_ptrTo(fieldType).Implements(marshalJSONType) && !fieldType.Implements(marshalJSONType) { isIndirectSpecialCase := isPtr && i == 0 && fieldNum == 1
isNilableType := encodeIsNilableType(fieldType)
var valueCode *opcode
switch {
case isIndirectSpecialCase && !isNilableType && encodeIsPtrMarshalJSONType(fieldType):
// *struct{ field T } => struct { field *T } // *struct{ field T } => struct { field *T }
// func (*T) MarshalJSON() ([]byte, error) // func (*T) MarshalJSON() ([]byte, error)
// move pointer position from head to first field // move pointer position from head to first field
@ -1253,7 +1271,7 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
nilcheck = false nilcheck = false
indirect = false indirect = false
disableIndirectConversion = true disableIndirectConversion = true
} else if i == 0 && fieldNum == 1 && isPtr && !isNilValue && rtype_ptrTo(fieldType).Implements(marshalTextType) && !fieldType.Implements(marshalTextType) { case isIndirectSpecialCase && !isNilableType && encodeIsPtrMarshalTextType(fieldType):
// *struct{ field T } => struct { field *T } // *struct{ field T } => struct { field *T }
// func (*T) MarshalText() ([]byte, error) // func (*T) MarshalText() ([]byte, error)
// move pointer position from head to first field // move pointer position from head to first field
@ -1265,7 +1283,7 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
nilcheck = false nilcheck = false
indirect = false indirect = false
disableIndirectConversion = true disableIndirectConversion = true
} else if isPtr && !fieldType.Implements(marshalJSONType) && rtype_ptrTo(fieldType).Implements(marshalJSONType) { case isPtr && encodeIsPtrMarshalJSONType(fieldType):
// *struct{ field T } // *struct{ field T }
// func (*T) MarshalJSON() ([]byte, error) // func (*T) MarshalJSON() ([]byte, error)
code, err := encodeCompileMarshalJSON(ctx.withType(fieldType)) code, err := encodeCompileMarshalJSON(ctx.withType(fieldType))
@ -1275,7 +1293,7 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
addrForMarshaler = true addrForMarshaler = true
nilcheck = false nilcheck = false
valueCode = code valueCode = code
} else if isPtr && !fieldType.Implements(marshalTextType) && rtype_ptrTo(fieldType).Implements(marshalTextType) { case isPtr && encodeIsPtrMarshalTextType(fieldType):
// *struct{ field T } // *struct{ field T }
// func (*T) MarshalText() ([]byte, error) // func (*T) MarshalText() ([]byte, error)
code, err := encodeCompileMarshalText(ctx.withType(fieldType)) code, err := encodeCompileMarshalText(ctx.withType(fieldType))
@ -1285,7 +1303,7 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
addrForMarshaler = true addrForMarshaler = true
nilcheck = false nilcheck = false
valueCode = code valueCode = code
} else { default:
code, err := encodeCompile(ctx.withType(fieldType), isPtr) code, err := encodeCompile(ctx.withType(fieldType), isPtr)
if err != nil { if err != nil {
return nil, err return nil, err
@ -1392,3 +1410,11 @@ func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error)
return ret, nil return ret, nil
} }
func encodeIsPtrMarshalJSONType(typ *rtype) bool {
return !typ.Implements(marshalJSONType) && rtype_ptrTo(typ).Implements(marshalJSONType)
}
func encodeIsPtrMarshalTextType(typ *rtype) bool {
return !typ.Implements(marshalTextType) && rtype_ptrTo(typ).Implements(marshalTextType)
}

View File

@ -22,13 +22,11 @@ const (
codeStructEnd codeType = 11 codeStructEnd codeType = 11
) )
var opTypeStrings = [442]string{ var opTypeStrings = [440]string{
"End", "End",
"Interface", "Interface",
"Ptr", "Ptr",
"RootSliceHead",
"SliceElem", "SliceElem",
"RootSliceElem",
"SliceEnd", "SliceEnd",
"ArrayElem", "ArrayElem",
"ArrayEnd", "ArrayEnd",
@ -473,449 +471,447 @@ const (
opEnd opType = 0 opEnd opType = 0
opInterface opType = 1 opInterface opType = 1
opPtr opType = 2 opPtr opType = 2
opRootSliceHead opType = 3 opSliceElem opType = 3
opSliceElem opType = 4 opSliceEnd opType = 4
opRootSliceElem opType = 5 opArrayElem opType = 5
opSliceEnd opType = 6 opArrayEnd opType = 6
opArrayElem opType = 7 opMapKey opType = 7
opArrayEnd opType = 8 opMapValue opType = 8
opMapKey opType = 9 opMapEnd opType = 9
opMapValue opType = 10 opStructFieldRecursiveEnd opType = 10
opMapEnd opType = 11 opStructAnonymousEnd opType = 11
opStructFieldRecursiveEnd opType = 12 opInt opType = 12
opStructAnonymousEnd opType = 13 opUint opType = 13
opInt opType = 14 opFloat32 opType = 14
opUint opType = 15 opFloat64 opType = 15
opFloat32 opType = 16 opBool opType = 16
opFloat64 opType = 17 opString opType = 17
opBool opType = 18 opBytes opType = 18
opString opType = 19 opNumber opType = 19
opBytes opType = 20 opArray opType = 20
opNumber opType = 21 opMap opType = 21
opArray opType = 22 opSlice opType = 22
opMap opType = 23 opStruct opType = 23
opSlice opType = 24 opMarshalJSON opType = 24
opStruct opType = 25 opMarshalText opType = 25
opMarshalJSON opType = 26 opRecursive opType = 26
opMarshalText opType = 27 opIntString opType = 27
opRecursive opType = 28 opUintString opType = 28
opIntString opType = 29 opIntPtr opType = 29
opUintString opType = 30 opUintPtr opType = 30
opIntPtr opType = 31 opFloat32Ptr opType = 31
opUintPtr opType = 32 opFloat64Ptr opType = 32
opFloat32Ptr opType = 33 opBoolPtr opType = 33
opFloat64Ptr opType = 34 opStringPtr opType = 34
opBoolPtr opType = 35 opBytesPtr opType = 35
opStringPtr opType = 36 opNumberPtr opType = 36
opBytesPtr opType = 37 opArrayPtr opType = 37
opNumberPtr opType = 38 opMapPtr opType = 38
opArrayPtr opType = 39 opSlicePtr opType = 39
opMapPtr opType = 40 opMarshalJSONPtr opType = 40
opSlicePtr opType = 41 opMarshalTextPtr opType = 41
opMarshalJSONPtr opType = 42 opInterfacePtr opType = 42
opMarshalTextPtr opType = 43 opRecursivePtr opType = 43
opInterfacePtr opType = 44 opStructFieldHeadInt opType = 44
opRecursivePtr opType = 45 opStructFieldHeadOmitEmptyInt opType = 45
opStructFieldHeadInt opType = 46 opStructFieldHeadStringTagInt opType = 46
opStructFieldHeadOmitEmptyInt opType = 47 opStructFieldPtrHeadInt opType = 47
opStructFieldHeadStringTagInt opType = 48 opStructFieldPtrHeadOmitEmptyInt opType = 48
opStructFieldPtrHeadInt opType = 49 opStructFieldPtrHeadStringTagInt opType = 49
opStructFieldPtrHeadOmitEmptyInt opType = 50 opStructFieldHeadUint opType = 50
opStructFieldPtrHeadStringTagInt opType = 51 opStructFieldHeadOmitEmptyUint opType = 51
opStructFieldHeadUint opType = 52 opStructFieldHeadStringTagUint opType = 52
opStructFieldHeadOmitEmptyUint opType = 53 opStructFieldPtrHeadUint opType = 53
opStructFieldHeadStringTagUint opType = 54 opStructFieldPtrHeadOmitEmptyUint opType = 54
opStructFieldPtrHeadUint opType = 55 opStructFieldPtrHeadStringTagUint opType = 55
opStructFieldPtrHeadOmitEmptyUint opType = 56 opStructFieldHeadFloat32 opType = 56
opStructFieldPtrHeadStringTagUint opType = 57 opStructFieldHeadOmitEmptyFloat32 opType = 57
opStructFieldHeadFloat32 opType = 58 opStructFieldHeadStringTagFloat32 opType = 58
opStructFieldHeadOmitEmptyFloat32 opType = 59 opStructFieldPtrHeadFloat32 opType = 59
opStructFieldHeadStringTagFloat32 opType = 60 opStructFieldPtrHeadOmitEmptyFloat32 opType = 60
opStructFieldPtrHeadFloat32 opType = 61 opStructFieldPtrHeadStringTagFloat32 opType = 61
opStructFieldPtrHeadOmitEmptyFloat32 opType = 62 opStructFieldHeadFloat64 opType = 62
opStructFieldPtrHeadStringTagFloat32 opType = 63 opStructFieldHeadOmitEmptyFloat64 opType = 63
opStructFieldHeadFloat64 opType = 64 opStructFieldHeadStringTagFloat64 opType = 64
opStructFieldHeadOmitEmptyFloat64 opType = 65 opStructFieldPtrHeadFloat64 opType = 65
opStructFieldHeadStringTagFloat64 opType = 66 opStructFieldPtrHeadOmitEmptyFloat64 opType = 66
opStructFieldPtrHeadFloat64 opType = 67 opStructFieldPtrHeadStringTagFloat64 opType = 67
opStructFieldPtrHeadOmitEmptyFloat64 opType = 68 opStructFieldHeadBool opType = 68
opStructFieldPtrHeadStringTagFloat64 opType = 69 opStructFieldHeadOmitEmptyBool opType = 69
opStructFieldHeadBool opType = 70 opStructFieldHeadStringTagBool opType = 70
opStructFieldHeadOmitEmptyBool opType = 71 opStructFieldPtrHeadBool opType = 71
opStructFieldHeadStringTagBool opType = 72 opStructFieldPtrHeadOmitEmptyBool opType = 72
opStructFieldPtrHeadBool opType = 73 opStructFieldPtrHeadStringTagBool opType = 73
opStructFieldPtrHeadOmitEmptyBool opType = 74 opStructFieldHeadString opType = 74
opStructFieldPtrHeadStringTagBool opType = 75 opStructFieldHeadOmitEmptyString opType = 75
opStructFieldHeadString opType = 76 opStructFieldHeadStringTagString opType = 76
opStructFieldHeadOmitEmptyString opType = 77 opStructFieldPtrHeadString opType = 77
opStructFieldHeadStringTagString opType = 78 opStructFieldPtrHeadOmitEmptyString opType = 78
opStructFieldPtrHeadString opType = 79 opStructFieldPtrHeadStringTagString opType = 79
opStructFieldPtrHeadOmitEmptyString opType = 80 opStructFieldHeadBytes opType = 80
opStructFieldPtrHeadStringTagString opType = 81 opStructFieldHeadOmitEmptyBytes opType = 81
opStructFieldHeadBytes opType = 82 opStructFieldHeadStringTagBytes opType = 82
opStructFieldHeadOmitEmptyBytes opType = 83 opStructFieldPtrHeadBytes opType = 83
opStructFieldHeadStringTagBytes opType = 84 opStructFieldPtrHeadOmitEmptyBytes opType = 84
opStructFieldPtrHeadBytes opType = 85 opStructFieldPtrHeadStringTagBytes opType = 85
opStructFieldPtrHeadOmitEmptyBytes opType = 86 opStructFieldHeadNumber opType = 86
opStructFieldPtrHeadStringTagBytes opType = 87 opStructFieldHeadOmitEmptyNumber opType = 87
opStructFieldHeadNumber opType = 88 opStructFieldHeadStringTagNumber opType = 88
opStructFieldHeadOmitEmptyNumber opType = 89 opStructFieldPtrHeadNumber opType = 89
opStructFieldHeadStringTagNumber opType = 90 opStructFieldPtrHeadOmitEmptyNumber opType = 90
opStructFieldPtrHeadNumber opType = 91 opStructFieldPtrHeadStringTagNumber opType = 91
opStructFieldPtrHeadOmitEmptyNumber opType = 92 opStructFieldHeadArray opType = 92
opStructFieldPtrHeadStringTagNumber opType = 93 opStructFieldHeadOmitEmptyArray opType = 93
opStructFieldHeadArray opType = 94 opStructFieldHeadStringTagArray opType = 94
opStructFieldHeadOmitEmptyArray opType = 95 opStructFieldPtrHeadArray opType = 95
opStructFieldHeadStringTagArray opType = 96 opStructFieldPtrHeadOmitEmptyArray opType = 96
opStructFieldPtrHeadArray opType = 97 opStructFieldPtrHeadStringTagArray opType = 97
opStructFieldPtrHeadOmitEmptyArray opType = 98 opStructFieldHeadMap opType = 98
opStructFieldPtrHeadStringTagArray opType = 99 opStructFieldHeadOmitEmptyMap opType = 99
opStructFieldHeadMap opType = 100 opStructFieldHeadStringTagMap opType = 100
opStructFieldHeadOmitEmptyMap opType = 101 opStructFieldPtrHeadMap opType = 101
opStructFieldHeadStringTagMap opType = 102 opStructFieldPtrHeadOmitEmptyMap opType = 102
opStructFieldPtrHeadMap opType = 103 opStructFieldPtrHeadStringTagMap opType = 103
opStructFieldPtrHeadOmitEmptyMap opType = 104 opStructFieldHeadSlice opType = 104
opStructFieldPtrHeadStringTagMap opType = 105 opStructFieldHeadOmitEmptySlice opType = 105
opStructFieldHeadSlice opType = 106 opStructFieldHeadStringTagSlice opType = 106
opStructFieldHeadOmitEmptySlice opType = 107 opStructFieldPtrHeadSlice opType = 107
opStructFieldHeadStringTagSlice opType = 108 opStructFieldPtrHeadOmitEmptySlice opType = 108
opStructFieldPtrHeadSlice opType = 109 opStructFieldPtrHeadStringTagSlice opType = 109
opStructFieldPtrHeadOmitEmptySlice opType = 110 opStructFieldHeadStruct opType = 110
opStructFieldPtrHeadStringTagSlice opType = 111 opStructFieldHeadOmitEmptyStruct opType = 111
opStructFieldHeadStruct opType = 112 opStructFieldHeadStringTagStruct opType = 112
opStructFieldHeadOmitEmptyStruct opType = 113 opStructFieldPtrHeadStruct opType = 113
opStructFieldHeadStringTagStruct opType = 114 opStructFieldPtrHeadOmitEmptyStruct opType = 114
opStructFieldPtrHeadStruct opType = 115 opStructFieldPtrHeadStringTagStruct opType = 115
opStructFieldPtrHeadOmitEmptyStruct opType = 116 opStructFieldHeadMarshalJSON opType = 116
opStructFieldPtrHeadStringTagStruct opType = 117 opStructFieldHeadOmitEmptyMarshalJSON opType = 117
opStructFieldHeadMarshalJSON opType = 118 opStructFieldHeadStringTagMarshalJSON opType = 118
opStructFieldHeadOmitEmptyMarshalJSON opType = 119 opStructFieldPtrHeadMarshalJSON opType = 119
opStructFieldHeadStringTagMarshalJSON opType = 120 opStructFieldPtrHeadOmitEmptyMarshalJSON opType = 120
opStructFieldPtrHeadMarshalJSON opType = 121 opStructFieldPtrHeadStringTagMarshalJSON opType = 121
opStructFieldPtrHeadOmitEmptyMarshalJSON opType = 122 opStructFieldHeadMarshalText opType = 122
opStructFieldPtrHeadStringTagMarshalJSON opType = 123 opStructFieldHeadOmitEmptyMarshalText opType = 123
opStructFieldHeadMarshalText opType = 124 opStructFieldHeadStringTagMarshalText opType = 124
opStructFieldHeadOmitEmptyMarshalText opType = 125 opStructFieldPtrHeadMarshalText opType = 125
opStructFieldHeadStringTagMarshalText opType = 126 opStructFieldPtrHeadOmitEmptyMarshalText opType = 126
opStructFieldPtrHeadMarshalText opType = 127 opStructFieldPtrHeadStringTagMarshalText opType = 127
opStructFieldPtrHeadOmitEmptyMarshalText opType = 128 opStructFieldHeadRecursive opType = 128
opStructFieldPtrHeadStringTagMarshalText opType = 129 opStructFieldHeadOmitEmptyRecursive opType = 129
opStructFieldHeadRecursive opType = 130 opStructFieldHeadStringTagRecursive opType = 130
opStructFieldHeadOmitEmptyRecursive opType = 131 opStructFieldPtrHeadRecursive opType = 131
opStructFieldHeadStringTagRecursive opType = 132 opStructFieldPtrHeadOmitEmptyRecursive opType = 132
opStructFieldPtrHeadRecursive opType = 133 opStructFieldPtrHeadStringTagRecursive opType = 133
opStructFieldPtrHeadOmitEmptyRecursive opType = 134 opStructFieldHeadIntString opType = 134
opStructFieldPtrHeadStringTagRecursive opType = 135 opStructFieldHeadOmitEmptyIntString opType = 135
opStructFieldHeadIntString opType = 136 opStructFieldHeadStringTagIntString opType = 136
opStructFieldHeadOmitEmptyIntString opType = 137 opStructFieldPtrHeadIntString opType = 137
opStructFieldHeadStringTagIntString opType = 138 opStructFieldPtrHeadOmitEmptyIntString opType = 138
opStructFieldPtrHeadIntString opType = 139 opStructFieldPtrHeadStringTagIntString opType = 139
opStructFieldPtrHeadOmitEmptyIntString opType = 140 opStructFieldHeadUintString opType = 140
opStructFieldPtrHeadStringTagIntString opType = 141 opStructFieldHeadOmitEmptyUintString opType = 141
opStructFieldHeadUintString opType = 142 opStructFieldHeadStringTagUintString opType = 142
opStructFieldHeadOmitEmptyUintString opType = 143 opStructFieldPtrHeadUintString opType = 143
opStructFieldHeadStringTagUintString opType = 144 opStructFieldPtrHeadOmitEmptyUintString opType = 144
opStructFieldPtrHeadUintString opType = 145 opStructFieldPtrHeadStringTagUintString opType = 145
opStructFieldPtrHeadOmitEmptyUintString opType = 146 opStructFieldHeadIntPtr opType = 146
opStructFieldPtrHeadStringTagUintString opType = 147 opStructFieldHeadOmitEmptyIntPtr opType = 147
opStructFieldHeadIntPtr opType = 148 opStructFieldHeadStringTagIntPtr opType = 148
opStructFieldHeadOmitEmptyIntPtr opType = 149 opStructFieldPtrHeadIntPtr opType = 149
opStructFieldHeadStringTagIntPtr opType = 150 opStructFieldPtrHeadOmitEmptyIntPtr opType = 150
opStructFieldPtrHeadIntPtr opType = 151 opStructFieldPtrHeadStringTagIntPtr opType = 151
opStructFieldPtrHeadOmitEmptyIntPtr opType = 152 opStructFieldHeadUintPtr opType = 152
opStructFieldPtrHeadStringTagIntPtr opType = 153 opStructFieldHeadOmitEmptyUintPtr opType = 153
opStructFieldHeadUintPtr opType = 154 opStructFieldHeadStringTagUintPtr opType = 154
opStructFieldHeadOmitEmptyUintPtr opType = 155 opStructFieldPtrHeadUintPtr opType = 155
opStructFieldHeadStringTagUintPtr opType = 156 opStructFieldPtrHeadOmitEmptyUintPtr opType = 156
opStructFieldPtrHeadUintPtr opType = 157 opStructFieldPtrHeadStringTagUintPtr opType = 157
opStructFieldPtrHeadOmitEmptyUintPtr opType = 158 opStructFieldHeadFloat32Ptr opType = 158
opStructFieldPtrHeadStringTagUintPtr opType = 159 opStructFieldHeadOmitEmptyFloat32Ptr opType = 159
opStructFieldHeadFloat32Ptr opType = 160 opStructFieldHeadStringTagFloat32Ptr opType = 160
opStructFieldHeadOmitEmptyFloat32Ptr opType = 161 opStructFieldPtrHeadFloat32Ptr opType = 161
opStructFieldHeadStringTagFloat32Ptr opType = 162 opStructFieldPtrHeadOmitEmptyFloat32Ptr opType = 162
opStructFieldPtrHeadFloat32Ptr opType = 163 opStructFieldPtrHeadStringTagFloat32Ptr opType = 163
opStructFieldPtrHeadOmitEmptyFloat32Ptr opType = 164 opStructFieldHeadFloat64Ptr opType = 164
opStructFieldPtrHeadStringTagFloat32Ptr opType = 165 opStructFieldHeadOmitEmptyFloat64Ptr opType = 165
opStructFieldHeadFloat64Ptr opType = 166 opStructFieldHeadStringTagFloat64Ptr opType = 166
opStructFieldHeadOmitEmptyFloat64Ptr opType = 167 opStructFieldPtrHeadFloat64Ptr opType = 167
opStructFieldHeadStringTagFloat64Ptr opType = 168 opStructFieldPtrHeadOmitEmptyFloat64Ptr opType = 168
opStructFieldPtrHeadFloat64Ptr opType = 169 opStructFieldPtrHeadStringTagFloat64Ptr opType = 169
opStructFieldPtrHeadOmitEmptyFloat64Ptr opType = 170 opStructFieldHeadBoolPtr opType = 170
opStructFieldPtrHeadStringTagFloat64Ptr opType = 171 opStructFieldHeadOmitEmptyBoolPtr opType = 171
opStructFieldHeadBoolPtr opType = 172 opStructFieldHeadStringTagBoolPtr opType = 172
opStructFieldHeadOmitEmptyBoolPtr opType = 173 opStructFieldPtrHeadBoolPtr opType = 173
opStructFieldHeadStringTagBoolPtr opType = 174 opStructFieldPtrHeadOmitEmptyBoolPtr opType = 174
opStructFieldPtrHeadBoolPtr opType = 175 opStructFieldPtrHeadStringTagBoolPtr opType = 175
opStructFieldPtrHeadOmitEmptyBoolPtr opType = 176 opStructFieldHeadStringPtr opType = 176
opStructFieldPtrHeadStringTagBoolPtr opType = 177 opStructFieldHeadOmitEmptyStringPtr opType = 177
opStructFieldHeadStringPtr opType = 178 opStructFieldHeadStringTagStringPtr opType = 178
opStructFieldHeadOmitEmptyStringPtr opType = 179 opStructFieldPtrHeadStringPtr opType = 179
opStructFieldHeadStringTagStringPtr opType = 180 opStructFieldPtrHeadOmitEmptyStringPtr opType = 180
opStructFieldPtrHeadStringPtr opType = 181 opStructFieldPtrHeadStringTagStringPtr opType = 181
opStructFieldPtrHeadOmitEmptyStringPtr opType = 182 opStructFieldHeadBytesPtr opType = 182
opStructFieldPtrHeadStringTagStringPtr opType = 183 opStructFieldHeadOmitEmptyBytesPtr opType = 183
opStructFieldHeadBytesPtr opType = 184 opStructFieldHeadStringTagBytesPtr opType = 184
opStructFieldHeadOmitEmptyBytesPtr opType = 185 opStructFieldPtrHeadBytesPtr opType = 185
opStructFieldHeadStringTagBytesPtr opType = 186 opStructFieldPtrHeadOmitEmptyBytesPtr opType = 186
opStructFieldPtrHeadBytesPtr opType = 187 opStructFieldPtrHeadStringTagBytesPtr opType = 187
opStructFieldPtrHeadOmitEmptyBytesPtr opType = 188 opStructFieldHeadNumberPtr opType = 188
opStructFieldPtrHeadStringTagBytesPtr opType = 189 opStructFieldHeadOmitEmptyNumberPtr opType = 189
opStructFieldHeadNumberPtr opType = 190 opStructFieldHeadStringTagNumberPtr opType = 190
opStructFieldHeadOmitEmptyNumberPtr opType = 191 opStructFieldPtrHeadNumberPtr opType = 191
opStructFieldHeadStringTagNumberPtr opType = 192 opStructFieldPtrHeadOmitEmptyNumberPtr opType = 192
opStructFieldPtrHeadNumberPtr opType = 193 opStructFieldPtrHeadStringTagNumberPtr opType = 193
opStructFieldPtrHeadOmitEmptyNumberPtr opType = 194 opStructFieldHeadArrayPtr opType = 194
opStructFieldPtrHeadStringTagNumberPtr opType = 195 opStructFieldHeadOmitEmptyArrayPtr opType = 195
opStructFieldHeadArrayPtr opType = 196 opStructFieldHeadStringTagArrayPtr opType = 196
opStructFieldHeadOmitEmptyArrayPtr opType = 197 opStructFieldPtrHeadArrayPtr opType = 197
opStructFieldHeadStringTagArrayPtr opType = 198 opStructFieldPtrHeadOmitEmptyArrayPtr opType = 198
opStructFieldPtrHeadArrayPtr opType = 199 opStructFieldPtrHeadStringTagArrayPtr opType = 199
opStructFieldPtrHeadOmitEmptyArrayPtr opType = 200 opStructFieldHeadMapPtr opType = 200
opStructFieldPtrHeadStringTagArrayPtr opType = 201 opStructFieldHeadOmitEmptyMapPtr opType = 201
opStructFieldHeadMapPtr opType = 202 opStructFieldHeadStringTagMapPtr opType = 202
opStructFieldHeadOmitEmptyMapPtr opType = 203 opStructFieldPtrHeadMapPtr opType = 203
opStructFieldHeadStringTagMapPtr opType = 204 opStructFieldPtrHeadOmitEmptyMapPtr opType = 204
opStructFieldPtrHeadMapPtr opType = 205 opStructFieldPtrHeadStringTagMapPtr opType = 205
opStructFieldPtrHeadOmitEmptyMapPtr opType = 206 opStructFieldHeadSlicePtr opType = 206
opStructFieldPtrHeadStringTagMapPtr opType = 207 opStructFieldHeadOmitEmptySlicePtr opType = 207
opStructFieldHeadSlicePtr opType = 208 opStructFieldHeadStringTagSlicePtr opType = 208
opStructFieldHeadOmitEmptySlicePtr opType = 209 opStructFieldPtrHeadSlicePtr opType = 209
opStructFieldHeadStringTagSlicePtr opType = 210 opStructFieldPtrHeadOmitEmptySlicePtr opType = 210
opStructFieldPtrHeadSlicePtr opType = 211 opStructFieldPtrHeadStringTagSlicePtr opType = 211
opStructFieldPtrHeadOmitEmptySlicePtr opType = 212 opStructFieldHeadMarshalJSONPtr opType = 212
opStructFieldPtrHeadStringTagSlicePtr opType = 213 opStructFieldHeadOmitEmptyMarshalJSONPtr opType = 213
opStructFieldHeadMarshalJSONPtr opType = 214 opStructFieldHeadStringTagMarshalJSONPtr opType = 214
opStructFieldHeadOmitEmptyMarshalJSONPtr opType = 215 opStructFieldPtrHeadMarshalJSONPtr opType = 215
opStructFieldHeadStringTagMarshalJSONPtr opType = 216 opStructFieldPtrHeadOmitEmptyMarshalJSONPtr opType = 216
opStructFieldPtrHeadMarshalJSONPtr opType = 217 opStructFieldPtrHeadStringTagMarshalJSONPtr opType = 217
opStructFieldPtrHeadOmitEmptyMarshalJSONPtr opType = 218 opStructFieldHeadMarshalTextPtr opType = 218
opStructFieldPtrHeadStringTagMarshalJSONPtr opType = 219 opStructFieldHeadOmitEmptyMarshalTextPtr opType = 219
opStructFieldHeadMarshalTextPtr opType = 220 opStructFieldHeadStringTagMarshalTextPtr opType = 220
opStructFieldHeadOmitEmptyMarshalTextPtr opType = 221 opStructFieldPtrHeadMarshalTextPtr opType = 221
opStructFieldHeadStringTagMarshalTextPtr opType = 222 opStructFieldPtrHeadOmitEmptyMarshalTextPtr opType = 222
opStructFieldPtrHeadMarshalTextPtr opType = 223 opStructFieldPtrHeadStringTagMarshalTextPtr opType = 223
opStructFieldPtrHeadOmitEmptyMarshalTextPtr opType = 224 opStructFieldHeadInterfacePtr opType = 224
opStructFieldPtrHeadStringTagMarshalTextPtr opType = 225 opStructFieldHeadOmitEmptyInterfacePtr opType = 225
opStructFieldHeadInterfacePtr opType = 226 opStructFieldHeadStringTagInterfacePtr opType = 226
opStructFieldHeadOmitEmptyInterfacePtr opType = 227 opStructFieldPtrHeadInterfacePtr opType = 227
opStructFieldHeadStringTagInterfacePtr opType = 228 opStructFieldPtrHeadOmitEmptyInterfacePtr opType = 228
opStructFieldPtrHeadInterfacePtr opType = 229 opStructFieldPtrHeadStringTagInterfacePtr opType = 229
opStructFieldPtrHeadOmitEmptyInterfacePtr opType = 230 opStructFieldHeadRecursivePtr opType = 230
opStructFieldPtrHeadStringTagInterfacePtr opType = 231 opStructFieldHeadOmitEmptyRecursivePtr opType = 231
opStructFieldHeadRecursivePtr opType = 232 opStructFieldHeadStringTagRecursivePtr opType = 232
opStructFieldHeadOmitEmptyRecursivePtr opType = 233 opStructFieldPtrHeadRecursivePtr opType = 233
opStructFieldHeadStringTagRecursivePtr opType = 234 opStructFieldPtrHeadOmitEmptyRecursivePtr opType = 234
opStructFieldPtrHeadRecursivePtr opType = 235 opStructFieldPtrHeadStringTagRecursivePtr opType = 235
opStructFieldPtrHeadOmitEmptyRecursivePtr opType = 236 opStructFieldHead opType = 236
opStructFieldPtrHeadStringTagRecursivePtr opType = 237 opStructFieldHeadOmitEmpty opType = 237
opStructFieldHead opType = 238 opStructFieldHeadStringTag opType = 238
opStructFieldHeadOmitEmpty opType = 239 opStructFieldPtrHead opType = 239
opStructFieldHeadStringTag opType = 240 opStructFieldPtrHeadOmitEmpty opType = 240
opStructFieldPtrHead opType = 241 opStructFieldPtrHeadStringTag opType = 241
opStructFieldPtrHeadOmitEmpty opType = 242 opStructFieldInt opType = 242
opStructFieldPtrHeadStringTag opType = 243 opStructFieldOmitEmptyInt opType = 243
opStructFieldInt opType = 244 opStructFieldStringTagInt opType = 244
opStructFieldOmitEmptyInt opType = 245 opStructFieldUint opType = 245
opStructFieldStringTagInt opType = 246 opStructFieldOmitEmptyUint opType = 246
opStructFieldUint opType = 247 opStructFieldStringTagUint opType = 247
opStructFieldOmitEmptyUint opType = 248 opStructFieldFloat32 opType = 248
opStructFieldStringTagUint opType = 249 opStructFieldOmitEmptyFloat32 opType = 249
opStructFieldFloat32 opType = 250 opStructFieldStringTagFloat32 opType = 250
opStructFieldOmitEmptyFloat32 opType = 251 opStructFieldFloat64 opType = 251
opStructFieldStringTagFloat32 opType = 252 opStructFieldOmitEmptyFloat64 opType = 252
opStructFieldFloat64 opType = 253 opStructFieldStringTagFloat64 opType = 253
opStructFieldOmitEmptyFloat64 opType = 254 opStructFieldBool opType = 254
opStructFieldStringTagFloat64 opType = 255 opStructFieldOmitEmptyBool opType = 255
opStructFieldBool opType = 256 opStructFieldStringTagBool opType = 256
opStructFieldOmitEmptyBool opType = 257 opStructFieldString opType = 257
opStructFieldStringTagBool opType = 258 opStructFieldOmitEmptyString opType = 258
opStructFieldString opType = 259 opStructFieldStringTagString opType = 259
opStructFieldOmitEmptyString opType = 260 opStructFieldBytes opType = 260
opStructFieldStringTagString opType = 261 opStructFieldOmitEmptyBytes opType = 261
opStructFieldBytes opType = 262 opStructFieldStringTagBytes opType = 262
opStructFieldOmitEmptyBytes opType = 263 opStructFieldNumber opType = 263
opStructFieldStringTagBytes opType = 264 opStructFieldOmitEmptyNumber opType = 264
opStructFieldNumber opType = 265 opStructFieldStringTagNumber opType = 265
opStructFieldOmitEmptyNumber opType = 266 opStructFieldArray opType = 266
opStructFieldStringTagNumber opType = 267 opStructFieldOmitEmptyArray opType = 267
opStructFieldArray opType = 268 opStructFieldStringTagArray opType = 268
opStructFieldOmitEmptyArray opType = 269 opStructFieldMap opType = 269
opStructFieldStringTagArray opType = 270 opStructFieldOmitEmptyMap opType = 270
opStructFieldMap opType = 271 opStructFieldStringTagMap opType = 271
opStructFieldOmitEmptyMap opType = 272 opStructFieldSlice opType = 272
opStructFieldStringTagMap opType = 273 opStructFieldOmitEmptySlice opType = 273
opStructFieldSlice opType = 274 opStructFieldStringTagSlice opType = 274
opStructFieldOmitEmptySlice opType = 275 opStructFieldStruct opType = 275
opStructFieldStringTagSlice opType = 276 opStructFieldOmitEmptyStruct opType = 276
opStructFieldStruct opType = 277 opStructFieldStringTagStruct opType = 277
opStructFieldOmitEmptyStruct opType = 278 opStructFieldMarshalJSON opType = 278
opStructFieldStringTagStruct opType = 279 opStructFieldOmitEmptyMarshalJSON opType = 279
opStructFieldMarshalJSON opType = 280 opStructFieldStringTagMarshalJSON opType = 280
opStructFieldOmitEmptyMarshalJSON opType = 281 opStructFieldMarshalText opType = 281
opStructFieldStringTagMarshalJSON opType = 282 opStructFieldOmitEmptyMarshalText opType = 282
opStructFieldMarshalText opType = 283 opStructFieldStringTagMarshalText opType = 283
opStructFieldOmitEmptyMarshalText opType = 284 opStructFieldRecursive opType = 284
opStructFieldStringTagMarshalText opType = 285 opStructFieldOmitEmptyRecursive opType = 285
opStructFieldRecursive opType = 286 opStructFieldStringTagRecursive opType = 286
opStructFieldOmitEmptyRecursive opType = 287 opStructFieldIntString opType = 287
opStructFieldStringTagRecursive opType = 288 opStructFieldOmitEmptyIntString opType = 288
opStructFieldIntString opType = 289 opStructFieldStringTagIntString opType = 289
opStructFieldOmitEmptyIntString opType = 290 opStructFieldUintString opType = 290
opStructFieldStringTagIntString opType = 291 opStructFieldOmitEmptyUintString opType = 291
opStructFieldUintString opType = 292 opStructFieldStringTagUintString opType = 292
opStructFieldOmitEmptyUintString opType = 293 opStructFieldIntPtr opType = 293
opStructFieldStringTagUintString opType = 294 opStructFieldOmitEmptyIntPtr opType = 294
opStructFieldIntPtr opType = 295 opStructFieldStringTagIntPtr opType = 295
opStructFieldOmitEmptyIntPtr opType = 296 opStructFieldUintPtr opType = 296
opStructFieldStringTagIntPtr opType = 297 opStructFieldOmitEmptyUintPtr opType = 297
opStructFieldUintPtr opType = 298 opStructFieldStringTagUintPtr opType = 298
opStructFieldOmitEmptyUintPtr opType = 299 opStructFieldFloat32Ptr opType = 299
opStructFieldStringTagUintPtr opType = 300 opStructFieldOmitEmptyFloat32Ptr opType = 300
opStructFieldFloat32Ptr opType = 301 opStructFieldStringTagFloat32Ptr opType = 301
opStructFieldOmitEmptyFloat32Ptr opType = 302 opStructFieldFloat64Ptr opType = 302
opStructFieldStringTagFloat32Ptr opType = 303 opStructFieldOmitEmptyFloat64Ptr opType = 303
opStructFieldFloat64Ptr opType = 304 opStructFieldStringTagFloat64Ptr opType = 304
opStructFieldOmitEmptyFloat64Ptr opType = 305 opStructFieldBoolPtr opType = 305
opStructFieldStringTagFloat64Ptr opType = 306 opStructFieldOmitEmptyBoolPtr opType = 306
opStructFieldBoolPtr opType = 307 opStructFieldStringTagBoolPtr opType = 307
opStructFieldOmitEmptyBoolPtr opType = 308 opStructFieldStringPtr opType = 308
opStructFieldStringTagBoolPtr opType = 309 opStructFieldOmitEmptyStringPtr opType = 309
opStructFieldStringPtr opType = 310 opStructFieldStringTagStringPtr opType = 310
opStructFieldOmitEmptyStringPtr opType = 311 opStructFieldBytesPtr opType = 311
opStructFieldStringTagStringPtr opType = 312 opStructFieldOmitEmptyBytesPtr opType = 312
opStructFieldBytesPtr opType = 313 opStructFieldStringTagBytesPtr opType = 313
opStructFieldOmitEmptyBytesPtr opType = 314 opStructFieldNumberPtr opType = 314
opStructFieldStringTagBytesPtr opType = 315 opStructFieldOmitEmptyNumberPtr opType = 315
opStructFieldNumberPtr opType = 316 opStructFieldStringTagNumberPtr opType = 316
opStructFieldOmitEmptyNumberPtr opType = 317 opStructFieldArrayPtr opType = 317
opStructFieldStringTagNumberPtr opType = 318 opStructFieldOmitEmptyArrayPtr opType = 318
opStructFieldArrayPtr opType = 319 opStructFieldStringTagArrayPtr opType = 319
opStructFieldOmitEmptyArrayPtr opType = 320 opStructFieldMapPtr opType = 320
opStructFieldStringTagArrayPtr opType = 321 opStructFieldOmitEmptyMapPtr opType = 321
opStructFieldMapPtr opType = 322 opStructFieldStringTagMapPtr opType = 322
opStructFieldOmitEmptyMapPtr opType = 323 opStructFieldSlicePtr opType = 323
opStructFieldStringTagMapPtr opType = 324 opStructFieldOmitEmptySlicePtr opType = 324
opStructFieldSlicePtr opType = 325 opStructFieldStringTagSlicePtr opType = 325
opStructFieldOmitEmptySlicePtr opType = 326 opStructFieldMarshalJSONPtr opType = 326
opStructFieldStringTagSlicePtr opType = 327 opStructFieldOmitEmptyMarshalJSONPtr opType = 327
opStructFieldMarshalJSONPtr opType = 328 opStructFieldStringTagMarshalJSONPtr opType = 328
opStructFieldOmitEmptyMarshalJSONPtr opType = 329 opStructFieldMarshalTextPtr opType = 329
opStructFieldStringTagMarshalJSONPtr opType = 330 opStructFieldOmitEmptyMarshalTextPtr opType = 330
opStructFieldMarshalTextPtr opType = 331 opStructFieldStringTagMarshalTextPtr opType = 331
opStructFieldOmitEmptyMarshalTextPtr opType = 332 opStructFieldInterfacePtr opType = 332
opStructFieldStringTagMarshalTextPtr opType = 333 opStructFieldOmitEmptyInterfacePtr opType = 333
opStructFieldInterfacePtr opType = 334 opStructFieldStringTagInterfacePtr opType = 334
opStructFieldOmitEmptyInterfacePtr opType = 335 opStructFieldRecursivePtr opType = 335
opStructFieldStringTagInterfacePtr opType = 336 opStructFieldOmitEmptyRecursivePtr opType = 336
opStructFieldRecursivePtr opType = 337 opStructFieldStringTagRecursivePtr opType = 337
opStructFieldOmitEmptyRecursivePtr opType = 338 opStructField opType = 338
opStructFieldStringTagRecursivePtr opType = 339 opStructFieldOmitEmpty opType = 339
opStructField opType = 340 opStructFieldStringTag opType = 340
opStructFieldOmitEmpty opType = 341 opStructEndInt opType = 341
opStructFieldStringTag opType = 342 opStructEndOmitEmptyInt opType = 342
opStructEndInt opType = 343 opStructEndStringTagInt opType = 343
opStructEndOmitEmptyInt opType = 344 opStructEndUint opType = 344
opStructEndStringTagInt opType = 345 opStructEndOmitEmptyUint opType = 345
opStructEndUint opType = 346 opStructEndStringTagUint opType = 346
opStructEndOmitEmptyUint opType = 347 opStructEndFloat32 opType = 347
opStructEndStringTagUint opType = 348 opStructEndOmitEmptyFloat32 opType = 348
opStructEndFloat32 opType = 349 opStructEndStringTagFloat32 opType = 349
opStructEndOmitEmptyFloat32 opType = 350 opStructEndFloat64 opType = 350
opStructEndStringTagFloat32 opType = 351 opStructEndOmitEmptyFloat64 opType = 351
opStructEndFloat64 opType = 352 opStructEndStringTagFloat64 opType = 352
opStructEndOmitEmptyFloat64 opType = 353 opStructEndBool opType = 353
opStructEndStringTagFloat64 opType = 354 opStructEndOmitEmptyBool opType = 354
opStructEndBool opType = 355 opStructEndStringTagBool opType = 355
opStructEndOmitEmptyBool opType = 356 opStructEndString opType = 356
opStructEndStringTagBool opType = 357 opStructEndOmitEmptyString opType = 357
opStructEndString opType = 358 opStructEndStringTagString opType = 358
opStructEndOmitEmptyString opType = 359 opStructEndBytes opType = 359
opStructEndStringTagString opType = 360 opStructEndOmitEmptyBytes opType = 360
opStructEndBytes opType = 361 opStructEndStringTagBytes opType = 361
opStructEndOmitEmptyBytes opType = 362 opStructEndNumber opType = 362
opStructEndStringTagBytes opType = 363 opStructEndOmitEmptyNumber opType = 363
opStructEndNumber opType = 364 opStructEndStringTagNumber opType = 364
opStructEndOmitEmptyNumber opType = 365 opStructEndArray opType = 365
opStructEndStringTagNumber opType = 366 opStructEndOmitEmptyArray opType = 366
opStructEndArray opType = 367 opStructEndStringTagArray opType = 367
opStructEndOmitEmptyArray opType = 368 opStructEndMap opType = 368
opStructEndStringTagArray opType = 369 opStructEndOmitEmptyMap opType = 369
opStructEndMap opType = 370 opStructEndStringTagMap opType = 370
opStructEndOmitEmptyMap opType = 371 opStructEndSlice opType = 371
opStructEndStringTagMap opType = 372 opStructEndOmitEmptySlice opType = 372
opStructEndSlice opType = 373 opStructEndStringTagSlice opType = 373
opStructEndOmitEmptySlice opType = 374 opStructEndStruct opType = 374
opStructEndStringTagSlice opType = 375 opStructEndOmitEmptyStruct opType = 375
opStructEndStruct opType = 376 opStructEndStringTagStruct opType = 376
opStructEndOmitEmptyStruct opType = 377 opStructEndMarshalJSON opType = 377
opStructEndStringTagStruct opType = 378 opStructEndOmitEmptyMarshalJSON opType = 378
opStructEndMarshalJSON opType = 379 opStructEndStringTagMarshalJSON opType = 379
opStructEndOmitEmptyMarshalJSON opType = 380 opStructEndMarshalText opType = 380
opStructEndStringTagMarshalJSON opType = 381 opStructEndOmitEmptyMarshalText opType = 381
opStructEndMarshalText opType = 382 opStructEndStringTagMarshalText opType = 382
opStructEndOmitEmptyMarshalText opType = 383 opStructEndRecursive opType = 383
opStructEndStringTagMarshalText opType = 384 opStructEndOmitEmptyRecursive opType = 384
opStructEndRecursive opType = 385 opStructEndStringTagRecursive opType = 385
opStructEndOmitEmptyRecursive opType = 386 opStructEndIntString opType = 386
opStructEndStringTagRecursive opType = 387 opStructEndOmitEmptyIntString opType = 387
opStructEndIntString opType = 388 opStructEndStringTagIntString opType = 388
opStructEndOmitEmptyIntString opType = 389 opStructEndUintString opType = 389
opStructEndStringTagIntString opType = 390 opStructEndOmitEmptyUintString opType = 390
opStructEndUintString opType = 391 opStructEndStringTagUintString opType = 391
opStructEndOmitEmptyUintString opType = 392 opStructEndIntPtr opType = 392
opStructEndStringTagUintString opType = 393 opStructEndOmitEmptyIntPtr opType = 393
opStructEndIntPtr opType = 394 opStructEndStringTagIntPtr opType = 394
opStructEndOmitEmptyIntPtr opType = 395 opStructEndUintPtr opType = 395
opStructEndStringTagIntPtr opType = 396 opStructEndOmitEmptyUintPtr opType = 396
opStructEndUintPtr opType = 397 opStructEndStringTagUintPtr opType = 397
opStructEndOmitEmptyUintPtr opType = 398 opStructEndFloat32Ptr opType = 398
opStructEndStringTagUintPtr opType = 399 opStructEndOmitEmptyFloat32Ptr opType = 399
opStructEndFloat32Ptr opType = 400 opStructEndStringTagFloat32Ptr opType = 400
opStructEndOmitEmptyFloat32Ptr opType = 401 opStructEndFloat64Ptr opType = 401
opStructEndStringTagFloat32Ptr opType = 402 opStructEndOmitEmptyFloat64Ptr opType = 402
opStructEndFloat64Ptr opType = 403 opStructEndStringTagFloat64Ptr opType = 403
opStructEndOmitEmptyFloat64Ptr opType = 404 opStructEndBoolPtr opType = 404
opStructEndStringTagFloat64Ptr opType = 405 opStructEndOmitEmptyBoolPtr opType = 405
opStructEndBoolPtr opType = 406 opStructEndStringTagBoolPtr opType = 406
opStructEndOmitEmptyBoolPtr opType = 407 opStructEndStringPtr opType = 407
opStructEndStringTagBoolPtr opType = 408 opStructEndOmitEmptyStringPtr opType = 408
opStructEndStringPtr opType = 409 opStructEndStringTagStringPtr opType = 409
opStructEndOmitEmptyStringPtr opType = 410 opStructEndBytesPtr opType = 410
opStructEndStringTagStringPtr opType = 411 opStructEndOmitEmptyBytesPtr opType = 411
opStructEndBytesPtr opType = 412 opStructEndStringTagBytesPtr opType = 412
opStructEndOmitEmptyBytesPtr opType = 413 opStructEndNumberPtr opType = 413
opStructEndStringTagBytesPtr opType = 414 opStructEndOmitEmptyNumberPtr opType = 414
opStructEndNumberPtr opType = 415 opStructEndStringTagNumberPtr opType = 415
opStructEndOmitEmptyNumberPtr opType = 416 opStructEndArrayPtr opType = 416
opStructEndStringTagNumberPtr opType = 417 opStructEndOmitEmptyArrayPtr opType = 417
opStructEndArrayPtr opType = 418 opStructEndStringTagArrayPtr opType = 418
opStructEndOmitEmptyArrayPtr opType = 419 opStructEndMapPtr opType = 419
opStructEndStringTagArrayPtr opType = 420 opStructEndOmitEmptyMapPtr opType = 420
opStructEndMapPtr opType = 421 opStructEndStringTagMapPtr opType = 421
opStructEndOmitEmptyMapPtr opType = 422 opStructEndSlicePtr opType = 422
opStructEndStringTagMapPtr opType = 423 opStructEndOmitEmptySlicePtr opType = 423
opStructEndSlicePtr opType = 424 opStructEndStringTagSlicePtr opType = 424
opStructEndOmitEmptySlicePtr opType = 425 opStructEndMarshalJSONPtr opType = 425
opStructEndStringTagSlicePtr opType = 426 opStructEndOmitEmptyMarshalJSONPtr opType = 426
opStructEndMarshalJSONPtr opType = 427 opStructEndStringTagMarshalJSONPtr opType = 427
opStructEndOmitEmptyMarshalJSONPtr opType = 428 opStructEndMarshalTextPtr opType = 428
opStructEndStringTagMarshalJSONPtr opType = 429 opStructEndOmitEmptyMarshalTextPtr opType = 429
opStructEndMarshalTextPtr opType = 430 opStructEndStringTagMarshalTextPtr opType = 430
opStructEndOmitEmptyMarshalTextPtr opType = 431 opStructEndInterfacePtr opType = 431
opStructEndStringTagMarshalTextPtr opType = 432 opStructEndOmitEmptyInterfacePtr opType = 432
opStructEndInterfacePtr opType = 433 opStructEndStringTagInterfacePtr opType = 433
opStructEndOmitEmptyInterfacePtr opType = 434 opStructEndRecursivePtr opType = 434
opStructEndStringTagInterfacePtr opType = 435 opStructEndOmitEmptyRecursivePtr opType = 435
opStructEndRecursivePtr opType = 436 opStructEndStringTagRecursivePtr opType = 436
opStructEndOmitEmptyRecursivePtr opType = 437 opStructEnd opType = 437
opStructEndStringTagRecursivePtr opType = 438 opStructEndOmitEmpty opType = 438
opStructEnd opType = 439 opStructEndStringTag opType = 439
opStructEndOmitEmpty opType = 440
opStructEndStringTag opType = 441
) )
func (t opType) String() string { func (t opType) String() string {
if int(t) >= 442 { if int(t) >= 440 {
return "" return ""
} }
return opTypeStrings[int(t)] return opTypeStrings[int(t)]

View File

@ -224,28 +224,6 @@ func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode
code = code.end.next code = code.end.next
} }
} }
case opRootSliceHead:
p := load(ctxptr, code.idx)
slice := ptrToSlice(p)
if p == 0 || slice.data == nil {
b = encodeNull(b)
b = encodeIndentComma(b)
code = code.end.next
} else {
store(ctxptr, code.elemIdx, 0)
store(ctxptr, code.length, uintptr(slice.len))
store(ctxptr, code.idx, uintptr(slice.data))
if slice.len > 0 {
b = append(b, '[', '\n')
b = appendIndent(ctx, b, code.indent+1)
code = code.next
store(ctxptr, code.idx, uintptr(slice.data))
} else {
b = appendIndent(ctx, b, code.indent)
b = append(b, '[', ']', ',', '\n')
code = code.end.next
}
}
case opSliceElem: case opSliceElem:
idx := load(ctxptr, code.elemIdx) idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length) length := load(ctxptr, code.length)
@ -264,22 +242,6 @@ func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode
b = append(b, ']', ',', '\n') b = append(b, ']', ',', '\n')
code = code.end.next code = code.end.next
} }
case opRootSliceElem:
idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length)
idx++
if idx < length {
b = appendIndent(ctx, b, code.indent+1)
store(ctxptr, code.elemIdx, idx)
code = code.next
data := load(ctxptr, code.headIdx)
store(ctxptr, code.idx, data+idx*code.size)
} else {
b = append(b, '\n')
b = appendIndent(ctx, b, code.indent)
b = append(b, ']')
code = code.end.next
}
case opArray: case opArray:
p := load(ctxptr, code.idx) p := load(ctxptr, code.idx)
if p == 0 { if p == 0 {

View File

@ -224,28 +224,6 @@ func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, op
code = code.end.next code = code.end.next
} }
} }
case opRootSliceHead:
p := load(ctxptr, code.idx)
slice := ptrToSlice(p)
if p == 0 || slice.data == nil {
b = encodeNull(b)
b = encodeIndentComma(b)
code = code.end.next
} else {
store(ctxptr, code.elemIdx, 0)
store(ctxptr, code.length, uintptr(slice.len))
store(ctxptr, code.idx, uintptr(slice.data))
if slice.len > 0 {
b = append(b, '[', '\n')
b = appendIndent(ctx, b, code.indent+1)
code = code.next
store(ctxptr, code.idx, uintptr(slice.data))
} else {
b = appendIndent(ctx, b, code.indent)
b = append(b, '[', ']', ',', '\n')
code = code.end.next
}
}
case opSliceElem: case opSliceElem:
idx := load(ctxptr, code.elemIdx) idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length) length := load(ctxptr, code.length)
@ -264,22 +242,6 @@ func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, op
b = append(b, ']', ',', '\n') b = append(b, ']', ',', '\n')
code = code.end.next code = code.end.next
} }
case opRootSliceElem:
idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length)
idx++
if idx < length {
b = appendIndent(ctx, b, code.indent+1)
store(ctxptr, code.elemIdx, idx)
code = code.next
data := load(ctxptr, code.headIdx)
store(ctxptr, code.idx, data+idx*code.size)
} else {
b = append(b, '\n')
b = appendIndent(ctx, b, code.indent)
b = append(b, ']')
code = code.end.next
}
case opArray: case opArray:
p := load(ctxptr, code.idx) p := load(ctxptr, code.idx)
if p == 0 { if p == 0 {