mirror of https://github.com/goccy/go-json.git
Remove unused variable ( headPos )
This commit is contained in:
parent
aaea586778
commit
e1240f02fb
|
@ -24,7 +24,6 @@ type opcode struct {
|
||||||
elemIdx uintptr // offset to access array/slice/map elem
|
elemIdx uintptr // offset to access array/slice/map elem
|
||||||
length uintptr // offset to access slice/map length or array length
|
length uintptr // offset to access slice/map length or array length
|
||||||
mapIter uintptr // offset to access map iterator
|
mapIter uintptr // offset to access map iterator
|
||||||
headPos uintptr // offset to access head position of map
|
|
||||||
mapPos uintptr // offset to access position list for sorted map
|
mapPos uintptr // offset to access position list for sorted map
|
||||||
offset uintptr // offset size from struct header
|
offset uintptr // offset size from struct header
|
||||||
size uintptr // array/slice elem size
|
size uintptr // array/slice elem size
|
||||||
|
@ -89,7 +88,6 @@ func (c *opcode) copy(codeMap map[uintptr]*opcode) *opcode {
|
||||||
elemIdx: c.elemIdx,
|
elemIdx: c.elemIdx,
|
||||||
length: c.length,
|
length: c.length,
|
||||||
mapIter: c.mapIter,
|
mapIter: c.mapIter,
|
||||||
headPos: c.headPos,
|
|
||||||
mapPos: c.mapPos,
|
mapPos: c.mapPos,
|
||||||
offset: c.offset,
|
offset: c.offset,
|
||||||
size: c.size,
|
size: c.size,
|
||||||
|
@ -200,12 +198,11 @@ func (c *opcode) dumpMapHead(code *opcode) string {
|
||||||
|
|
||||||
func (c *opcode) dumpMapEnd(code *opcode) string {
|
func (c *opcode) dumpMapEnd(code *opcode) string {
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
`[%d]%s%s ([idx:%d][headPos:%d][mapPos:%d][length:%d])`,
|
`[%d]%s%s ([idx:%d][mapPos:%d][length:%d])`,
|
||||||
code.displayIdx,
|
code.displayIdx,
|
||||||
strings.Repeat("-", code.indent),
|
strings.Repeat("-", code.indent),
|
||||||
code.op,
|
code.op,
|
||||||
code.idx/uintptrSize,
|
code.idx/uintptrSize,
|
||||||
code.headPos/uintptrSize,
|
|
||||||
code.mapPos/uintptrSize,
|
code.mapPos/uintptrSize,
|
||||||
code.length/uintptrSize,
|
code.length/uintptrSize,
|
||||||
)
|
)
|
||||||
|
@ -437,8 +434,6 @@ func newMapValueCode(ctx *encodeCompileContext, head *opcode) *opcode {
|
||||||
}
|
}
|
||||||
|
|
||||||
func newMapEndCode(ctx *encodeCompileContext, head *opcode) *opcode {
|
func newMapEndCode(ctx *encodeCompileContext, head *opcode) *opcode {
|
||||||
headPos := opcodeOffset(ctx.ptrIndex)
|
|
||||||
ctx.incPtrIndex()
|
|
||||||
mapPos := opcodeOffset(ctx.ptrIndex)
|
mapPos := opcodeOffset(ctx.ptrIndex)
|
||||||
ctx.incPtrIndex()
|
ctx.incPtrIndex()
|
||||||
idx := opcodeOffset(ctx.ptrIndex)
|
idx := opcodeOffset(ctx.ptrIndex)
|
||||||
|
@ -447,7 +442,6 @@ func newMapEndCode(ctx *encodeCompileContext, head *opcode) *opcode {
|
||||||
displayIdx: ctx.opcodeIndex,
|
displayIdx: ctx.opcodeIndex,
|
||||||
idx: idx,
|
idx: idx,
|
||||||
length: head.length,
|
length: head.length,
|
||||||
headPos: headPos,
|
|
||||||
mapPos: mapPos,
|
mapPos: mapPos,
|
||||||
indent: ctx.indent,
|
indent: ctx.indent,
|
||||||
next: newEndOp(ctx),
|
next: newEndOp(ctx),
|
||||||
|
|
Loading…
Reference in New Issue