mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: separate dowidth better
Having a global MaxWidth lets us avoid needing to refer to thearch from split-out packages when all they need is thearch.MAXWIDTH. And make a couple interface changes to let dowidth avoid importing package ir directly. Then it can move into package types. Change-Id: I2c12e8e22252597530e648848320e19bdd490a01 Reviewed-on: https://go-review.googlesource.com/c/go/+/279302 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
cb28c96be8
commit
7c8f5356ab
8 changed files with 51 additions and 17 deletions
|
|
@ -164,7 +164,7 @@ func (s *ssafn) AllocFrame(f *ssa.Func) {
|
|||
|
||||
dowidth(n.Type())
|
||||
w := n.Type().Width
|
||||
if w >= thearch.MAXWIDTH || w < 0 {
|
||||
if w >= MaxWidth || w < 0 {
|
||||
base.Fatalf("bad width")
|
||||
}
|
||||
if w == 0 && lastHasPtr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue