mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: simplify slicebytes
Use slicesym to implement. Remove len param. Passes toolstash-check. Change-Id: Ia6d4fb2a3b476eceeba60979b4dd82b634b43939 Reviewed-on: https://go-review.googlesource.com/c/go/+/228887 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
ea52c78a66
commit
ed5233166f
2 changed files with 5 additions and 8 deletions
|
|
@ -208,7 +208,7 @@ func (s *InitSchedule) staticassign(l *Node, r *Node) bool {
|
|||
case OSTR2BYTES:
|
||||
if l.Class() == PEXTERN && r.Left.Op == OLITERAL {
|
||||
sval := strlit(r.Left)
|
||||
slicebytes(l, sval, len(sval))
|
||||
slicebytes(l, sval)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue