• Josh Bleecher Snyder's avatar
    cmd/compile: handle blank struct fields in NumComponents · bbfae469
    Josh Bleecher Snyder authored
    NumComponents is used by racewalk to decide whether reads and writes
    might occur to subobjects of an address. For that purpose,
    blank fields matter.
    
    It is also used to decide whether to inline == and != for a type.
    For that purpose, blank fields may be ignored.
    
    Add a parameter to NumComponents to support this distinction.
    While we're here, document NumComponents, as requested in CL 59334.
    
    Change-Id: I8c2021b172edadd6184848a32a74774dde1805c8
    Reviewed-on: https://go-review.googlesource.com/103755
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
    bbfae469
walk.go 95.5 KB