deadcode

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(info *meta.GlobalSummary, rootNames []string) map[string][]int

Analyze returns live ABI method slot indexes by concrete type symbol name.

Types

type Analysis added in v1.0.9

type Analysis struct {
	LiveSlots map[string][]int
	// contains filtered or unexported fields
}

Analysis keeps interface/reflection visibility and method liveness from the same fixed point. It borrows info and must not outlive its package metadata.

func AnalyzeProgram added in v1.0.9

func AnalyzeProgram(info *meta.GlobalSummary, rootNames []string) Analysis

AnalyzeProgram computes method liveness and interface visibility together. The returned Analysis borrows info and must not outlive its package metadata.

func (Analysis) CanDropMethodMetadata added in v1.0.9

func (a Analysis) CanDropMethodMetadata(name string) bool

CanDropMethodMetadata requires a known type that cannot be observed through an interface, including reflection through child and method-result types. Callers must additionally rule out opaque native consumers of Go metadata.

func (Analysis) CanDropTypeFields added in v1.0.9

func (a Analysis) CanDropTypeFields(name string) bool

CanDropTypeFields excludes reflection-visible types and dynamic type lookup. StructOf can find a static descriptor without converting that type to an interface. Callers must also prove equality and hashing do not read Fields.

func (Analysis) CanRejectInterfaceType added in v1.0.9

func (a Analysis) CanRejectInterfaceType(name string) bool

CanRejectInterfaceType reports whether a concrete type is absent from the closed interface domain. Unknown metadata must retain the runtime check. Callers must restrict predicates to basic types: reflection can synthesize composite types without a recorded conversion to that exact type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL