commit | 225bcec98b53ddceeb6998614ad566c11ef27620 | [log] [tgz] |
---|---|---|
author | Matthew Dempsky <mdempsky@google.com> | Mon Aug 08 12:31:33 2022 -0700 |
committer | Cherry Mui <cherryyz@google.com> | Mon Sep 19 21:52:24 2022 +0000 |
tree | a6f00d7fa3cec475324ba2fbe709f728cec9bf90 | |
parent | 19d792c1eb4342895f9d41d03ab931e9e26c7d78 [diff] |
[release-branch.go1.19] cmd/compile/internal/inline: fix latent CalleeEffects issue ir.ClosureExpr implements ir.InitNode, so ir.InitExpr can prepend init statements to it. However, CalleeEffects wasn't aware of this and could cause the init statements to get dropped when inlining a call to a closure. This isn't an issue today, because we don't create closures with init statements. But I ran into this within unified IR. Easy and robust solution: just take advantage that ir.TakeInit can handle any node. Fixes #54917. Change-Id: Ica05fbf6a8c5be4b11927daf84491a1140da5431 Reviewed-on: https://go-review.googlesource.com/c/go/+/422196 Reviewed-by: Than McIntosh <thanm@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/429896 Reviewed-by: Michael Knyszek <mknyszek@google.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.