Skip to main content

Module calls

Module calls 

Source
Expand description

Call-site edge extraction.

Walks a lowered statement body and pulls out every procedure / function invocation as a CallSite. The dependency-graph layer resolves each callee to a concrete node (via plsql_symbols::resolve_reference) and mints a Calls edge; this module’s job is purely extraction — find the call sites and their shape.

Calls appear in three places:

  1. Statement-level procedure calls — a bare Statement::Unrecognized line whose text is pkg.proc(args); (the stmt recogniser leaves these unclassified because they’re neither assignment nor control flow).
  2. Expression-embedded function calls — inside an Assignment.rhs_text, an If arm condition, a loop range, a Return value, etc.
  3. Nested calls — nvl(compute(x), 0) yields both nvl and compute.

§/oracle evidence

  • DATABASE-REFERENCE.md PL/SQL Language Reference — the call grammar (positional / named notation, package- qualified vs bare) drives what counts as a callee.
  • LOW-LEVEL-CATALOGS.md Data Dictionary View Families — ALL_DEPENDENCIES with DEPENDENCY_TYPE is the server-side mirror the depgraph cross-checks Calls edges against.

Structs§

CallSite
One extracted call site.

Enums§

CallContext

Functions§

extract_call_sites
Extract every call site from a lowered statement body.
extract_call_sites_bounded
Depth-bounded variant of extract_call_sites. Returns the extracted call sites plus a [RecursionOutcome] recording whether (and how often) a nested body was abandoned at the recursion-depth cap rather than walked unbounded. The caller is responsible for emitting an honest typed diagnostic when outcome.limit_hit (R13 — never silently truncate).