From f24eac47710b0170fd45611ab1867e87701e0a95 Mon Sep 17 00:00:00 2001 From: Dan Scales Date: Mon, 26 Apr 2021 14:32:23 -0700 Subject: cmd/compile: improving the documentation of various fields and functions This is only changes to comments, so should be fine to go into 1.17. Change-Id: I01e28dc76b03fb3ca846d976f8ac84bc2acb2ea2 Reviewed-on: https://go-review.googlesource.com/c/go/+/318009 Run-TryBot: Dan Scales TryBot-Result: Go Bot Reviewed-by: Cuong Manh Le Reviewed-by: Matthew Dempsky --- src/cmd/compile/internal/typecheck/iimport.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cmd/compile/internal/typecheck/iimport.go') diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index 00f6a6e483..a5ddbb5a74 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -42,6 +42,9 @@ var ( inlineImporter = map[*types.Sym]iimporterAndOffset{} ) +// expandDecl returns immediately if n is already a Name node. Otherwise, n should +// be an Ident node, and expandDecl reads in the definition of the specified +// identifier from the appropriate package. func expandDecl(n ir.Node) ir.Node { if n, ok := n.(*ir.Name); ok { return n @@ -61,6 +64,8 @@ func expandDecl(n ir.Node) ir.Node { return r.doDecl(n.Sym()) } +// ImportBody reads in the dcls and body of an imported function (which should not +// yet have been read in). func ImportBody(fn *ir.Func) { if fn.Inl.Body != nil { base.Fatalf("%v already has inline body", fn) -- cgit v1.2.3-54-g00ecf