]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: correct comment for len check when make slice
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 11 Apr 2020 14:49:10 +0000 (21:49 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Sat, 11 Apr 2020 16:20:57 +0000 (16:20 +0000)
commitb78109e80e1dd5ff79001b2cefb2a0eff819422d
treed6678ca6d43aa44c490318af509bef8f742c6ac4
parenta1b802bde7ceab614dcf64e84f972cac5f1b2210
cmd/compile: correct comment for len check when make slice

CL 226737 optimizes len check when make slice. The comment that cap is
constrainted to [0, 2^31) is not quite true, it's 31 or 63 depends on
whether it's 32/64-bit systems.

Change-Id: I6f54e41827ffe4d0b67a44975da3ce07b2fabbad
Reviewed-on: https://go-review.googlesource.com/c/go/+/227803
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/walk.go