]> Cypherpunks.ru repositories - gostls13.git/commitdiff
runtime: remove useless nil checking during init of itab
authorEzzno J <ezzno@ezzno.site>
Tue, 14 Nov 2023 02:52:31 +0000 (02:52 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 14 Nov 2023 17:15:12 +0000 (17:15 +0000)
Change-Id: I8ef12221e18e163b695d88f4bb8c309763341ec3
GitHub-Last-Rev: d3d4d4cb79418ccbb027a08892a95368888acbbf
GitHub-Pull-Request: golang/go#64107
Reviewed-on: https://go-review.googlesource.com/c/go/+/542116
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/runtime/iface.go

index d5a181cae17e766bc4a47a38f213873f5b37ac29..4563809a9dde76e225d1e14622ca9072fd4d5eec 100644 (file)
@@ -225,13 +225,11 @@ imethods:
                                        pkgPath = rtyp.nameOff(x.PkgPath).Name()
                                }
                                if tname.IsExported() || pkgPath == ipkg {
-                                       if m != nil {
-                                               ifn := rtyp.textOff(t.Ifn)
-                                               if k == 0 {
-                                                       fun0 = ifn // we'll set m.fun[0] at the end
-                                               } else {
-                                                       methods[k] = ifn
-                                               }
+                                       ifn := rtyp.textOff(t.Ifn)
+                                       if k == 0 {
+                                               fun0 = ifn // we'll set m.fun[0] at the end
+                                       } else {
+                                               methods[k] = ifn
                                        }
                                        continue imethods
                                }