mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: unexport Type.Width and Type.Align [generated]
[git-generate]
cd src/cmd/compile/internal
: Workaround rf issue with types2 tests.
rm types2/*_test.go
: Rewrite uses. First a type-safe rewrite,
: then a second pass to fix unnecessary conversions.
rf '
ex ./abi ./escape ./gc ./liveness ./noder ./reflectdata ./ssa ./ssagen ./staticinit ./typebits ./typecheck ./walk {
import "cmd/compile/internal/types"
var t *types.Type
t.Width -> t.Size()
t.Align -> uint8(t.Alignment())
}
ex ./abi ./escape ./gc ./liveness ./noder ./reflectdata ./ssa ./ssagen ./staticinit ./typebits ./typecheck ./walk {
import "cmd/compile/internal/types"
var t *types.Type
int64(uint8(t.Alignment())) -> t.Alignment()
}
'
: Rename fields to lower case.
(
cd types
rf '
mv Type.Width Type.width
mv Type.Align Type.align
'
)
: Revert types2 changes.
git checkout HEAD^ types2
Change-Id: I42091faece104c4ef619d9d4d50514fd48c8f029
Reviewed-on: https://go-review.googlesource.com/c/go/+/345480
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
94f2a03951
commit
72c003ef82
30 changed files with 191 additions and 191 deletions
|
|
@ -378,7 +378,7 @@ func (sc *slotCanonicalizer) lookup(ls LocalSlot) (SlKeyIdx, bool) {
|
|||
split, _ = sc.lookup(*ls.SplitOf)
|
||||
}
|
||||
k := slotKey{
|
||||
name: ls.N, offset: ls.Off, width: ls.Type.Width,
|
||||
name: ls.N, offset: ls.Off, width: ls.Type.Size(),
|
||||
splitOf: split, splitOffset: ls.SplitOffset,
|
||||
}
|
||||
if idx, ok := sc.slmap[k]; ok {
|
||||
|
|
@ -1649,7 +1649,7 @@ func BuildFuncDebugNoOptimized(ctxt *obj.Link, f *Func, loggingEnabled bool, sta
|
|||
}
|
||||
if len(inp.Registers) > 1 {
|
||||
list = append(list, dwarf.DW_OP_piece)
|
||||
ts := rtypes[k].Width
|
||||
ts := rtypes[k].Size()
|
||||
list = dwarf.AppendUleb128(list, uint64(ts))
|
||||
if padding[k] > 0 {
|
||||
if loggingEnabled {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue