commit | 533cd80315904661e3d644a140bdf52c8ac7aad6 | [log] [tgz] |
---|---|---|
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | Thu Sep 22 18:53:12 2022 +0700 |
committer | Gopher Robot <gobot@golang.org> | Thu Sep 22 21:36:44 2022 +0000 |
tree | 60e021f8cb0a45023bbf92d06641c282226cdbab | |
parent | 42a46206b97ca7cf4246d3c1230a70cf42ad5bb0 [diff] |
cmd/compile/internal/walk: remove reduceSlice After CL 22425, there're two optimizations for slice expr which are never applied during walk pass: s[i:len(s)] s[i:j:cap(s)] The order pass have already rewritten len/cap expression to use autotmp, thus the same safe expression check will never fire. The code can now be simplified by moving the only case left from reduceSlice to walkSlice, then removing reduceSlice entirely. Passes toolstash-check. Change-Id: Ia8cfb15c8e96c186a214c17b42d0fee51b0d3a1c Reviewed-on: https://go-review.googlesource.com/c/go/+/432695 Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.