From 58da4c35b15200b7279f18ea15bc8644618aae78 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 1 May 2020 17:19:27 +0200 Subject: prog: introduce Field type Remvoe FieldName from Type and add a separate Field type that holds field name. Use Field for struct fields, union options and syscalls arguments, only these really have names. Reduces size of sys/linux/gen/amd64.go from 5665583 to 5201321 (-8.2%). Allows to not create new type for squashed any pointer. But main advantages will follow, e.g. removing StructDesc, using TypeRef in Arg, etc. Update #1580 --- prog/any_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'prog/any_test.go') diff --git a/prog/any_test.go b/prog/any_test.go index 968d1624a..e481ef1c1 100644 --- a/prog/any_test.go +++ b/prog/any_test.go @@ -61,12 +61,12 @@ func TestSquash(t *testing.T) { if target.ArgContainsAny(ptrArg) { t.Fatalf("arg is already squashed") } - target.squashPtr(ptrArg, true) + target.squashPtr(ptrArg) if !target.ArgContainsAny(ptrArg) { t.Fatalf("arg is not squashed") } p1 := strings.TrimSpace(string(p.Serialize())) - target.squashPtr(ptrArg, true) + target.squashPtr(ptrArg) p2 := strings.TrimSpace(string(p.Serialize())) if p1 != p2 { t.Fatalf("double squash changed program:\n%v\nvs:\n%v", p1, p2) -- cgit mrf-deployment