diff --git a/pkg/compiler/codegen.go b/pkg/compiler/codegen.go index 2b3ee9122..33cec05f3 100644 --- a/pkg/compiler/codegen.go +++ b/pkg/compiler/codegen.go @@ -2244,8 +2244,13 @@ func (c *codegen) writeJumps(b []byte) ([]byte, error) { return nil, err } if op != opcode.PUSHA && math.MinInt8 <= offset && offset <= math.MaxInt8 { - copy(b[ctx.IP():], []byte{byte(toShortForm(op)), byte(offset), byte(opcode.NOP), byte(opcode.NOP), byte(opcode.NOP)}) - nopOffsets = append(nopOffsets, ctx.IP()+2, ctx.IP()+3, ctx.IP()+4) + if op == opcode.JMPL && offset == 5 { + copy(b[ctx.IP():], []byte{byte(opcode.NOP), byte(opcode.NOP), byte(opcode.NOP), byte(opcode.NOP), byte(opcode.NOP)}) + nopOffsets = append(nopOffsets, ctx.IP(), ctx.IP()+1, ctx.IP()+2, ctx.IP()+3, ctx.IP()+4) + } else { + copy(b[ctx.IP():], []byte{byte(toShortForm(op)), byte(offset), byte(opcode.NOP), byte(opcode.NOP), byte(opcode.NOP)}) + nopOffsets = append(nopOffsets, ctx.IP()+2, ctx.IP()+3, ctx.IP()+4) + } } case opcode.INITSLOT: nextIP := ctx.NextIP() diff --git a/pkg/compiler/inline_test.go b/pkg/compiler/inline_test.go index d69a3e97c..9de0379aa 100644 --- a/pkg/compiler/inline_test.go +++ b/pkg/compiler/inline_test.go @@ -281,7 +281,6 @@ func TestInlineVariadicInInlinedCall(t *testing.T) { } func TestInlineConversion(t *testing.T) { - t.Skip() src1 := `package foo import "github.com/nspcc-dev/neo-go/pkg/compiler/testdata/inline" var _ = inline.A @@ -307,7 +306,6 @@ func TestInlineConversion(t *testing.T) { } func TestInlineConversionQualified(t *testing.T) { - t.Skip() src1 := `package foo import "github.com/nspcc-dev/neo-go/pkg/compiler/testdata/inline" var A = 1