]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/typecheck: export Implements
authorMichael Pratt <mpratt@google.com>
Wed, 17 May 2023 15:42:27 +0000 (11:42 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 22 May 2023 15:34:36 +0000 (15:34 +0000)
commit13e96964377b09adfb2165bca25764198dae8349
treef0ffb29cc17d749dcb656075b32b6a308a72c55c
parent374bd6a3ac7a201cfb37230942fedaa0451e4de6
cmd/compile/internal/typecheck: export Implements

Provide an exported version of implements to easily check if a type
implements an interface. This will be use for PGO devirtualization.

Even within the package, other callers can make use of this simpler API
to reduce duplication.

For #59959.

Change-Id: If4eb86f197ca32abc7634561e36498a247b5070f
Reviewed-on: https://go-review.googlesource.com/c/go/+/495915
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
src/cmd/compile/internal/typecheck/expr.go
src/cmd/compile/internal/typecheck/stmt.go
src/cmd/compile/internal/typecheck/subr.go