Source File
filter.go
Belonging Package
internal/runtime/gc/scan
// Copyright 2025 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package scanimport// FilterNil packs non-nil (non-zero) values in bufp together// at the beginning of bufp, returning the length of the// packed buffer. It treats bufp as an array of size n.func ( *uintptr, int32) int32 {:= unsafe.Slice(, int()):= 0:= len() - 1for < {for < && [] == 0 {--}for < && [] != 0 {++}if >= {break}[] = []--}if >= 0 && [] == 0 {--}return int32() + 1}
![]() |
The pages are generated with Golds v0.8.3-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |