From bfa2bafb04a62b0ceb8f5c47be8ae10098cd08e3 Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Wed, 28 Apr 2021 15:52:40 +0300 Subject: [PATCH] compiler: optimize jumps in tests Jump target shortening affects manifest, so we better be sure. --- pkg/compiler/debug_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/compiler/debug_test.go b/pkg/compiler/debug_test.go index b5dfbd121..fbcef22d3 100644 --- a/pkg/compiler/debug_test.go +++ b/pkg/compiler/debug_test.go @@ -73,7 +73,9 @@ func _deploy(data interface{}, isUpdate bool) { x := 1; _ = x } c := newCodegen(info, pkg) require.NoError(t, c.compile(info, pkg)) - buf := c.prog.Bytes() + buf, err := c.writeJumps(c.prog.Bytes()) + require.NoError(t, err) + d := c.emitDebugInfo(buf) require.NotNil(t, d)