mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: reduce overhead of RParams in types.Type
Changed RParams in types.Type to be a pointer to a slice, rather than a slice itself, in order to reduce it from three words to one words, since the large majority of types will not be generic or instantiated from a generic type. Additional cleanup: remove operation OTYPEINST, which we don't have need of, since all type instantiations are either handled by types2 or happen automatically during some form of stenciling. Both of these are useful cleanups before the Go 1.17 freeze. Change-Id: I61ad56b3c698b30d2cb5a2cdd12263202c54f49c Reviewed-on: https://go-review.googlesource.com/c/go/+/308770 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Dan Scales <danscales@google.com>
This commit is contained in:
parent
4d7d7a4c50
commit
519f223aa2
4 changed files with 41 additions and 40 deletions
|
|
@ -285,7 +285,6 @@ const (
|
|||
// Left is nil if there is no type-switch variable
|
||||
OTYPESW
|
||||
OFUNCINST // instantiation of a generic function
|
||||
OTYPEINST // instantiation of a generic type
|
||||
|
||||
// types
|
||||
OTCHAN // chan int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue