From c7c42917742c65fd914c53436f88229203a4cc04 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 25 Sep 2019 12:18:37 +0300 Subject: [PATCH] vm: simplify APPEND implementation a bit --- pkg/vm/vm.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 38e8b23b9..a3ad75215 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -670,10 +670,7 @@ func (v *VM) execute(ctx *Context, op Instruction) { itemElem := v.estack.Pop() arrElem := v.estack.Pop() - val := itemElem.value - if t, ok := itemElem.value.(*StructItem); ok { - val = t.Clone() - } + val := cloneIfStruct(itemElem.value) switch t := arrElem.value.(type) { case *ArrayItem: