diff options
author | Robert Griesemer <gri@golang.org> | 2018-10-29 13:44:44 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2018-10-31 04:30:10 +0000 |
commit | fde4b9ed14e339b5064373c1d4a73e211ec32ac4 (patch) | |
tree | 747822ff2e86bb9e0ee310687c1961fed4444c2e /src/cmd/compile/internal/types/type.go | |
parent | 84b96c21bf226e80e46d5c22c5e42815bb392af3 (diff) | |
download | go-fde4b9ed14e339b5064373c1d4a73e211ec32ac4.tar.gz go-fde4b9ed14e339b5064373c1d4a73e211ec32ac4.zip |
cmd/compile: better documentation around checkwidth
Change-Id: I5c7ec9676b5573c883c196459acea85aa9ff8130
Reviewed-on: https://go-review.googlesource.com/c/146021
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/types/type.go')
-rw-r--r-- | src/cmd/compile/internal/types/type.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go index e6e6127405..39f4d2aa7b 100644 --- a/src/cmd/compile/internal/types/type.go +++ b/src/cmd/compile/internal/types/type.go @@ -141,7 +141,7 @@ type Type struct { Extra interface{} // Width is the width of this Type in bytes. - Width int64 + Width int64 // valid if Align > 0 methods Fields allMethods Fields @@ -156,16 +156,16 @@ type Type struct { Vargen int32 // unique name for OTYPE/ONAME Etype EType // kind of type - Align uint8 // the required alignment of this type, in bytes + Align uint8 // the required alignment of this type, in bytes (0 means Width and Align have not yet been computed) flags bitset8 } const ( - typeNotInHeap = 1 << iota // type cannot be heap allocated - typeBroke // broken type definition - typeNoalg // suppress hash and eq algorithm generation - typeDeferwidth + typeNotInHeap = 1 << iota // type cannot be heap allocated + typeBroke // broken type definition + typeNoalg // suppress hash and eq algorithm generation + typeDeferwidth // width computation has been deferred and type is on deferredTypeStack typeRecur ) |