From 61e533dca2b19ee4071322f9cb8bf87d5182c71f Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Sun, 31 Jan 2021 22:45:59 +0900 Subject: [PATCH] Refactor encoder --- encode.go | 335 ++-- encode_compile.go | 431 +++-- encode_context.go | 11 +- encode_opcode.go | 2 +- encode_vm.go | 2098 +++++++++++------------ encode_vm_escaped.go | 2049 +++++++++++------------ encode_vm_escaped_indent.go | 3120 +++++++++++++++++------------------ encode_vm_indent.go | 3120 +++++++++++++++++------------------ json.go | 61 +- option.go | 9 +- 10 files changed, 5626 insertions(+), 5610 deletions(-) diff --git a/encode.go b/encode.go index a48c4c3..a9fc6c7 100644 --- a/encode.go +++ b/encode.go @@ -2,154 +2,58 @@ package json import ( "bytes" - "encoding" "encoding/base64" - "fmt" "io" "math" - "reflect" "strconv" "sync" - "sync/atomic" "unsafe" ) // An Encoder writes JSON values to an output stream. type Encoder struct { w io.Writer - ctx *encodeRuntimeContext - ptr unsafe.Pointer - buf []byte enabledIndent bool enabledHTMLEscape bool - unorderedMap bool - baseIndent int - prefix []byte - indentStr []byte -} - -type compiledCode struct { - code *opcode - linked bool // whether recursive code already have linked - curLen uintptr - nextLen uintptr + prefix string + indentStr string } const ( - bufSize = 1024 - maxAcceptableTypeAddrRange = 1024 * 1024 * 2 // 2 Mib + bufSize = 1024 ) +type EncodeOption int + const ( - opCodeEscapedType = iota - opCodeEscapedIndentType - opCodeNoEscapeType - opCodeNoEscapeIndentType + EncodeOptionHTMLEscape EncodeOption = 1 << iota + EncodeOptionIndent + EncodeOptionUnorderedMap ) -type opcodeSet struct { - code *opcode - codeLength int -} - -func loadOpcodeMap() map[uintptr]*opcodeSet { - p := atomic.LoadPointer(&cachedOpcode) - return *(*map[uintptr]*opcodeSet)(unsafe.Pointer(&p)) -} - -func storeOpcodeSet(typ uintptr, set *opcodeSet, m map[uintptr]*opcodeSet) { - newOpcodeMap := make(map[uintptr]*opcodeSet, len(m)+1) - newOpcodeMap[typ] = set - - for k, v := range m { - newOpcodeMap[k] = v - } - - atomic.StorePointer(&cachedOpcode, *(*unsafe.Pointer)(unsafe.Pointer(&newOpcodeMap))) -} - var ( - encPool sync.Pool - codePool sync.Pool - cachedOpcode unsafe.Pointer // map[uintptr]*opcodeSet - marshalJSONType reflect.Type - marshalTextType reflect.Type - baseTypeAddr uintptr - cachedOpcodeSets []*opcodeSet -) - -//go:linkname typelinks reflect.typelinks -func typelinks() ([]unsafe.Pointer, [][]int32) - -//go:linkname rtypeOff reflect.rtypeOff -func rtypeOff(unsafe.Pointer, int32) unsafe.Pointer - -func setupOpcodeSets() error { - sections, offsets := typelinks() - if len(sections) != 1 { - return fmt.Errorf("failed to get sections") - } - if len(offsets) != 1 { - return fmt.Errorf("failed to get offsets") - } - section := sections[0] - offset := offsets[0] - var ( - min uintptr = uintptr(^uint(0)) - max uintptr = 0 - ) - for i := 0; i < len(offset); i++ { - addr := uintptr(rtypeOff(section, offset[i])) - if min > addr { - min = addr - } - if max < addr { - max = addr - } - } - addrRange := uintptr(max) - uintptr(min) - if addrRange == 0 { - return fmt.Errorf("failed to get address range of types") - } - if addrRange > maxAcceptableTypeAddrRange { - return fmt.Errorf("too big address range %d", addrRange) - } - cachedOpcodeSets = make([]*opcodeSet, addrRange) - baseTypeAddr = min - return nil -} - -func init() { - encPool = sync.Pool{ + encRuntimeContextPool = sync.Pool{ New: func() interface{} { - return &Encoder{ - ctx: &encodeRuntimeContext{ - ptrs: make([]uintptr, 128), - keepRefs: make([]unsafe.Pointer, 0, 8), - }, - buf: make([]byte, 0, bufSize), + return &encodeRuntimeContext{ + buf: make([]byte, 0, bufSize), + ptrs: make([]uintptr, 128), + keepRefs: make([]unsafe.Pointer, 0, 8), } }, } - marshalJSONType = reflect.TypeOf((*Marshaler)(nil)).Elem() - marshalTextType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() - if err := setupOpcodeSets(); err != nil { - // fallback to slow path - } +) + +func takeEncodeRuntimeContext() *encodeRuntimeContext { + return encRuntimeContextPool.Get().(*encodeRuntimeContext) +} + +func releaseEncodeRuntimeContext(ctx *encodeRuntimeContext) { + encRuntimeContextPool.Put(ctx) } // NewEncoder returns a new encoder that writes to w. func NewEncoder(w io.Writer) *Encoder { - enc := encPool.Get().(*Encoder) - enc.w = w - enc.reset() - return enc -} - -func newEncoder() *Encoder { - enc := encPool.Get().(*Encoder) - enc.reset() - return enc + return &Encoder{w: w, enabledHTMLEscape: true} } // Encode writes the JSON encoding of v to the stream, followed by a newline character. @@ -160,15 +64,23 @@ func (e *Encoder) Encode(v interface{}) error { } // EncodeWithOption call Encode with EncodeOption. -func (e *Encoder) EncodeWithOption(v interface{}, opts ...EncodeOption) error { - for _, opt := range opts { - if err := opt(e); err != nil { - return err - } +func (e *Encoder) EncodeWithOption(v interface{}, optFuncs ...EncodeOptionFunc) error { + var opt EncodeOption + if e.enabledHTMLEscape { + opt |= EncodeOptionHTMLEscape + } + for _, optFunc := range optFuncs { + opt = optFunc(opt) + } + var ( + buf []byte + err error + ) + if e.enabledIndent { + buf, err = encodeIndentWithOpt(v, e.prefix, e.indentStr, opt) + } else { + buf, err = encodeWithOpt(v, opt) } - header := (*interfaceHeader)(unsafe.Pointer(&v)) - e.ptr = header.ptr - buf, err := e.encode(header, v == nil) if err != nil { return err } @@ -181,7 +93,6 @@ func (e *Encoder) EncodeWithOption(v interface{}, opts ...EncodeOption) error { if _, err := e.w.Write(buf); err != nil { return err } - e.buf = buf[:0] return nil } @@ -200,40 +111,17 @@ func (e *Encoder) SetIndent(prefix, indent string) { e.enabledIndent = false return } - e.prefix = []byte(prefix) - e.indentStr = []byte(indent) + e.prefix = prefix + e.indentStr = indent e.enabledIndent = true } -func (e *Encoder) release() { - e.w = nil - encPool.Put(e) -} - -func (e *Encoder) reset() { - e.baseIndent = 0 - e.enabledHTMLEscape = true - e.enabledIndent = false - e.unorderedMap = false -} - -func (e *Encoder) encodeForMarshal(header *interfaceHeader, isNil bool) ([]byte, error) { - buf, err := e.encode(header, isNil) +func marshal(v interface{}, opt EncodeOption) ([]byte, error) { + buf, err := encodeWithOpt(v, EncodeOptionHTMLEscape) if err != nil { return nil, err } - e.buf = buf - - if e.enabledIndent { - // this line's description is the below. - buf = buf[:len(buf)-2] - - copied := make([]byte, len(buf)) - copy(copied, buf) - return copied, nil - } - // this line exists to escape call of `runtime.makeslicecopy` . // if use `make([]byte, len(buf)-1)` and `copy(copied, buf)`, // dst buffer size and src buffer size are differrent. @@ -245,95 +133,98 @@ func (e *Encoder) encodeForMarshal(header *interfaceHeader, isNil bool) ([]byte, return copied, nil } -func (e *Encoder) encode(header *interfaceHeader, isNil bool) ([]byte, error) { - b := e.buf[:0] - if isNil { +func marshalIndent(v interface{}, prefix, indent string, opt EncodeOption) ([]byte, error) { + buf, err := encodeIndentWithOpt(v, prefix, indent, EncodeOptionHTMLEscape) + if err != nil { + return nil, err + } + buf = buf[:len(buf)-2] + + copied := make([]byte, len(buf)) + copy(copied, buf) + return copied, nil +} + +func encodeWithOpt(v interface{}, opt EncodeOption) ([]byte, error) { + ctx := takeEncodeRuntimeContext() + b := ctx.buf[:0] + if v == nil { b = encodeNull(b) - if e.enabledIndent { - b = encodeIndentComma(b) - } else { - b = encodeComma(b) - } + b = encodeComma(b) return b, nil } + header := (*interfaceHeader)(unsafe.Pointer(&v)) typ := header.typ typeptr := uintptr(unsafe.Pointer(typ)) - codeSet, err := e.compileToGetCodeSet(typeptr) + codeSet, err := encodeCompileToGetCodeSet(typeptr) if err != nil { return nil, err } - ctx := e.ctx p := uintptr(header.ptr) ctx.init(p, codeSet.codeLength) - if e.enabledIndent { - if e.enabledHTMLEscape { - return e.runEscapedIndent(ctx, b, codeSet) - } else { - return e.runIndent(ctx, b, codeSet) - } + buf, err := encodeRunCode(ctx, b, codeSet, opt) + + ctx.keepRefs = append(ctx.keepRefs, header.ptr) + + if err != nil { + releaseEncodeRuntimeContext(ctx) + return nil, err } - if e.enabledHTMLEscape { - return e.runEscaped(ctx, b, codeSet) - } - return e.run(ctx, b, codeSet) + + ctx.buf = buf + releaseEncodeRuntimeContext(ctx) + return buf, nil } -func (e *Encoder) compileToGetCodeSet(typeptr uintptr) (*opcodeSet, error) { - if cachedOpcodeSets == nil { - return e.compileToGetCodeSetSlowPath(typeptr) - } - if codeSet := cachedOpcodeSets[typeptr-baseTypeAddr]; codeSet != nil { - return codeSet, nil +func encodeIndentWithOpt(v interface{}, prefix, indent string, opt EncodeOption) ([]byte, error) { + ctx := takeEncodeRuntimeContext() + b := ctx.buf[:0] + if v == nil { + b = encodeNull(b) + b = encodeIndentComma(b) + return b, nil } + header := (*interfaceHeader)(unsafe.Pointer(&v)) + typ := header.typ - // noescape trick for header.typ ( reflect.*rtype ) - copiedType := *(**rtype)(unsafe.Pointer(&typeptr)) - - code, err := e.compileHead(&encodeCompileContext{ - typ: copiedType, - root: true, - structTypeToCompiledCode: map[uintptr]*compiledCode{}, - }) + typeptr := uintptr(unsafe.Pointer(typ)) + codeSet, err := encodeCompileToGetCodeSet(typeptr) if err != nil { return nil, err } - code = copyOpcode(code) - codeLength := code.totalLength() - codeSet := &opcodeSet{ - code: code, - codeLength: codeLength, - } - cachedOpcodeSets[int(typeptr-baseTypeAddr)] = codeSet - return codeSet, nil -} -func (e *Encoder) compileToGetCodeSetSlowPath(typeptr uintptr) (*opcodeSet, error) { - opcodeMap := loadOpcodeMap() - if codeSet, exists := opcodeMap[typeptr]; exists { - return codeSet, nil - } + p := uintptr(header.ptr) + ctx.init(p, codeSet.codeLength) + buf, err := encodeRunIndentCode(ctx, b, codeSet, prefix, indent, opt) - // noescape trick for header.typ ( reflect.*rtype ) - copiedType := *(**rtype)(unsafe.Pointer(&typeptr)) + ctx.keepRefs = append(ctx.keepRefs, header.ptr) - code, err := e.compileHead(&encodeCompileContext{ - typ: copiedType, - root: true, - structTypeToCompiledCode: map[uintptr]*compiledCode{}, - }) if err != nil { + releaseEncodeRuntimeContext(ctx) return nil, err } - code = copyOpcode(code) - codeLength := code.totalLength() - codeSet := &opcodeSet{ - code: code, - codeLength: codeLength, + + ctx.buf = buf + releaseEncodeRuntimeContext(ctx) + return buf, nil +} + +func encodeRunCode(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt EncodeOption) ([]byte, error) { + if (opt & EncodeOptionHTMLEscape) != 0 { + return encodeRunEscaped(ctx, b, codeSet, opt) } - storeOpcodeSet(typeptr, codeSet, opcodeMap) - return codeSet, nil + return encodeRun(ctx, b, codeSet, opt) +} + +func encodeRunIndentCode(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, prefix, indent string, opt EncodeOption) ([]byte, error) { + ctx.prefix = []byte(prefix) + ctx.indentStr = []byte(indent) + if (opt & EncodeOptionHTMLEscape) != 0 { + return encodeRunEscapedIndent(ctx, b, codeSet, opt) + } + return encodeRunIndent(ctx, b, codeSet, opt) } func encodeFloat32(b []byte, v float32) []byte { @@ -389,10 +280,10 @@ func appendStructEnd(b []byte) []byte { return append(b, '}', ',') } -func (e *Encoder) appendStructEndIndent(b []byte, indent int) []byte { +func appendStructEndIndent(ctx *encodeRuntimeContext, b []byte, indent int) []byte { b = append(b, '\n') - b = append(b, e.prefix...) - b = append(b, bytes.Repeat(e.indentStr, e.baseIndent+indent)...) + b = append(b, ctx.prefix...) + b = append(b, bytes.Repeat(ctx.indentStr, ctx.baseIndent+indent)...) return append(b, '}', ',', '\n') } @@ -411,7 +302,7 @@ func encodeByteSlice(b []byte, src []byte) []byte { return append(append(b, buf...), '"') } -func (e *Encoder) encodeIndent(b []byte, indent int) []byte { - b = append(b, e.prefix...) - return append(b, bytes.Repeat(e.indentStr, e.baseIndent+indent)...) +func encodeIndent(ctx *encodeRuntimeContext, b []byte, indent int) []byte { + b = append(b, ctx.prefix...) + return append(b, bytes.Repeat(ctx.indentStr, ctx.baseIndent+indent)...) } diff --git a/encode_compile.go b/encode_compile.go index 1bfb3d3..04e256c 100644 --- a/encode_compile.go +++ b/encode_compile.go @@ -1,23 +1,178 @@ package json import ( + "encoding" "fmt" "reflect" "strings" + "sync/atomic" "unsafe" ) -func (e *Encoder) compileHead(ctx *encodeCompileContext) (*opcode, error) { +type compiledCode struct { + code *opcode + linked bool // whether recursive code already have linked + curLen uintptr + nextLen uintptr +} + +type opcodeSet struct { + code *opcode + codeLength int +} + +var ( + marshalJSONType = reflect.TypeOf((*Marshaler)(nil)).Elem() + marshalTextType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + cachedOpcode unsafe.Pointer // map[uintptr]*opcodeSet + baseTypeAddr uintptr + cachedOpcodeSets []*opcodeSet +) + +const ( + maxAcceptableTypeAddrRange = 1024 * 1024 * 2 // 2 Mib +) + +//go:linkname typelinks reflect.typelinks +func typelinks() ([]unsafe.Pointer, [][]int32) + +//go:linkname rtypeOff reflect.rtypeOff +func rtypeOff(unsafe.Pointer, int32) unsafe.Pointer + +func setupOpcodeSets() error { + sections, offsets := typelinks() + if len(sections) != 1 { + return fmt.Errorf("failed to get sections") + } + if len(offsets) != 1 { + return fmt.Errorf("failed to get offsets") + } + section := sections[0] + offset := offsets[0] + var ( + min uintptr = uintptr(^uint(0)) + max uintptr = 0 + ) + for i := 0; i < len(offset); i++ { + typ := (*rtype)(rtypeOff(section, offset[i])) + addr := uintptr(unsafe.Pointer(typ)) + if min > addr { + min = addr + } + if max < addr { + max = addr + } + if typ.Kind() == reflect.Ptr { + addr = uintptr(unsafe.Pointer(typ.Elem())) + if min > addr { + min = addr + } + if max < addr { + max = addr + } + } + } + addrRange := uintptr(max) - uintptr(min) + if addrRange == 0 { + return fmt.Errorf("failed to get address range of types") + } + if addrRange > maxAcceptableTypeAddrRange { + return fmt.Errorf("too big address range %d", addrRange) + } + cachedOpcodeSets = make([]*opcodeSet, addrRange) + baseTypeAddr = min + return nil +} + +func init() { + if err := setupOpcodeSets(); err != nil { + // fallback to slow path + } +} + +func encodeCompileToGetCodeSet(typeptr uintptr) (*opcodeSet, error) { + if cachedOpcodeSets == nil { + return encodeCompileToGetCodeSetSlowPath(typeptr) + } + if codeSet := cachedOpcodeSets[typeptr-baseTypeAddr]; codeSet != nil { + return codeSet, nil + } + + // noescape trick for header.typ ( reflect.*rtype ) + copiedType := *(**rtype)(unsafe.Pointer(&typeptr)) + + code, err := encodeCompileHead(&encodeCompileContext{ + typ: copiedType, + root: true, + structTypeToCompiledCode: map[uintptr]*compiledCode{}, + }) + if err != nil { + return nil, err + } + code = copyOpcode(code) + codeLength := code.totalLength() + codeSet := &opcodeSet{ + code: code, + codeLength: codeLength, + } + cachedOpcodeSets[int(typeptr-baseTypeAddr)] = codeSet + return codeSet, nil +} + +func encodeCompileToGetCodeSetSlowPath(typeptr uintptr) (*opcodeSet, error) { + opcodeMap := loadOpcodeMap() + if codeSet, exists := opcodeMap[typeptr]; exists { + return codeSet, nil + } + + // noescape trick for header.typ ( reflect.*rtype ) + copiedType := *(**rtype)(unsafe.Pointer(&typeptr)) + + code, err := encodeCompileHead(&encodeCompileContext{ + typ: copiedType, + root: true, + structTypeToCompiledCode: map[uintptr]*compiledCode{}, + }) + if err != nil { + return nil, err + } + code = copyOpcode(code) + codeLength := code.totalLength() + codeSet := &opcodeSet{ + code: code, + codeLength: codeLength, + } + storeOpcodeSet(typeptr, codeSet, opcodeMap) + return codeSet, nil +} + +func loadOpcodeMap() map[uintptr]*opcodeSet { + p := atomic.LoadPointer(&cachedOpcode) + return *(*map[uintptr]*opcodeSet)(unsafe.Pointer(&p)) +} + +func storeOpcodeSet(typ uintptr, set *opcodeSet, m map[uintptr]*opcodeSet) { + newOpcodeMap := make(map[uintptr]*opcodeSet, len(m)+1) + newOpcodeMap[typ] = set + + for k, v := range m { + newOpcodeMap[k] = v + } + + atomic.StorePointer(&cachedOpcode, *(*unsafe.Pointer)(unsafe.Pointer(&newOpcodeMap))) +} + +func encodeCompileHead(ctx *encodeCompileContext) (*opcode, error) { typ := ctx.typ switch { case typ.Implements(marshalJSONType): - return e.compileMarshalJSON(ctx) + return encodeCompileMarshalJSON(ctx) case rtype_ptrTo(typ).Implements(marshalJSONType): - return e.compileMarshalJSONPtr(ctx) + return encodeCompileMarshalJSONPtr(ctx) case typ.Implements(marshalTextType): - return e.compileMarshalText(ctx) + return encodeCompileMarshalText(ctx) case rtype_ptrTo(typ).Implements(marshalTextType): - return e.compileMarshalTextPtr(ctx) + return encodeCompileMarshalTextPtr(ctx) } isPtr := false orgType := typ @@ -26,32 +181,32 @@ func (e *Encoder) compileHead(ctx *encodeCompileContext) (*opcode, error) { isPtr = true } if typ.Kind() == reflect.Map { - return e.compileMap(ctx.withType(typ), isPtr) + return encodeCompileMap(ctx.withType(typ), isPtr) } else if typ.Kind() == reflect.Struct { - code, err := e.compileStruct(ctx.withType(typ), isPtr) + code, err := encodeCompileStruct(ctx.withType(typ), isPtr) if err != nil { return nil, err } - e.convertHeadOnlyCode(code, isPtr) - e.optimizeStructEnd(code) - e.linkRecursiveCode(code) + encodeConvertHeadOnlyCode(code, isPtr) + encodeOptimizeStructEnd(code) + encodeLinkRecursiveCode(code) return code, nil } else if isPtr && typ.Implements(marshalTextType) { typ = orgType } else if isPtr && typ.Implements(marshalJSONType) { typ = orgType } - code, err := e.compile(ctx.withType(typ)) + code, err := encodeCompile(ctx.withType(typ)) if err != nil { return nil, err } - e.convertHeadOnlyCode(code, isPtr) - e.optimizeStructEnd(code) - e.linkRecursiveCode(code) + encodeConvertHeadOnlyCode(code, isPtr) + encodeOptimizeStructEnd(code) + encodeLinkRecursiveCode(code) return code, nil } -func (e *Encoder) linkRecursiveCode(c *opcode) { +func encodeLinkRecursiveCode(c *opcode) { for code := c; code.op != opEnd && code.op != opStructFieldRecursiveEnd; { switch code.op { case opStructFieldRecursive, @@ -82,7 +237,7 @@ func (e *Encoder) linkRecursiveCode(c *opcode) { code.jmp.nextLen = nextTotalLength code.jmp.linked = true - e.linkRecursiveCode(code.jmp.code) + encodeLinkRecursiveCode(code.jmp.code) code = code.next continue } @@ -95,7 +250,7 @@ func (e *Encoder) linkRecursiveCode(c *opcode) { } } -func (e *Encoder) optimizeStructEnd(c *opcode) { +func encodeOptimizeStructEnd(c *opcode) { for code := c; code.op != opEnd; { if code.op == opStructFieldRecursive { // ignore if exists recursive operation @@ -136,7 +291,7 @@ func (e *Encoder) optimizeStructEnd(c *opcode) { } } -func (e *Encoder) convertHeadOnlyCode(c *opcode, isPtrHead bool) { +func encodeConvertHeadOnlyCode(c *opcode, isPtrHead bool) { if c.nextField == nil { return } @@ -145,19 +300,19 @@ func (e *Encoder) convertHeadOnlyCode(c *opcode, isPtrHead bool) { } switch c.op { case opStructFieldHead: - e.convertHeadOnlyCode(c.next, false) + encodeConvertHeadOnlyCode(c.next, false) if !strings.Contains(c.next.op.String(), "Only") { return } c.op = opStructFieldHeadOnly case opStructFieldHeadOmitEmpty: - e.convertHeadOnlyCode(c.next, false) + encodeConvertHeadOnlyCode(c.next, false) if !strings.Contains(c.next.op.String(), "Only") { return } c.op = opStructFieldHeadOmitEmptyOnly case opStructFieldHeadStringTag: - e.convertHeadOnlyCode(c.next, false) + encodeConvertHeadOnlyCode(c.next, false) if !strings.Contains(c.next.op.String(), "Only") { return } @@ -185,7 +340,7 @@ func (e *Encoder) convertHeadOnlyCode(c *opcode, isPtrHead bool) { } } -func (e *Encoder) implementsMarshaler(typ *rtype) bool { +func encodeImplementsMarshaler(typ *rtype) bool { switch { case typ.Implements(marshalJSONType): return true @@ -199,115 +354,115 @@ func (e *Encoder) implementsMarshaler(typ *rtype) bool { return false } -func (e *Encoder) compile(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompile(ctx *encodeCompileContext) (*opcode, error) { typ := ctx.typ switch { case typ.Implements(marshalJSONType): - return e.compileMarshalJSON(ctx) + return encodeCompileMarshalJSON(ctx) case rtype_ptrTo(typ).Implements(marshalJSONType): - return e.compileMarshalJSONPtr(ctx) + return encodeCompileMarshalJSONPtr(ctx) case typ.Implements(marshalTextType): - return e.compileMarshalText(ctx) + return encodeCompileMarshalText(ctx) case rtype_ptrTo(typ).Implements(marshalTextType): - return e.compileMarshalTextPtr(ctx) + return encodeCompileMarshalTextPtr(ctx) } switch typ.Kind() { case reflect.Ptr: - return e.compilePtr(ctx) + return encodeCompilePtr(ctx) case reflect.Slice: elem := typ.Elem() - if !e.implementsMarshaler(elem) && elem.Kind() == reflect.Uint8 { - return e.compileBytes(ctx) + if !encodeImplementsMarshaler(elem) && elem.Kind() == reflect.Uint8 { + return encodeCompileBytes(ctx) } - return e.compileSlice(ctx) + return encodeCompileSlice(ctx) case reflect.Array: - return e.compileArray(ctx) + return encodeCompileArray(ctx) case reflect.Map: - return e.compileMap(ctx, true) + return encodeCompileMap(ctx, true) case reflect.Struct: - return e.compileStruct(ctx, false) + return encodeCompileStruct(ctx, false) case reflect.Interface: - return e.compileInterface(ctx) + return encodeCompileInterface(ctx) case reflect.Int: - return e.compileInt(ctx) + return encodeCompileInt(ctx) case reflect.Int8: - return e.compileInt8(ctx) + return encodeCompileInt8(ctx) case reflect.Int16: - return e.compileInt16(ctx) + return encodeCompileInt16(ctx) case reflect.Int32: - return e.compileInt32(ctx) + return encodeCompileInt32(ctx) case reflect.Int64: - return e.compileInt64(ctx) + return encodeCompileInt64(ctx) case reflect.Uint: - return e.compileUint(ctx) + return encodeCompileUint(ctx) case reflect.Uint8: - return e.compileUint8(ctx) + return encodeCompileUint8(ctx) case reflect.Uint16: - return e.compileUint16(ctx) + return encodeCompileUint16(ctx) case reflect.Uint32: - return e.compileUint32(ctx) + return encodeCompileUint32(ctx) case reflect.Uint64: - return e.compileUint64(ctx) + return encodeCompileUint64(ctx) case reflect.Uintptr: - return e.compileUint(ctx) + return encodeCompileUint(ctx) case reflect.Float32: - return e.compileFloat32(ctx) + return encodeCompileFloat32(ctx) case reflect.Float64: - return e.compileFloat64(ctx) + return encodeCompileFloat64(ctx) case reflect.String: - return e.compileString(ctx) + return encodeCompileString(ctx) case reflect.Bool: - return e.compileBool(ctx) + return encodeCompileBool(ctx) } return nil, &UnsupportedTypeError{Type: rtype2type(typ)} } -func (e *Encoder) compileKey(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileKey(ctx *encodeCompileContext) (*opcode, error) { typ := ctx.typ switch { case rtype_ptrTo(typ).Implements(marshalJSONType): - return e.compileMarshalJSONPtr(ctx) + return encodeCompileMarshalJSONPtr(ctx) case rtype_ptrTo(typ).Implements(marshalTextType): - return e.compileMarshalTextPtr(ctx) + return encodeCompileMarshalTextPtr(ctx) } switch typ.Kind() { case reflect.Ptr: - return e.compilePtr(ctx) + return encodeCompilePtr(ctx) case reflect.Interface: - return e.compileInterface(ctx) + return encodeCompileInterface(ctx) case reflect.String: - return e.compileString(ctx) + return encodeCompileString(ctx) case reflect.Int: - return e.compileIntString(ctx) + return encodeCompileIntString(ctx) case reflect.Int8: - return e.compileInt8String(ctx) + return encodeCompileInt8String(ctx) case reflect.Int16: - return e.compileInt16String(ctx) + return encodeCompileInt16String(ctx) case reflect.Int32: - return e.compileInt32String(ctx) + return encodeCompileInt32String(ctx) case reflect.Int64: - return e.compileInt64String(ctx) + return encodeCompileInt64String(ctx) case reflect.Uint: - return e.compileUintString(ctx) + return encodeCompileUintString(ctx) case reflect.Uint8: - return e.compileUint8String(ctx) + return encodeCompileUint8String(ctx) case reflect.Uint16: - return e.compileUint16String(ctx) + return encodeCompileUint16String(ctx) case reflect.Uint32: - return e.compileUint32String(ctx) + return encodeCompileUint32String(ctx) case reflect.Uint64: - return e.compileUint64String(ctx) + return encodeCompileUint64String(ctx) case reflect.Uintptr: - return e.compileUintString(ctx) + return encodeCompileUintString(ctx) } return nil, &UnsupportedTypeError{Type: rtype2type(typ)} } -func (e *Encoder) compilePtr(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompilePtr(ctx *encodeCompileContext) (*opcode, error) { ptrOpcodeIndex := ctx.opcodeIndex ptrIndex := ctx.ptrIndex ctx.incIndex() - code, err := e.compile(ctx.withType(ctx.typ.Elem())) + code, err := encodeCompile(ctx.withType(ctx.typ.Elem())) if err != nil { return nil, err } @@ -324,187 +479,187 @@ func (e *Encoder) compilePtr(ctx *encodeCompileContext) (*opcode, error) { return newOpCodeWithNext(c, opPtr, code), nil } -func (e *Encoder) compileMarshalJSON(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileMarshalJSON(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opMarshalJSON) ctx.incIndex() return code, nil } -func (e *Encoder) compileMarshalJSONPtr(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileMarshalJSONPtr(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx.withType(rtype_ptrTo(ctx.typ)), opMarshalJSON) ctx.incIndex() return code, nil } -func (e *Encoder) compileMarshalText(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileMarshalText(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opMarshalText) ctx.incIndex() return code, nil } -func (e *Encoder) compileMarshalTextPtr(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileMarshalTextPtr(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx.withType(rtype_ptrTo(ctx.typ)), opMarshalText) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt8(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt8(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt8) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt16(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt16(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt16) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt32(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt32(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt32) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt64(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt64(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt64) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint8(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint8(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint8) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint16(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint16(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint16) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint32(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint32(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint32) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint64(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint64(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint64) ctx.incIndex() return code, nil } -func (e *Encoder) compileIntString(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileIntString(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opIntString) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt8String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt8String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt8String) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt16String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt16String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt16String) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt32String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt32String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt32String) ctx.incIndex() return code, nil } -func (e *Encoder) compileInt64String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInt64String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opInt64String) ctx.incIndex() return code, nil } -func (e *Encoder) compileUintString(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUintString(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUintString) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint8String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint8String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint8String) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint16String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint16String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint16String) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint32String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint32String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint32String) ctx.incIndex() return code, nil } -func (e *Encoder) compileUint64String(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileUint64String(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opUint64String) ctx.incIndex() return code, nil } -func (e *Encoder) compileFloat32(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileFloat32(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opFloat32) ctx.incIndex() return code, nil } -func (e *Encoder) compileFloat64(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileFloat64(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opFloat64) ctx.incIndex() return code, nil } -func (e *Encoder) compileString(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileString(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opString) ctx.incIndex() return code, nil } -func (e *Encoder) compileBool(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileBool(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opBool) ctx.incIndex() return code, nil } -func (e *Encoder) compileBytes(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileBytes(ctx *encodeCompileContext) (*opcode, error) { code := newOpCode(ctx, opBytes) ctx.incIndex() return code, nil } -func (e *Encoder) compileInterface(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileInterface(ctx *encodeCompileContext) (*opcode, error) { code := newInterfaceCode(ctx) ctx.incIndex() return code, nil } -func (e *Encoder) compileSlice(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileSlice(ctx *encodeCompileContext) (*opcode, error) { ctx.root = false elem := ctx.typ.Elem() size := elem.Size() @@ -512,7 +667,7 @@ func (e *Encoder) compileSlice(ctx *encodeCompileContext) (*opcode, error) { header := newSliceHeaderCode(ctx) ctx.incIndex() - code, err := e.compile(ctx.withType(ctx.typ.Elem()).incIndent()) + code, err := encodeCompile(ctx.withType(ctx.typ.Elem()).incIndent()) if err != nil { return nil, err } @@ -536,7 +691,7 @@ func (e *Encoder) compileSlice(ctx *encodeCompileContext) (*opcode, error) { return (*opcode)(unsafe.Pointer(header)), nil } -func (e *Encoder) compileArray(ctx *encodeCompileContext) (*opcode, error) { +func encodeCompileArray(ctx *encodeCompileContext) (*opcode, error) { ctx.root = false typ := ctx.typ elem := typ.Elem() @@ -546,7 +701,7 @@ func (e *Encoder) compileArray(ctx *encodeCompileContext) (*opcode, error) { header := newArrayHeaderCode(ctx, alen) ctx.incIndex() - code, err := e.compile(ctx.withType(elem).incIndent()) + code, err := encodeCompile(ctx.withType(elem).incIndent()) if err != nil { return nil, err } @@ -585,7 +740,7 @@ func mapiternext(it unsafe.Pointer) //go:noescape func maplen(m unsafe.Pointer) int -func (e *Encoder) compileMap(ctx *encodeCompileContext, withLoad bool) (*opcode, error) { +func encodeCompileMap(ctx *encodeCompileContext, withLoad bool) (*opcode, error) { // header => code => value => code => key => code => value => code => end // ^ | // |_______________________| @@ -595,7 +750,7 @@ func (e *Encoder) compileMap(ctx *encodeCompileContext, withLoad bool) (*opcode, typ := ctx.typ keyType := ctx.typ.Key() - keyCode, err := e.compileKey(ctx.withType(keyType)) + keyCode, err := encodeCompileKey(ctx.withType(keyType)) if err != nil { return nil, err } @@ -604,7 +759,7 @@ func (e *Encoder) compileMap(ctx *encodeCompileContext, withLoad bool) (*opcode, ctx.incIndex() valueType := typ.Elem() - valueCode, err := e.compile(ctx.withType(valueType)) + valueCode, err := encodeCompile(ctx.withType(valueType)) if err != nil { return nil, err } @@ -633,7 +788,7 @@ func (e *Encoder) compileMap(ctx *encodeCompileContext, withLoad bool) (*opcode, return (*opcode)(unsafe.Pointer(header)), nil } -func (e *Encoder) typeToHeaderType(ctx *encodeCompileContext, code *opcode) opType { +func encodeTypeToHeaderType(ctx *encodeCompileContext, code *opcode) opType { switch code.op { case opPtr: ptrNum := 1 @@ -757,7 +912,7 @@ func (e *Encoder) typeToHeaderType(ctx *encodeCompileContext, code *opcode) opTy return opStructFieldHead } -func (e *Encoder) typeToFieldType(ctx *encodeCompileContext, code *opcode) opType { +func encodeTypeToFieldType(ctx *encodeCompileContext, code *opcode) opType { switch code.op { case opPtr: ptrNum := 1 @@ -881,8 +1036,8 @@ func (e *Encoder) typeToFieldType(ctx *encodeCompileContext, code *opcode) opTyp return opStructField } -func (e *Encoder) optimizeStructHeader(ctx *encodeCompileContext, code *opcode, tag *structTag) opType { - headType := e.typeToHeaderType(ctx, code) +func encodeOptimizeStructHeader(ctx *encodeCompileContext, code *opcode, tag *structTag) opType { + headType := encodeTypeToHeaderType(ctx, code) switch { case tag.isOmitEmpty: headType = headType.headToOmitEmptyHead() @@ -892,8 +1047,8 @@ func (e *Encoder) optimizeStructHeader(ctx *encodeCompileContext, code *opcode, return headType } -func (e *Encoder) optimizeStructField(ctx *encodeCompileContext, code *opcode, tag *structTag) opType { - fieldType := e.typeToFieldType(ctx, code) +func encodeOptimizeStructField(ctx *encodeCompileContext, code *opcode, tag *structTag) opType { + fieldType := encodeTypeToFieldType(ctx, code) switch { case tag.isOmitEmpty: fieldType = fieldType.fieldToOmitEmptyField() @@ -903,24 +1058,24 @@ func (e *Encoder) optimizeStructField(ctx *encodeCompileContext, code *opcode, t return fieldType } -func (e *Encoder) recursiveCode(ctx *encodeCompileContext, jmp *compiledCode) *opcode { +func encodeRecursiveCode(ctx *encodeCompileContext, jmp *compiledCode) *opcode { code := newRecursiveCode(ctx, jmp) ctx.incIndex() return code } -func (e *Encoder) compiledCode(ctx *encodeCompileContext) *opcode { +func encodeCompiledCode(ctx *encodeCompileContext) *opcode { typ := ctx.typ typeptr := uintptr(unsafe.Pointer(typ)) if compiledCode, exists := ctx.structTypeToCompiledCode[typeptr]; exists { - return e.recursiveCode(ctx, compiledCode) + return encodeRecursiveCode(ctx, compiledCode) } return nil } -func (e *Encoder) structHeader(ctx *encodeCompileContext, fieldCode *opcode, valueCode *opcode, tag *structTag) *opcode { +func encodeStructHeader(ctx *encodeCompileContext, fieldCode *opcode, valueCode *opcode, tag *structTag) *opcode { fieldCode.indent-- - op := e.optimizeStructHeader(ctx, valueCode, tag) + op := encodeOptimizeStructHeader(ctx, valueCode, tag) fieldCode.op = op fieldCode.ptrNum = valueCode.ptrNum switch op { @@ -943,9 +1098,9 @@ func (e *Encoder) structHeader(ctx *encodeCompileContext, fieldCode *opcode, val return (*opcode)(unsafe.Pointer(fieldCode)) } -func (e *Encoder) structField(ctx *encodeCompileContext, fieldCode *opcode, valueCode *opcode, tag *structTag) *opcode { +func encodeStructField(ctx *encodeCompileContext, fieldCode *opcode, valueCode *opcode, tag *structTag) *opcode { code := (*opcode)(unsafe.Pointer(fieldCode)) - op := e.optimizeStructField(ctx, valueCode, tag) + op := encodeOptimizeStructField(ctx, valueCode, tag) fieldCode.op = op fieldCode.ptrNum = valueCode.ptrNum switch op { @@ -968,7 +1123,7 @@ func (e *Encoder) structField(ctx *encodeCompileContext, fieldCode *opcode, valu return code } -func (e *Encoder) isNotExistsField(head *opcode) bool { +func encodeIsNotExistsField(head *opcode) bool { if head == nil { return false } @@ -990,10 +1145,10 @@ func (e *Encoder) isNotExistsField(head *opcode) bool { if head.next.op.codeType() != codeStructField { return false } - return e.isNotExistsField(head.next) + return encodeIsNotExistsField(head.next) } -func (e *Encoder) optimizeAnonymousFields(head *opcode) { +func encodeOptimizeAnonymousFields(head *opcode) { code := head var prev *opcode removedFields := map[*opcode]struct{}{} @@ -1004,13 +1159,13 @@ func (e *Encoder) optimizeAnonymousFields(head *opcode) { if code.op == opStructField { codeType := code.next.op.codeType() if codeType == codeStructField { - if e.isNotExistsField(code.next) { + if encodeIsNotExistsField(code.next) { code.next = code.nextField diff := code.next.displayIdx - code.displayIdx for i := 0; i < diff; i++ { code.next.decOpcodeIndex() } - linkPrevToNextField(code, removedFields) + encodeLinkPrevToNextField(code, removedFields) code = prev } } @@ -1027,7 +1182,7 @@ type structFieldPair struct { linked bool } -func (e *Encoder) anonymousStructFieldPairMap(typ *rtype, tags structTags, named string, valueCode *opcode) map[string][]structFieldPair { +func encodeAnonymousStructFieldPairMap(typ *rtype, tags structTags, named string, valueCode *opcode) map[string][]structFieldPair { anonymousFields := map[string][]structFieldPair{} f := valueCode var prevAnonymousField *opcode @@ -1050,7 +1205,7 @@ func (e *Encoder) anonymousStructFieldPairMap(typ *rtype, tags structTags, named for i := 0; i < diff; i++ { f.nextField.decOpcodeIndex() } - linkPrevToNextField(f, removedFields) + encodeLinkPrevToNextField(f, removedFields) } if f.displayKey == "" { @@ -1069,7 +1224,7 @@ func (e *Encoder) anonymousStructFieldPairMap(typ *rtype, tags structTags, named isTaggedKey: f.isTaggedKey, }) if f.next != nil && f.nextField != f.next && f.next.op.codeType() == codeStructField { - for k, v := range e.anonymousStructFieldPairMap(typ, tags, named, f.next) { + for k, v := range encodeAnonymousStructFieldPairMap(typ, tags, named, f.next) { anonymousFields[k] = append(anonymousFields[k], v...) } } @@ -1082,7 +1237,7 @@ func (e *Encoder) anonymousStructFieldPairMap(typ *rtype, tags structTags, named return anonymousFields } -func (e *Encoder) optimizeConflictAnonymousFields(anonymousFields map[string][]structFieldPair) { +func encodeOptimizeConflictAnonymousFields(anonymousFields map[string][]structFieldPair) { removedFields := map[*opcode]struct{}{} for _, fieldPairs := range anonymousFields { if len(fieldPairs) == 1 { @@ -1104,7 +1259,7 @@ func (e *Encoder) optimizeConflictAnonymousFields(anonymousFields map[string][]s fieldPair.curField.nextField.decOpcodeIndex() } removedFields[fieldPair.curField] = struct{}{} - linkPrevToNextField(fieldPair.curField, removedFields) + encodeLinkPrevToNextField(fieldPair.curField, removedFields) } fieldPair.linked = true } @@ -1122,7 +1277,7 @@ func (e *Encoder) optimizeConflictAnonymousFields(anonymousFields map[string][]s for i := 0; i < diff; i++ { fieldPair.curField.nextField.decOpcodeIndex() } - linkPrevToNextField(fieldPair.curField, removedFields) + encodeLinkPrevToNextField(fieldPair.curField, removedFields) } fieldPair.linked = true } @@ -1135,9 +1290,9 @@ func (e *Encoder) optimizeConflictAnonymousFields(anonymousFields map[string][]s } } -func (e *Encoder) compileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error) { +func encodeCompileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, error) { ctx.root = false - if code := e.compiledCode(ctx); code != nil { + if code := encodeCompiledCode(ctx); code != nil { return code, nil } typ := ctx.typ @@ -1179,7 +1334,7 @@ func (e *Encoder) compileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, fieldOpcodeIndex := ctx.opcodeIndex fieldPtrIndex := ctx.ptrIndex ctx.incIndex() - valueCode, err := e.compile(ctx.withType(fieldType)) + valueCode, err := encodeCompile(ctx.withType(fieldType)) if err != nil { return nil, err } @@ -1195,7 +1350,7 @@ func (e *Encoder) compileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, if tag.isTaggedKey { tagKey = tag.key } - for k, v := range e.anonymousStructFieldPairMap(typ, tags, tagKey, valueCode) { + for k, v := range encodeAnonymousStructFieldPairMap(typ, tags, tagKey, valueCode) { anonymousFields[k] = append(anonymousFields[k], v...) } } @@ -1216,13 +1371,13 @@ func (e *Encoder) compileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, } if fieldIdx == 0 { fieldCode.headIdx = fieldCode.idx - code = e.structHeader(ctx, fieldCode, valueCode, tag) + code = encodeStructHeader(ctx, fieldCode, valueCode, tag) head = fieldCode prevField = fieldCode } else { fieldCode.headIdx = head.headIdx code.next = fieldCode - code = e.structField(ctx, fieldCode, valueCode, tag) + code = encodeStructField(ctx, fieldCode, valueCode, tag) prevField.nextField = fieldCode fieldCode.prevField = prevField prevField = fieldCode @@ -1265,8 +1420,8 @@ func (e *Encoder) compileStruct(ctx *encodeCompileContext, isPtr bool) (*opcode, head.end = structEndCode code.next = structEndCode - e.optimizeConflictAnonymousFields(anonymousFields) - e.optimizeAnonymousFields(head) + encodeOptimizeConflictAnonymousFields(anonymousFields) + encodeOptimizeAnonymousFields(head) ret := (*opcode)(unsafe.Pointer(head)) compiled.code = ret diff --git a/encode_context.go b/encode_context.go index dca785f..692f9d7 100644 --- a/encode_context.go +++ b/encode_context.go @@ -142,9 +142,13 @@ func (c *encodeCompileContext) decPtrIndex() { } type encodeRuntimeContext struct { - ptrs []uintptr - keepRefs []unsafe.Pointer - seenPtr []uintptr + buf []byte + ptrs []uintptr + keepRefs []unsafe.Pointer + seenPtr []uintptr + baseIndent int + prefix []byte + indentStr []byte } func (c *encodeRuntimeContext) init(p uintptr, codelen int) { @@ -154,6 +158,7 @@ func (c *encodeRuntimeContext) init(p uintptr, codelen int) { c.ptrs[0] = p c.keepRefs = c.keepRefs[:0] c.seenPtr = c.seenPtr[:0] + c.baseIndent = 0 } func (c *encodeRuntimeContext) ptr() uintptr { diff --git a/encode_opcode.go b/encode_opcode.go index cf3d013..96492e2 100644 --- a/encode_opcode.go +++ b/encode_opcode.go @@ -327,7 +327,7 @@ func nextField(code *opcode, removedFields map[*opcode]struct{}) *opcode { return code } -func linkPrevToNextField(cur *opcode, removedFields map[*opcode]struct{}) { +func encodeLinkPrevToNextField(cur *opcode, removedFields map[*opcode]struct{}) { prev := prevField(cur.prevField, removedFields) prev.nextField = nextField(cur.nextField, removedFields) code := prev diff --git a/encode_vm.go b/encode_vm.go index 8f78dd8..8690f07 100644 --- a/encode_vm.go +++ b/encode_vm.go @@ -24,6 +24,36 @@ func store(base uintptr, idx uintptr, p uintptr) { **(**uintptr)(unsafe.Pointer(&addr)) = p } +func ptrToInt(p uintptr) int { return **(**int)(unsafe.Pointer(&p)) } +func ptrToInt8(p uintptr) int8 { return **(**int8)(unsafe.Pointer(&p)) } +func ptrToInt16(p uintptr) int16 { return **(**int16)(unsafe.Pointer(&p)) } +func ptrToInt32(p uintptr) int32 { return **(**int32)(unsafe.Pointer(&p)) } +func ptrToInt64(p uintptr) int64 { return **(**int64)(unsafe.Pointer(&p)) } +func ptrToUint(p uintptr) uint { return **(**uint)(unsafe.Pointer(&p)) } +func ptrToUint8(p uintptr) uint8 { return **(**uint8)(unsafe.Pointer(&p)) } +func ptrToUint16(p uintptr) uint16 { return **(**uint16)(unsafe.Pointer(&p)) } +func ptrToUint32(p uintptr) uint32 { return **(**uint32)(unsafe.Pointer(&p)) } +func ptrToUint64(p uintptr) uint64 { return **(**uint64)(unsafe.Pointer(&p)) } +func ptrToFloat32(p uintptr) float32 { return **(**float32)(unsafe.Pointer(&p)) } +func ptrToFloat64(p uintptr) float64 { return **(**float64)(unsafe.Pointer(&p)) } +func ptrToBool(p uintptr) bool { return **(**bool)(unsafe.Pointer(&p)) } +func ptrToByte(p uintptr) byte { return **(**byte)(unsafe.Pointer(&p)) } +func ptrToBytes(p uintptr) []byte { return **(**[]byte)(unsafe.Pointer(&p)) } +func ptrToString(p uintptr) string { return **(**string)(unsafe.Pointer(&p)) } +func ptrToSlice(p uintptr) *sliceHeader { return *(**sliceHeader)(unsafe.Pointer(&p)) } +func ptrToPtr(p uintptr) uintptr { + return uintptr(**(**unsafe.Pointer)(unsafe.Pointer(&p))) +} +func ptrToUnsafePtr(p uintptr) unsafe.Pointer { + return *(*unsafe.Pointer)(unsafe.Pointer(&p)) +} +func ptrToInterface(code *opcode, p uintptr) interface{} { + return *(*interface{})(unsafe.Pointer(&interfaceHeader{ + typ: code.typ, + ptr: *(*unsafe.Pointer)(unsafe.Pointer(&p)), + })) +} + func errUnsupportedValue(code *opcode, ptr uintptr) *UnsupportedValueError { v := *(*interface{})(unsafe.Pointer(&interfaceHeader{ typ: code.typ, @@ -49,7 +79,7 @@ func errMarshaler(code *opcode, err error) *MarshalerError { } } -func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ([]byte, error) { +func encodeRun(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt EncodeOption) ([]byte, error) { recursiveLevel := 0 ptrOffset := uintptr(0) ctxptr := ctx.ptr() @@ -62,113 +92,113 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opPtr: ptr := load(ctxptr, code.idx) code = code.next - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) case opInt: - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt8: - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt16: - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt32: - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt64: - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opUint: - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint8: - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint16: - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint32: - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint64: - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opIntString: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt8String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt16String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt32String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt64String: b = append(b, '"') - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeComma(b) code = code.next case opUintString: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint8String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint16String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint32String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint64String: b = append(b, '"') - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeComma(b) code = code.next case opFloat32: - b = encodeFloat32(b, e.ptrToFloat32(load(ctxptr, code.idx))) + b = encodeFloat32(b, ptrToFloat32(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opFloat64: - v := e.ptrToFloat64(load(ctxptr, code.idx)) + v := ptrToFloat64(load(ctxptr, code.idx)) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -176,20 +206,20 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opString: - b = encodeNoEscapedString(b, e.ptrToString(load(ctxptr, code.idx))) + b = encodeNoEscapedString(b, ptrToString(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opBool: - b = encodeBool(b, e.ptrToBool(load(ctxptr, code.idx))) + b = encodeBool(b, ptrToBool(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opBytes: ptr := load(ctxptr, code.idx) - slice := e.ptrToSlice(ptr) + slice := ptrToSlice(ptr) if ptr == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) } else { - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) } b = encodeComma(b) code = code.next @@ -207,7 +237,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } } ctx.seenPtr = append(ctx.seenPtr, ptr) - iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr)) + iface := (*interfaceHeader)(ptrToUnsafePtr(ptr)) if iface == nil || iface.ptr == nil { b = encodeNull(b) b = encodeComma(b) @@ -215,7 +245,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface)) - ifaceCodeSet, err := e.compileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) + ifaceCodeSet, err := encodeCompileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) if err != nil { return nil, err } @@ -237,7 +267,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ctx.ptrs = newPtrs - bb, err := e.run(ctx, b, ifaceCodeSet) + bb, err := encodeRun(ctx, b, ifaceCodeSet, opt) if err != nil { return nil, err } @@ -256,7 +286,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next break } - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -279,7 +309,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opMarshalText: ptr := load(ctxptr, code.idx) isPtr := code.typ.Kind() == reflect.Ptr - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) if p == nil || isPtr && *(*unsafe.Pointer)(p) == nil { b = append(b, '"', '"', ',') } else { @@ -297,7 +327,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opSliceHead: p := load(ctxptr, code.idx) - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) b = encodeComma(b) @@ -370,7 +400,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.end.next } else { - uptr := e.ptrToUnsafePtr(ptr) + uptr := ptrToUnsafePtr(ptr) mlen := maplen(uptr) if mlen > 0 { b = append(b, '{') @@ -379,7 +409,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( store(ctxptr, code.elemIdx, 0) store(ctxptr, code.length, uintptr(mlen)) store(ctxptr, code.mapIter, uintptr(iter)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) @@ -401,8 +431,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { // load pointer - ptr = e.ptrToPtr(ptr) - uptr := e.ptrToUnsafePtr(ptr) + ptr = ptrToPtr(ptr) + uptr := ptrToUnsafePtr(ptr) if ptr == 0 { b = encodeNull(b) b = encodeComma(b) @@ -419,7 +449,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( store(ctxptr, code.mapIter, uintptr(iter)) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) @@ -435,10 +465,10 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( idx := load(ctxptr, code.elemIdx) length := load(ctxptr, code.length) idx++ - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -451,11 +481,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -465,16 +495,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } } case opMapValue: - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { last := len(b) - 1 b[last] = ':' } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) } ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) value := mapitervalue(iter) store(ctxptr, code.next.idx, uintptr(value)) mapiternext(iter) @@ -483,7 +513,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( // this operation only used by sorted map. length := int(load(ctxptr, code.length)) ptr := load(ctxptr, code.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) pos := mapCtx.pos for i := 0; i < length; i++ { startKey := pos[i*2] @@ -514,7 +544,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( releaseMapContext(mapCtx) code = code.next case opStructFieldPtrAnonymousHeadRecursive: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadRecursive: fallthrough @@ -555,7 +585,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ctx.seenPtr = ctx.seenPtr[:len(ctx.seenPtr)-1] codePtr := load(ctxptr, code.elemIdx) - code = (*opcode)(e.ptrToUnsafePtr(codePtr)) + code = (*opcode)(ptrToUnsafePtr(codePtr)) ctxptr = ctx.ptr() + offset ptrOffset = offset case opStructFieldPtrHead: @@ -565,7 +595,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHead: ptr := load(ctxptr, code.idx) @@ -585,7 +615,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmpty: @@ -638,7 +668,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmpty: @@ -656,7 +686,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } } case opStructFieldPtrHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt: ptr := load(ctxptr, code.idx) @@ -667,14 +697,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt: @@ -685,7 +715,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -698,7 +728,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt: @@ -711,7 +741,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -720,13 +750,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntOnly, opStructFieldHeadOmitEmptyIntOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt(p)) + v := int64(ptrToInt(p)) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -738,12 +768,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadIntPtr: p := load(ctxptr, code.idx) @@ -755,17 +785,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -775,16 +805,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -796,12 +826,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } } @@ -815,7 +845,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadIntPtrOnly: p := load(ctxptr, code.idx) @@ -824,7 +854,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next @@ -836,14 +866,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyIntPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeComma(b) } code = code.next @@ -855,7 +885,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) @@ -865,7 +895,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -881,18 +911,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt: ptr := load(ctxptr, code.idx) @@ -900,14 +930,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt: @@ -915,7 +945,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -928,7 +958,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt: @@ -938,7 +968,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -949,7 +979,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -958,7 +988,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -975,13 +1005,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadIntPtr: p := load(ctxptr, code.idx) @@ -990,16 +1020,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -1007,17 +1037,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -1026,12 +1056,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1042,7 +1072,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadIntPtrOnly: p := load(ctxptr, code.idx) @@ -1050,7 +1080,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1060,7 +1090,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) @@ -1068,7 +1098,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1078,7 +1108,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) @@ -1087,13 +1117,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8: ptr := load(ctxptr, code.idx) @@ -1104,14 +1134,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt8: @@ -1122,7 +1152,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1135,7 +1165,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt8: @@ -1148,7 +1178,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1157,13 +1187,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Only, opStructFieldHeadOmitEmptyInt8Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt8(p)) + v := int64(ptrToInt8(p)) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -1175,12 +1205,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1192,17 +1222,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1212,16 +1242,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1233,12 +1263,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } } @@ -1252,7 +1282,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1261,7 +1291,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1273,14 +1303,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt8PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeComma(b) } code = code.next @@ -1292,7 +1322,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1302,7 +1332,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1318,18 +1348,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8: ptr := load(ctxptr, code.idx) @@ -1337,14 +1367,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8: @@ -1352,7 +1382,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1365,7 +1395,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt8: @@ -1375,7 +1405,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1386,7 +1416,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -1395,7 +1425,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1412,13 +1442,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1427,16 +1457,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1444,17 +1474,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1463,12 +1493,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1479,7 +1509,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1487,7 +1517,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1497,7 +1527,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1505,7 +1535,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1515,7 +1545,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1524,13 +1554,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16: ptr := load(ctxptr, code.idx) @@ -1541,14 +1571,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt16: @@ -1559,7 +1589,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1572,7 +1602,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt16: @@ -1585,7 +1615,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1594,13 +1624,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Only, opStructFieldHeadOmitEmptyInt16Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt16(p)) + v := int64(ptrToInt16(p)) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -1612,12 +1642,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1629,17 +1659,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1649,16 +1679,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1670,12 +1700,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } } @@ -1689,7 +1719,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1698,7 +1728,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1710,14 +1740,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt16PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeComma(b) } code = code.next @@ -1729,7 +1759,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1739,7 +1769,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1755,18 +1785,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16: ptr := load(ctxptr, code.idx) @@ -1774,14 +1804,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16: @@ -1789,7 +1819,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1802,7 +1832,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt16: @@ -1812,7 +1842,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1823,7 +1853,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -1832,7 +1862,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1849,13 +1879,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1864,16 +1894,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1881,17 +1911,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1900,12 +1930,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1916,7 +1946,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1924,7 +1954,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1934,7 +1964,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1942,7 +1972,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1952,7 +1982,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1961,13 +1991,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32: ptr := load(ctxptr, code.idx) @@ -1978,14 +2008,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt32: @@ -1996,7 +2026,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2009,7 +2039,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt32: @@ -2022,7 +2052,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2031,13 +2061,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Only, opStructFieldHeadOmitEmptyInt32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt32(p)) + v := int64(ptrToInt32(p)) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -2049,12 +2079,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2066,17 +2096,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2086,16 +2116,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2107,12 +2137,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } } @@ -2126,7 +2156,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2135,7 +2165,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -2147,14 +2177,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeComma(b) } code = code.next @@ -2166,7 +2196,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2176,7 +2206,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -2192,18 +2222,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32: ptr := load(ctxptr, code.idx) @@ -2211,14 +2241,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32: @@ -2226,7 +2256,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2239,7 +2269,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt32: @@ -2249,7 +2279,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2260,7 +2290,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -2269,7 +2299,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2286,13 +2316,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2301,16 +2331,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2318,17 +2348,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2337,12 +2367,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -2353,7 +2383,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2361,7 +2391,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -2371,7 +2401,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2379,7 +2409,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeComma(b) code = code.next } @@ -2389,7 +2419,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2398,13 +2428,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64: ptr := load(ctxptr, code.idx) @@ -2415,14 +2445,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt64: @@ -2433,7 +2463,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2446,7 +2476,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt64: @@ -2459,7 +2489,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2468,13 +2498,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Only, opStructFieldHeadOmitEmptyInt64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToInt64(p) + v := ptrToInt64(p) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -2486,12 +2516,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2503,17 +2533,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2523,16 +2553,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2544,12 +2574,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } } @@ -2563,7 +2593,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2572,7 +2602,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -2584,14 +2614,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeComma(b) } code = code.next @@ -2603,7 +2633,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2613,7 +2643,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -2629,18 +2659,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64: ptr := load(ctxptr, code.idx) @@ -2648,14 +2678,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64: @@ -2663,7 +2693,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2676,7 +2706,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt64: @@ -2686,7 +2716,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2697,7 +2727,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -2706,7 +2736,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2723,13 +2753,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2738,16 +2768,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2755,17 +2785,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2774,12 +2804,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -2790,7 +2820,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2798,7 +2828,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -2808,7 +2838,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2816,7 +2846,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeComma(b) code = code.next } @@ -2826,7 +2856,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2835,13 +2865,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint: ptr := load(ctxptr, code.idx) @@ -2852,14 +2882,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint: @@ -2870,7 +2900,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2883,7 +2913,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint: @@ -2896,7 +2926,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2905,13 +2935,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintOnly, opStructFieldHeadOmitEmptyUintOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint(p)) + v := uint64(ptrToUint(p)) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -2923,12 +2953,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUintPtr: p := load(ctxptr, code.idx) @@ -2940,17 +2970,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -2960,16 +2990,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -2981,12 +3011,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } } @@ -3000,7 +3030,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUintPtrOnly: p := load(ctxptr, code.idx) @@ -3009,7 +3039,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3021,14 +3051,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUintPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeComma(b) } code = code.next @@ -3040,7 +3070,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) @@ -3050,7 +3080,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3066,18 +3096,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint: ptr := load(ctxptr, code.idx) @@ -3085,14 +3115,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint: @@ -3100,7 +3130,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3113,7 +3143,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint: @@ -3123,7 +3153,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3134,7 +3164,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -3143,7 +3173,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3160,13 +3190,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUintPtr: p := load(ctxptr, code.idx) @@ -3175,16 +3205,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3192,17 +3222,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3211,12 +3241,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3227,7 +3257,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUintPtrOnly: p := load(ctxptr, code.idx) @@ -3235,7 +3265,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3245,7 +3275,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) @@ -3253,7 +3283,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeComma(b) code = code.next } @@ -3263,7 +3293,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) @@ -3272,13 +3302,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8: ptr := load(ctxptr, code.idx) @@ -3289,14 +3319,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint8: @@ -3307,7 +3337,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3320,7 +3350,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint8: @@ -3333,7 +3363,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3342,13 +3372,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Only, opStructFieldHeadOmitEmptyUint8Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint8(p)) + v := uint64(ptrToUint8(p)) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -3360,12 +3390,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3377,17 +3407,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3397,16 +3427,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3418,12 +3448,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } } @@ -3437,7 +3467,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3446,7 +3476,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3458,14 +3488,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint8PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeComma(b) } code = code.next @@ -3477,7 +3507,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3487,7 +3517,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3503,18 +3533,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8: ptr := load(ctxptr, code.idx) @@ -3522,14 +3552,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8: @@ -3537,7 +3567,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3550,7 +3580,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint8: @@ -3560,7 +3590,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3571,7 +3601,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -3580,7 +3610,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3597,13 +3627,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3612,16 +3642,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3629,17 +3659,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3648,12 +3678,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3664,7 +3694,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3672,7 +3702,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3682,7 +3712,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3690,7 +3720,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeComma(b) code = code.next } @@ -3700,7 +3730,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3709,13 +3739,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16: ptr := load(ctxptr, code.idx) @@ -3726,14 +3756,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint16: @@ -3744,7 +3774,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3757,7 +3787,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint16: @@ -3770,7 +3800,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3779,13 +3809,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Only, opStructFieldHeadOmitEmptyUint16Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint16(p)) + v := uint64(ptrToUint16(p)) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -3797,12 +3827,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -3814,17 +3844,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -3834,16 +3864,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -3855,12 +3885,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } } @@ -3874,7 +3904,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint16PtrOnly: p := load(ctxptr, code.idx) @@ -3883,7 +3913,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3895,14 +3925,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint16PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeComma(b) } code = code.next @@ -3914,7 +3944,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) @@ -3924,7 +3954,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3940,18 +3970,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16: ptr := load(ctxptr, code.idx) @@ -3959,14 +3989,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16: @@ -3974,7 +4004,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3987,7 +4017,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint16: @@ -3997,7 +4027,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4008,7 +4038,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -4017,7 +4047,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4034,13 +4064,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4049,16 +4079,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4066,17 +4096,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4085,12 +4115,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4101,7 +4131,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4109,7 +4139,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4119,7 +4149,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4127,7 +4157,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeComma(b) code = code.next } @@ -4137,7 +4167,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4146,13 +4176,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32: ptr := load(ctxptr, code.idx) @@ -4163,14 +4193,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint32: @@ -4181,7 +4211,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4194,7 +4224,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint32: @@ -4207,7 +4237,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4216,13 +4246,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Only, opStructFieldHeadOmitEmptyUint32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint32(p)) + v := uint64(ptrToUint32(p)) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -4234,12 +4264,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4251,17 +4281,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4271,16 +4301,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4292,12 +4322,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } } @@ -4311,7 +4341,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4320,7 +4350,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4332,14 +4362,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeComma(b) } code = code.next @@ -4351,7 +4381,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4361,7 +4391,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4377,18 +4407,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32: ptr := load(ctxptr, code.idx) @@ -4396,14 +4426,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32: @@ -4411,7 +4441,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4424,7 +4454,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint32: @@ -4434,7 +4464,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4445,7 +4475,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -4454,7 +4484,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4471,13 +4501,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4486,16 +4516,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4503,17 +4533,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4522,12 +4552,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4538,7 +4568,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4546,7 +4576,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4556,7 +4586,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4564,7 +4594,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeComma(b) code = code.next } @@ -4574,7 +4604,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4583,13 +4613,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64: ptr := load(ctxptr, code.idx) @@ -4600,14 +4630,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint64: @@ -4618,7 +4648,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4631,7 +4661,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint64: @@ -4644,7 +4674,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4653,13 +4683,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Only, opStructFieldHeadOmitEmptyUint64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToUint64(p) + v := ptrToUint64(p) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -4671,12 +4701,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -4688,17 +4718,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -4708,16 +4738,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -4729,12 +4759,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } } @@ -4748,7 +4778,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4757,7 +4787,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -4769,14 +4799,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeComma(b) } code = code.next @@ -4788,7 +4818,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4798,7 +4828,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -4814,18 +4844,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64: ptr := load(ctxptr, code.idx) @@ -4833,14 +4863,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64: @@ -4848,7 +4878,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4861,7 +4891,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint64: @@ -4871,7 +4901,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4882,7 +4912,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -4891,7 +4921,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4908,13 +4938,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -4923,16 +4953,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -4940,17 +4970,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -4959,12 +4989,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -4975,7 +5005,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4983,7 +5013,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -4993,7 +5023,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) @@ -5001,7 +5031,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeComma(b) code = code.next } @@ -5011,7 +5041,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) @@ -5020,13 +5050,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32: ptr := load(ctxptr, code.idx) @@ -5037,14 +5067,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat32: @@ -5055,7 +5085,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5068,7 +5098,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat32: @@ -5081,7 +5111,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -5090,13 +5120,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Only, opStructFieldHeadOmitEmptyFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToFloat32(p) + v := ptrToFloat32(p) if v != 0 { b = append(b, code.key...) b = encodeFloat32(b, v) @@ -5108,12 +5138,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5125,17 +5155,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5145,16 +5175,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5166,12 +5196,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } } @@ -5185,7 +5215,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5194,7 +5224,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next @@ -5206,14 +5236,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeComma(b) } code = code.next @@ -5225,7 +5255,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5235,7 +5265,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -5251,18 +5281,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32: ptr := load(ctxptr, code.idx) @@ -5270,14 +5300,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32: @@ -5285,7 +5315,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5298,7 +5328,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagFloat32: @@ -5308,7 +5338,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -5319,7 +5349,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -5328,7 +5358,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5345,13 +5375,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5360,16 +5390,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5377,17 +5407,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5396,12 +5426,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -5412,7 +5442,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5420,7 +5450,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next @@ -5430,7 +5460,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5438,7 +5468,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeComma(b) code = code.next } @@ -5448,7 +5478,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5457,13 +5487,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64: ptr := load(ctxptr, code.idx) @@ -5472,7 +5502,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5485,7 +5515,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat64: @@ -5496,7 +5526,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5512,7 +5542,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat64: @@ -5523,7 +5553,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5538,7 +5568,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5548,7 +5578,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyFloat64Only, opStructFieldHeadOmitEmptyFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -5563,7 +5593,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5572,7 +5602,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -5584,11 +5614,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5598,7 +5628,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -5608,10 +5638,10 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5621,7 +5651,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next } case opStructFieldPtrHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -5633,12 +5663,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5656,7 +5686,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5665,7 +5695,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5681,14 +5711,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5704,7 +5734,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5714,7 +5744,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5734,12 +5764,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5749,14 +5779,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5768,7 +5798,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64: @@ -5776,12 +5806,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { b = append(b, code.key...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5793,7 +5823,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagFloat64: @@ -5803,7 +5833,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5818,7 +5848,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5831,12 +5861,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { b = append(b, code.key...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5852,7 +5882,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5862,7 +5892,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next } case opStructFieldPtrAnonymousHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -5871,11 +5901,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5884,7 +5914,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -5892,12 +5922,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5906,7 +5936,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -5915,12 +5945,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5935,7 +5965,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5943,7 +5973,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5957,7 +5987,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5965,7 +5995,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5979,7 +6009,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5988,7 +6018,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5998,7 +6028,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = encodeComma(b) code = code.next case opStructFieldPtrHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadString: ptr := load(ctxptr, code.idx) @@ -6009,14 +6039,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyString: @@ -6027,7 +6057,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6040,7 +6070,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagString: @@ -6052,7 +6082,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, s))) b = encodeComma(b) code = code.next @@ -6061,13 +6091,13 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringOnly, opStructFieldHeadOmitEmptyStringOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToString(p) + v := ptrToString(p) if v != "" { b = append(b, code.key...) b = encodeNoEscapedString(b, v) @@ -6078,11 +6108,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringPtr: p := load(ctxptr, code.idx) @@ -6094,17 +6124,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6114,16 +6144,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6135,11 +6165,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } } b = encodeComma(b) @@ -6152,7 +6182,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringPtrOnly: p := load(ctxptr, code.idx) @@ -6161,7 +6191,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next @@ -6173,14 +6203,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyStringPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) b = encodeComma(b) } code = code.next @@ -6192,7 +6222,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) @@ -6201,7 +6231,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6216,18 +6246,18 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadString: ptr := load(ctxptr, code.idx) @@ -6235,14 +6265,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyString: @@ -6250,7 +6280,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6263,7 +6293,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagString: @@ -6272,7 +6302,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(ptr)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(ptr)))) b = encodeComma(b) code = code.next } @@ -6282,7 +6312,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6291,7 +6321,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6307,12 +6337,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(ptr)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(ptr)))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringPtr: p := load(ctxptr, code.idx) @@ -6321,16 +6351,16 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6338,17 +6368,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6357,11 +6387,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( break } b = append(b, code.key...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6371,7 +6401,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringPtrOnly: p := load(ctxptr, code.idx) @@ -6379,7 +6409,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next @@ -6389,7 +6419,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) @@ -6397,7 +6427,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.nextField } else { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) b = encodeComma(b) code = code.next } @@ -6407,7 +6437,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) @@ -6415,7 +6445,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6427,7 +6457,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadBool: ptr := load(ctxptr, code.idx) @@ -6442,7 +6472,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6459,11 +6489,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.key...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadBool: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadBool: ptr := load(ctxptr, code.idx) @@ -6471,7 +6501,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6483,7 +6513,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadBytes: ptr := load(ctxptr, code.idx) @@ -6498,12 +6528,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadBytes: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadBytes: ptr := load(ctxptr, code.idx) @@ -6511,7 +6541,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6523,7 +6553,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadArray: ptr := load(ctxptr, code.idx) + code.offset @@ -6544,7 +6574,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( store(ctxptr, code.idx, ptr) } case opStructFieldPtrAnonymousHeadArray: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadArray: ptr := load(ctxptr, code.idx) + code.offset @@ -6563,7 +6593,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadSlice: ptr := load(ctxptr, code.idx) @@ -6585,7 +6615,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( store(ctxptr, code.idx, p) } case opStructFieldPtrAnonymousHeadSlice: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadSlice: ptr := load(ctxptr, code.idx) @@ -6605,7 +6635,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadMarshalJSON: ptr := load(ctxptr, code.idx) @@ -6617,7 +6647,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6644,7 +6674,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next } case opStructFieldPtrAnonymousHeadMarshalJSON: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadMarshalJSON: ptr := load(ctxptr, code.idx) @@ -6653,7 +6683,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6687,7 +6717,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadMarshalText: ptr := load(ctxptr, code.idx) @@ -6699,7 +6729,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6716,7 +6746,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next } case opStructFieldPtrAnonymousHeadMarshalText: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadMarshalText: ptr := load(ctxptr, code.idx) @@ -6725,7 +6755,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6744,7 +6774,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBool: @@ -6755,7 +6785,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { @@ -6768,7 +6798,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyBool: @@ -6776,7 +6806,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { @@ -6789,7 +6819,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBytes: @@ -6800,7 +6830,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, '{') - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { @@ -6813,7 +6843,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyBytes: @@ -6821,7 +6851,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( if ptr == 0 { code = code.end.next } else { - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { @@ -6834,7 +6864,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyMarshalJSON: @@ -6846,7 +6876,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6883,7 +6913,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmptyMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyMarshalJSON: @@ -6892,7 +6922,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6929,7 +6959,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadOmitEmptyMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyMarshalText: @@ -6941,7 +6971,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6963,7 +6993,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadOmitEmptyMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyMarshalText: @@ -6972,7 +7002,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6994,7 +7024,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTag: @@ -7013,7 +7043,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTag: @@ -7028,7 +7058,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBool: @@ -7041,7 +7071,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( b = append(b, '{') b = append(b, code.key...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -7049,7 +7079,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagBool: @@ -7059,7 +7089,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, code.key...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -7067,7 +7097,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBytes: @@ -7079,14 +7109,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagBytes: @@ -7095,14 +7125,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadStringTagMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagMarshalJSON: @@ -7114,7 +7144,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bb, err := v.(Marshaler).MarshalJSON() @@ -7149,7 +7179,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagMarshalJSON: @@ -7158,7 +7188,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bb, err := v.(Marshaler).MarshalJSON() @@ -7193,7 +7223,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrHeadStringTagMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagMarshalText: @@ -7205,7 +7235,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7222,7 +7252,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldPtrAnonymousHeadStringTagMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagMarshalText: @@ -7231,7 +7261,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7268,12 +7298,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldInt: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -7284,47 +7314,47 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldIntPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = encodeComma(b) code = code.next case opStructFieldIntNPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = encodeComma(b) code = code.next case opStructFieldInt8: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -7335,30 +7365,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = encodeComma(b) code = code.next case opStructFieldInt16: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -7369,30 +7399,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = encodeComma(b) code = code.next case opStructFieldInt32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -7403,30 +7433,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = encodeComma(b) code = code.next case opStructFieldInt64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -7437,30 +7467,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = encodeComma(b) code = code.next case opStructFieldUint: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -7471,30 +7501,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUintPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = encodeComma(b) code = code.next case opStructFieldUint8: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -7505,30 +7535,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = encodeComma(b) code = code.next case opStructFieldUint16: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -7539,30 +7569,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = encodeComma(b) code = code.next case opStructFieldUint32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -7573,30 +7603,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = encodeComma(b) code = code.next case opStructFieldUint64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -7607,30 +7637,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint64(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint64(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = encodeComma(b) code = code.next case opStructFieldFloat32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = encodeFloat32(b, v) @@ -7641,25 +7671,25 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldFloat32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeComma(b) code = code.next case opStructFieldFloat64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7668,7 +7698,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructFieldOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -7680,7 +7710,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructFieldStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7693,14 +7723,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldFloat64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) b = encodeComma(b) code = code.next break } - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7710,12 +7740,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldString: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { b = append(b, code.key...) b = encodeNoEscapedString(b, v) @@ -7725,50 +7755,50 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldStringTagString: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, s))) b = encodeComma(b) code = code.next case opStructFieldStringPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } b = encodeComma(b) code = code.next case opStructFieldOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeComma(b) } code = code.next case opStructFieldStringTagStringPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next case opStructFieldBool: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { b = append(b, code.key...) b = encodeBool(b, v) @@ -7779,30 +7809,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldBoolPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeBool(b, e.ptrToBool(p)) + b = encodeBool(b, ptrToBool(p)) } b = encodeComma(b) code = code.next case opStructFieldBytes: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { b = append(b, code.key...) b = encodeByteSlice(b, v) @@ -7811,7 +7841,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructFieldStringTagBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) b = append(b, code.key...) b = encodeByteSlice(b, v) b = encodeComma(b) @@ -7820,7 +7850,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7836,7 +7866,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7853,9 +7883,9 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) p := ptr + code.offset if code.typ.Kind() == reflect.Ptr && code.typ.Elem().Implements(marshalJSONType) { - p = e.ptrToPtr(p) + p = ptrToPtr(p) } - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil && p != 0 { bb, err := v.(Marshaler).MarshalJSON() if err != nil { @@ -7875,7 +7905,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7886,7 +7916,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldStringTagMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7898,7 +7928,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldOmitEmptyMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil { bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7918,7 +7948,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldOmitEmptyArray: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { code = code.nextField } else { @@ -7935,7 +7965,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructFieldOmitEmptySlice: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { code = code.nextField } else { @@ -8005,12 +8035,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndInt: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -8029,27 +8059,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndIntPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyIntPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8064,12 +8094,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagIntPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8077,29 +8107,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndIntNPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt8: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -8118,27 +8148,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8153,12 +8183,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagInt8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8166,29 +8196,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndInt8NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt16: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -8207,27 +8237,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8242,12 +8272,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagInt16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8255,29 +8285,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndInt16NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, int64(v)) @@ -8296,27 +8326,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8331,12 +8361,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagInt32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8344,29 +8374,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndInt32NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendInt(b, v) @@ -8385,27 +8415,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8420,12 +8450,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagInt64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8433,29 +8463,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndInt64NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = appendStructEnd(b) code = code.next case opStructEndUint: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -8474,27 +8504,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUintPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUintPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8509,12 +8539,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagUintPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8522,29 +8552,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndUintNPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint8: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -8563,27 +8593,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8598,12 +8628,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagUint8Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8611,29 +8641,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndUint8NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint16: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -8652,27 +8682,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8687,12 +8717,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagUint16Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8700,29 +8730,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndUint16NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, uint64(v)) @@ -8741,27 +8771,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8776,12 +8806,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagUint32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8789,29 +8819,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndUint32NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = appendUint(b, v) @@ -8830,27 +8860,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8865,12 +8895,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagUint64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8878,29 +8908,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndUint64NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = appendStructEnd(b) code = code.next case opStructEndFloat32: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { b = append(b, code.key...) b = encodeFloat32(b, v) @@ -8919,27 +8949,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndFloat32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyFloat32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8954,12 +8984,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagFloat32Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8967,24 +8997,24 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndFloat32NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = appendStructEnd(b) code = code.next case opStructEndFloat64: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -8993,7 +9023,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructEndOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -9013,7 +9043,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructEndStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9026,14 +9056,14 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndFloat64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) b = appendStructEnd(b) code = code.next break } - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9042,10 +9072,10 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructEndOmitEmptyFloat64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9064,12 +9094,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagFloat64Ptr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9081,17 +9111,17 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndFloat64NPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9102,12 +9132,12 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndString: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { b = append(b, code.key...) b = encodeNoEscapedString(b, v) @@ -9125,27 +9155,27 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagString: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, s))) b = appendStructEnd(b) code = code.next case opStructEndStringPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.key...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -9160,11 +9190,11 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagStringPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToString(p) + v := ptrToString(p) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, v))) } b = appendStructEnd(b) @@ -9172,29 +9202,29 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringNPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } b = appendStructEnd(b) code = code.next case opStructEndBool: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { b = append(b, code.key...) b = encodeBool(b, v) @@ -9213,30 +9243,30 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndBoolPtr: b = append(b, code.key...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeBool(b, e.ptrToBool(p)) + b = encodeBool(b, ptrToBool(p)) } b = appendStructEnd(b) code = code.next case opStructEndBytes: ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { b = append(b, code.key...) b = encodeByteSlice(b, v) @@ -9253,7 +9283,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( code = code.next case opStructEndStringTagBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) b = append(b, code.key...) b = encodeByteSlice(b, v) b = appendStructEnd(b) @@ -9262,7 +9292,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9278,8 +9308,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndOmitEmptyMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) - if v != nil && (code.typ.Kind() != reflect.Ptr || e.ptrToPtr(p) != 0) { + v := ptrToInterface(code, p) + if v != nil && (code.typ.Kind() != reflect.Ptr || ptrToPtr(p) != 0) { bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9305,7 +9335,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9322,7 +9352,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( ptr := load(ctxptr, code.headIdx) b = append(b, code.key...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -9333,7 +9363,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndOmitEmptyMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil { bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -9355,7 +9385,7 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( case opStructEndStringTagMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -9371,33 +9401,3 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ( END: return b, nil } - -func (e *Encoder) ptrToInt(p uintptr) int { return **(**int)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToInt8(p uintptr) int8 { return **(**int8)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToInt16(p uintptr) int16 { return **(**int16)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToInt32(p uintptr) int32 { return **(**int32)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToInt64(p uintptr) int64 { return **(**int64)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToUint(p uintptr) uint { return **(**uint)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToUint8(p uintptr) uint8 { return **(**uint8)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToUint16(p uintptr) uint16 { return **(**uint16)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToUint32(p uintptr) uint32 { return **(**uint32)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToUint64(p uintptr) uint64 { return **(**uint64)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToFloat32(p uintptr) float32 { return **(**float32)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToFloat64(p uintptr) float64 { return **(**float64)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToBool(p uintptr) bool { return **(**bool)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToByte(p uintptr) byte { return **(**byte)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToBytes(p uintptr) []byte { return **(**[]byte)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToString(p uintptr) string { return **(**string)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToSlice(p uintptr) *sliceHeader { return *(**sliceHeader)(unsafe.Pointer(&p)) } -func (e *Encoder) ptrToPtr(p uintptr) uintptr { - return uintptr(**(**unsafe.Pointer)(unsafe.Pointer(&p))) -} -func (e *Encoder) ptrToUnsafePtr(p uintptr) unsafe.Pointer { - return *(*unsafe.Pointer)(unsafe.Pointer(&p)) -} -func (e *Encoder) ptrToInterface(code *opcode, p uintptr) interface{} { - return *(*interface{})(unsafe.Pointer(&interfaceHeader{ - typ: code.typ, - ptr: *(*unsafe.Pointer)(unsafe.Pointer(&p)), - })) -} diff --git a/encode_vm_escaped.go b/encode_vm_escaped.go index 78cd64e..2d3e51a 100644 --- a/encode_vm_escaped.go +++ b/encode_vm_escaped.go @@ -11,7 +11,7 @@ import ( "unsafe" ) -func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ([]byte, error) { +func encodeRunEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt EncodeOption) ([]byte, error) { recursiveLevel := 0 ptrOffset := uintptr(0) ctxptr := ctx.ptr() @@ -25,113 +25,113 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opPtr: ptr := load(ctxptr, code.idx) code = code.next - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) case opInt: - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt8: - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt16: - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt32: - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opInt64: - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opUint: - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint8: - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint16: - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint32: - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = encodeComma(b) code = code.next case opUint64: - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opIntString: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt8String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt16String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt32String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opInt64String: b = append(b, '"') - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeComma(b) code = code.next case opUintString: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint8String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint16String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint32String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeComma(b) code = code.next case opUint64String: b = append(b, '"') - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeComma(b) code = code.next case opFloat32: - b = encodeFloat32(b, e.ptrToFloat32(load(ctxptr, code.idx))) + b = encodeFloat32(b, ptrToFloat32(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opFloat64: - v := e.ptrToFloat64(load(ctxptr, code.idx)) + v := ptrToFloat64(load(ctxptr, code.idx)) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -139,20 +139,20 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.next case opString: - b = encodeEscapedString(b, e.ptrToString(load(ctxptr, code.idx))) + b = encodeEscapedString(b, ptrToString(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opBool: - b = encodeBool(b, e.ptrToBool(load(ctxptr, code.idx))) + b = encodeBool(b, ptrToBool(load(ctxptr, code.idx))) b = encodeComma(b) code = code.next case opBytes: ptr := load(ctxptr, code.idx) - slice := e.ptrToSlice(ptr) + slice := ptrToSlice(ptr) if ptr == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) } else { - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) } b = encodeComma(b) code = code.next @@ -170,7 +170,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } } ctx.seenPtr = append(ctx.seenPtr, ptr) - iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr)) + iface := (*interfaceHeader)(ptrToUnsafePtr(ptr)) if iface == nil || iface.ptr == nil { b = encodeNull(b) b = encodeComma(b) @@ -178,7 +178,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface)) - ifaceCodeSet, err := e.compileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) + ifaceCodeSet, err := encodeCompileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) if err != nil { return nil, err } @@ -200,7 +200,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ctx.ptrs = newPtrs - bb, err := e.runEscaped(ctx, b, ifaceCodeSet) + bb, err := encodeRunEscaped(ctx, b, ifaceCodeSet, opt) if err != nil { return nil, err } @@ -219,7 +219,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next break } - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -241,7 +241,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opMarshalText: ptr := load(ctxptr, code.idx) isPtr := code.typ.Kind() == reflect.Ptr - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) if p == nil || isPtr && *(*unsafe.Pointer)(p) == nil { b = append(b, '"', '"', ',') } else { @@ -259,7 +259,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opSliceHead: p := load(ctxptr, code.idx) - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) b = encodeComma(b) @@ -332,7 +332,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.end.next } else { - uptr := e.ptrToUnsafePtr(ptr) + uptr := ptrToUnsafePtr(ptr) mlen := maplen(uptr) if mlen > 0 { b = append(b, '{') @@ -341,7 +341,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod store(ctxptr, code.elemIdx, 0) store(ctxptr, code.length, uintptr(mlen)) store(ctxptr, code.mapIter, uintptr(iter)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) @@ -363,8 +363,8 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { // load pointer - ptr = e.ptrToPtr(ptr) - uptr := e.ptrToUnsafePtr(ptr) + ptr = ptrToPtr(ptr) + uptr := ptrToUnsafePtr(ptr) if ptr == 0 { b = encodeNull(b) b = encodeComma(b) @@ -381,9 +381,10 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod store(ctxptr, code.mapIter, uintptr(iter)) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) + ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) store(ctxptr, code.end.mapPos, uintptr(unsafe.Pointer(mapCtx))) } code = code.next @@ -396,10 +397,10 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod idx := load(ctxptr, code.elemIdx) length := load(ctxptr, code.length) idx++ - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -412,11 +413,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -426,16 +427,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } } case opMapValue: - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { last := len(b) - 1 b[last] = ':' } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) } ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) value := mapitervalue(iter) store(ctxptr, code.next.idx, uintptr(value)) mapiternext(iter) @@ -444,7 +445,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod // this operation only used by sorted map. length := int(load(ctxptr, code.length)) ptr := load(ctxptr, code.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) pos := mapCtx.pos for i := 0; i < length; i++ { startKey := pos[i*2] @@ -475,7 +476,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod releaseMapContext(mapCtx) code = code.next case opStructFieldPtrAnonymousHeadRecursive: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadRecursive: fallthrough @@ -516,7 +517,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ctx.seenPtr = ctx.seenPtr[:len(ctx.seenPtr)-1] codePtr := load(ctxptr, code.elemIdx) - code = (*opcode)(e.ptrToUnsafePtr(codePtr)) + code = (*opcode)(ptrToUnsafePtr(codePtr)) ctxptr = ctx.ptr() + offset ptrOffset = offset case opStructFieldPtrHead: @@ -526,7 +527,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHead: ptr := load(ctxptr, code.idx) @@ -546,7 +547,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmpty: @@ -597,7 +598,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmpty: @@ -615,7 +616,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } } case opStructFieldPtrHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt: ptr := load(ctxptr, code.idx) @@ -626,14 +627,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt: @@ -644,7 +645,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -657,7 +658,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt: @@ -670,7 +671,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -679,13 +680,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntOnly, opStructFieldHeadOmitEmptyIntOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt(p)) + v := int64(ptrToInt(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -697,12 +698,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadIntPtr: p := load(ctxptr, code.idx) @@ -714,17 +715,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -734,16 +735,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -755,12 +756,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } } @@ -774,7 +775,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadIntPtrOnly: p := load(ctxptr, code.idx) @@ -783,7 +784,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next @@ -795,14 +796,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyIntPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeComma(b) } code = code.next @@ -814,7 +815,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) @@ -824,7 +825,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -840,18 +841,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt: ptr := load(ctxptr, code.idx) @@ -859,14 +860,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt: @@ -874,7 +875,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -887,7 +888,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt: @@ -897,7 +898,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -908,7 +909,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -917,7 +918,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -934,13 +935,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadIntPtr: p := load(ctxptr, code.idx) @@ -949,16 +950,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -966,17 +967,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -985,12 +986,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1001,7 +1002,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadIntPtrOnly: p := load(ctxptr, code.idx) @@ -1009,7 +1010,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1019,7 +1020,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) @@ -1027,7 +1028,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1037,7 +1038,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) @@ -1046,13 +1047,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8: ptr := load(ctxptr, code.idx) @@ -1063,14 +1064,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt8: @@ -1081,7 +1082,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1094,7 +1095,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt8: @@ -1107,7 +1108,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1116,13 +1117,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Only, opStructFieldHeadOmitEmptyInt8Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt8(p)) + v := int64(ptrToInt8(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -1134,12 +1135,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1151,17 +1152,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1171,16 +1172,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1192,12 +1193,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } } @@ -1211,7 +1212,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1220,7 +1221,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1232,14 +1233,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt8PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeComma(b) } code = code.next @@ -1251,7 +1252,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1261,7 +1262,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1277,18 +1278,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8: ptr := load(ctxptr, code.idx) @@ -1296,14 +1297,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8: @@ -1311,7 +1312,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1324,7 +1325,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt8: @@ -1334,7 +1335,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1345,7 +1346,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -1354,7 +1355,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1371,13 +1372,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1386,16 +1387,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1403,17 +1404,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1422,12 +1423,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1438,7 +1439,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1446,7 +1447,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1456,7 +1457,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1464,7 +1465,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1474,7 +1475,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) @@ -1483,13 +1484,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16: ptr := load(ctxptr, code.idx) @@ -1500,14 +1501,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt16: @@ -1518,7 +1519,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1531,7 +1532,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt16: @@ -1544,7 +1545,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1553,13 +1554,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Only, opStructFieldHeadOmitEmptyInt16Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt16(p)) + v := int64(ptrToInt16(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -1571,12 +1572,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1588,17 +1589,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1608,16 +1609,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1629,12 +1630,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } } @@ -1648,7 +1649,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1657,7 +1658,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1669,14 +1670,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt16PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeComma(b) } code = code.next @@ -1688,7 +1689,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1698,7 +1699,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1714,18 +1715,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16: ptr := load(ctxptr, code.idx) @@ -1733,14 +1734,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16: @@ -1748,7 +1749,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1761,7 +1762,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt16: @@ -1771,7 +1772,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1782,7 +1783,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -1791,7 +1792,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1808,13 +1809,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1823,16 +1824,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1840,17 +1841,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1859,12 +1860,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -1875,7 +1876,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1883,7 +1884,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -1893,7 +1894,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1901,7 +1902,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeComma(b) code = code.next } @@ -1911,7 +1912,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) @@ -1920,13 +1921,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32: ptr := load(ctxptr, code.idx) @@ -1937,14 +1938,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt32: @@ -1955,7 +1956,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -1968,7 +1969,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt32: @@ -1981,7 +1982,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -1990,13 +1991,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Only, opStructFieldHeadOmitEmptyInt32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := int64(e.ptrToInt32(p)) + v := int64(ptrToInt32(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -2008,12 +2009,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2025,17 +2026,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2045,16 +2046,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2066,12 +2067,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } } @@ -2085,7 +2086,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2094,7 +2095,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -2106,14 +2107,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeComma(b) } code = code.next @@ -2125,7 +2126,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2135,7 +2136,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -2151,18 +2152,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32: ptr := load(ctxptr, code.idx) @@ -2170,14 +2171,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32: @@ -2185,7 +2186,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2198,7 +2199,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt32: @@ -2208,7 +2209,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2219,7 +2220,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -2228,7 +2229,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2245,13 +2246,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2260,16 +2261,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2277,17 +2278,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2296,12 +2297,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -2312,7 +2313,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2320,7 +2321,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -2330,7 +2331,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2338,7 +2339,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeComma(b) code = code.next } @@ -2348,7 +2349,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) @@ -2357,13 +2358,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64: ptr := load(ctxptr, code.idx) @@ -2374,14 +2375,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt64: @@ -2392,7 +2393,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2405,7 +2406,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt64: @@ -2418,7 +2419,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2427,13 +2428,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Only, opStructFieldHeadOmitEmptyInt64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToInt64(p) + v := ptrToInt64(p) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -2445,12 +2446,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2462,17 +2463,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2482,16 +2483,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2503,12 +2504,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } } @@ -2522,7 +2523,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2531,7 +2532,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -2543,14 +2544,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeComma(b) } code = code.next @@ -2562,7 +2563,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2572,7 +2573,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -2588,18 +2589,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64: ptr := load(ctxptr, code.idx) @@ -2607,14 +2608,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64: @@ -2622,7 +2623,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2635,7 +2636,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagInt64: @@ -2645,7 +2646,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2656,7 +2657,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -2665,7 +2666,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2682,13 +2683,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2697,16 +2698,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2714,17 +2715,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2733,12 +2734,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -2749,7 +2750,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2757,7 +2758,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -2767,7 +2768,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2775,7 +2776,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeComma(b) code = code.next } @@ -2785,7 +2786,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) @@ -2794,13 +2795,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint: ptr := load(ctxptr, code.idx) @@ -2811,14 +2812,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint: @@ -2829,7 +2830,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -2842,7 +2843,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint: @@ -2855,7 +2856,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -2864,13 +2865,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintOnly, opStructFieldHeadOmitEmptyUintOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint(p)) + v := uint64(ptrToUint(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -2882,12 +2883,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUintPtr: p := load(ctxptr, code.idx) @@ -2899,17 +2900,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -2919,16 +2920,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -2940,12 +2941,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } } @@ -2959,7 +2960,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUintPtrOnly: p := load(ctxptr, code.idx) @@ -2968,7 +2969,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next @@ -2980,14 +2981,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUintPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeComma(b) } code = code.next @@ -2999,7 +3000,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) @@ -3009,7 +3010,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3025,18 +3026,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint: ptr := load(ctxptr, code.idx) @@ -3044,14 +3045,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint: @@ -3059,7 +3060,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3072,7 +3073,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint: @@ -3082,7 +3083,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3093,7 +3094,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -3102,7 +3103,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3119,13 +3120,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUintPtr: p := load(ctxptr, code.idx) @@ -3134,16 +3135,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3151,17 +3152,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3170,12 +3171,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3186,7 +3187,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUintPtrOnly: p := load(ctxptr, code.idx) @@ -3194,7 +3195,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3204,7 +3205,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) @@ -3212,7 +3213,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeComma(b) code = code.next } @@ -3222,7 +3223,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) @@ -3231,13 +3232,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8: ptr := load(ctxptr, code.idx) @@ -3248,14 +3249,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint8: @@ -3266,7 +3267,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3279,7 +3280,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint8: @@ -3292,7 +3293,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3301,13 +3302,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Only, opStructFieldHeadOmitEmptyUint8Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint8(p)) + v := uint64(ptrToUint8(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -3319,12 +3320,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3336,17 +3337,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3356,16 +3357,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3377,12 +3378,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } } @@ -3396,7 +3397,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3405,7 +3406,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3417,14 +3418,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint8PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeComma(b) } code = code.next @@ -3436,7 +3437,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3446,7 +3447,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3462,18 +3463,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8: ptr := load(ctxptr, code.idx) @@ -3481,14 +3482,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8: @@ -3496,7 +3497,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3509,7 +3510,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint8: @@ -3519,7 +3520,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3530,7 +3531,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -3539,7 +3540,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3556,13 +3557,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3571,16 +3572,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3588,17 +3589,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3607,12 +3608,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3623,7 +3624,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3631,7 +3632,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3641,7 +3642,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3649,7 +3650,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeComma(b) code = code.next } @@ -3659,7 +3660,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) @@ -3668,13 +3669,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16: ptr := load(ctxptr, code.idx) @@ -3685,14 +3686,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint16: @@ -3703,7 +3704,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3716,7 +3717,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint16: @@ -3729,7 +3730,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3738,13 +3739,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Only, opStructFieldHeadOmitEmptyUint16Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint16(p)) + v := uint64(ptrToUint16(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -3756,12 +3757,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -3773,17 +3774,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -3793,16 +3794,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -3814,12 +3815,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } } @@ -3833,7 +3834,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint16PtrOnly: p := load(ctxptr, code.idx) @@ -3842,7 +3843,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -3854,14 +3855,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint16PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeComma(b) } code = code.next @@ -3873,7 +3874,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) @@ -3883,7 +3884,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -3899,18 +3900,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16: ptr := load(ctxptr, code.idx) @@ -3918,14 +3919,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16: @@ -3933,7 +3934,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3946,7 +3947,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint16: @@ -3956,7 +3957,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -3967,7 +3968,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -3976,7 +3977,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -3993,13 +3994,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4008,16 +4009,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4025,17 +4026,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4044,12 +4045,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4060,7 +4061,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4068,7 +4069,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4078,7 +4079,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4086,7 +4087,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeComma(b) code = code.next } @@ -4096,7 +4097,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) @@ -4105,13 +4106,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32: ptr := load(ctxptr, code.idx) @@ -4122,14 +4123,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint32: @@ -4140,7 +4141,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4153,7 +4154,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint32: @@ -4166,7 +4167,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4175,13 +4176,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Only, opStructFieldHeadOmitEmptyUint32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := uint64(e.ptrToUint32(p)) + v := uint64(ptrToUint32(p)) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -4193,12 +4194,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4210,17 +4211,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4230,16 +4231,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4251,12 +4252,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } } @@ -4270,7 +4271,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4279,7 +4280,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4291,14 +4292,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeComma(b) } code = code.next @@ -4310,7 +4311,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4320,7 +4321,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4336,18 +4337,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32: ptr := load(ctxptr, code.idx) @@ -4355,14 +4356,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32: @@ -4370,7 +4371,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4383,7 +4384,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint32: @@ -4393,7 +4394,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4404,7 +4405,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next } @@ -4413,7 +4414,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4430,13 +4431,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4445,16 +4446,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4462,17 +4463,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4481,12 +4482,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) @@ -4497,7 +4498,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4505,7 +4506,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeComma(b) code = code.next @@ -4515,7 +4516,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4523,7 +4524,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeComma(b) code = code.next } @@ -4533,7 +4534,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) @@ -4542,13 +4543,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64: ptr := load(ctxptr, code.idx) @@ -4559,14 +4560,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint64: @@ -4577,7 +4578,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4590,7 +4591,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint64: @@ -4603,7 +4604,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4612,13 +4613,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Only, opStructFieldHeadOmitEmptyUint64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToUint64(p) + v := ptrToUint64(p) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -4630,12 +4631,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -4647,17 +4648,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -4667,16 +4668,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -4688,12 +4689,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } } @@ -4707,7 +4708,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4716,7 +4717,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -4728,14 +4729,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeComma(b) } code = code.next @@ -4747,7 +4748,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4757,7 +4758,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -4773,18 +4774,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64: ptr := load(ctxptr, code.idx) @@ -4792,14 +4793,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64: @@ -4807,7 +4808,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4820,7 +4821,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagUint64: @@ -4830,7 +4831,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -4841,7 +4842,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -4850,7 +4851,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -4867,13 +4868,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -4882,16 +4883,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -4899,17 +4900,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -4918,12 +4919,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -4934,7 +4935,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4942,7 +4943,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeComma(b) code = code.next @@ -4952,7 +4953,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4960,7 +4961,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeComma(b) code = code.next } @@ -4970,7 +4971,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) @@ -4979,13 +4980,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32: ptr := load(ctxptr, code.idx) @@ -4996,14 +4997,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat32: @@ -5014,7 +5015,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5027,7 +5028,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat32: @@ -5040,7 +5041,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -5049,13 +5050,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Only, opStructFieldHeadOmitEmptyFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToFloat32(p) + v := ptrToFloat32(p) if v != 0 { b = append(b, code.escapedKey...) b = encodeFloat32(b, v) @@ -5067,12 +5068,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5084,17 +5085,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5104,16 +5105,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5125,12 +5126,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } } @@ -5144,7 +5145,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5153,7 +5154,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next @@ -5165,14 +5166,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat32PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeComma(b) } code = code.next @@ -5184,7 +5185,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5194,7 +5195,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -5210,18 +5211,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32: ptr := load(ctxptr, code.idx) @@ -5229,14 +5230,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32: @@ -5244,7 +5245,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5257,7 +5258,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagFloat32: @@ -5267,7 +5268,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -5278,7 +5279,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -5287,7 +5288,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5304,13 +5305,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5319,16 +5320,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5336,17 +5337,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5355,12 +5356,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) @@ -5371,7 +5372,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5379,7 +5380,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) } b = encodeComma(b) code = code.next @@ -5389,7 +5390,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5397,7 +5398,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeComma(b) code = code.next } @@ -5407,7 +5408,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) @@ -5416,13 +5417,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64: ptr := load(ctxptr, code.idx) @@ -5431,7 +5432,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5444,7 +5445,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat64: @@ -5455,7 +5456,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { @@ -5471,7 +5472,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat64: @@ -5482,7 +5483,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5497,7 +5498,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5507,7 +5508,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyFloat64Only, opStructFieldHeadOmitEmptyFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -5522,7 +5523,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5531,7 +5532,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.next case opStructFieldPtrHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -5543,11 +5544,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5557,7 +5558,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -5567,10 +5568,10 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5580,7 +5581,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next } case opStructFieldPtrHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -5592,12 +5593,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5615,7 +5616,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5624,7 +5625,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5640,14 +5641,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat64PtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5663,7 +5664,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5673,7 +5674,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5693,12 +5694,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5708,14 +5709,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5727,7 +5728,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64: @@ -5735,12 +5736,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5752,7 +5753,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagFloat64: @@ -5762,7 +5763,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5777,7 +5778,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5790,12 +5791,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5811,7 +5812,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5821,7 +5822,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next } case opStructFieldPtrAnonymousHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -5830,11 +5831,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5843,7 +5844,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -5851,12 +5852,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5865,7 +5866,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -5874,12 +5875,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5894,7 +5895,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5902,7 +5903,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5916,7 +5917,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5924,7 +5925,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5938,7 +5939,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) @@ -5947,7 +5948,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p + code.offset) + v := ptrToFloat64(p + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5964,7 +5965,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadString: ptr := load(ctxptr, code.idx) @@ -5975,14 +5976,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyString: @@ -5993,7 +5994,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6006,7 +6007,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagString: @@ -6018,7 +6019,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, s))) b = encodeComma(b) code = code.next @@ -6027,13 +6028,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringOnly, opStructFieldHeadOmitEmptyStringOnly: p := load(ctxptr, code.idx) b = append(b, '{') - v := e.ptrToString(p) + v := ptrToString(p) if v != "" { b = append(b, code.escapedKey...) b = encodeEscapedString(b, v) @@ -6044,11 +6045,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod p := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) b = encodeComma(b) code = code.next case opStructFieldPtrHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringPtr: p := load(ctxptr, code.idx) @@ -6060,17 +6061,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6080,16 +6081,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = encodeComma(b) } code = code.next } case opStructFieldPtrHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6101,11 +6102,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } } b = encodeComma(b) @@ -6118,7 +6119,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringPtrOnly: p := load(ctxptr, code.idx) @@ -6127,7 +6128,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next @@ -6139,14 +6140,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyStringPtrOnly: b = append(b, '{') p := load(ctxptr, code.idx) if p != 0 { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) b = encodeComma(b) } code = code.next @@ -6158,7 +6159,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) @@ -6167,7 +6168,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6182,18 +6183,18 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadString: ptr := load(ctxptr, code.idx) @@ -6201,14 +6202,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyString: @@ -6216,7 +6217,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6229,7 +6230,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagString: @@ -6238,7 +6239,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(ptr)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(ptr)))) b = encodeComma(b) code = code.next } @@ -6248,7 +6249,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6257,7 +6258,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { @@ -6273,12 +6274,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(ptr)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(ptr)))) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringPtr: p := load(ctxptr, code.idx) @@ -6287,16 +6288,16 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6304,17 +6305,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6323,11 +6324,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod break } b = append(b, code.escapedKey...) - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6337,7 +6338,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringPtrOnly: p := load(ctxptr, code.idx) @@ -6345,7 +6346,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeComma(b) code = code.next @@ -6355,7 +6356,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) @@ -6363,7 +6364,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) b = encodeComma(b) code = code.next } @@ -6373,7 +6374,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) @@ -6381,7 +6382,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next @@ -6393,7 +6394,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadBool: ptr := load(ctxptr, code.idx) @@ -6408,7 +6409,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6425,11 +6426,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.idx) b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadBool: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadBool: ptr := load(ctxptr, code.idx) @@ -6437,7 +6438,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6449,7 +6450,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadBytes: ptr := load(ctxptr, code.idx) @@ -6464,12 +6465,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadBytes: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadBytes: ptr := load(ctxptr, code.idx) @@ -6477,7 +6478,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } @@ -6489,7 +6490,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadArray: ptr := load(ctxptr, code.idx) + code.offset @@ -6510,7 +6511,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod store(ctxptr, code.idx, ptr) } case opStructFieldPtrAnonymousHeadArray: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadArray: ptr := load(ctxptr, code.idx) + code.offset @@ -6529,7 +6530,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadSlice: ptr := load(ctxptr, code.idx) @@ -6551,7 +6552,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod store(ctxptr, code.idx, p) } case opStructFieldPtrAnonymousHeadSlice: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadSlice: ptr := load(ctxptr, code.idx) @@ -6571,7 +6572,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadMarshalJSON: ptr := load(ctxptr, code.idx) @@ -6583,7 +6584,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6609,7 +6610,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next } case opStructFieldPtrAnonymousHeadMarshalJSON: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadMarshalJSON: ptr := load(ctxptr, code.idx) @@ -6618,7 +6619,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6651,7 +6652,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadMarshalText: ptr := load(ctxptr, code.idx) @@ -6663,7 +6664,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6680,7 +6681,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next } case opStructFieldPtrAnonymousHeadMarshalText: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadMarshalText: ptr := load(ctxptr, code.idx) @@ -6689,7 +6690,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) ptr += code.offset - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) rv := reflect.ValueOf(v) if rv.Type().Kind() == reflect.Interface && rv.IsNil() { b = encodeNull(b) @@ -6708,7 +6709,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBool: @@ -6719,7 +6720,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { @@ -6732,7 +6733,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyBool: @@ -6740,7 +6741,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { @@ -6753,7 +6754,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBytes: @@ -6764,7 +6765,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, '{') - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { @@ -6777,7 +6778,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyBytes: @@ -6785,7 +6786,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod if ptr == 0 { code = code.end.next } else { - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { @@ -6798,7 +6799,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyMarshalJSON: @@ -6810,7 +6811,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6846,7 +6847,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmptyMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyMarshalJSON: @@ -6855,7 +6856,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6891,7 +6892,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadOmitEmptyMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyMarshalText: @@ -6903,7 +6904,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6925,7 +6926,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadOmitEmptyMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadOmitEmptyMarshalText: @@ -6934,7 +6935,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr if p == nil || (!isPtr && *(*unsafe.Pointer)(p) == nil) { code = code.nextField @@ -6956,7 +6957,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTag: @@ -6975,7 +6976,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTag: @@ -6990,7 +6991,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBool: @@ -7003,7 +7004,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -7022,14 +7023,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod b = append(b, '{') b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldPtrAnonymousHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagBool: @@ -7039,7 +7040,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next @@ -7047,7 +7048,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBytes: @@ -7059,14 +7060,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagBytes: @@ -7075,14 +7076,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next } case opStructFieldPtrHeadStringTagMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagMarshalJSON: @@ -7094,7 +7095,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bb, err := v.(Marshaler).MarshalJSON() @@ -7117,7 +7118,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { var buf bytes.Buffer - if err := compact(&buf, bb, e.enabledHTMLEscape); err != nil { + if err := compact(&buf, bb, true); err != nil { return nil, err } b = append(b, code.escapedKey...) @@ -7129,7 +7130,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagMarshalJSON: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagMarshalJSON: @@ -7138,7 +7139,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) isPtr := code.typ.Kind() == reflect.Ptr v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bb, err := v.(Marshaler).MarshalJSON() @@ -7161,7 +7162,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.nextField } else { var buf bytes.Buffer - if err := compact(&buf, bb, e.enabledHTMLEscape); err != nil { + if err := compact(&buf, bb, true); err != nil { return nil, err } b = append(b, code.escapedKey...) @@ -7173,7 +7174,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrHeadStringTagMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagMarshalText: @@ -7185,7 +7186,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod } else { b = append(b, '{') ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7202,7 +7203,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldPtrAnonymousHeadStringTagMarshalText: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldAnonymousHeadStringTagMarshalText: @@ -7211,7 +7212,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.end.next } else { ptr += code.offset - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) v := *(*interface{})(unsafe.Pointer(&interfaceHeader{typ: code.typ, ptr: p})) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7248,12 +7249,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldInt: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -7264,47 +7265,47 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldIntPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = encodeComma(b) code = code.next case opStructFieldIntNPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = encodeComma(b) code = code.next case opStructFieldInt8: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -7315,30 +7316,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = encodeComma(b) code = code.next case opStructFieldInt16: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -7349,30 +7350,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = encodeComma(b) code = code.next case opStructFieldInt32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -7383,30 +7384,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = encodeComma(b) code = code.next case opStructFieldInt64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -7417,30 +7418,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldInt64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = encodeComma(b) code = code.next case opStructFieldUint: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -7451,30 +7452,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUintPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = encodeComma(b) code = code.next case opStructFieldUint8: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -7485,30 +7486,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = encodeComma(b) code = code.next case opStructFieldUint16: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -7519,30 +7520,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = encodeComma(b) code = code.next case opStructFieldUint32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -7553,30 +7554,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = encodeComma(b) code = code.next case opStructFieldUint64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -7587,30 +7588,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint64(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint64(ptr+code.offset))) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldUint64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = encodeComma(b) code = code.next case opStructFieldFloat32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = encodeFloat32(b, v) @@ -7621,25 +7622,25 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldFloat32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeComma(b) code = code.next case opStructFieldFloat64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7648,7 +7649,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructFieldOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -7660,7 +7661,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructFieldStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7673,14 +7674,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldFloat64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) b = encodeComma(b) code = code.next break } - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7690,12 +7691,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldString: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { b = append(b, code.escapedKey...) b = encodeEscapedString(b, v) @@ -7705,50 +7706,50 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldStringTagString: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, s))) b = encodeComma(b) code = code.next case opStructFieldStringPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } b = encodeComma(b) code = code.next case opStructFieldOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeComma(b) } code = code.next case opStructFieldStringTagStringPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } b = encodeComma(b) code = code.next case opStructFieldBool: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { b = append(b, code.escapedKey...) b = encodeBool(b, v) @@ -7759,30 +7760,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeComma(b) code = code.next case opStructFieldBoolPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeBool(b, e.ptrToBool(p)) + b = encodeBool(b, ptrToBool(p)) } b = encodeComma(b) code = code.next case opStructFieldBytes: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeComma(b) code = code.next case opStructFieldOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { b = append(b, code.escapedKey...) b = encodeByteSlice(b, v) @@ -7791,7 +7792,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructFieldStringTagBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) b = append(b, code.escapedKey...) b = encodeByteSlice(b, v) b = encodeComma(b) @@ -7800,7 +7801,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7816,9 +7817,9 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) p := ptr + code.offset if code.typ.Kind() == reflect.Ptr && code.typ.Elem().Implements(marshalJSONType) { - p = e.ptrToPtr(p) + p = ptrToPtr(p) } - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil && p != 0 { bb, err := v.(Marshaler).MarshalJSON() if err != nil { @@ -7836,13 +7837,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) } var buf bytes.Buffer - if err := compact(&buf, bb, e.enabledHTMLEscape); err != nil { + if err := compact(&buf, bb, true); err != nil { return nil, err } b = append(b, code.escapedKey...) @@ -7853,7 +7854,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7864,7 +7865,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldOmitEmptyMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil { bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -7878,7 +7879,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldStringTagMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7896,7 +7897,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldOmitEmptyArray: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { code = code.nextField } else { @@ -7913,7 +7914,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructFieldOmitEmptySlice: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { code = code.nextField } else { @@ -7983,12 +7984,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndInt: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -8007,27 +8008,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndIntPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyIntPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8042,12 +8043,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagIntPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8055,29 +8056,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndIntNPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt8: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -8096,27 +8097,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8131,12 +8132,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagInt8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8144,29 +8145,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndInt8NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt16: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -8185,27 +8186,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8220,12 +8221,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagInt16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8233,29 +8234,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndInt16NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, int64(v)) @@ -8274,27 +8275,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8309,12 +8310,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagInt32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8322,29 +8323,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndInt32NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } b = appendStructEnd(b) code = code.next case opStructEndInt64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendInt(b, v) @@ -8363,27 +8364,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndInt64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyInt64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8398,12 +8399,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagInt64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8411,29 +8412,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndInt64NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } b = appendStructEnd(b) code = code.next case opStructEndUint: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -8452,27 +8453,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUintPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUintPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8487,12 +8488,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagUintPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8500,29 +8501,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndUintNPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint8: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -8541,27 +8542,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8576,12 +8577,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagUint8Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8589,29 +8590,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndUint8NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint16: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -8630,27 +8631,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8665,12 +8666,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagUint16Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8678,29 +8679,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndUint16NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, uint64(v)) @@ -8719,27 +8720,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8754,12 +8755,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagUint32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') } b = appendStructEnd(b) @@ -8767,29 +8768,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndUint32NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } b = appendStructEnd(b) code = code.next case opStructEndUint64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = appendUint(b, v) @@ -8808,27 +8809,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndUint64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyUint64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8843,12 +8844,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagUint64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8856,29 +8857,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndUint64NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } b = appendStructEnd(b) code = code.next case opStructEndFloat32: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { b = append(b, code.escapedKey...) b = encodeFloat32(b, v) @@ -8897,27 +8898,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndFloat32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyFloat32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -8932,12 +8933,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagFloat32Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') } b = appendStructEnd(b) @@ -8945,24 +8946,24 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndFloat32NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = appendStructEnd(b) code = code.next case opStructEndFloat64: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -8971,7 +8972,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructEndOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) @@ -8991,7 +8992,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructEndStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9004,14 +9005,14 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndFloat64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) b = appendStructEnd(b) code = code.next break } - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9020,10 +9021,10 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructEndOmitEmptyFloat64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9042,12 +9043,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagFloat64Ptr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9059,17 +9060,17 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndFloat64NPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -9080,12 +9081,12 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndString: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { b = append(b, code.escapedKey...) b = encodeEscapedString(b, v) @@ -9103,27 +9104,27 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagString: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, s))) b = appendStructEnd(b) code = code.next case opStructEndStringPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { b = append(b, code.escapedKey...) - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = appendStructEnd(b) } else { last := len(b) - 1 @@ -9138,11 +9139,11 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagStringPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToString(p) + v := ptrToString(p) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, v))) } b = appendStructEnd(b) @@ -9150,29 +9151,29 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringNPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) for i := 0; i < code.ptrNum-1; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } b = appendStructEnd(b) code = code.next case opStructEndBool: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { b = append(b, code.escapedKey...) b = encodeBool(b, v) @@ -9191,30 +9192,30 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) b = append(b, '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = appendStructEnd(b) code = code.next case opStructEndBoolPtr: b = append(b, code.escapedKey...) ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeBool(b, e.ptrToBool(p)) + b = encodeBool(b, ptrToBool(p)) } b = appendStructEnd(b) code = code.next case opStructEndBytes: ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = appendStructEnd(b) code = code.next case opStructEndOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { b = append(b, code.escapedKey...) b = encodeByteSlice(b, v) @@ -9231,7 +9232,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod code = code.next case opStructEndStringTagBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) b = append(b, code.escapedKey...) b = encodeByteSlice(b, v) b = appendStructEnd(b) @@ -9240,7 +9241,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9255,8 +9256,8 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndOmitEmptyMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) - if v != nil && (code.typ.Kind() != reflect.Ptr || e.ptrToPtr(p) != 0) { + v := ptrToInterface(code, p) + if v != nil && (code.typ.Kind() != reflect.Ptr || ptrToPtr(p) != 0) { bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9281,13 +9282,13 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) } var buf bytes.Buffer - if err := compact(&buf, bb, e.enabledHTMLEscape); err != nil { + if err := compact(&buf, bb, true); err != nil { return nil, err } b = append(b, code.escapedKey...) @@ -9298,7 +9299,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod ptr := load(ctxptr, code.headIdx) b = append(b, code.escapedKey...) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -9309,7 +9310,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndOmitEmptyMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) if v != nil { bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { @@ -9331,7 +9332,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod case opStructEndStringTagMarshalText: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) diff --git a/encode_vm_escaped_indent.go b/encode_vm_escaped_indent.go index 98bff40..1c62cf7 100644 --- a/encode_vm_escaped_indent.go +++ b/encode_vm_escaped_indent.go @@ -12,7 +12,7 @@ import ( "unsafe" ) -func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ([]byte, error) { +func encodeRunEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt EncodeOption) ([]byte, error) { ptrOffset := uintptr(0) ctxptr := ctx.ptr() code := codeSet.code @@ -24,113 +24,113 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opPtr: ptr := load(ctxptr, code.idx) code = code.next - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) case opInt: - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt8: - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt16: - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt32: - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt64: - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opUint: - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint8: - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint16: - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint32: - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint64: - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opIntString: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt8String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt16String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt32String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt64String: b = append(b, '"') - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUintString: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint8String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint16String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint32String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint64String: b = append(b, '"') - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opFloat32: - b = encodeFloat32(b, e.ptrToFloat32(load(ctxptr, code.idx))) + b = encodeFloat32(b, ptrToFloat32(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opFloat64: - v := e.ptrToFloat64(load(ctxptr, code.idx)) + v := ptrToFloat64(load(ctxptr, code.idx)) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -138,20 +138,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opString: - b = encodeEscapedString(b, e.ptrToString(load(ctxptr, code.idx))) + b = encodeEscapedString(b, ptrToString(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opBool: - b = encodeBool(b, e.ptrToBool(load(ctxptr, code.idx))) + b = encodeBool(b, ptrToBool(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opBytes: ptr := load(ctxptr, code.idx) - slice := e.ptrToSlice(ptr) + slice := ptrToSlice(ptr) if ptr == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) } else { - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) } b = encodeIndentComma(b) code = code.next @@ -169,7 +169,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } ctx.seenPtr = append(ctx.seenPtr, ptr) - iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr)) + iface := (*interfaceHeader)(ptrToUnsafePtr(ptr)) if iface == nil || iface.ptr == nil { b = encodeNull(b) b = encodeIndentComma(b) @@ -177,7 +177,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface)) - ifaceCodeSet, err := e.compileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) + ifaceCodeSet, err := encodeCompileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) if err != nil { return nil, err } @@ -199,13 +199,13 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet ctx.ptrs = newPtrs - oldBaseIndent := e.baseIndent - e.baseIndent = code.indent - bb, err := e.runEscapedIndent(ctx, b, ifaceCodeSet) + oldBaseIndent := ctx.baseIndent + ctx.baseIndent = code.indent + bb, err := encodeRunEscapedIndent(ctx, b, ifaceCodeSet, opt) if err != nil { return nil, err } - e.baseIndent = oldBaseIndent + ctx.baseIndent = oldBaseIndent ctx.ptrs = oldPtrs ctxptr = ctx.ptr() @@ -221,7 +221,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next break } - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -241,8 +241,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -252,7 +252,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opMarshalText: ptr := load(ctxptr, code.idx) isPtr := code.typ.Kind() == reflect.Ptr - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) if p == nil { b = encodeNull(b) b = encodeIndentComma(b) @@ -277,22 +277,22 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opSliceHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) 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 = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) code = code.next store(ctxptr, code.idx, uintptr(slice.data)) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', '\n') code = code.end.next } @@ -300,22 +300,22 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opRootSliceHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) 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 = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) code = code.next store(ctxptr, code.idx, uintptr(slice.data)) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', ',', '\n') code = code.end.next } @@ -325,7 +325,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet length := load(ctxptr, code.length) idx++ if idx < length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, idx) data := load(ctxptr, code.headIdx) size := code.size @@ -334,7 +334,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } else { b = b[:len(b)-2] b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']', ',', '\n') code = code.end.next } @@ -343,33 +343,33 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet length := load(ctxptr, code.length) idx++ if idx < length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(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 = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']') code = code.end.next } case opArrayHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { if code.length > 0 { b = append(b, '[', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, 0) code = code.next store(ctxptr, code.idx, p) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', ',', '\n') code = code.end.next } @@ -378,7 +378,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet idx := load(ctxptr, code.elemIdx) idx++ if idx < code.length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, idx) p := load(ctxptr, code.headIdx) size := code.size @@ -387,19 +387,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } else { b = b[:len(b)-2] b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']', ',', '\n') code = code.end.next } case opMapHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - uptr := e.ptrToUnsafePtr(ptr) + uptr := ptrToUnsafePtr(ptr) mlen := maplen(uptr) if mlen > 0 { b = append(b, '{', '\n') @@ -409,20 +409,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet store(ctxptr, code.length, uintptr(mlen)) store(ctxptr, code.mapIter, uintptr(iter)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) store(ctxptr, code.end.mapPos, uintptr(unsafe.Pointer(mapCtx))) } else { - b = e.encodeIndent(b, code.next.indent) + b = encodeIndent(ctx, b, code.next.indent) } key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) code = code.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next } @@ -430,15 +430,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opMapHeadLoad: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) code = code.end.next } else { // load pointer - ptr = e.ptrToPtr(ptr) - uptr := e.ptrToUnsafePtr(ptr) + ptr = ptrToPtr(ptr) + uptr := ptrToUnsafePtr(ptr) if uintptr(uptr) == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next @@ -455,18 +455,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) store(ctxptr, code.end.mapPos, uintptr(unsafe.Pointer(mapCtx))) } else { - b = e.encodeIndent(b, code.next.indent) + b = encodeIndent(ctx, b, code.next.indent) } code = code.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next } @@ -475,29 +475,29 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet idx := load(ctxptr, code.elemIdx) length := load(ctxptr, code.length) idx++ - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { if idx < length { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) store(ctxptr, code.elemIdx, idx) ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) code = code.next } else { last := len(b) - 1 b[last] = '\n' - b = e.encodeIndent(b, code.indent-1) + b = encodeIndent(ctx, b, code.indent-1) b = append(b, '}', ',', '\n') code = code.end.next } } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -507,15 +507,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opMapValue: - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { b = append(b, ':', ' ') } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) } ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) value := mapitervalue(iter) store(ctxptr, code.next.idx, uintptr(value)) mapiternext(iter) @@ -524,7 +524,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet // this operation only used by sorted map length := int(load(ctxptr, code.length)) ptr := load(ctxptr, code.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) pos := mapCtx.pos for i := 0; i < length; i++ { startKey := pos[i*2] @@ -543,8 +543,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet sort.Sort(mapCtx.slice) buf := mapCtx.buf for _, item := range mapCtx.slice.items { - buf = append(buf, e.prefix...) - buf = append(buf, bytes.Repeat(e.indentStr, e.baseIndent+code.indent+1)...) + buf = append(buf, ctx.prefix...) + buf = append(buf, bytes.Repeat(ctx.indentStr, ctx.baseIndent+code.indent+1)...) buf = append(buf, item.key...) buf[len(buf)-2] = ':' buf[len(buf)-1] = ' ' @@ -552,8 +552,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } buf = buf[:len(buf)-2] buf = append(buf, '\n') - buf = append(buf, e.prefix...) - buf = append(buf, bytes.Repeat(e.indentStr, e.baseIndent+code.indent)...) + buf = append(buf, ctx.prefix...) + buf = append(buf, bytes.Repeat(ctx.indentStr, ctx.baseIndent+code.indent)...) buf = append(buf, '}', ',', '\n') b = b[:pos[0]] @@ -568,25 +568,25 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else if code.next == code.end { // not exists fields - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next store(ctxptr, code.idx, ptr) } else { b = append(b, '{', '\n') if !code.anonymousKey { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') } @@ -597,24 +597,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') p := ptr + code.offset if p == 0 || *(*uintptr)(*(*unsafe.Pointer)(unsafe.Pointer(&p))) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next @@ -625,7 +625,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet ptr := load(ctxptr, code.idx) b = append(b, '{', '\n') if !code.anonymousKey { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') } @@ -636,7 +636,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet ptr := load(ctxptr, code.idx) b = append(b, '{', '\n') if !code.anonymousKey && ptr != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') p := ptr + code.offset @@ -646,7 +646,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.nextField } case opStructFieldPtrHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt: ptr := load(ctxptr, code.idx) @@ -656,17 +656,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt: @@ -677,11 +677,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -692,7 +692,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt: @@ -703,10 +703,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -714,18 +714,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadIntOnly, opStructFieldHeadIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntOnly, opStructFieldHeadOmitEmptyIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt(p)) + v := int64(ptrToInt(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -735,15 +735,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagIntOnly, opStructFieldHeadStringTagIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadIntPtr: p := load(ctxptr, code.idx) @@ -754,20 +754,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -777,18 +777,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -799,15 +799,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } } @@ -821,18 +821,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -844,16 +844,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -865,19 +865,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -888,51 +888,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -941,18 +941,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -962,10 +962,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -974,11 +974,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -991,17 +991,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadIntPtr: p := load(ctxptr, code.idx) @@ -1009,19 +1009,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -1029,19 +1029,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -1049,15 +1049,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1068,17 +1068,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadIntPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1088,17 +1088,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1108,24 +1108,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8: ptr := load(ctxptr, code.idx) @@ -1135,17 +1135,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr))) + b = appendInt(b, int64(ptrToInt8(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt8: @@ -1156,11 +1156,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1171,7 +1171,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt8: @@ -1182,10 +1182,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1193,18 +1193,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadInt8Only, opStructFieldHeadInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Only, opStructFieldHeadOmitEmptyInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt8(p)) + v := int64(ptrToInt8(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -1214,15 +1214,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt8Only, opStructFieldHeadStringTagInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1233,20 +1233,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1256,18 +1256,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1278,15 +1278,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } } @@ -1300,18 +1300,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1323,16 +1323,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -1344,19 +1344,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1367,51 +1367,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1420,18 +1420,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1441,10 +1441,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1453,11 +1453,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1470,17 +1470,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1488,19 +1488,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1508,19 +1508,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1528,15 +1528,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1547,17 +1547,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1567,17 +1567,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1587,24 +1587,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16: ptr := load(ctxptr, code.idx) @@ -1614,17 +1614,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr))) + b = appendInt(b, int64(ptrToInt16(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt16: @@ -1635,11 +1635,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1650,7 +1650,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt16: @@ -1661,10 +1661,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1672,18 +1672,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadInt16Only, opStructFieldHeadInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Only, opStructFieldHeadOmitEmptyInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt16(p)) + v := int64(ptrToInt16(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -1693,15 +1693,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt16Only, opStructFieldHeadStringTagInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1712,20 +1712,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1735,18 +1735,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1757,15 +1757,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } } @@ -1779,18 +1779,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1802,16 +1802,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -1823,19 +1823,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1846,51 +1846,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1899,18 +1899,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1920,10 +1920,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1932,11 +1932,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1949,17 +1949,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1967,19 +1967,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1987,19 +1987,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -2007,15 +2007,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2026,17 +2026,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2046,17 +2046,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2066,24 +2066,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32: ptr := load(ctxptr, code.idx) @@ -2093,17 +2093,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr))) + b = appendInt(b, int64(ptrToInt32(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt32: @@ -2114,11 +2114,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2129,7 +2129,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt32: @@ -2140,10 +2140,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2151,18 +2151,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadInt32Only, opStructFieldHeadInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Only, opStructFieldHeadOmitEmptyInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt32(p)) + v := int64(ptrToInt32(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -2172,15 +2172,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt32Only, opStructFieldHeadStringTagInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2191,20 +2191,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2214,18 +2214,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2236,15 +2236,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } } @@ -2258,18 +2258,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2281,16 +2281,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -2302,19 +2302,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2325,51 +2325,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2378,18 +2378,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2399,10 +2399,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2411,11 +2411,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2428,17 +2428,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2446,19 +2446,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2466,19 +2466,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2486,15 +2486,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2505,17 +2505,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2525,17 +2525,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2545,24 +2545,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64: ptr := load(ctxptr, code.idx) @@ -2572,17 +2572,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr)) + b = appendInt(b, ptrToInt64(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt64: @@ -2593,11 +2593,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -2608,7 +2608,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt64: @@ -2619,10 +2619,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2630,18 +2630,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadInt64Only, opStructFieldHeadInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Only, opStructFieldHeadOmitEmptyInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToInt64(p) + v := ptrToInt64(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -2651,15 +2651,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagInt64Only, opStructFieldHeadStringTagInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2670,20 +2670,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2693,18 +2693,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2715,15 +2715,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } } @@ -2737,18 +2737,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -2760,16 +2760,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -2781,19 +2781,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -2804,51 +2804,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -2857,18 +2857,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2878,10 +2878,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -2890,11 +2890,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -2907,17 +2907,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2925,19 +2925,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2945,19 +2945,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2965,15 +2965,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -2984,17 +2984,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -3004,17 +3004,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -3024,24 +3024,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint: ptr := load(ctxptr, code.idx) @@ -3051,17 +3051,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint: @@ -3072,11 +3072,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3087,7 +3087,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint: @@ -3098,10 +3098,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3109,18 +3109,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadUintOnly, opStructFieldHeadUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintOnly, opStructFieldHeadOmitEmptyUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint(p)) + v := uint64(ptrToUint(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -3130,15 +3130,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUintOnly, opStructFieldHeadStringTagUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUintPtr: p := load(ctxptr, code.idx) @@ -3149,20 +3149,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3172,18 +3172,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3194,15 +3194,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } } @@ -3216,18 +3216,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3239,16 +3239,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -3260,19 +3260,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3283,51 +3283,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3336,18 +3336,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3357,10 +3357,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3369,11 +3369,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3386,17 +3386,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUintPtr: p := load(ctxptr, code.idx) @@ -3404,19 +3404,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3424,19 +3424,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3444,15 +3444,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3463,17 +3463,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUintPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3483,17 +3483,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3503,24 +3503,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8: ptr := load(ctxptr, code.idx) @@ -3530,17 +3530,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr))) + b = appendUint(b, uint64(ptrToUint8(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint8: @@ -3551,11 +3551,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3566,7 +3566,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint8: @@ -3577,10 +3577,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3588,18 +3588,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadUint8Only, opStructFieldHeadUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Only, opStructFieldHeadOmitEmptyUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint8(p)) + v := uint64(ptrToUint8(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -3609,15 +3609,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint8Only, opStructFieldHeadStringTagUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3628,20 +3628,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3651,18 +3651,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3673,15 +3673,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } } @@ -3695,18 +3695,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3718,16 +3718,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -3739,19 +3739,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3762,51 +3762,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3815,18 +3815,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3836,10 +3836,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3848,11 +3848,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3865,17 +3865,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3883,19 +3883,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3903,19 +3903,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3923,15 +3923,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3942,17 +3942,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3962,17 +3962,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3982,24 +3982,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16: ptr := load(ctxptr, code.idx) @@ -4009,17 +4009,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr))) + b = appendUint(b, uint64(ptrToUint16(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint16: @@ -4030,11 +4030,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4045,7 +4045,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint16: @@ -4056,10 +4056,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4067,18 +4067,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadUint16Only, opStructFieldHeadUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Only, opStructFieldHeadOmitEmptyUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint16(p)) + v := uint64(ptrToUint16(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -4088,15 +4088,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint16Only, opStructFieldHeadStringTagUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4107,20 +4107,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4130,18 +4130,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4152,15 +4152,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } } @@ -4174,18 +4174,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4197,16 +4197,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -4218,19 +4218,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4241,51 +4241,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4294,18 +4294,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4315,10 +4315,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4327,11 +4327,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4344,17 +4344,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4362,19 +4362,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4382,19 +4382,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4402,15 +4402,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4421,17 +4421,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4441,17 +4441,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4461,24 +4461,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32: ptr := load(ctxptr, code.idx) @@ -4488,17 +4488,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr))) + b = appendUint(b, uint64(ptrToUint32(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint32: @@ -4509,11 +4509,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4524,7 +4524,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint32: @@ -4535,10 +4535,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4546,18 +4546,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadUint32Only, opStructFieldHeadUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Only, opStructFieldHeadOmitEmptyUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint32(p)) + v := uint64(ptrToUint32(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -4567,15 +4567,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint32Only, opStructFieldHeadStringTagUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4586,20 +4586,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4609,18 +4609,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4631,15 +4631,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } } @@ -4653,18 +4653,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4676,16 +4676,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -4697,19 +4697,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4720,51 +4720,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4773,18 +4773,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4794,10 +4794,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4806,11 +4806,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4823,17 +4823,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4841,19 +4841,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4861,19 +4861,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4881,15 +4881,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4900,17 +4900,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4920,17 +4920,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4940,24 +4940,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64: ptr := load(ctxptr, code.idx) @@ -4967,17 +4967,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr)) + b = appendUint(b, ptrToUint64(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint64: @@ -4988,11 +4988,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -5003,7 +5003,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint64: @@ -5014,10 +5014,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5025,18 +5025,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadUint64Only, opStructFieldHeadUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Only, opStructFieldHeadOmitEmptyUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToUint64(p) + v := ptrToUint64(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -5046,15 +5046,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagUint64Only, opStructFieldHeadStringTagUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -5065,20 +5065,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -5088,18 +5088,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -5110,15 +5110,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } } @@ -5132,18 +5132,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -5155,16 +5155,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -5176,19 +5176,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5199,51 +5199,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -5252,18 +5252,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5273,10 +5273,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5285,11 +5285,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -5302,17 +5302,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -5320,19 +5320,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -5340,19 +5340,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -5360,15 +5360,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5379,17 +5379,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -5399,17 +5399,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5419,24 +5419,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32: ptr := load(ctxptr, code.idx) @@ -5446,17 +5446,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat32: @@ -5467,11 +5467,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5482,7 +5482,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat32: @@ -5493,10 +5493,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5504,18 +5504,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadFloat32Only, opStructFieldHeadFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Only, opStructFieldHeadOmitEmptyFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToFloat32(p) + v := ptrToFloat32(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5525,15 +5525,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagFloat32Only, opStructFieldHeadStringTagFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5544,20 +5544,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5567,18 +5567,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5589,15 +5589,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } } @@ -5611,18 +5611,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next @@ -5634,16 +5634,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -5655,19 +5655,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5678,51 +5678,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5731,18 +5731,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5752,10 +5752,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } @@ -5764,11 +5764,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5781,17 +5781,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5799,19 +5799,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5819,19 +5819,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5839,15 +5839,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5858,17 +5858,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next @@ -5878,17 +5878,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5898,24 +5898,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64: ptr := load(ctxptr, code.idx) @@ -5924,12 +5924,12 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.end.next } else { - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -5939,7 +5939,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat64: @@ -5950,14 +5950,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -5968,7 +5968,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat64: @@ -5979,10 +5979,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5994,10 +5994,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadFloat64Only, opStructFieldHeadFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6007,12 +6007,12 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadOmitEmptyFloat64Only, opStructFieldHeadOmitEmptyFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -6022,10 +6022,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagFloat64Only, opStructFieldHeadStringTagFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6034,7 +6034,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -6045,14 +6045,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6062,7 +6062,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -6072,12 +6072,12 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6087,7 +6087,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next } case opStructFieldPtrHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -6098,15 +6098,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6124,18 +6124,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6151,16 +6151,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6176,19 +6176,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6203,19 +6203,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6225,17 +6225,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6244,21 +6244,21 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -6267,18 +6267,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6292,10 +6292,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6308,14 +6308,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6329,11 +6329,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = append(b, '"') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6343,7 +6343,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next } case opStructFieldPtrAnonymousHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -6351,14 +6351,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6367,7 +6367,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -6375,14 +6375,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6391,7 +6391,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -6399,15 +6399,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6422,17 +6422,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6446,17 +6446,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6470,18 +6470,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6491,7 +6491,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadString: ptr := load(ctxptr, code.idx) @@ -6501,17 +6501,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(ptr)) + b = encodeEscapedString(b, ptrToString(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyString: @@ -6522,11 +6522,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) @@ -6537,7 +6537,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagString: @@ -6548,10 +6548,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, v))) b = encodeIndentComma(b) code = code.next @@ -6559,18 +6559,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringOnly, opStructFieldHeadStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringOnly, opStructFieldHeadOmitEmptyStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToString(p) + v := ptrToString(p) if v != "" { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) @@ -6580,14 +6580,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagStringOnly, opStructFieldHeadStringTagStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringPtr: p := load(ctxptr, code.idx) @@ -6598,20 +6598,20 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6621,18 +6621,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6643,14 +6643,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } } b = encodeIndentComma(b) @@ -6663,18 +6663,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -6686,16 +6686,16 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -6707,18 +6707,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next @@ -6728,51 +6728,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) @@ -6781,17 +6781,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } } case opStructFieldPtrAnonymousHeadStringTagString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(ptr+code.offset)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(ptr+code.offset)))) b = encodeIndentComma(b) code = code.next } @@ -6800,10 +6800,10 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -6812,11 +6812,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) @@ -6829,15 +6829,15 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(ptr+code.offset)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(ptr+code.offset)))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringPtr: p := load(ctxptr, code.idx) @@ -6845,19 +6845,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6865,19 +6865,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6885,14 +6885,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next @@ -6902,17 +6902,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -6922,17 +6922,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeEscapedString(b, ptrToString(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -6942,81 +6942,81 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadBool: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeBool(b, e.ptrToBool(ptr)) + b = encodeBool(b, ptrToBool(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadBytes: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeBool(b, v) @@ -7027,24 +7027,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeByteSlice(b, v) @@ -7055,7 +7055,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTag: @@ -7067,7 +7067,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet } else { b = append(b, '{', '\n') p := ptr + code.offset - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next @@ -7076,22 +7076,22 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -7099,27 +7099,27 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldPtrHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructField: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7132,7 +7132,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if p == 0 || **(**uintptr)(unsafe.Pointer(&p)) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next @@ -7141,24 +7141,24 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldStringTag: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next store(ctxptr, code.idx, p) case opStructFieldInt: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7167,26 +7167,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagInt: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7195,26 +7195,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagInt8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7223,26 +7223,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagInt16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7251,26 +7251,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagInt32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) @@ -7279,26 +7279,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagInt64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7307,26 +7307,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagUint: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7335,26 +7335,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagUint8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7363,26 +7363,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagUint16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7391,26 +7391,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagUint32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) @@ -7419,26 +7419,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagUint64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldFloat32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -7447,19 +7447,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagFloat32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldFloat64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7468,12 +7468,12 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -7482,11 +7482,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') b = encodeFloat64(b, v) @@ -7494,18 +7494,18 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldString: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) @@ -7514,63 +7514,63 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagString: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, s))) b = encodeIndentComma(b) code = code.next case opStructFieldStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) } code = code.next case opStructFieldStringTagStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } b = encodeIndentComma(b) code = code.next case opStructFieldBool: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeBool(b, v) @@ -7579,26 +7579,26 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagBool: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldBytes: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeByteSlice(b, v) @@ -7607,19 +7607,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagBytes: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldMarshalJSON: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7632,8 +7632,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -7642,11 +7642,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7659,8 +7659,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -7670,11 +7670,11 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructFieldStringTagMarshalText: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7683,12 +7683,12 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeIndentComma(b) code = code.next case opStructFieldArray: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { b = encodeNull(b) b = encodeIndentComma(b) @@ -7699,22 +7699,22 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldOmitEmptyArray: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next } case opStructFieldSlice: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) b = encodeIndentComma(b) @@ -7725,17 +7725,17 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldOmitEmptySlice: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next } case opStructFieldMap: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7744,8 +7744,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) code = code.nextField } else { - p = e.ptrToPtr(p) - mlen := maplen(e.ptrToUnsafePtr(p)) + p = ptrToPtr(p) + mlen := maplen(ptrToUnsafePtr(p)) if mlen == 0 { b = append(b, '{', '}', ',', '\n') mapCode := code.next @@ -7764,14 +7764,14 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if mlen == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next } } case opStructFieldMapLoad: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7780,8 +7780,8 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = encodeNull(b) code = code.nextField } else { - p = e.ptrToPtr(p) - mlen := maplen(e.ptrToUnsafePtr(p)) + p = ptrToPtr(p) + mlen := maplen(ptrToUnsafePtr(p)) if mlen == 0 { b = append(b, '{', '}', ',', '\n') code = code.nextField @@ -7799,7 +7799,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if mlen == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') code = code.next @@ -7808,7 +7808,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet case opStructFieldStruct: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if p == 0 { @@ -7831,7 +7831,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') headCode := code.next @@ -7859,27 +7859,27 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') b = encodeIndentComma(b) code = code.next case opStructEndInt: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7890,7 +7890,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -7898,35 +7898,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagInt: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndIntPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyIntPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7937,44 +7937,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagIntPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7985,7 +7985,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -7993,35 +7993,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagInt8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt8(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8032,44 +8032,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8080,7 +8080,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8088,35 +8088,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagInt16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt16(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8127,44 +8127,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8175,7 +8175,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8183,35 +8183,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagInt32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt32(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8222,44 +8222,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, ptrToInt64(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendInt(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8270,7 +8270,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8278,35 +8278,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagInt64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, ptrToInt64(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8317,44 +8317,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8365,7 +8365,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8373,35 +8373,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagUint: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUintPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUintPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8412,44 +8412,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUintPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8460,7 +8460,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8468,35 +8468,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagUint8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint8(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8507,44 +8507,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8555,7 +8555,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8563,35 +8563,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagUint16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint16(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8602,44 +8602,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8650,7 +8650,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8658,35 +8658,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagUint32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint32(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8697,44 +8697,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, ptrToUint64(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = appendUint(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8745,7 +8745,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8753,35 +8753,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagUint64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, ptrToUint64(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8792,44 +8792,44 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeFloat32(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8840,7 +8840,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8848,35 +8848,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagFloat32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeFloat32(b, ptrToFloat32(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8887,51 +8887,51 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagFloat32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8942,7 +8942,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8950,47 +8950,47 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') b = encodeFloat64(b, v) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9001,48 +9001,48 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagFloat64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndString: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeEscapedString(b, e.ptrToString(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeEscapedString(b, ptrToString(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeEscapedString(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9053,7 +9053,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9061,35 +9061,35 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagString: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, s))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, e.ptrToString(p)) + b = encodeEscapedString(b, ptrToString(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeEscapedString(b, e.ptrToString(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeEscapedString(b, ptrToString(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9100,42 +9100,42 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeEscapedString(b, string(encodeEscapedString([]byte{}, ptrToString(p)))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndBool: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeBool(b, ptrToBool(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeBool(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9146,7 +9146,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9154,30 +9154,30 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagBool: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndBytes: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') b = encodeByteSlice(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9188,7 +9188,7 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9196,19 +9196,19 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet code = code.next case opStructEndStringTagBytes: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndMarshalJSON: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9221,21 +9221,21 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } b = append(b, indentBuf.Bytes()...) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9248,27 +9248,27 @@ func (e *Encoder) runEscapedIndent(ctx *encodeRuntimeContext, b []byte, codeSet if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } b = encodeEscapedString(b, indentBuf.String()) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringTagMarshalText: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.escapedKey...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) } b = encodeEscapedString(b, *(*string)(unsafe.Pointer(&bytes))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opEnd: goto END diff --git a/encode_vm_indent.go b/encode_vm_indent.go index ec31248..afcb21f 100644 --- a/encode_vm_indent.go +++ b/encode_vm_indent.go @@ -12,7 +12,7 @@ import ( "unsafe" ) -func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet) ([]byte, error) { +func encodeRunIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcodeSet, opt EncodeOption) ([]byte, error) { ptrOffset := uintptr(0) ctxptr := ctx.ptr() code := codeSet.code @@ -24,113 +24,113 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opPtr: ptr := load(ctxptr, code.idx) code = code.next - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) case opInt: - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt8: - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt16: - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt32: - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opInt64: - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opUint: - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint8: - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint16: - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint32: - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = encodeIndentComma(b) code = code.next case opUint64: - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opIntString: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt8String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt16String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt32String: b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(load(ctxptr, code.idx)))) + b = appendInt(b, int64(ptrToInt32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opInt64String: b = append(b, '"') - b = appendInt(b, e.ptrToInt64(load(ctxptr, code.idx))) + b = appendInt(b, ptrToInt64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUintString: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint8String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint8(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint16String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint16(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint32String: b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(load(ctxptr, code.idx)))) + b = appendUint(b, uint64(ptrToUint32(load(ctxptr, code.idx)))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opUint64String: b = append(b, '"') - b = appendUint(b, e.ptrToUint64(load(ctxptr, code.idx))) + b = appendUint(b, ptrToUint64(load(ctxptr, code.idx))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opFloat32: - b = encodeFloat32(b, e.ptrToFloat32(load(ctxptr, code.idx))) + b = encodeFloat32(b, ptrToFloat32(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opFloat64: - v := e.ptrToFloat64(load(ctxptr, code.idx)) + v := ptrToFloat64(load(ctxptr, code.idx)) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -138,20 +138,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opString: - b = encodeNoEscapedString(b, e.ptrToString(load(ctxptr, code.idx))) + b = encodeNoEscapedString(b, ptrToString(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opBool: - b = encodeBool(b, e.ptrToBool(load(ctxptr, code.idx))) + b = encodeBool(b, ptrToBool(load(ctxptr, code.idx))) b = encodeIndentComma(b) code = code.next case opBytes: ptr := load(ctxptr, code.idx) - slice := e.ptrToSlice(ptr) + slice := ptrToSlice(ptr) if ptr == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) } else { - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) } b = encodeIndentComma(b) code = code.next @@ -169,7 +169,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } ctx.seenPtr = append(ctx.seenPtr, ptr) - iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr)) + iface := (*interfaceHeader)(ptrToUnsafePtr(ptr)) if iface == nil || iface.ptr == nil { b = encodeNull(b) b = encodeIndentComma(b) @@ -177,7 +177,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface)) - ifaceCodeSet, err := e.compileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) + ifaceCodeSet, err := encodeCompileToGetCodeSet(uintptr(unsafe.Pointer(iface.typ))) if err != nil { return nil, err } @@ -199,13 +199,13 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode ctx.ptrs = newPtrs - oldBaseIndent := e.baseIndent - e.baseIndent = code.indent - bb, err := e.runIndent(ctx, b, ifaceCodeSet) + oldBaseIndent := ctx.baseIndent + ctx.baseIndent = code.indent + bb, err := encodeRunIndent(ctx, b, ifaceCodeSet, opt) if err != nil { return nil, err } - e.baseIndent = oldBaseIndent + ctx.baseIndent = oldBaseIndent ctx.ptrs = oldPtrs ctxptr = ctx.ptr() @@ -221,7 +221,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next break } - v := e.ptrToInterface(code, ptr) + v := ptrToInterface(code, ptr) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -241,8 +241,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -252,7 +252,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opMarshalText: ptr := load(ctxptr, code.idx) isPtr := code.typ.Kind() == reflect.Ptr - p := e.ptrToUnsafePtr(ptr) + p := ptrToUnsafePtr(ptr) if p == nil { b = encodeNull(b) b = encodeIndentComma(b) @@ -277,22 +277,22 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opSliceHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) 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 = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) code = code.next store(ctxptr, code.idx, uintptr(slice.data)) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', '\n') code = code.end.next } @@ -300,22 +300,22 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opRootSliceHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) 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 = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) code = code.next store(ctxptr, code.idx, uintptr(slice.data)) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', ',', '\n') code = code.end.next } @@ -325,7 +325,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode length := load(ctxptr, code.length) idx++ if idx < length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, idx) data := load(ctxptr, code.headIdx) size := code.size @@ -334,7 +334,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } else { b = b[:len(b)-2] b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']', ',', '\n') code = code.end.next } @@ -343,33 +343,33 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode length := load(ctxptr, code.length) idx++ if idx < length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(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 = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']') code = code.end.next } case opArrayHead: p := load(ctxptr, code.idx) if p == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { if code.length > 0 { b = append(b, '[', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, 0) code = code.next store(ctxptr, code.idx, p) } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '[', ']', ',', '\n') code = code.end.next } @@ -378,7 +378,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode idx := load(ctxptr, code.elemIdx) idx++ if idx < code.length { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) store(ctxptr, code.elemIdx, idx) p := load(ctxptr, code.headIdx) size := code.size @@ -387,19 +387,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } else { b = b[:len(b)-2] b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, ']', ',', '\n') code = code.end.next } case opMapHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - uptr := e.ptrToUnsafePtr(ptr) + uptr := ptrToUnsafePtr(ptr) mlen := maplen(uptr) if mlen > 0 { b = append(b, '{', '\n') @@ -409,20 +409,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode store(ctxptr, code.length, uintptr(mlen)) store(ctxptr, code.mapIter, uintptr(iter)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) store(ctxptr, code.end.mapPos, uintptr(unsafe.Pointer(mapCtx))) } else { - b = e.encodeIndent(b, code.next.indent) + b = encodeIndent(ctx, b, code.next.indent) } key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) code = code.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next } @@ -430,15 +430,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opMapHeadLoad: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) code = code.end.next } else { // load pointer - ptr = e.ptrToPtr(ptr) - uptr := e.ptrToUnsafePtr(ptr) + ptr = ptrToPtr(ptr) + uptr := ptrToUnsafePtr(ptr) if uintptr(uptr) == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next @@ -455,18 +455,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) - if !e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) == 0 { mapCtx := newMapContext(mlen) mapCtx.pos = append(mapCtx.pos, len(b)) ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(mapCtx)) store(ctxptr, code.end.mapPos, uintptr(unsafe.Pointer(mapCtx))) } else { - b = e.encodeIndent(b, code.next.indent) + b = encodeIndent(ctx, b, code.next.indent) } code = code.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next } @@ -475,29 +475,29 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode idx := load(ctxptr, code.elemIdx) length := load(ctxptr, code.length) idx++ - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { if idx < length { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) store(ctxptr, code.elemIdx, idx) ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) code = code.next } else { last := len(b) - 1 b[last] = '\n' - b = e.encodeIndent(b, code.indent-1) + b = encodeIndent(ctx, b, code.indent-1) b = append(b, '}', ',', '\n') code = code.end.next } } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) if idx < length { ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) store(ctxptr, code.elemIdx, idx) key := mapiterkey(iter) store(ctxptr, code.next.idx, uintptr(key)) @@ -507,15 +507,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opMapValue: - if e.unorderedMap { + if (opt & EncodeOptionUnorderedMap) != 0 { b = append(b, ':', ' ') } else { ptr := load(ctxptr, code.end.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) mapCtx.pos = append(mapCtx.pos, len(b)) } ptr := load(ctxptr, code.mapIter) - iter := e.ptrToUnsafePtr(ptr) + iter := ptrToUnsafePtr(ptr) value := mapitervalue(iter) store(ctxptr, code.next.idx, uintptr(value)) mapiternext(iter) @@ -524,7 +524,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode // this operation only used by sorted map length := int(load(ctxptr, code.length)) ptr := load(ctxptr, code.mapPos) - mapCtx := (*encodeMapContext)(e.ptrToUnsafePtr(ptr)) + mapCtx := (*encodeMapContext)(ptrToUnsafePtr(ptr)) pos := mapCtx.pos for i := 0; i < length; i++ { startKey := pos[i*2] @@ -543,8 +543,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode sort.Sort(mapCtx.slice) buf := mapCtx.buf for _, item := range mapCtx.slice.items { - buf = append(buf, e.prefix...) - buf = append(buf, bytes.Repeat(e.indentStr, e.baseIndent+code.indent+1)...) + buf = append(buf, ctx.prefix...) + buf = append(buf, bytes.Repeat(ctx.indentStr, ctx.baseIndent+code.indent+1)...) buf = append(buf, item.key...) buf[len(buf)-2] = ':' buf[len(buf)-1] = ' ' @@ -552,8 +552,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } buf = buf[:len(buf)-2] buf = append(buf, '\n') - buf = append(buf, e.prefix...) - buf = append(buf, bytes.Repeat(e.indentStr, e.baseIndent+code.indent)...) + buf = append(buf, ctx.prefix...) + buf = append(buf, bytes.Repeat(ctx.indentStr, ctx.baseIndent+code.indent)...) buf = append(buf, '}', ',', '\n') b = b[:pos[0]] @@ -568,25 +568,25 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else if code.next == code.end { // not exists fields - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '}', ',', '\n') code = code.end.next store(ctxptr, code.idx, ptr) } else { b = append(b, '{', '\n') if !code.anonymousKey { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') } @@ -597,24 +597,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmpty: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') p := ptr + code.offset if p == 0 || *(*uintptr)(*(*unsafe.Pointer)(unsafe.Pointer(&p))) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') code = code.next @@ -625,7 +625,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode ptr := load(ctxptr, code.idx) b = append(b, '{', '\n') if !code.anonymousKey { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') } @@ -636,7 +636,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode ptr := load(ctxptr, code.idx) b = append(b, '{', '\n') if !code.anonymousKey && ptr != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') p := ptr + code.offset @@ -646,7 +646,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.nextField } case opStructFieldPtrHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt: ptr := load(ctxptr, code.idx) @@ -656,17 +656,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt: @@ -677,11 +677,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -692,7 +692,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt: @@ -703,10 +703,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -714,18 +714,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadIntOnly, opStructFieldHeadIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntOnly, opStructFieldHeadOmitEmptyIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt(p)) + v := int64(ptrToInt(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -735,15 +735,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagIntOnly, opStructFieldHeadStringTagIntOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadIntPtr: p := load(ctxptr, code.idx) @@ -754,20 +754,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -777,18 +777,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -799,15 +799,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } } @@ -821,18 +821,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -844,16 +844,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -865,19 +865,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -888,51 +888,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -941,18 +941,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagInt: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -962,10 +962,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -974,11 +974,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -991,17 +991,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadIntPtr: p := load(ctxptr, code.idx) @@ -1009,19 +1009,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtr: p := load(ctxptr, code.idx) @@ -1029,19 +1029,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagIntPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagIntPtr: p := load(ctxptr, code.idx) @@ -1049,15 +1049,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1068,17 +1068,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadIntPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1088,17 +1088,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyIntPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1108,24 +1108,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagIntPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p+code.offset))) + b = appendInt(b, int64(ptrToInt(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8: ptr := load(ctxptr, code.idx) @@ -1135,17 +1135,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr))) + b = appendInt(b, int64(ptrToInt8(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt8: @@ -1156,11 +1156,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1171,7 +1171,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt8: @@ -1182,10 +1182,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1193,18 +1193,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadInt8Only, opStructFieldHeadInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Only, opStructFieldHeadOmitEmptyInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt8(p)) + v := int64(ptrToInt8(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -1214,15 +1214,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt8Only, opStructFieldHeadStringTagInt8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1233,20 +1233,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1256,18 +1256,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1278,15 +1278,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } } @@ -1300,18 +1300,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1323,16 +1323,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -1344,19 +1344,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1367,51 +1367,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1420,18 +1420,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagInt8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1441,10 +1441,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1453,11 +1453,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1470,17 +1470,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt8Ptr: p := load(ctxptr, code.idx) @@ -1488,19 +1488,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8Ptr: p := load(ctxptr, code.idx) @@ -1508,19 +1508,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt8Ptr: p := load(ctxptr, code.idx) @@ -1528,15 +1528,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1547,17 +1547,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1567,17 +1567,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt8PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1587,24 +1587,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p+code.offset))) + b = appendInt(b, int64(ptrToInt8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16: ptr := load(ctxptr, code.idx) @@ -1614,17 +1614,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr))) + b = appendInt(b, int64(ptrToInt16(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt16: @@ -1635,11 +1635,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1650,7 +1650,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt16: @@ -1661,10 +1661,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1672,18 +1672,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadInt16Only, opStructFieldHeadInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Only, opStructFieldHeadOmitEmptyInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt16(p)) + v := int64(ptrToInt16(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -1693,15 +1693,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt16Only, opStructFieldHeadStringTagInt16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1712,20 +1712,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1735,18 +1735,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -1757,15 +1757,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } } @@ -1779,18 +1779,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -1802,16 +1802,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -1823,19 +1823,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -1846,51 +1846,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1899,18 +1899,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagInt16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -1920,10 +1920,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -1932,11 +1932,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -1949,17 +1949,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt16Ptr: p := load(ctxptr, code.idx) @@ -1967,19 +1967,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16Ptr: p := load(ctxptr, code.idx) @@ -1987,19 +1987,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt16Ptr: p := load(ctxptr, code.idx) @@ -2007,15 +2007,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2026,17 +2026,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2046,17 +2046,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt16PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2066,24 +2066,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p+code.offset))) + b = appendInt(b, int64(ptrToInt16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32: ptr := load(ctxptr, code.idx) @@ -2093,17 +2093,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr))) + b = appendInt(b, int64(ptrToInt32(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt32: @@ -2114,11 +2114,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2129,7 +2129,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt32: @@ -2140,10 +2140,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2151,18 +2151,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadInt32Only, opStructFieldHeadInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Only, opStructFieldHeadOmitEmptyInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := int64(e.ptrToInt32(p)) + v := int64(ptrToInt32(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -2172,15 +2172,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt32Only, opStructFieldHeadStringTagInt32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2191,20 +2191,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2214,18 +2214,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2236,15 +2236,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } } @@ -2258,18 +2258,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2281,16 +2281,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -2302,19 +2302,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2325,51 +2325,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2378,18 +2378,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagInt32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2399,10 +2399,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2411,11 +2411,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -2428,17 +2428,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt32Ptr: p := load(ctxptr, code.idx) @@ -2446,19 +2446,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32Ptr: p := load(ctxptr, code.idx) @@ -2466,19 +2466,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt32Ptr: p := load(ctxptr, code.idx) @@ -2486,15 +2486,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -2505,17 +2505,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -2525,17 +2525,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -2545,24 +2545,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p+code.offset))) + b = appendInt(b, int64(ptrToInt32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64: ptr := load(ctxptr, code.idx) @@ -2572,17 +2572,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr)) + b = appendInt(b, ptrToInt64(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyInt64: @@ -2593,11 +2593,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -2608,7 +2608,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagInt64: @@ -2619,10 +2619,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2630,18 +2630,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadInt64Only, opStructFieldHeadInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Only, opStructFieldHeadOmitEmptyInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToInt64(p) + v := ptrToInt64(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -2651,15 +2651,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagInt64Only, opStructFieldHeadStringTagInt64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2670,20 +2670,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2693,18 +2693,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2715,15 +2715,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } } @@ -2737,18 +2737,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -2760,16 +2760,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -2781,19 +2781,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -2804,51 +2804,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -2857,18 +2857,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagInt64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -2878,10 +2878,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -2890,11 +2890,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -2907,17 +2907,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadInt64Ptr: p := load(ctxptr, code.idx) @@ -2925,19 +2925,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64Ptr: p := load(ctxptr, code.idx) @@ -2945,19 +2945,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagInt64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagInt64Ptr: p := load(ctxptr, code.idx) @@ -2965,15 +2965,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -2984,17 +2984,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadInt64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -3004,17 +3004,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyInt64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -3024,24 +3024,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagInt64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p+code.offset)) + b = appendInt(b, ptrToInt64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint: ptr := load(ctxptr, code.idx) @@ -3051,17 +3051,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint: @@ -3072,11 +3072,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3087,7 +3087,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint: @@ -3098,10 +3098,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3109,18 +3109,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadUintOnly, opStructFieldHeadUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintOnly, opStructFieldHeadOmitEmptyUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint(p)) + v := uint64(ptrToUint(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -3130,15 +3130,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUintOnly, opStructFieldHeadStringTagUintOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUintPtr: p := load(ctxptr, code.idx) @@ -3149,20 +3149,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3172,18 +3172,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3194,15 +3194,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } } @@ -3216,18 +3216,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3239,16 +3239,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -3260,19 +3260,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3283,51 +3283,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3336,18 +3336,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagUint: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3357,10 +3357,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3369,11 +3369,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3386,17 +3386,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUintPtr: p := load(ctxptr, code.idx) @@ -3404,19 +3404,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtr: p := load(ctxptr, code.idx) @@ -3424,19 +3424,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUintPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUintPtr: p := load(ctxptr, code.idx) @@ -3444,15 +3444,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3463,17 +3463,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUintPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3483,17 +3483,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUintPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3503,24 +3503,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUintPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p+code.offset))) + b = appendUint(b, uint64(ptrToUint(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8: ptr := load(ctxptr, code.idx) @@ -3530,17 +3530,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr))) + b = appendUint(b, uint64(ptrToUint8(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint8: @@ -3551,11 +3551,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3566,7 +3566,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint8: @@ -3577,10 +3577,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3588,18 +3588,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadUint8Only, opStructFieldHeadUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Only, opStructFieldHeadOmitEmptyUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint8(p)) + v := uint64(ptrToUint8(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -3609,15 +3609,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint8Only, opStructFieldHeadStringTagUint8Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3628,20 +3628,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3651,18 +3651,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3673,15 +3673,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } } @@ -3695,18 +3695,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3718,16 +3718,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -3739,19 +3739,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3762,51 +3762,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3815,18 +3815,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagUint8: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -3836,10 +3836,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3848,11 +3848,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -3865,17 +3865,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint8Ptr: p := load(ctxptr, code.idx) @@ -3883,19 +3883,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8Ptr: p := load(ctxptr, code.idx) @@ -3903,19 +3903,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint8Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint8Ptr: p := load(ctxptr, code.idx) @@ -3923,15 +3923,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -3942,17 +3942,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -3962,17 +3962,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint8PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -3982,24 +3982,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint8PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p+code.offset))) + b = appendUint(b, uint64(ptrToUint8(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16: ptr := load(ctxptr, code.idx) @@ -4009,17 +4009,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr))) + b = appendUint(b, uint64(ptrToUint16(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint16: @@ -4030,11 +4030,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4045,7 +4045,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint16: @@ -4056,10 +4056,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4067,18 +4067,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadUint16Only, opStructFieldHeadUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Only, opStructFieldHeadOmitEmptyUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint16(p)) + v := uint64(ptrToUint16(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -4088,15 +4088,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint16Only, opStructFieldHeadStringTagUint16Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4107,20 +4107,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4130,18 +4130,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4152,15 +4152,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } } @@ -4174,18 +4174,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4197,16 +4197,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -4218,19 +4218,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4241,51 +4241,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4294,18 +4294,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagUint16: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4315,10 +4315,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4327,11 +4327,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4344,17 +4344,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint16Ptr: p := load(ctxptr, code.idx) @@ -4362,19 +4362,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16Ptr: p := load(ctxptr, code.idx) @@ -4382,19 +4382,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint16Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint16Ptr: p := load(ctxptr, code.idx) @@ -4402,15 +4402,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4421,17 +4421,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4441,17 +4441,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint16PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4461,24 +4461,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint16PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p+code.offset))) + b = appendUint(b, uint64(ptrToUint16(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32: ptr := load(ctxptr, code.idx) @@ -4488,17 +4488,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr))) + b = appendUint(b, uint64(ptrToUint32(ptr))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint32: @@ -4509,11 +4509,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4524,7 +4524,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint32: @@ -4535,10 +4535,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4546,18 +4546,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadUint32Only, opStructFieldHeadUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Only, opStructFieldHeadOmitEmptyUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := uint64(e.ptrToUint32(p)) + v := uint64(ptrToUint32(p)) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -4567,15 +4567,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint32Only, opStructFieldHeadStringTagUint32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4586,20 +4586,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4609,18 +4609,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4631,15 +4631,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } } @@ -4653,18 +4653,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4676,16 +4676,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeIndentComma(b) } code = code.next @@ -4697,19 +4697,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4720,51 +4720,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4773,18 +4773,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagUint32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -4794,10 +4794,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4806,11 +4806,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -4823,17 +4823,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint32Ptr: p := load(ctxptr, code.idx) @@ -4841,19 +4841,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32Ptr: p := load(ctxptr, code.idx) @@ -4861,19 +4861,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint32Ptr: p := load(ctxptr, code.idx) @@ -4881,15 +4881,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) @@ -4900,17 +4900,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) } b = encodeIndentComma(b) code = code.next @@ -4920,17 +4920,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = encodeIndentComma(b) code = code.next } @@ -4940,24 +4940,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p+code.offset))) + b = appendUint(b, uint64(ptrToUint32(p+code.offset))) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64: ptr := load(ctxptr, code.idx) @@ -4967,17 +4967,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr)) + b = appendUint(b, ptrToUint64(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyUint64: @@ -4988,11 +4988,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -5003,7 +5003,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagUint64: @@ -5014,10 +5014,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5025,18 +5025,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadUint64Only, opStructFieldHeadUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Only, opStructFieldHeadOmitEmptyUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToUint64(p) + v := ptrToUint64(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -5046,15 +5046,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagUint64Only, opStructFieldHeadStringTagUint64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -5065,20 +5065,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -5088,18 +5088,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -5110,15 +5110,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } } @@ -5132,18 +5132,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -5155,16 +5155,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -5176,19 +5176,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5199,51 +5199,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -5252,18 +5252,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagUint64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5273,10 +5273,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5285,11 +5285,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -5302,17 +5302,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadUint64Ptr: p := load(ctxptr, code.idx) @@ -5320,19 +5320,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64Ptr: p := load(ctxptr, code.idx) @@ -5340,19 +5340,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagUint64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagUint64Ptr: p := load(ctxptr, code.idx) @@ -5360,15 +5360,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5379,17 +5379,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadUint64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -5399,17 +5399,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyUint64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5419,24 +5419,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagUint64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p+code.offset)) + b = appendUint(b, ptrToUint64(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32: ptr := load(ctxptr, code.idx) @@ -5446,17 +5446,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat32: @@ -5467,11 +5467,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5482,7 +5482,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat32: @@ -5493,10 +5493,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5504,18 +5504,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadFloat32Only, opStructFieldHeadFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Only, opStructFieldHeadOmitEmptyFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToFloat32(p) + v := ptrToFloat32(p) if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5525,15 +5525,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagFloat32Only, opStructFieldHeadStringTagFloat32Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5544,20 +5544,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5567,18 +5567,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5589,15 +5589,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } } @@ -5611,18 +5611,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next @@ -5634,16 +5634,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -5655,19 +5655,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5678,51 +5678,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5731,18 +5731,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagFloat32: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -5752,10 +5752,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(ptr)) + b = encodeFloat32(b, ptrToFloat32(ptr)) b = encodeIndentComma(b) code = code.next } @@ -5764,11 +5764,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -5781,17 +5781,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat32Ptr: p := load(ctxptr, code.idx) @@ -5799,19 +5799,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32Ptr: p := load(ctxptr, code.idx) @@ -5819,19 +5819,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat32Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat32Ptr: p := load(ctxptr, code.idx) @@ -5839,15 +5839,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) @@ -5858,17 +5858,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } b = encodeIndentComma(b) code = code.next @@ -5878,17 +5878,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat32PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -5898,24 +5898,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat32PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p+code.offset)) + b = encodeFloat32(b, ptrToFloat32(p+code.offset)) b = append(b, '"') } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64: ptr := load(ctxptr, code.idx) @@ -5924,12 +5924,12 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.end.next } else { - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -5939,7 +5939,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyFloat64: @@ -5950,14 +5950,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -5968,7 +5968,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagFloat64: @@ -5979,10 +5979,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -5994,10 +5994,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadFloat64Only, opStructFieldHeadFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6007,12 +6007,12 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadOmitEmptyFloat64Only, opStructFieldHeadOmitEmptyFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -6022,10 +6022,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagFloat64Only, opStructFieldHeadStringTagFloat64Only: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6034,7 +6034,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -6045,14 +6045,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6062,7 +6062,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -6072,12 +6072,12 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6087,7 +6087,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next } case opStructFieldPtrHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -6098,15 +6098,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6124,18 +6124,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6151,16 +6151,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6176,19 +6176,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6203,19 +6203,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6225,17 +6225,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6244,21 +6244,21 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -6267,18 +6267,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagFloat64: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6292,10 +6292,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6308,14 +6308,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6329,11 +6329,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = append(b, '"') - v := e.ptrToFloat64(ptr) + v := ptrToFloat64(ptr) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6343,7 +6343,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next } case opStructFieldPtrAnonymousHeadFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadFloat64Ptr: p := load(ctxptr, code.idx) @@ -6351,14 +6351,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6367,7 +6367,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64Ptr: p := load(ctxptr, code.idx) @@ -6375,14 +6375,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6391,7 +6391,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next } case opStructFieldPtrAnonymousHeadStringTagFloat64Ptr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagFloat64Ptr: p := load(ctxptr, code.idx) @@ -6399,15 +6399,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6422,17 +6422,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadFloat64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6446,17 +6446,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyFloat64PtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6470,18 +6470,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagFloat64PtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -6491,7 +6491,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadString: ptr := load(ctxptr, code.idx) @@ -6501,17 +6501,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(ptr)) + b = encodeNoEscapedString(b, ptrToString(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyString: @@ -6522,11 +6522,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) @@ -6537,7 +6537,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagString: @@ -6548,10 +6548,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, v))) b = encodeIndentComma(b) code = code.next @@ -6559,18 +6559,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringOnly, opStructFieldHeadStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringOnly, opStructFieldHeadOmitEmptyStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - v := e.ptrToString(p) + v := ptrToString(p) if v != "" { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) @@ -6580,14 +6580,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagStringOnly, opStructFieldHeadStringTagStringOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringPtr: p := load(ctxptr, code.idx) @@ -6598,20 +6598,20 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6621,18 +6621,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next } else { b = append(b, '{', '\n') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) } code = code.next } case opStructFieldPtrHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6643,14 +6643,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode break } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } } b = encodeIndentComma(b) @@ -6663,18 +6663,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -6686,16 +6686,16 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') if p != 0 { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) b = encodeIndentComma(b) } code = code.next @@ -6707,18 +6707,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next @@ -6728,51 +6728,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') for i := 0; i < code.ptrNum; i++ { if p == 0 { break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) } if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadOmitEmptyString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) @@ -6781,17 +6781,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } } case opStructFieldPtrAnonymousHeadStringTagString: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagString: ptr := load(ctxptr, code.idx) if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(ptr+code.offset)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(ptr+code.offset)))) b = encodeIndentComma(b) code = code.next } @@ -6800,10 +6800,10 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -6812,11 +6812,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v == "" { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) @@ -6829,15 +6829,15 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if ptr == 0 { code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(ptr+code.offset)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(ptr+code.offset)))) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringPtr: p := load(ctxptr, code.idx) @@ -6845,19 +6845,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrAnonymousHeadOmitEmptyStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtr: p := load(ctxptr, code.idx) @@ -6865,19 +6865,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrAnonymousHeadStringTagStringPtr: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldAnonymousHeadStringTagStringPtr: p := load(ctxptr, code.idx) @@ -6885,14 +6885,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - p = e.ptrToPtr(p) + p = ptrToPtr(p) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next @@ -6902,17 +6902,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) } b = encodeIndentComma(b) code = code.next @@ -6922,17 +6922,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadOmitEmptyStringPtrOnly: p := load(ctxptr, code.idx) if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p+code.offset)) + b = encodeNoEscapedString(b, ptrToString(p+code.offset)) b = encodeIndentComma(b) code = code.next } @@ -6942,81 +6942,81 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.end.next break } - store(ctxptr, code.idx, e.ptrToPtr(p)) + store(ctxptr, code.idx, ptrToPtr(p)) fallthrough case opStructFieldAnonymousHeadStringTagStringPtrOnly: p := load(ctxptr, code.idx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p+code.offset)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p+code.offset)))) } b = encodeIndentComma(b) code = code.next case opStructFieldPtrHeadBool: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeBool(b, e.ptrToBool(ptr)) + b = encodeBool(b, ptrToBool(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadBytes: - store(ctxptr, code.idx, e.ptrToPtr(load(ctxptr, code.idx))) + store(ctxptr, code.idx, ptrToPtr(load(ctxptr, code.idx))) fallthrough case opStructFieldHeadBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr)) + b = encodeByteSlice(b, ptrToBytes(ptr)) b = encodeIndentComma(b) code = code.next } case opStructFieldPtrHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if !v { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeBool(b, v) @@ -7027,24 +7027,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadOmitEmptyBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '{', '\n') - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') b = encodeByteSlice(b, v) @@ -7055,7 +7055,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTag: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTag: @@ -7067,7 +7067,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode } else { b = append(b, '{', '\n') p := ptr + code.offset - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') code = code.next @@ -7076,22 +7076,22 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBool: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next @@ -7099,27 +7099,27 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldPtrHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr != 0 { - store(ctxptr, code.idx, e.ptrToPtr(ptr)) + store(ctxptr, code.idx, ptrToPtr(ptr)) } fallthrough case opStructFieldHeadStringTagBytes: ptr := load(ctxptr, code.idx) if ptr == 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = encodeNull(b) b = encodeIndentComma(b) code = code.end.next } else { b = append(b, '{', '\n') - b = e.encodeIndent(b, code.indent+1) + b = encodeIndent(ctx, b, code.indent+1) b = append(b, code.key...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next } case opStructField: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7132,7 +7132,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if p == 0 || **(**uintptr)(unsafe.Pointer(&p)) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next @@ -7141,24 +7141,24 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldStringTag: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next store(ctxptr, code.idx, p) case opStructFieldInt: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7167,26 +7167,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagInt: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7195,26 +7195,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagInt8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7223,26 +7223,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagInt16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) @@ -7251,26 +7251,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagInt32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldInt64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) @@ -7279,26 +7279,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagInt64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7307,26 +7307,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagUint: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7335,26 +7335,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagUint8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7363,26 +7363,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagUint16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) @@ -7391,26 +7391,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagUint32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldUint64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) @@ -7419,26 +7419,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagUint64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldFloat32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) @@ -7447,19 +7447,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagFloat32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldFloat64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } @@ -7468,12 +7468,12 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat64(b, v) @@ -7482,11 +7482,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') b = encodeFloat64(b, v) @@ -7494,18 +7494,18 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldString: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) @@ -7514,63 +7514,63 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagString: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, s))) b = encodeIndentComma(b) code = code.next case opStructFieldStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) b = encodeIndentComma(b) } code = code.next case opStructFieldStringTagStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } b = encodeIndentComma(b) code = code.next case opStructFieldBool: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeBool(b, v) @@ -7579,26 +7579,26 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagBool: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') b = encodeIndentComma(b) code = code.next case opStructFieldBytes: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeByteSlice(b, v) @@ -7607,19 +7607,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagBytes: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) b = encodeIndentComma(b) code = code.next case opStructFieldMarshalJSON: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7632,8 +7632,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -7642,11 +7642,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -7659,8 +7659,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } @@ -7669,11 +7669,11 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructFieldStringTagMarshalText: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) @@ -7682,12 +7682,12 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeIndentComma(b) code = code.next case opStructFieldArray: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { b = encodeNull(b) b = encodeIndentComma(b) @@ -7698,22 +7698,22 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldOmitEmptyArray: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - array := e.ptrToSlice(p) + array := ptrToSlice(p) if p == 0 || uintptr(array.data) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next } case opStructFieldSlice: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { b = encodeNull(b) b = encodeIndentComma(b) @@ -7724,17 +7724,17 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldOmitEmptySlice: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - slice := e.ptrToSlice(p) + slice := ptrToSlice(p) if p == 0 || uintptr(slice.data) == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next } case opStructFieldMap: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7743,8 +7743,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) code = code.nextField } else { - p = e.ptrToPtr(p) - mlen := maplen(e.ptrToUnsafePtr(p)) + p = ptrToPtr(p) + mlen := maplen(ptrToUnsafePtr(p)) if mlen == 0 { b = append(b, '{', '}', ',', '\n') mapCode := code.next @@ -7763,14 +7763,14 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if mlen == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next } } case opStructFieldMapLoad: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) @@ -7779,8 +7779,8 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = encodeNull(b) code = code.nextField } else { - p = e.ptrToPtr(p) - mlen := maplen(e.ptrToUnsafePtr(p)) + p = ptrToPtr(p) + mlen := maplen(ptrToUnsafePtr(p)) if mlen == 0 { b = append(b, '{', '}', ',', '\n') code = code.nextField @@ -7798,7 +7798,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if mlen == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') code = code.next @@ -7807,7 +7807,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode case opStructFieldStruct: ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if p == 0 { @@ -7830,7 +7830,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if p == 0 { code = code.nextField } else { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') headCode := code.next @@ -7858,27 +7858,27 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') b = encodeIndentComma(b) code = code.next case opStructEndInt: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt(ptr + code.offset) + v := ptrToInt(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7889,7 +7889,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -7897,35 +7897,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagInt: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndIntPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyIntPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7936,44 +7936,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagIntPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt(p))) + b = appendInt(b, int64(ptrToInt(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt8(ptr + code.offset) + v := ptrToInt8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -7984,7 +7984,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -7992,35 +7992,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagInt8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt8(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt8(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt8(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt8(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8031,44 +8031,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt8(p))) + b = appendInt(b, int64(ptrToInt8(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt16(ptr + code.offset) + v := ptrToInt16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8079,7 +8079,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8087,35 +8087,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagInt16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt16(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt16(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt16(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt16(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8126,44 +8126,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt16(p))) + b = appendInt(b, int64(ptrToInt16(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt32(ptr + code.offset) + v := ptrToInt32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, int64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8174,7 +8174,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8182,35 +8182,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagInt32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, int64(e.ptrToInt32(ptr+code.offset))) + b = appendInt(b, int64(ptrToInt32(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, int64(e.ptrToInt32(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, int64(ptrToInt32(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8221,44 +8221,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, int64(e.ptrToInt32(p))) + b = appendInt(b, int64(ptrToInt32(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, ptrToInt64(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToInt64(ptr + code.offset) + v := ptrToInt64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendInt(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8269,7 +8269,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8277,35 +8277,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagInt64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendInt(b, e.ptrToInt64(ptr+code.offset)) + b = appendInt(b, ptrToInt64(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndInt64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyInt64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendInt(b, e.ptrToInt64(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendInt(b, ptrToInt64(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8316,44 +8316,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagInt64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendInt(b, e.ptrToInt64(p)) + b = appendInt(b, ptrToInt64(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint(ptr + code.offset) + v := ptrToUint(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8364,7 +8364,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8372,35 +8372,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagUint: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUintPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUintPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8411,44 +8411,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUintPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint(p))) + b = appendUint(b, uint64(ptrToUint(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint8: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint8: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint8(ptr + code.offset) + v := ptrToUint8(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8459,7 +8459,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8467,35 +8467,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagUint8: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint8(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint8(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint8Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint8(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint8(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8506,44 +8506,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint8Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint8(p))) + b = appendUint(b, uint64(ptrToUint8(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint16: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint16: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint16(ptr + code.offset) + v := ptrToUint16(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8554,7 +8554,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8562,35 +8562,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagUint16: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint16(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint16(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint16Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint16(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint16(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8601,44 +8601,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint16Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint16(p))) + b = appendUint(b, uint64(ptrToUint16(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint32(ptr + code.offset) + v := ptrToUint32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, uint64(v)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8649,7 +8649,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8657,35 +8657,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagUint32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, uint64(e.ptrToUint32(ptr+code.offset))) + b = appendUint(b, uint64(ptrToUint32(ptr+code.offset))) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, uint64(e.ptrToUint32(p))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, uint64(ptrToUint32(p))) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8696,44 +8696,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, uint64(e.ptrToUint32(p))) + b = appendUint(b, uint64(ptrToUint32(p))) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, ptrToUint64(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToUint64(ptr + code.offset) + v := ptrToUint64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = appendUint(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8744,7 +8744,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8752,35 +8752,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagUint64: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = appendUint(b, e.ptrToUint64(ptr+code.offset)) + b = appendUint(b, ptrToUint64(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndUint64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyUint64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = appendUint(b, e.ptrToUint64(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendUint(b, ptrToUint64(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8791,44 +8791,44 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagUint64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = appendUint(b, e.ptrToUint64(p)) + b = appendUint(b, ptrToUint64(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat32: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat32: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat32(ptr + code.offset) + v := ptrToFloat32(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeFloat32(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8839,7 +8839,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8847,35 +8847,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagFloat32: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeFloat32(b, e.ptrToFloat32(ptr+code.offset)) + b = encodeFloat32(b, ptrToFloat32(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat32Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeFloat32(b, e.ptrToFloat32(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeFloat32(b, ptrToFloat32(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8886,51 +8886,51 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagFloat32Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - b = encodeFloat32(b, e.ptrToFloat32(p)) + b = encodeFloat32(b, ptrToFloat32(p)) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat64: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if v != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -8941,7 +8941,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -8949,47 +8949,47 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagFloat64: ptr := load(ctxptr, code.headIdx) - v := e.ptrToFloat64(ptr + code.offset) + v := ptrToFloat64(ptr + code.offset) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') b = encodeFloat64(b, v) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndFloat64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyFloat64Ptr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9000,48 +9000,48 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagFloat64Ptr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { b = append(b, '"') - v := e.ptrToFloat64(p) + v := ptrToFloat64(p) if math.IsInf(v, 0) || math.IsNaN(v) { return nil, errUnsupportedFloat(v) } b = encodeFloat64(b, v) b = append(b, '"') } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndString: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeNoEscapedString(b, e.ptrToString(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeNoEscapedString(b, ptrToString(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyString: ptr := load(ctxptr, code.headIdx) - v := e.ptrToString(ptr + code.offset) + v := ptrToString(ptr + code.offset) if v != "" { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeNoEscapedString(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9052,7 +9052,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9060,35 +9060,35 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagString: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - s := e.ptrToString(ptr + code.offset) + s := ptrToString(ptr + code.offset) b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, s))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, e.ptrToString(p)) + b = encodeNoEscapedString(b, ptrToString(p)) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyStringPtr: ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p != 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeNoEscapedString(b, e.ptrToString(p)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeNoEscapedString(b, ptrToString(p)) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9099,42 +9099,42 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) } code = code.next case opStructEndStringTagStringPtr: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - p := e.ptrToPtr(ptr + code.offset) + p := ptrToPtr(ptr + code.offset) if p == 0 { b = encodeNull(b) } else { - b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, e.ptrToString(p)))) + b = encodeNoEscapedString(b, string(encodeNoEscapedString([]byte{}, ptrToString(p)))) } - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndBool: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeBool(b, ptrToBool(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyBool: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBool(ptr + code.offset) + v := ptrToBool(ptr + code.offset) if v { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeBool(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9145,7 +9145,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9153,30 +9153,30 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagBool: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ', '"') - b = encodeBool(b, e.ptrToBool(ptr+code.offset)) + b = encodeBool(b, ptrToBool(ptr+code.offset)) b = append(b, '"') - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndBytes: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndOmitEmptyBytes: ptr := load(ctxptr, code.headIdx) - v := e.ptrToBytes(ptr + code.offset) + v := ptrToBytes(ptr + code.offset) if len(v) > 0 { - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') b = encodeByteSlice(b, v) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) } else { last := len(b) - 1 if b[last-1] == '{' { @@ -9187,7 +9187,7 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode b = b[:len(b)-2] } b = append(b, '\n') - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, '}') } b = encodeIndentComma(b) @@ -9195,19 +9195,19 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode code = code.next case opStructEndStringTagBytes: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') - b = encodeByteSlice(b, e.ptrToBytes(ptr+code.offset)) - b = e.appendStructEndIndent(b, code.indent-1) + b = encodeByteSlice(b, ptrToBytes(ptr+code.offset)) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndMarshalJSON: - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') ptr := load(ctxptr, code.headIdx) p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9220,21 +9220,21 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } b = append(b, indentBuf.Bytes()...) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringTagMarshalJSON: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bb, err := v.(Marshaler).MarshalJSON() if err != nil { return nil, errMarshaler(code, err) @@ -9247,27 +9247,27 @@ func (e *Encoder) runIndent(ctx *encodeRuntimeContext, b []byte, codeSet *opcode if err := encodeWithIndent( &indentBuf, compactBuf.Bytes(), - string(e.prefix)+strings.Repeat(string(e.indentStr), e.baseIndent+code.indent), - string(e.indentStr), + string(ctx.prefix)+strings.Repeat(string(ctx.indentStr), ctx.baseIndent+code.indent), + string(ctx.indentStr), ); err != nil { return nil, err } b = encodeNoEscapedString(b, indentBuf.String()) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opStructEndStringTagMarshalText: ptr := load(ctxptr, code.headIdx) - b = e.encodeIndent(b, code.indent) + b = encodeIndent(ctx, b, code.indent) b = append(b, code.key...) b = append(b, ' ') p := ptr + code.offset - v := e.ptrToInterface(code, p) + v := ptrToInterface(code, p) bytes, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { return nil, errMarshaler(code, err) } b = encodeNoEscapedString(b, *(*string)(unsafe.Pointer(&bytes))) - b = e.appendStructEndIndent(b, code.indent-1) + b = appendStructEndIndent(ctx, b, code.indent-1) code = code.next case opEnd: goto END diff --git a/json.go b/json.go index f3a3f3a..662739b 100644 --- a/json.go +++ b/json.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "strconv" - "unsafe" ) // Marshaler is the interface implemented by types that @@ -160,34 +159,16 @@ func Marshal(v interface{}) ([]byte, error) { // MarshalNoEscape func MarshalNoEscape(v interface{}) ([]byte, error) { - enc := newEncoder() - header := (*interfaceHeader)(unsafe.Pointer(&v)) - bytes, err := enc.encodeForMarshal(header, v == nil) - if err != nil { - enc.release() - return nil, err - } - enc.release() - return bytes, nil + return marshal(v, EncodeOptionHTMLEscape) } // MarshalWithOption returns the JSON encoding of v with EncodeOption. -func MarshalWithOption(v interface{}, opts ...EncodeOption) ([]byte, error) { - enc := newEncoder() - for _, opt := range opts { - if err := opt(enc); err != nil { - return nil, err - } +func MarshalWithOption(v interface{}, optFuncs ...EncodeOptionFunc) ([]byte, error) { + opt := EncodeOptionHTMLEscape + for _, optFunc := range optFuncs { + opt = optFunc(opt) } - header := (*interfaceHeader)(unsafe.Pointer(&v)) - enc.ptr = header.ptr - bytes, err := enc.encodeForMarshal(header, v == nil) - if err != nil { - enc.release() - return nil, err - } - enc.release() - return bytes, nil + return marshal(v, opt) } // MarshalIndent is like Marshal but applies Indent to format the output. @@ -198,24 +179,12 @@ func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { } // MarshalIndentWithOption is like Marshal but applies Indent to format the output with EncodeOption. -func MarshalIndentWithOption(v interface{}, prefix, indent string, opts ...EncodeOption) ([]byte, error) { - var b *bytes.Buffer - enc := NewEncoder(b) - for _, opt := range opts { - if err := opt(enc); err != nil { - return nil, err - } +func MarshalIndentWithOption(v interface{}, prefix, indent string, optFuncs ...EncodeOptionFunc) ([]byte, error) { + opt := EncodeOptionHTMLEscape | EncodeOptionIndent + for _, optFunc := range optFuncs { + opt = optFunc(opt) } - enc.SetIndent(prefix, indent) - header := (*interfaceHeader)(unsafe.Pointer(&v)) - enc.ptr = header.ptr - bytes, err := enc.encodeForMarshal(header, v == nil) - if err != nil { - enc.release() - return nil, err - } - enc.release() - return bytes, nil + return marshalIndent(v, prefix, indent, opt) } // Unmarshal parses the JSON-encoded data and stores the result @@ -408,12 +377,8 @@ func HTMLEscape(dst *bytes.Buffer, src []byte) { if err := dec.Decode(&v); err != nil { return } - enc := NewEncoder(dst) - enc.SetEscapeHTML(true) - header := (*interfaceHeader)(unsafe.Pointer(&v)) - enc.ptr = header.ptr - enc.buf, _ = enc.encode(header, v == nil) - dst.Write(enc.buf[:len(enc.buf)-1]) // remove last ',' character + buf, _ := marshal(v, EncodeOptionHTMLEscape) + dst.Write(buf) } // Valid reports whether data is a valid JSON encoding. diff --git a/option.go b/option.go index b2414a7..3f3e919 100644 --- a/option.go +++ b/option.go @@ -1,10 +1,9 @@ package json -type EncodeOption func(*Encoder) error +type EncodeOptionFunc func(EncodeOption) EncodeOption -func UnorderedMap() EncodeOption { - return func(e *Encoder) error { - e.unorderedMap = true - return nil +func UnorderedMap() func(EncodeOption) EncodeOption { + return func(opt EncodeOption) EncodeOption { + return opt | EncodeOptionUnorderedMap } }