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("Interface", "Op"),
createOpType("Ptr", "Op"),
createOpType("RootSliceHead", "SliceHead"),
createOpType("SliceElem", "SliceElem"),
createOpType("RootSliceElem", "SliceElem"),
createOpType("SliceEnd", "Op"),
createOpType("ArrayElem", "ArrayElem"),
createOpType("ArrayEnd", "Op"),

View File

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

View File

@ -224,28 +224,6 @@ func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode
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:
idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length)
@ -264,22 +242,6 @@ func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode
b = append(b, ']', ',', '\n')
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:
p := load(ctxptr, code.idx)
if p == 0 {

View File

@ -224,28 +224,6 @@ func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, op
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:
idx := load(ctxptr, code.elemIdx)
length := load(ctxptr, code.length)
@ -264,22 +242,6 @@ func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, op
b = append(b, ']', ',', '\n')
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:
p := load(ctxptr, code.idx)
if p == 0 {