aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/func.go
diff options
context:
space:
mode:
authorCuong Manh Le <cuong.manhle.vn@gmail.com>2021-07-04 12:06:39 +0700
committerCuong Manh Le <cuong.manhle.vn@gmail.com>2021-07-07 11:18:25 +0000
commit4676c3675e85a8a82a1513ef1f5e38aebc80ddc8 (patch)
tree3d03fa179896911624daea46a65390d9cb5c7330 /src/cmd/compile/internal/typecheck/func.go
parent5c42b6a953036b906626f5b25b7655641fbad060 (diff)
downloadgo-4676c3675e85a8a82a1513ef1f5e38aebc80ddc8.tar.gz
go-4676c3675e85a8a82a1513ef1f5e38aebc80ddc8.zip
[dev.typeparams] cmd/compile: rename PartialCallType -> MethodValueType
CL 330837 rename OCALLPART to OMETHVALUE, so do the same thing for PartialCallType for consistency. Change-Id: Id40eb35bbcee7719acfb41fce0e2b968879f9fef Reviewed-on: https://go-review.googlesource.com/c/go/+/332769 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> 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.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/typecheck/func.go b/src/cmd/compile/internal/typecheck/func.go
index 847e9b9aea..7dec65c1d6 100644
--- a/src/cmd/compile/internal/typecheck/func.go
+++ b/src/cmd/compile/internal/typecheck/func.go
@@ -125,10 +125,10 @@ func ClosureType(clo *ir.ClosureExpr) *types.Type {
return typ
}
-// PartialCallType returns the struct type used to hold all the information
-// needed in the closure for n (n must be a OMETHVALUE node).
-// The address of a variable of the returned type can be cast to a func.
-func PartialCallType(n *ir.SelectorExpr) *types.Type {
+// MethodValueType returns the struct type used to hold all the information
+// needed in the closure for a OMETHVALUE node. The address of a variable of
+// the returned type can be cast to a func.
+func MethodValueType(n *ir.SelectorExpr) *types.Type {
t := types.NewStruct(types.NoPkg, []*types.Field{
types.NewField(base.Pos, Lookup("F"), types.Types[types.TUINTPTR]),
types.NewField(base.Pos, Lookup("R"), n.X.Type()),