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:
Josh Bleecher Snyder 2020-04-10 21:33:27 -07:00
parent ea52c78a66
commit ed5233166f
2 changed files with 5 additions and 8 deletions

View file

@ -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
}