]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add Type.SetNumElem
authorJosh Bleecher Snyder <josharian@gmail.com>
Thu, 31 Mar 2016 22:18:39 +0000 (15:18 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 1 Apr 2016 20:04:17 +0000 (20:04 +0000)
commit5dd129bcff20e7b7337bd536935fab3b7214db15
treecf42635ae88bc4278705eca914cdac2a52fb0fec
parente504055e7847a933557f94e92c2cfe9092d678f8
cmd/compile: add Type.SetNumElem

This removes all access to Type.Bound
from outside type.go.

Update sinit to make a new type rather than
copy and mutate.

Update bimport to create a new slice type
instead of mutating TDDDFIELD.
These are rare, so the extra allocs are nominal.

I’m not happy about having a setter,
but it appears the most practical route
forward at the moment, and it only has a few uses.

Passes toolstash -cmp.

Change-Id: I174f07c8f336afc656904bde4bdbde4f3ef0db96
Reviewed-on: https://go-review.googlesource.com/21423
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/sinit.go
src/cmd/compile/internal/gc/type.go
src/cmd/compile/internal/gc/typecheck.go