diff options
| author | Josh Bleecher Snyder <josharian@gmail.com> | 2020-04-08 12:36:35 -0700 |
|---|---|---|
| committer | Josh Bleecher Snyder <josharian@gmail.com> | 2020-04-09 01:16:43 +0000 |
| commit | 376472ddb7252a4a859d89fc5ccb6db802e2b3b0 (patch) | |
| tree | fb2d481f58808e3d3e192b853dad189368f971f3 /src/cmd/compile/internal/gc/align.go | |
| parent | 7a4247cd46b61ae724d6eaebd51b15d2e5fd7c1c (diff) | |
| download | go-git-376472ddb7252a4a859d89fc5ccb6db802e2b3b0.tar.gz | |
cmd/compile: clean up slice and string offsets/sizes
Minor cleanup:
* Modernize comments.
* Change from int to int64 to avoid conversions.
* Use idiomatic names.
Passes toolstash-check.
Change-Id: I93560c81926c0f4e00f33129cb4846b53bea99e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/227548
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/gc/align.go')
| -rw-r--r-- | src/cmd/compile/internal/gc/align.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/gc/align.go b/src/cmd/compile/internal/gc/align.go index ec66cb4392..ab578ee8c7 100644 --- a/src/cmd/compile/internal/gc/align.go +++ b/src/cmd/compile/internal/gc/align.go @@ -319,10 +319,10 @@ func dowidth(t *types.Type) { Fatalf("dowidth any") case TSTRING: - if sizeof_String == 0 { + if sizeofString == 0 { Fatalf("early dowidth string") } - w = int64(sizeof_String) + w = sizeofString t.Align = uint8(Widthptr) case TARRAY: @@ -344,7 +344,7 @@ func dowidth(t *types.Type) { if t.Elem() == nil { break } - w = int64(sizeof_Slice) + w = sizeofSlice checkwidth(t.Elem()) t.Align = uint8(Widthptr) |
