diff options
author | Matthew Dempsky <mdempsky@google.com> | 2020-12-01 13:07:35 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-02 06:42:17 +0000 |
commit | 77a71e0057357b0567cc5036f7e0f903d82705bb (patch) | |
tree | e8d28d921a4aeab51276f896754e61787654d2bd /src/cmd/compile/internal/types/sizeof_test.go | |
parent | 15085f89746762e0919fa257feac3eb5b996e6db (diff) | |
download | go-77a71e0057357b0567cc5036f7e0f903d82705bb.tar.gz go-77a71e0057357b0567cc5036f7e0f903d82705bb.zip |
[dev.regabi] cmd/compile: add Interface, Signature, and Struct constructors
This CL adds the remaining constructors needed to abstract away
construction of Types, and updates the compiler to use them
throughout. There's now just a couple uses within test cases to
remove.
While at it, I also replace the Func.Outnamed field with a simple
helper function, which reduces the size of function types somewhat.
Passes toolstash/buildall.
Change-Id: If1aa1095c98ae34b00380d0b3531bd63c10ce885
Reviewed-on: https://go-review.googlesource.com/c/go/+/274713
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/types/sizeof_test.go')
-rw-r--r-- | src/cmd/compile/internal/types/sizeof_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types/sizeof_test.go b/src/cmd/compile/internal/types/sizeof_test.go index 88a2fbba2f..72a35bc7da 100644 --- a/src/cmd/compile/internal/types/sizeof_test.go +++ b/src/cmd/compile/internal/types/sizeof_test.go @@ -24,7 +24,7 @@ func TestSizeof(t *testing.T) { {Type{}, 56, 96}, {Map{}, 20, 40}, {Forward{}, 20, 32}, - {Func{}, 28, 48}, + {Func{}, 24, 40}, {Struct{}, 16, 32}, {Interface{}, 8, 16}, {Chan{}, 8, 16}, |