work cover test

This commit is contained in:
Masaaki Goshima 2021-11-25 21:27:29 +09:00
parent a5bf94c75b
commit 7e0bfb4f54
No known key found for this signature in database
GPG Key ID: 6A53785055537153
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,7 @@ func (c *SliceCode) ToOpcode(ctx *compileContext) Opcodes {
header := newSliceHeaderCode(ctx)
ctx.incIndex()
codes := c.value.ToOpcode(ctx.incIndent())
codes.First().Flags |= IndirectFlags
elemCode := newSliceElemCode(ctx.withType(c.typ.Elem()), header, size)
ctx.incIndex()
end := newOpCode(ctx, OpSliceEnd)
@ -262,6 +263,7 @@ func (c *ArrayCode) ToOpcode(ctx *compileContext) Opcodes {
ctx.incIndex()
codes := c.value.ToOpcode(ctx.incIndent())
codes.First().Flags |= IndirectFlags
elemCode := newArrayElemCode(ctx.withType(elem), header, alen, size)
ctx.incIndex()
@ -300,6 +302,7 @@ func (c *MapCode) ToOpcode(ctx *compileContext) Opcodes {
value := newMapValueCode(ctx, header)
ctx.incIndex()
valueCodes := c.value.ToOpcode(ctx.incIndent())
valueCodes.First().Flags |= IndirectFlags
key := newMapKeyCode(ctx, header)
ctx.incIndex()