• Matthew Dempsky's avatar
    cmd/compile: clean up escape graph construction · 7eef0ca1
    Matthew Dempsky authored
    OTYPESW and ORANGE were manually creating locations and flows around
    them, which are relatively low-level graph construction primitives.
    This CL changes them to use holes like the rest of the code.
    
    Also, introduce "later" as an abstraction for assignment flows that
    don't happen right away, and which need to prevent expressions from
    being marked as "transient" (e.g., in ODEFER and ORANGE).
    
    There's no behavior change here, but this does reduce the number of
    newLoc call sites, which should help with restoring -m=2 diagnostics.
    
    Passes toolstash-check.
    
    Updates #31489.
    
    Change-Id: Ic03d4488cb5162afe8b00b12432d203027e8d7d0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/196619Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
    7eef0ca1
escape.go 34 KB