diff options
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2020-10-22 00:25:17 +0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2020-10-28 17:10:08 +0000 |
commit | 642329fdd55aabafc67b3a7c50902e29125621ab (patch) | |
tree | 391ec188d728cbc5578b07781d4e155e82f7c34c /src/runtime/mfinal.go | |
parent | e3c58bbeb8c76fa3abc0f7153edbab72208c1f88 (diff) | |
download | go-642329fdd55aabafc67b3a7c50902e29125621ab.tar.gz go-642329fdd55aabafc67b3a7c50902e29125621ab.zip |
Revert "cmd/compile: split exported/non-exported methods for interface type"
This reverts commit 8f26b57f9afc238bdecb9b7030bc2f4364093885.
Reason for revert: break a bunch of code, include standard library.
Fixes #42123
Change-Id: Ife90ecbafd2cb395623d1db555fbfc9c1b0098e0
Reviewed-on: https://go-review.googlesource.com/c/go/+/264026
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: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/mfinal.go')
-rw-r--r-- | src/runtime/mfinal.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go index 6ec5133be0..f4dbd77252 100644 --- a/src/runtime/mfinal.go +++ b/src/runtime/mfinal.go @@ -210,7 +210,7 @@ func runfinq() { // set up with empty interface (*eface)(frame)._type = &f.ot.typ (*eface)(frame).data = f.arg - if !ityp.isEmpty() { + if len(ityp.mhdr) != 0 { // convert to interface with methods // this conversion is guaranteed to succeed - we checked in SetFinalizer *(*iface)(frame) = assertE2I(ityp, *(*eface)(frame)) @@ -394,7 +394,7 @@ func SetFinalizer(obj interface{}, finalizer interface{}) { } case fint.kind&kindMask == kindInterface: ityp := (*interfacetype)(unsafe.Pointer(fint)) - if ityp.isEmpty() { + if len(ityp.mhdr) == 0 { // ok - satisfies empty interface goto okarg } |