1. 03 Sep, 2019 1 commit
    • Matthew Dempsky's avatar
      cmd/compile: silence esc diagnostics about directiface OCONVIFACEs · 9f89edcd
      Matthew Dempsky authored
      In general, a conversion to interface type may require values to be
      boxed, which in turn necessitates escape analysis to determine whether
      the boxed representation can be stack allocated.
      
      However, esc.go used to unconditionally print escape analysis
      decisions about OCONVIFACE, even for conversions that don't require
      boxing (e.g., pointers, channels, maps, functions).
      
      For test compatibility with esc.go, escape.go similarly printed these
      useless diagnostics. This CL removes the diagnostics, and updates test
      expectations accordingly.
      
      Change-Id: I97c57a4a08e44d265bba516c78426ff4f2bf1e12
      Reviewed-on: https://go-review.googlesource.com/c/go/+/192697
      
      
      Run-TryBot: Matthew Dempsky <mdempsky@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      9f89edcd
  2. 02 Apr, 2019 1 commit
    • Matthew Dempsky's avatar
      cmd/compile: skip escape analysis diagnostics for OADDR · abefcac1
      Matthew Dempsky authored
      For most nodes (e.g., OPTRLIT, OMAKESLICE, OCONVIFACE), escape
      analysis prints "escapes to heap" or "does not escape" to indicate
      whether that node's allocation can be heap or stack allocated.
      
      These messages are also emitted for OADDR, even though OADDR does not
      actually allocate anything itself. Moreover, it's redundant because
      escape analysis already prints "moved to heap" diagnostics when an
      OADDR node like "&x" causes x to require heap allocation.
      
      Because OADDR nodes don't allocate memory, my escape analysis rewrite
      doesn't naturally emit the "escapes to heap" / "does not escape"
      diagnostics for them. It's also non-trivial to replicate the exact
      semantics esc.go uses for OADDR.
      
      Since there are so many of these messages, I'm disabling them in this
      CL by themselves. I modified esc.go to suppress the Warnl calls
      without any other behavior changes, and then used a shell script to
      automatically remove any ERROR messages mentioned by run.go in
      "miss...
      abefcac1
  3. 02 May, 2016 1 commit
  4. 28 Mar, 2015 3 commits