mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: introduce named gcshape types
Still 1-1 with real types, but now with their own names! Shape types are implicitly convertible to (and convertible from) the types they represent. Change-Id: I0133a8d8fbeb369380574b075a32b3c987e314d5 Reviewed-on: https://go-review.googlesource.com/c/go/+/335170 Run-TryBot: Keith Randall <khr@golang.org> Trust: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Reviewed-by: Dan Scales <danscales@google.com>
This commit is contained in:
parent
897970688b
commit
a7a17f0ca8
7 changed files with 317 additions and 32 deletions
|
|
@ -452,6 +452,11 @@ func (w *writer) contentHash(s *LSym) goobj.HashType {
|
|||
binary.LittleEndian.PutUint64(tmp[6:14], uint64(r.Add))
|
||||
h.Write(tmp[:])
|
||||
rs := r.Sym
|
||||
if rs == nil {
|
||||
fmt.Printf("symbol: %s\n", s)
|
||||
fmt.Printf("relocation: %#v\n", r)
|
||||
panic("nil symbol target in relocation")
|
||||
}
|
||||
switch rs.PkgIdx {
|
||||
case goobj.PkgIdxHashed64:
|
||||
h.Write([]byte{0})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue