constfoldcensus

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package constfoldcensus enumerates every call site that simplifies or evaluates a constant at planning (RFC-257 WS-E design 5.4(b)): the value and predicate simplification entry points, the constant evaluators, the predicate simplifier driver, and every `Evaluate(nil)` / `Eval(nil)` call. Its test assigns each site a reason and fails on a site nobody assigned.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(sites []Site) map[Site]int

Count tallies sites by key.

func InPopulation

func InPopulation(file string) bool

InPopulation reports whether a module-relative slash path is a census file: a non-test, non-generated Go file under pkg/.

Types

type Site

type Site struct {
	File, Func, Callee string
}

Site is one census key: the file (slash path from the module root), the enclosing top-level function (Recv.Name for a method), and the callee.

func ScanSource

func ScanSource(file string, src []byte) ([]Site, error)

ScanSource returns the census sites of one non-test Go file. file is its slash path from the module root.

func Sorted

func Sorted(counts map[Site]int) []Site

Sorted returns the keys of counts in a stable order.

func (Site) String

func (s Site) String() string

Jump to

Keyboard shortcuts

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