]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make setting and accessing of node slice elements more uniform
authorMartin Möhrmann <moehrmann@google.com>
Sun, 19 Feb 2017 14:57:58 +0000 (15:57 +0100)
committerMartin Möhrmann <moehrmann@google.com>
Fri, 24 Feb 2017 21:55:24 +0000 (21:55 +0000)
commitfdef951116ea5e201866b7d4a53c8c90056770f4
treed86af705f332bcbfde7f74cfa632ebc7d6ceb426
parentfb1f47a77c642f36fc7a80d468ad1cda8bb66361
cmd/compile: make setting and accessing of node slice elements more uniform

Add Set3 function to complement existing Set1 and Set2 functions.
Consistently use Set1, Set2 and Set3 for []*Node instead of Set where applicable.

Add SetFirst and SetSecond for setting elements of []*Node to mirror
First and Second for accessing elements in []*Node.

Replace uses of Index by First and Second and
SetIndex with SetFirst and SetSecond where applicable.

Passes toolstash -cmp.

Change-Id: I8255aae768cf245c8f93eec2e9efa05b8112b4e5
Reviewed-on: https://go-review.googlesource.com/37430
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/range.go
src/cmd/compile/internal/gc/select.go
src/cmd/compile/internal/gc/subr.go
src/cmd/compile/internal/gc/swt.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go