]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: make argument length mismatch in mkcall an error
authorMartin Möhrmann <moehrmann@google.com>
Fri, 18 Aug 2017 16:40:12 +0000 (18:40 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Tue, 22 Aug 2017 21:03:26 +0000 (21:03 +0000)
commit8bbae3d5c9589635225b3a614ffda33989e1f424
tree7198ef9113fa7dae6bcdacbe336ca205afe21f0a
parentcbc4e5d9c4f2444c5d40ae6333b4e1f4c9cfbd41
cmd/compile: make argument length mismatch in mkcall an error

mkcall is used to construct calls to builtin functions.

Instead of silently ignoring any additional arguments to mkcall
abort compilation with an error.

This protects against accidentally supplying too many arguments to mkcall
when compiler changes are made.

Change appendslice and copyany to construct calls to
slicestringcopy and slicecopy explicitly instead of
relying on the old behavior as a feature.

Change-Id: I3cfe815a57d454a129e3c08aac824f6107779a42
Reviewed-on: https://go-review.googlesource.com/57770
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/walk.go