compiler: optimize jumps in tests

Jump target shortening affects manifest, so we better be sure.
This commit is contained in:
Evgeniy Stratonikov 2021-04-28 15:52:40 +03:00
parent 2aaaf30db7
commit bfa2bafb04

View file

@ -73,7 +73,9 @@ func _deploy(data interface{}, isUpdate bool) { x := 1; _ = x }
c := newCodegen(info, pkg) c := newCodegen(info, pkg)
require.NoError(t, c.compile(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) d := c.emitDebugInfo(buf)
require.NotNil(t, d) require.NotNil(t, d)