Skip to documentation
SLOP

tiny.smg.calls

Reference tiny.smg calls

Defined in tiny.smg.

API (9)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callstiny.smgcalls
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: tools/smg/src/calls/report.zig:38

zig
pub const Cycle = struct {    members: []const u32,    recursive: bool,};

Source: tools/smg/src/calls/report.zig:1

zig
pub const Entry = struct {    node: u32,    territory: u32,    depth: u32,    test_marked: bool,    cycle: bool,};

Source: tools/smg/src/calls/report.zig:22

zig
pub const Reach = struct {    total: u32,    test_marked: u32,    max_depth: u32,    entries: []const Entry,    strata: []const Stratum,    territories: []const Territory,    pub fn beyond(self: Reach, depth: u32) u32 {        if (depth >= self.max_depth) return 0;        var count: u32 = 0;        for (self.strata[depth..]) |stratum| count += stratum.count;        return count;    }};

Source: tools/smg/src/calls/report.zig:48

zig
pub const Report = struct {    focus: u32,    focus_territory: u32,    graph_nodes: u32,    graph_edges: u32,    callers: Reach,    calls: Reach,    cycle: Cycle,    resolution: Resolution,};

Source: tools/smg/src/calls/report.zig:43

zig
pub const Resolution = struct {    unresolved_targets: ?u32,    external_targets: ?u32,};

Source: tools/smg/src/calls/report.zig:14

zig
pub const Stratum = struct {    depth: u32,    count: u32,    test_marked: u32,    territory_start: u32,    territory_count: u32,};

Source: tools/smg/src/calls/report.zig:9

zig
pub const Territory = struct {    node: u32,    count: u32,};

Source: tools/smg/src/calls/analyze.zig:12

zig
pub fn build(    allocator: std.mem.Allocator,    graph: graph_mod.Graph,    focus_name: []const u8,) !calls.Report {    if (graph.nodes.items.len >= unreached) return error.CapacityOverflow;    if (graph.edges.items.len > std.math.maxInt(u32)) return error.CapacityOverflow;    const focus: u32 = @intCast(graph.node_index.get(focus_name) orelse        return error.NodeNotFound);    const incoming = try allocator.alloc(u32, graph.nodes.items.len);    defer allocator.free(incoming);    const outgoing = try allocator.alloc(u32, graph.nodes.items.len);    defer allocator.free(outgoing);    const queue = try allocator.alloc(u32, graph.nodes.items.len);    defer allocator.free(queue);    fillDistances(graph, focus, .incoming, incoming, queue);    fillDistances(graph, focus, .outgoing, outgoing, queue);    return .{        .focus = focus,        .focus_territory = territoryIndex(graph, focus),        .graph_nodes = @intCast(graph.nodes.items.len),        .graph_edges = @intCast(graph.edges.items.len),        .callers = try buildReach(allocator, graph, incoming, outgoing),        .calls = try buildReach(allocator, graph, outgoing, incoming),        .cycle = try buildCycle(allocator, graph, focus, incoming, outgoing),        .resolution = try resolution(allocator, graph.nodes.items[focus]),    };}
Called byCallstest; no linktools.smg.src.calls.analyzetest: call report preserves strata te...private; no linktools.smg.src.calls.analyzebuildCycleprivate; no linktools.smg.src.calls.analyzebuildReachprivate; no linktools.smg.src.calls.analyzefillDistancesprivate; no linktools.smg.src.calls.analyzeresolutionprivate; no linktools.smg.src.calls.analyzeterritoryIndexcallsbuild
Static calls · unresolved targets: 1 · external targets: 2.

Source: tools/smg/src/calls/root.zig

zig
const report = @import("report.zig");pub const Cycle = report.Cycle;pub const Entry = report.Entry;pub const Reach = report.Reach;pub const Report = report.Report;pub const Resolution = report.Resolution;pub const Stratum = report.Stratum;pub const Territory = report.Territory;pub const build = @import("analyze.zig").build;

Source: tools/smg/src/root.zig:14

zig
pub const calls = @import("calls/root.zig");

Audit

Definitions10
Public names10
Members30
Version26.7.0
Revisiondaab053ee433