diff options
author | Dan Scales <danscales@google.com> | 2021-04-26 14:32:23 -0700 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-05-07 21:35:41 +0000 |
commit | f24eac47710b0170fd45611ab1867e87701e0a95 (patch) | |
tree | 485a45d4d3be76ca28f3fc6d0f18e994b86b25d4 /src/cmd/compile/internal/typecheck/func.go | |
parent | 3980c4db192783c6aefa0a5978e553046c9c7dea (diff) | |
download | go-f24eac47710b0170fd45611ab1867e87701e0a95.tar.gz go-f24eac47710b0170fd45611ab1867e87701e0a95.zip |
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 <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/func.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/func.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/typecheck/func.go b/src/cmd/compile/internal/typecheck/func.go index e154c39269..f381e1dbdc 100644 --- a/src/cmd/compile/internal/typecheck/func.go +++ b/src/cmd/compile/internal/typecheck/func.go @@ -105,8 +105,9 @@ func PartialCallType(n *ir.SelectorExpr) *types.Type { // typechecking an inline body, as opposed to the body of a real function. var inTypeCheckInl bool -// Lazy typechecking of imported bodies. For local functions, CanInline will set ->typecheck -// because they're a copy of an already checked body. +// ImportedBody returns immediately if the inlining information for fn is +// populated. Otherwise, fn must be an imported function. If so, ImportedBody +// loads in the dcls and body for fn, and typechecks as needed. func ImportedBody(fn *ir.Func) { if fn.Inl.Body != nil { return @@ -180,7 +181,7 @@ func fnpkg(fn *ir.Name) *types.Pkg { return fn.Sym().Pkg } -// closurename generates a new unique name for a closure within +// ClosureName generates a new unique name for a closure within // outerfunc. func ClosureName(outerfunc *ir.Func) *types.Sym { outer := "glob." |