From 58ae5e18624eaaac79cab00e63d6f32c9bd64ee0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 3 May 2020 11:29:12 +0200 Subject: prog: remove StructDesc Remove StructDesc, KeyedStruct, StructKey and all associated logic/complexity in prog and pkg/compiler. We can now handle recursion more generically with the Ref type, and Dir/FieldName are not a part of the type anymore. This makes StructType/UnionType simpler and more natural. Reduces size of sys/linux/gen/amd64.go from 5201321 to 4180861 (-20%). Update #1580 --- pkg/compiler/compiler_test.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'pkg/compiler/compiler_test.go') diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index ae3b3d357..3d4ee3e64 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -122,8 +122,6 @@ func TestData(t *testing.T) { out := new(bytes.Buffer) fmt.Fprintf(out, "\n\nRESOURCES:\n") serializer.Write(out, desc.Resources) - fmt.Fprintf(out, "\n\nSTRUCTS:\n") - serializer.Write(out, desc.StructDescs) fmt.Fprintf(out, "\n\nSYSCALLS:\n") serializer.Write(out, desc.Syscalls) if false { @@ -188,8 +186,6 @@ s2 { if p == nil { t.Fatal("failed to compile") } - got := p.StructDescs[0].Desc - t.Logf("got: %#v", got) } func TestCollectUnusedError(t *testing.T) { -- cgit mrf-deployment