From: zhangyunhao Date: Tue, 6 Sep 2022 10:39:52 +0000 (+0800) Subject: cmd/compile: gofmt comments X-Git-Tag: go1.20rc1~1175 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=812fd2fe70112209557c4f6392ab8eaee6f68dda;p=gostls13.git cmd/compile: gofmt comments Change-Id: I79634efbd8d0189afdfe22e147d63c889e8047ba Reviewed-on: https://go-review.googlesource.com/c/go/+/427964 Reviewed-by: Matthew Dempsky Run-TryBot: Wayne Zuo Reviewed-by: Wayne Zuo TryBot-Result: Gopher Robot Auto-Submit: Matthew Dempsky Reviewed-by: Michael Knyszek --- diff --git a/src/cmd/compile/internal/walk/builtin.go b/src/cmd/compile/internal/walk/builtin.go index 0acac9631b..7d55494737 100644 --- a/src/cmd/compile/internal/walk/builtin.go +++ b/src/cmd/compile/internal/walk/builtin.go @@ -26,20 +26,20 @@ import ( // // For race detector, expand append(src, a [, b]* ) to // -// init { -// s := src -// const argc = len(args) - 1 -// newLen := s.len + argc -// if uint(newLen) <= uint(s.cap) { -// s = s[:newLen] -// } else { -// s = growslice(s.ptr, newLen, s.cap, argc, elemType) -// } -// s[s.len - argc] = a -// s[s.len - argc + 1] = b -// ... +// init { +// s := src +// const argc = len(args) - 1 +// newLen := s.len + argc +// if uint(newLen) <= uint(s.cap) { +// s = s[:newLen] +// } else { +// s = growslice(s.ptr, newLen, s.cap, argc, elemType) // } -// s +// s[s.len - argc] = a +// s[s.len - argc + 1] = b +// ... +// } +// s func walkAppend(n *ir.CallExpr, init *ir.Nodes, dst ir.Node) ir.Node { if !ir.SameSafeExpr(dst, n.Args[0]) { n.Args[0] = safeExpr(n.Args[0], init)