mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] cmd/compile: rename OCALLPART to OMETHVALUE
Go spec call them "method values", not "partial calls". Note that we use "OMETHVALUE" (as opposed to "OMETHODVALUE") to be consistent with "OMETHEXPR". Change-Id: I1efd985d4b567a1b4b20aeb603eb82db579edbd5 Reviewed-on: https://go-review.googlesource.com/c/go/+/330837 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>
This commit is contained in:
parent
d44ed5d144
commit
1b995f91a5
24 changed files with 126 additions and 126 deletions
|
|
@ -564,7 +564,7 @@ func transformAsOp(n *ir.AssignOpStmt) {
|
|||
}
|
||||
|
||||
// transformDot transforms an OXDOT (or ODOT) or ODOT, ODOTPTR, ODOTMETH,
|
||||
// ODOTINTER, or OCALLPART, as appropriate. It adds in extra nodes as needed to
|
||||
// ODOTINTER, or OMETHVALUE, as appropriate. It adds in extra nodes as needed to
|
||||
// access embedded fields. Corresponds to typecheck.tcDot.
|
||||
func transformDot(n *ir.SelectorExpr, isCall bool) ir.Node {
|
||||
assert(n.Type() != nil && n.Typecheck() == 1)
|
||||
|
|
@ -588,7 +588,7 @@ func transformDot(n *ir.SelectorExpr, isCall bool) ir.Node {
|
|||
assert(f != nil)
|
||||
|
||||
if (n.Op() == ir.ODOTINTER || n.Op() == ir.ODOTMETH) && !isCall {
|
||||
n.SetOp(ir.OCALLPART)
|
||||
n.SetOp(ir.OMETHVALUE)
|
||||
if len(n.X.Type().RParams()) > 0 || n.X.Type().IsPtr() && len(n.X.Type().Elem().RParams()) > 0 {
|
||||
// TODO: MethodValueWrapper needed for generics?
|
||||
// Or did we successfully desugar all that at stencil time?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue