aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2017-08-24 15:23:27 -0700
committerKeith Randall <khr@golang.org>2017-08-25 03:26:58 +0000
commitf1517ec6e5d1ccf04c1266e710545436b972750f (patch)
tree5ff6536a085b3969ec5be3736555cdcf15d8b692 /src/make.bash
parente258249c247d7135f164f4f0b3abb29bebe75767 (diff)
downloadgo-f1517ec6e5d1ccf04c1266e710545436b972750f.tar.xz
cmd/compile: remove more nil ptr checks after newobject
For code like the following (where x escapes): x := []int{1} We're currently generating a nil check. The line above is really 3 operations: t := new([1]int) t[0] = 1 x := t[:] We remove the nil check for t[0] = 1, but not for t[:]. Our current nil check removal rule is too strict about the possible memory arguments of the nil check. Unlike zeroing or storing to the result of runtime.newobject, the nilness of runtime.newobject is always false, even after other stores have happened in the meantime. Change-Id: I95fad4e3a59c27effdb37c43ea215e18f30b1e5f Reviewed-on: https://go-review.googlesource.com/58711 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/make.bash')
0 files changed, 0 insertions, 0 deletions