]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: refactor appendslice to use newer gc code style
authorMartin Möhrmann <moehrmann@google.com>
Thu, 10 May 2018 07:28:04 +0000 (09:28 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Fri, 24 Aug 2018 07:06:58 +0000 (07:06 +0000)
commitc907a75494f0d828a9afa5f849684f3c09c4afa2
tree437901a7a2463697278ebd29605e8ae2cf15c765
parent379d2dea72e475288da97ad6c665105fb731a34d
cmd/compile: refactor appendslice to use newer gc code style

- add comments with builtin function signatures that are instantiated
- use Nodes type from the beginning instead of
  []*Node with a later conversion to Nodes
- use conv(x, y) helper function instead of nod(OCONV, x, y)
- factor out repeated calls to Type.Elem()

This makes the function style similar to newer functions like extendslice.

passes toolstash -cmp

Change-Id: Iedab191af9e0884fb6762c9c168430c1d2246979
Reviewed-on: https://go-review.googlesource.com/112598
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/walk.go