mirror of https://github.com/goccy/go-json.git
Remove unused condition
This commit is contained in:
parent
e9e9aa8874
commit
6cac23acc3
|
@ -665,12 +665,6 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error {
|
||||||
case opStructFieldRecursiveEnd:
|
case opStructFieldRecursiveEnd:
|
||||||
recursiveLevel--
|
recursiveLevel--
|
||||||
|
|
||||||
// Since the pointer addresses of root code and code.jmp.code may be common,
|
|
||||||
// `opStructFieldRecursive` processing may replace `opEnd` of root code with `opRecursiveEnd`.
|
|
||||||
// At that time, `recursiveLevel` becomes -1, so return here as normal processing.
|
|
||||||
if recursiveLevel < 0 {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
// restore ctxptr
|
// restore ctxptr
|
||||||
offset := load(ctxptr, code.idx)
|
offset := load(ctxptr, code.idx)
|
||||||
code = (*opcode)(unsafe.Pointer(load(ctxptr, code.elemIdx)))
|
code = (*opcode)(unsafe.Pointer(load(ctxptr, code.elemIdx)))
|
||||||
|
|
Loading…
Reference in New Issue