all: upgrade golangci-lint and formatters (#240)

This commit is contained in:
Michael McLoughlin
2022-03-27 15:31:26 -07:00
committed by GitHub
parent 553930530f
commit 72b8db9c80
24 changed files with 179 additions and 118 deletions

View File

@@ -83,6 +83,7 @@ func TestLivenessBasic(t *testing.T) {
}
func AssertLiveness(t *testing.T, ctx *build.Context, in, out [][]reg.Register) {
t.Helper()
fn := ConstructLiveness(t, ctx)
is := fn.Instructions()
@@ -97,12 +98,14 @@ func AssertLiveness(t *testing.T, ctx *build.Context, in, out [][]reg.Register)
}
func AssertRegistersMatchSet(t *testing.T, rs []reg.Register, s reg.MaskSet) {
t.Helper()
if !s.Equals(reg.NewMaskSetFromRegisters(rs)) {
t.Fatalf("register slice does not match set: %#v and %#v", rs, s)
}
}
func ConstructLiveness(t *testing.T, ctx *build.Context) *ir.Function {
t.Helper()
return BuildFunction(t, ctx, pass.LabelTarget, pass.CFG, pass.Liveness)
}