Documentation
¶
Overview ¶
Package callgraph builds a directed graph of function calls within user packages and identifies cleat leaves (functions that directly call HostCalls methods).
Package callgraph builds a directed graph of function calls within user packages and identifies cleat leaves — functions that directly call HostCalls methods.
The graph is used by the closure package to compute transitive closure for WASM compilation.
Key types:
- Graph — directed call graph with forward and reverse edges
Key functions:
- Build — constructs a call graph from analyzer.AnalysisResult
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// Calls maps caller → set of callees (fully-qualified names).
Calls map[string]map[string]bool
// CalledBy maps callee → set of callers (reverse edges).
CalledBy map[string]map[string]bool
// DurableLeaves maps fully-qualified names of functions that directly
// call at least one HostCalls method.
DurableLeaves map[string]bool
}
Graph represents the directed call graph of functions.
func Build ¶
func Build(result *analyzer.AnalysisResult) (*Graph, error)
Build constructs a call graph from the given analysis result.
Click to show internal directories.
Click to hide internal directories.