From 6cac23acc37743ac01c3b63b47365355ed0aeadd Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Tue, 15 Sep 2020 20:48:32 +0900 Subject: [PATCH] Remove unused condition --- encode_vm.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/encode_vm.go b/encode_vm.go index 2bb7349..8578965 100644 --- a/encode_vm.go +++ b/encode_vm.go @@ -665,12 +665,6 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, code *opcode) error { case opStructFieldRecursiveEnd: 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 offset := load(ctxptr, code.idx) code = (*opcode)(unsafe.Pointer(load(ctxptr, code.elemIdx)))