[tools] go/analysis/passes/composite: clarify and optimize

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
May 11, 2026, 11:29:36 AM (13 hours ago) May 11
to Alan Donovan, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Hongxiang Jiang, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
go/analysis/passes/composite: clarify and optimize

I thought some work would be required here to support
embedded literals T{k: v} where k implies a.b.k, but
in fact there's nothing to do. But in the course of
figuring that out, I made it about 4x faster by using
cursors and avoiding allocation, and clearer too.

For golang/go#78553
Change-Id: Id4db0c6d1a8f086e94588cec746ba978dd57ddd8
Reviewed-by: Hongxiang Jiang <hxj...@golang.org>
Auto-Submit: Hongxiang Jiang <hxj...@golang.org>
Files:
  • M go/analysis/passes/composite/composite.go
Change size: M
Delta: 1 file changed, 65 insertions(+), 79 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: Id4db0c6d1a8f086e94588cec746ba978dd57ddd8
Gerrit-Change-Number: 773222
Gerrit-PatchSet: 2
Gerrit-Owner: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages