vm: simplify APPEND implementation a bit

This commit is contained in:
Evgenii Stratonikov 2019-09-25 12:18:37 +03:00
parent 13d7770c68
commit c7c4291774

View file

@ -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: