[go] cmd/compile: encode field selectors in UIR format for struct literals

0 views
Skip to first unread message

Robert Griesemer (Gerrit)

unread,
Mar 19, 2026, 5:32:39 PM (yesterday) Mar 19
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Mark Freeman, Robert Griesemer, Gopher Robot, golang-co...@googlegroups.com

Robert Griesemer submitted the change

Unreviewed changes

3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
cmd/compile/internal/noder: encode promoted struct fields for composite literals in UIR

This change requires an encoding format change for struct literals.
Introduce a new UIR version (V3) and use the opportunity to encode
all composite literals more compactly: specifically, when we know
that (composite literal) keys are always present, avoid encoding a
bool value for each key.

Do not yet enable the new format.

For #9859.
Change-Id: Ic6dc9adb1aa494e923eadaf578f8cfc61efd5ea4
Reviewed-by: Mark Freeman <markf...@google.com>
Reviewed-by: Robert Griesemer <g...@google.com>
Files:
  • M src/cmd/compile/internal/noder/reader.go
  • M src/cmd/compile/internal/noder/writer.go
  • M src/internal/pkgbits/version.go
Change size: M
Delta: 3 files changed, 185 insertions(+), 13 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Mark Freeman, +1 by Robert Griesemer
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ic6dc9adb1aa494e923eadaf578f8cfc61efd5ea4
Gerrit-Change-Number: 754664
Gerrit-PatchSet: 5
Gerrit-Owner: Robert Griesemer <g...@google.com>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-Reviewer: Robert Griesemer <g...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages