aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types/type.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2017-04-28 00:19:49 +0000
committerJosh Bleecher Snyder <josharian@gmail.com>2017-04-28 01:24:13 +0000
commitdae5389d3d2b5303542a6b699eff49307b7ed985 (patch)
tree3445d4990345f4e9c32d33cc0878b684ba63972c /src/cmd/compile/internal/types/type.go
parent3a342af977ccf8604f49fc776d17c5f3f3e6d293 (diff)
downloadgo-dae5389d3d2b5303542a6b699eff49307b7ed985.tar.gz
go-dae5389d3d2b5303542a6b699eff49307b7ed985.zip
Revert "cmd/compile: add Type.MustSize and Type.MustAlignment"
This reverts commit 94d540a4b6bf68ec472bf4469037955e3133fcf7. Reason for revert: prefer something along the lines of CL 42018. Change-Id: I876fe32e98f37d8d725fe55e0fd0ea429c0198e0 Reviewed-on: https://go-review.googlesource.com/42022 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/types/type.go')
-rw-r--r--src/cmd/compile/internal/types/type.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/cmd/compile/internal/types/type.go b/src/cmd/compile/internal/types/type.go
index 4dad1ca50c..62041454ca 100644
--- a/src/cmd/compile/internal/types/type.go
+++ b/src/cmd/compile/internal/types/type.go
@@ -863,28 +863,12 @@ func (t *Type) ArgWidth() int64 {
return t.Extra.(*Func).Argwid
}
-// Size calculates and returns t's Size.
func (t *Type) Size() int64 {
- Dowidth(t)
- return t.Width
-}
-
-// MustSize returns t's Size, which must have been calculated previously.
-// It is intended for use in the backend, where t must be treated as readonly.
-func (t *Type) MustSize() int64 {
t.AssertWidthCalculated()
return t.Width
}
-// Alignment calculates and returns t's Alignment.
func (t *Type) Alignment() int64 {
- Dowidth(t)
- return int64(t.Align)
-}
-
-// MustAlignment returns t's Alignment, which must have been calculated previously.
-// It is intended for use in the backend, where t must be treated as readonly.
-func (t *Type) MustAlignment() int64 {
t.AssertWidthCalculated()
return int64(t.Align)
}