diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2023-08-17 22:13:22 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-08-18 22:38:50 +0000 |
| commit | 89eb6b76ae4b81b2b5613d62a8afec9e791c55ec (patch) | |
| tree | 632922ae71a9f72cff9ca957f7fd6eacba1c894a /src/cmd/compile/internal/noder/reader.go | |
| parent | 78f90511ec89774fcdfe3d619972a58dd73b4954 (diff) | |
| download | go-89eb6b76ae4b81b2b5613d62a8afec9e791c55ec.tar.xz | |
cmd/compile: remove some uses of ir.CurFunc
This CL updates several frontend passes to stop relying on
ir.CurFunc (at least directly).
Change-Id: I3c3529e81e27fb05d54a828f081f7c7efc31af67
Reviewed-on: https://go-review.googlesource.com/c/go/+/520606
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
| -rw-r--r-- | src/cmd/compile/internal/noder/reader.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index 013c73f3d5..99755a976b 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -3446,10 +3446,7 @@ var inlgen = 0 // unifiedInlineCall implements inline.NewInline by re-reading the function // body from its Unified IR export data. -func unifiedInlineCall(call *ir.CallExpr, fn *ir.Func, inlIndex int) *ir.InlinedCallExpr { - // TODO(mdempsky): Turn callerfn into an explicit parameter. - callerfn := ir.CurFunc - +func unifiedInlineCall(callerfn *ir.Func, call *ir.CallExpr, fn *ir.Func, inlIndex int) *ir.InlinedCallExpr { pri, ok := bodyReaderFor(fn) if !ok { base.FatalfAt(call.Pos(), "cannot inline call to %v: missing inline body", fn) |
