[go] cmd/compile/internal/escape: avoid interface method call receivers always escaping

3 views
Skip to first unread message

t hepudds (Gerrit)

unread,
May 17, 2026, 11:57:32 PM (2 days ago) May 17
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

t hepudds uploaded new patchset

t hepudds uploaded patch set #12 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ibd90eca7eaffcc83cad70b949b4d5713fa75fec0
Gerrit-Change-Number: 743200
Gerrit-PatchSet: 12
Gerrit-Owner: t hepudds <thepud...@gmail.com>
Gerrit-Reviewer: t hepudds <thepud...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

t hepudds (Gerrit)

unread,
May 17, 2026, 11:59:21 PM (2 days ago) May 17
to goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
Attention needed from Keith Randall

t hepudds added 1 comment

Patchset-level comments
File-level comment, Patchset 12 (Latest):
t hepudds . resolved

Hi @k...@golang.org, PTAL. This is ready for review. (This is the main interface receiver CL, which teaches the compiler to avoid always escaping the value in an interface conversion that is later used as the receiver in a interface method call.)

Open in Gerrit

Related details

Attention is currently required from:
  • Keith Randall
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ibd90eca7eaffcc83cad70b949b4d5713fa75fec0
Gerrit-Change-Number: 743200
Gerrit-PatchSet: 12
Gerrit-Owner: t hepudds <thepud...@gmail.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Attention: Keith Randall <k...@golang.org>
Gerrit-Comment-Date: Mon, 18 May 2026 03:59:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Keith Randall (Gerrit)

unread,
May 18, 2026, 8:02:15 PM (12 hours ago) May 18
to t hepudds, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com
Attention needed from t hepudds

Keith Randall added 3 comments

Patchset-level comments
Keith Randall . resolved

Looks pretty good. I'm excited to see what allocations this could remove.

File src/cmd/compile/internal/escape/call.go
Line 479, Patchset 12 (Latest): continue
Keith Randall . unresolved

we could probably break at this point.
(or maybe we can only do that if also derefs==0?)

Line 511, Patchset 12 (Latest): esc.Optimize()
Keith Randall . unresolved
I don't see any mention of the Mutator or Callee parts of the leaks descriptor. How do those get updated? With `f` as in the CL description
```
type T struct {
x int
}
func (t *T) String() string {
t.x++
return "foo"
}
t := T{x:7}
f(&t)
```
We need to have `t` flow to the mutate hole, I think, because we mutate it.

But maybe mutates only matters for byte slices?

Similarly for Calls, I can't think of an obvious case where this matters, but maybe it would be safer to flow to the callee hole just in case.

Open in Gerrit

Related details

Attention is currently required from:
  • t hepudds
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ibd90eca7eaffcc83cad70b949b4d5713fa75fec0
    Gerrit-Change-Number: 743200
    Gerrit-PatchSet: 12
    Gerrit-Owner: t hepudds <thepud...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: t hepudds <thepud...@gmail.com>
    Gerrit-Attention: t hepudds <thepud...@gmail.com>
    Gerrit-Comment-Date: Tue, 19 May 2026 00:02:10 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy

    t hepudds (Gerrit)

    unread,
    12:48 AM (7 hours ago) 12:48 AM
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from t hepudds

    t hepudds uploaded new patchset

    t hepudds uploaded patch set #13 to this change.
    Following approvals got outdated and were removed:
    Open in Gerrit

    Related details

    Attention is currently required from:
    • t hepudds
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ibd90eca7eaffcc83cad70b949b4d5713fa75fec0
      Gerrit-Change-Number: 743200
      Gerrit-PatchSet: 13
      unsatisfied_requirement
      open
      diffy

      t hepudds (Gerrit)

      unread,
      12:49 AM (7 hours ago) 12:49 AM
      to goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

      t hepudds voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ibd90eca7eaffcc83cad70b949b4d5713fa75fec0
      Gerrit-Change-Number: 743200
      Gerrit-PatchSet: 13
      Gerrit-Owner: t hepudds <thepud...@gmail.com>
      Gerrit-Reviewer: Keith Randall <k...@golang.org>
      Gerrit-Reviewer: t hepudds <thepud...@gmail.com>
      Gerrit-Comment-Date: Tue, 19 May 2026 04:49:08 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages