]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused cgoCheckUsingType function
authorIan Lance Taylor <iant@golang.org>
Fri, 24 Oct 2025 21:57:55 +0000 (14:57 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 27 Oct 2025 16:49:00 +0000 (09:49 -0700)
The only calls to it were removed in CL 616255.

Change-Id: I6c6b01e2e98d54300b6323fd74ccc45fa1d433dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/714820
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

src/runtime/cgocheck.go

index ab804a5a36ed9513108bf21b0b3388018a1e3496..81300adfcf10d7241d32a86e0e71ab5e0927514b 100644 (file)
@@ -177,27 +177,3 @@ func cgoCheckBits(src unsafe.Pointer, gcbits *byte, off, size uintptr) {
                }
        }
 }
-
-// cgoCheckUsingType is like cgoCheckTypedBlock, but is a last ditch
-// fall back to look for pointers in src using the type information.
-// We only use this when looking at a value on the stack when the type
-// uses a GC program, because otherwise it's more efficient to use the
-// GC bits. This is called on the system stack.
-//
-//go:nowritebarrier
-//go:systemstack
-func cgoCheckUsingType(typ *_type, src unsafe.Pointer, off, size uintptr) {
-       if !typ.Pointers() {
-               return
-       }
-
-       // Anything past typ.PtrBytes is not a pointer.
-       if typ.PtrBytes <= off {
-               return
-       }
-       if ptrdataSize := typ.PtrBytes - off; size > ptrdataSize {
-               size = ptrdataSize
-       }
-
-       cgoCheckBits(src, getGCMask(typ), off, size)
-}