]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: clean up escape graph construction
authorMatthew Dempsky <mdempsky@google.com>
Thu, 19 Sep 2019 23:55:56 +0000 (16:55 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 23 Sep 2019 21:24:59 +0000 (21:24 +0000)
commit7eef0ca17ae09ae40027dcc78138179e0ed19b10
tree33772560c3f491dff45c02b17e672fc4647d4220
parent55924135eed3b607ccbe4725900de797b51757f9
cmd/compile: clean up escape graph construction

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/+/196619
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/gc/escape.go