MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / methodAndFunctionNodes

Function methodAndFunctionNodes

src/resolution/callback-synthesizer.ts:173–176  ·  view source on GitHub ↗

* Stream method + function nodes lazily. The synthesizers only scan-and-filter * down to a tiny matched subset, so materializing every function/method (which * is gigabytes on a symbol-dense project) just to iterate it once is what OOM'd * #610. Iterating keeps memory O(1) in the node count.

(queries: QueryBuilder)

Source from the content-addressed store, hash-verified

171 * #610. Iterating keeps memory O(1) in the node count.
172 */
173function* methodAndFunctionNodes(queries: QueryBuilder): IterableIterator<Node> {
174 yield* queries.iterateNodesByKind('method');
175 yield* queries.iterateNodesByKind('function');
176}
177
178/** Phase 1: field-backed observer channels (registrar/dispatcher share a store). */
179async function fieldChannelEdges(queries: QueryBuilder, ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> {

Callers 2

fieldChannelEdgesFunction · 0.85
closureCollectionEdgesFunction · 0.85

Calls 1

iterateNodesByKindMethod · 0.65

Tested by

no test coverage detected