@colbymchenry/codegraph-win32-arm64 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +1 -1
- package/bin/codegraph.cmd +1 -1
- package/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.d.ts +3 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +427 -684
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +30 -74
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/bin/fatal-handler.js +0 -46
- package/lib/dist/bin/fatal-handler.js.map +1 -1
- package/lib/dist/bin/node-version-check.js +0 -33
- package/lib/dist/bin/node-version-check.js.map +1 -1
- package/lib/dist/bin/uninstall.js +0 -19
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/bin/viewer-gate.js +0 -14
- package/lib/dist/bin/viewer-gate.js.map +1 -1
- package/lib/dist/compile-cache.d.ts +2 -0
- package/lib/dist/compile-cache.d.ts.map +1 -0
- package/lib/dist/compile-cache.js +45 -0
- package/lib/dist/compile-cache.js.map +1 -0
- package/lib/dist/context/formatter.js +3 -66
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +44 -1
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +123 -430
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/context/markers.js +0 -17
- package/lib/dist/context/markers.js.map +1 -1
- package/lib/dist/db/index.d.ts +44 -1
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +123 -395
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +11 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +71 -79
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/name-substring-index.d.ts +63 -0
- package/lib/dist/db/name-substring-index.d.ts.map +1 -0
- package/lib/dist/db/name-substring-index.js +151 -0
- package/lib/dist/db/name-substring-index.js.map +1 -0
- package/lib/dist/db/node-sqlite.d.ts +19 -0
- package/lib/dist/db/node-sqlite.d.ts.map +1 -0
- package/lib/dist/db/node-sqlite.js +23 -0
- package/lib/dist/db/node-sqlite.js.map +1 -0
- package/lib/dist/db/open-error.d.ts +36 -0
- package/lib/dist/db/open-error.d.ts.map +1 -0
- package/lib/dist/db/open-error.js +63 -0
- package/lib/dist/db/open-error.js.map +1 -0
- package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
- package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
- package/lib/dist/db/parameter-flow-queries.js +168 -0
- package/lib/dist/db/parameter-flow-queries.js.map +1 -0
- package/lib/dist/db/queries.d.ts +641 -40
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1370 -1398
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/reference-tail.d.ts +83 -0
- package/lib/dist/db/reference-tail.d.ts.map +1 -0
- package/lib/dist/db/reference-tail.js +68 -0
- package/lib/dist/db/reference-tail.js.map +1 -0
- package/lib/dist/db/schema.sql +18 -2
- package/lib/dist/db/sqlite-adapter.d.ts +18 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +12 -62
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
- package/lib/dist/db/synthesis-stage.js +2 -6
- package/lib/dist/db/synthesis-stage.js.map +1 -1
- package/lib/dist/db/wal-valve.js +1 -153
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.js +0 -37
- package/lib/dist/db/wsl-shared-index.js.map +1 -1
- package/lib/dist/directory.d.ts +81 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +91 -500
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/engine.d.ts +15 -0
- package/lib/dist/engine.d.ts.map +1 -0
- package/lib/dist/engine.js +34 -0
- package/lib/dist/engine.js.map +1 -0
- package/lib/dist/errors.d.ts +10 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +8 -101
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +15 -133
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +102 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +260 -179
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +37 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/dfm-extractor.js +0 -21
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -24
- package/lib/dist/extraction/extraction-version.js.map +1 -1
- package/lib/dist/extraction/function-ref.d.ts +40 -0
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +145 -206
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +29 -154
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +47 -4
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +91 -374
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +216 -11
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +703 -1368
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.js +0 -16
- package/lib/dist/extraction/kernel/decode.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts +3 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +29 -131
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/kernel/layout.js +42 -76
- package/lib/dist/extraction/kernel/layout.js.map +1 -1
- package/lib/dist/extraction/kernel/loader.js +0 -37
- package/lib/dist/extraction/kernel/loader.js.map +1 -1
- package/lib/dist/extraction/languages/arkts.js +0 -59
- package/lib/dist/extraction/languages/arkts.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +140 -28
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +876 -823
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/cfquery.js +0 -9
- package/lib/dist/extraction/languages/cfquery.js.map +1 -1
- package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
- package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/cfscript.js +80 -9
- package/lib/dist/extraction/languages/cfscript.js.map +1 -1
- package/lib/dist/extraction/languages/cobol.js +0 -114
- package/lib/dist/extraction/languages/cobol.js.map +1 -1
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
- package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
- package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +11 -54
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts +84 -0
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +335 -159
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +15 -102
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/go.d.ts +48 -0
- package/lib/dist/extraction/languages/go.d.ts.map +1 -1
- package/lib/dist/extraction/languages/go.js +102 -31
- package/lib/dist/extraction/languages/go.js.map +1 -1
- package/lib/dist/extraction/languages/index.js +0 -6
- package/lib/dist/extraction/languages/index.js.map +1 -1
- package/lib/dist/extraction/languages/java.d.ts.map +1 -1
- package/lib/dist/extraction/languages/java.js +67 -78
- package/lib/dist/extraction/languages/java.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +2 -12
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +15 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +69 -150
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.js +2 -39
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/luau.js +0 -14
- package/lib/dist/extraction/languages/luau.js.map +1 -1
- package/lib/dist/extraction/languages/nix.js +0 -16
- package/lib/dist/extraction/languages/nix.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +5 -16
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
- package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
- package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
- package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
- package/lib/dist/extraction/languages/pascal-system.js +23 -0
- package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
- package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
- package/lib/dist/extraction/languages/pascal.js +3 -4
- package/lib/dist/extraction/languages/pascal.js.map +1 -1
- package/lib/dist/extraction/languages/php.js +5 -42
- package/lib/dist/extraction/languages/php.js.map +1 -1
- package/lib/dist/extraction/languages/python.js +2 -20
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/r.js +8 -78
- package/lib/dist/extraction/languages/r.js.map +1 -1
- package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
- package/lib/dist/extraction/languages/ruby.js +17 -25
- package/lib/dist/extraction/languages/ruby.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +10 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +15 -47
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.js +5 -41
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/solidity.js +1 -82
- package/lib/dist/extraction/languages/solidity.js.map +1 -1
- package/lib/dist/extraction/languages/swift.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +33 -27
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/terraform.js +6 -152
- package/lib/dist/extraction/languages/terraform.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +71 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +86 -41
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
- package/lib/dist/extraction/languages/vbnet.js +9 -42
- package/lib/dist/extraction/languages/vbnet.js.map +1 -1
- package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
- package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
- package/lib/dist/extraction/lazy-frameworks.js +8 -0
- package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
- package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +89 -148
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +0 -78
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +11 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +41 -5
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +74 -158
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.d.ts +1 -1
- package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
- package/lib/dist/extraction/parse-worker.js +7 -58
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/razor-extractor.d.ts +9 -0
- package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/razor-extractor.js +45 -69
- package/lib/dist/extraction/razor-extractor.js.map +1 -1
- package/lib/dist/extraction/razor-script.d.ts +23 -0
- package/lib/dist/extraction/razor-script.d.ts.map +1 -0
- package/lib/dist/extraction/razor-script.js +244 -0
- package/lib/dist/extraction/razor-script.js.map +1 -0
- package/lib/dist/extraction/sfc-script.d.ts +85 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +136 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.d.ts +1 -1
- package/lib/dist/extraction/store-worker.d.ts.map +1 -1
- package/lib/dist/extraction/store-worker.js +5 -37
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +8 -32
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +16 -122
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +6 -153
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.js +0 -7
- package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +455 -9
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +1998 -2517
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +20 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +113 -115
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +164 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
- package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
- package/lib/dist/extraction/vue-template-calls.js +497 -0
- package/lib/dist/extraction/vue-template-calls.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/file-limits.d.ts +8 -0
- package/lib/dist/file-limits.d.ts.map +1 -1
- package/lib/dist/file-limits.js +13 -28
- package/lib/dist/file-limits.js.map +1 -1
- package/lib/dist/graph/branch-guards.d.ts +17 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +98 -250
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/call-sites.d.ts +12 -0
- package/lib/dist/graph/call-sites.d.ts.map +1 -0
- package/lib/dist/graph/call-sites.js +17 -0
- package/lib/dist/graph/call-sites.js.map +1 -0
- package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
- package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
- package/lib/dist/graph/cobol-copybooks.js +45 -0
- package/lib/dist/graph/cobol-copybooks.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +26 -4
- package/lib/dist/graph/dead-code.d.ts.map +1 -1
- package/lib/dist/graph/dead-code.js +157 -311
- package/lib/dist/graph/dead-code.js.map +1 -1
- package/lib/dist/graph/dynamic-boundary-report.js +1 -88
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
- package/lib/dist/graph/file-cycles.d.ts +20 -0
- package/lib/dist/graph/file-cycles.d.ts.map +1 -0
- package/lib/dist/graph/file-cycles.js +79 -0
- package/lib/dist/graph/file-cycles.js.map +1 -0
- package/lib/dist/graph/go-package.d.ts +27 -0
- package/lib/dist/graph/go-package.d.ts.map +1 -0
- package/lib/dist/graph/go-package.js +49 -0
- package/lib/dist/graph/go-package.js.map +1 -0
- package/lib/dist/graph/index.d.ts +2 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +4 -6
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +85 -219
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/graph/owning-package.d.ts +59 -0
- package/lib/dist/graph/owning-package.d.ts.map +1 -0
- package/lib/dist/graph/owning-package.js +120 -0
- package/lib/dist/graph/owning-package.js.map +1 -0
- package/lib/dist/graph/queries.d.ts +2 -2
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -135
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +15 -3
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
- package/lib/dist/graph/symbol-lookup.js +47 -89
- package/lib/dist/graph/symbol-lookup.js.map +1 -1
- package/lib/dist/graph/synthesized-hop.d.ts +37 -0
- package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
- package/lib/dist/graph/synthesized-hop.js +62 -0
- package/lib/dist/graph/synthesized-hop.js.map +1 -0
- package/lib/dist/graph/test-code.d.ts +21 -0
- package/lib/dist/graph/test-code.d.ts.map +1 -0
- package/lib/dist/graph/test-code.js +50 -0
- package/lib/dist/graph/test-code.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +31 -2
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +98 -226
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.js +0 -138
- package/lib/dist/graph/type-hierarchy.js.map +1 -1
- package/lib/dist/index.d.ts +195 -25
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +697 -1105
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.js +0 -39
- package/lib/dist/installer/beta-signup.js.map +1 -1
- package/lib/dist/installer/config-writer.js +0 -24
- package/lib/dist/installer/config-writer.js.map +1 -1
- package/lib/dist/installer/index.d.ts +9 -5
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +25 -159
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/instructions-template.d.ts +1 -1
- package/lib/dist/installer/instructions-template.js +0 -37
- package/lib/dist/installer/instructions-template.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +0 -113
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/bob.d.ts +20 -0
- package/lib/dist/installer/targets/bob.d.ts.map +1 -0
- package/lib/dist/installer/targets/bob.js +83 -0
- package/lib/dist/installer/targets/bob.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +1 -185
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +17 -109
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.js +2 -54
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
- package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
- package/lib/dist/installer/targets/copilot-vscode.js +0 -58
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
- package/lib/dist/installer/targets/cursor.js +7 -88
- package/lib/dist/installer/targets/cursor.js.map +1 -1
- package/lib/dist/installer/targets/droid.d.ts +18 -0
- package/lib/dist/installer/targets/droid.d.ts.map +1 -0
- package/lib/dist/installer/targets/droid.js +92 -0
- package/lib/dist/installer/targets/droid.js.map +1 -0
- package/lib/dist/installer/targets/dsh.d.ts +35 -0
- package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
- package/lib/dist/installer/targets/dsh.js +267 -0
- package/lib/dist/installer/targets/dsh.js.map +1 -0
- package/lib/dist/installer/targets/gemini.js +0 -37
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/grok.d.ts +25 -0
- package/lib/dist/installer/targets/grok.d.ts.map +1 -0
- package/lib/dist/installer/targets/grok.js +96 -0
- package/lib/dist/installer/targets/grok.js.map +1 -0
- package/lib/dist/installer/targets/hermes.d.ts +19 -7
- package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
- package/lib/dist/installer/targets/hermes.js +218 -214
- package/lib/dist/installer/targets/hermes.js.map +1 -1
- package/lib/dist/installer/targets/json-config.d.ts +45 -0
- package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
- package/lib/dist/installer/targets/json-config.js +128 -0
- package/lib/dist/installer/targets/json-config.js.map +1 -0
- package/lib/dist/installer/targets/kimi.d.ts +21 -0
- package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
- package/lib/dist/installer/targets/kimi.js +97 -0
- package/lib/dist/installer/targets/kimi.js.map +1 -0
- package/lib/dist/installer/targets/kiro.js +1 -41
- package/lib/dist/installer/targets/kiro.js.map +1 -1
- package/lib/dist/installer/targets/opencode.js +0 -102
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/pi.d.ts +24 -0
- package/lib/dist/installer/targets/pi.d.ts.map +1 -0
- package/lib/dist/installer/targets/pi.js +100 -0
- package/lib/dist/installer/targets/pi.js.map +1 -0
- package/lib/dist/installer/targets/qoder.d.ts +23 -0
- package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
- package/lib/dist/installer/targets/qoder.js +83 -0
- package/lib/dist/installer/targets/qoder.js.map +1 -0
- package/lib/dist/installer/targets/qwen.d.ts +21 -0
- package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
- package/lib/dist/installer/targets/qwen.js +115 -0
- package/lib/dist/installer/targets/qwen.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +18 -25
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +81 -11
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +183 -129
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +82 -6
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +318 -112
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +1 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/installer/targets/types.js +0 -13
- package/lib/dist/installer/targets/types.js.map +1 -1
- package/lib/dist/installer/targets/windsurf.d.ts +22 -0
- package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
- package/lib/dist/installer/targets/windsurf.js +90 -0
- package/lib/dist/installer/targets/windsurf.js.map +1 -0
- package/lib/dist/lazy-engine.d.ts +22 -0
- package/lib/dist/lazy-engine.d.ts.map +1 -0
- package/lib/dist/lazy-engine.js +16 -0
- package/lib/dist/lazy-engine.js.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +0 -6
- package/lib/dist/mcp/answer-freshness.js.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +2 -23
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +2 -79
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +44 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +189 -118
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +23 -0
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +89 -373
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +4 -78
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/early-ppid.js +0 -24
- package/lib/dist/mcp/early-ppid.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +10 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +41 -152
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.js +0 -108
- package/lib/dist/mcp/explore-dedup.js.map +1 -1
- package/lib/dist/mcp/explore-diagnostics.js +0 -116
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
- package/lib/dist/mcp/explore-session-state.js +0 -129
- package/lib/dist/mcp/explore-session-state.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +5 -4
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.d.ts +7 -1
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
- package/lib/dist/mcp/index-freshness.js +20 -12
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/index-version-warning.d.ts +21 -0
- package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
- package/lib/dist/mcp/index-version-warning.js +38 -0
- package/lib/dist/mcp/index-version-warning.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +19 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +118 -293
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +106 -121
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/ppid-watchdog.js +0 -24
- package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
- package/lib/dist/mcp/process-identity.d.ts +42 -0
- package/lib/dist/mcp/process-identity.d.ts.map +1 -0
- package/lib/dist/mcp/process-identity.js +130 -0
- package/lib/dist/mcp/process-identity.js.map +1 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +55 -21
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +26 -8
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +209 -223
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +58 -3
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +140 -100
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +24 -36
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.js +0 -31
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +27 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +29 -130
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +1 -48
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/stdin-teardown.js +0 -28
- package/lib/dist/mcp/stdin-teardown.js.map +1 -1
- package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
- package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
- package/lib/dist/mcp/stdout-teardown.js +20 -0
- package/lib/dist/mcp/stdout-teardown.js.map +1 -0
- package/lib/dist/mcp/tools.d.ts +159 -20
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +730 -3545
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/transport.d.ts.map +1 -1
- package/lib/dist/mcp/transport.js +4 -96
- package/lib/dist/mcp/transport.js.map +1 -1
- package/lib/dist/mcp/version.d.ts +13 -1
- package/lib/dist/mcp/version.d.ts.map +1 -1
- package/lib/dist/mcp/version.js +19 -21
- package/lib/dist/mcp/version.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +11 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
- package/lib/dist/mcp/writer-lock.js +49 -46
- package/lib/dist/mcp/writer-lock.js.map +1 -1
- package/lib/dist/project-config.js +1 -138
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +7 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +19 -52
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/ambient-modules.d.ts +185 -0
- package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
- package/lib/dist/resolution/ambient-modules.js +732 -0
- package/lib/dist/resolution/ambient-modules.js.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +96 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +695 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
- package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
- package/lib/dist/resolution/c-feature-variants.js +249 -0
- package/lib/dist/resolution/c-feature-variants.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
- package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
- package/lib/dist/resolution/c-macro-renames.js +95 -0
- package/lib/dist/resolution/c-macro-renames.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +1487 -1234
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
- package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
- package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
- package/lib/dist/resolution/cooperative-yield.js +0 -27
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-constructor.js +15 -17
- package/lib/dist/resolution/cpp-constructor.js.map +1 -1
- package/lib/dist/resolution/cpp-includers.d.ts +46 -0
- package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-includers.js +153 -0
- package/lib/dist/resolution/cpp-includers.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +60 -61
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
- package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-namespaces.js +151 -0
- package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
- package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-raw-strings.js +167 -0
- package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
- package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-supertypes.js +322 -0
- package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
- package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
- package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
- package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-type-aliases.js +648 -0
- package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
- package/lib/dist/resolution/dart-libraries.d.ts +75 -0
- package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
- package/lib/dist/resolution/dart-libraries.js +721 -0
- package/lib/dist/resolution/dart-libraries.js.map +1 -0
- package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
- package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
- package/lib/dist/resolution/dart-local-scope.js +565 -0
- package/lib/dist/resolution/dart-local-scope.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +959 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +30 -60
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
- package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
- package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/cics.js +7 -33
- package/lib/dist/resolution/frameworks/cics.js.map +1 -1
- package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
- package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
- package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
- package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/component-folder.js +11 -0
- package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +106 -101
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
- package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/drupal.js +377 -142
- package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +79 -65
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +64 -183
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +215 -173
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +11 -112
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +15 -61
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/goframe.js +1 -55
- package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +16 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +20 -48
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +209 -147
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +291 -71
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +33 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +236 -192
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
- package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
- package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +11 -66
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/object-literal.js +0 -21
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/package-deps.js +35 -26
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +31 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +27 -33
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +106 -116
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +1 -166
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +17 -7
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +21 -79
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +68 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +1721 -114
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +152 -52
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +51 -70
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +9 -74
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
- package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +199 -167
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/terraform.js +1 -85
- package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts +26 -10
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +147 -147
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +69 -107
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
- package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
- package/lib/dist/resolution/go-module.d.ts +23 -7
- package/lib/dist/resolution/go-module.d.ts.map +1 -1
- package/lib/dist/resolution/go-module.js +21 -24
- package/lib/dist/resolution/go-module.js.map +1 -1
- package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
- package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
- package/lib/dist/resolution/go-stdlib-methods.js +224 -0
- package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
- package/lib/dist/resolution/goframe-synthesizer.js +2 -53
- package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +298 -23
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +1802 -1280
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +449 -5
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +1477 -981
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +14 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +15 -13
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
- package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
- package/lib/dist/resolution/js-class-expressions.js +25 -0
- package/lib/dist/resolution/js-class-expressions.js.map +1 -0
- package/lib/dist/resolution/js-super-calls.d.ts +18 -0
- package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
- package/lib/dist/resolution/js-super-calls.js +94 -0
- package/lib/dist/resolution/js-super-calls.js.map +1 -0
- package/lib/dist/resolution/jsx-code.d.ts +28 -0
- package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
- package/lib/dist/resolution/jsx-code.js +459 -0
- package/lib/dist/resolution/jsx-code.js.map +1 -0
- package/lib/dist/resolution/lru-cache.d.ts +5 -13
- package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
- package/lib/dist/resolution/lru-cache.js +43 -32
- package/lib/dist/resolution/lru-cache.js.map +1 -1
- package/lib/dist/resolution/memory-budget.js +0 -52
- package/lib/dist/resolution/memory-budget.js.map +1 -1
- package/lib/dist/resolution/module-importers.d.ts +185 -0
- package/lib/dist/resolution/module-importers.d.ts.map +1 -0
- package/lib/dist/resolution/module-importers.js +588 -0
- package/lib/dist/resolution/module-importers.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +891 -8
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +25013 -2928
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.js +46 -28
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/override-parameters.d.ts +40 -0
- package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/override-parameters.js +339 -0
- package/lib/dist/resolution/override-parameters.js.map +1 -0
- package/lib/dist/resolution/parameter-flow.d.ts +218 -0
- package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/parameter-flow.js +474 -0
- package/lib/dist/resolution/parameter-flow.js.map +1 -0
- package/lib/dist/resolution/pascal-scope.d.ts +91 -0
- package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
- package/lib/dist/resolution/pascal-scope.js +961 -0
- package/lib/dist/resolution/pascal-scope.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +32 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +43 -110
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/project-scans.d.ts +38 -0
- package/lib/dist/resolution/project-scans.d.ts.map +1 -0
- package/lib/dist/resolution/project-scans.js +30 -0
- package/lib/dist/resolution/project-scans.js.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts +2 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +67 -48
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +43 -3
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +55 -97
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts +1 -1
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +10 -36
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
- package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
- package/lib/dist/resolution/resurrect-ref.js +19 -0
- package/lib/dist/resolution/resurrect-ref.js.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
- package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-constant-paths.js +255 -0
- package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
- package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
- package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
- package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
- package/lib/dist/resolution/rust-scopes.d.ts +120 -0
- package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
- package/lib/dist/resolution/rust-scopes.js +730 -0
- package/lib/dist/resolution/rust-scopes.js.map +1 -0
- package/lib/dist/resolution/shopify-themes.d.ts +10 -0
- package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
- package/lib/dist/resolution/shopify-themes.js +19 -0
- package/lib/dist/resolution/shopify-themes.js.map +1 -0
- package/lib/dist/resolution/strip-comments.d.ts +20 -1
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +164 -119
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
- package/lib/dist/resolution/swift-objc-bridge.js +0 -160
- package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +355 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/synth-utils.js +1 -22
- package/lib/dist/resolution/synth-utils.js.map +1 -1
- package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
- package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
- package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +7 -2
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +318 -121
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +34 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +285 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +209 -10
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +0 -47
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
- package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
- package/lib/dist/resolution/vbnet-receivers.js +1482 -0
- package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/workspace-packages.d.ts +206 -15
- package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
- package/lib/dist/resolution/workspace-packages.js +570 -152
- package/lib/dist/resolution/workspace-packages.js.map +1 -1
- package/lib/dist/search/identifier-segments.js +2 -93
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-parser.js +0 -54
- package/lib/dist/search/query-parser.js.map +1 -1
- package/lib/dist/search/query-paths.js +0 -167
- package/lib/dist/search/query-paths.js.map +1 -1
- package/lib/dist/search/query-utils.d.ts +44 -0
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +120 -198
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/git-hooks.d.ts +14 -5
- package/lib/dist/sync/git-hooks.d.ts.map +1 -1
- package/lib/dist/sync/git-hooks.js +118 -65
- package/lib/dist/sync/git-hooks.js.map +1 -1
- package/lib/dist/sync/index.js +0 -14
- package/lib/dist/sync/index.js.map +1 -1
- package/lib/dist/sync/watch-policy.js +0 -45
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +29 -11
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +83 -487
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +29 -2
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +59 -78
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +68 -146
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +46 -0
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +15 -44
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.js +0 -19
- package/lib/dist/ui/color.js.map +1 -1
- package/lib/dist/ui/glyphs.js +2 -45
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +0 -21
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +0 -22
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
- package/lib/dist/ui-server/api/deadcode.js +2 -31
- package/lib/dist/ui-server/api/deadcode.js.map +1 -1
- package/lib/dist/ui-server/api/effects.d.ts +7 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
- package/lib/dist/ui-server/api/effects.js +20 -103
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +73 -130
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/events.js +0 -145
- package/lib/dist/ui-server/api/events.js.map +1 -1
- package/lib/dist/ui-server/api/file.js +0 -80
- package/lib/dist/ui-server/api/file.js.map +1 -1
- package/lib/dist/ui-server/api/filecode.js +0 -95
- package/lib/dist/ui-server/api/filecode.js.map +1 -1
- package/lib/dist/ui-server/api/flow.js +0 -149
- package/lib/dist/ui-server/api/flow.js.map +1 -1
- package/lib/dist/ui-server/api/hierarchy.js +0 -28
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
- package/lib/dist/ui-server/api/index.js +0 -88
- package/lib/dist/ui-server/api/index.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts +41 -6
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +95 -308
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.d.ts.map +1 -1
- package/lib/dist/ui-server/api/node.js +4 -109
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/nodes.js +0 -16
- package/lib/dist/ui-server/api/nodes.js.map +1 -1
- package/lib/dist/ui-server/api/program.js +0 -90
- package/lib/dist/ui-server/api/program.js.map +1 -1
- package/lib/dist/ui-server/api/respond.js +0 -60
- package/lib/dist/ui-server/api/respond.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts +6 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +18 -39
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts +2 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +47 -47
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +16 -171
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/search.js +0 -62
- package/lib/dist/ui-server/api/search.js.map +1 -1
- package/lib/dist/ui-server/api/session.js +0 -58
- package/lib/dist/ui-server/api/session.js.map +1 -1
- package/lib/dist/ui-server/api/source.d.ts.map +1 -1
- package/lib/dist/ui-server/api/source.js +0 -161
- package/lib/dist/ui-server/api/source.js.map +1 -1
- package/lib/dist/ui-server/api/stats.js +0 -58
- package/lib/dist/ui-server/api/stats.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +105 -373
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trail-store.js +24 -106
- package/lib/dist/ui-server/api/trail-store.js.map +1 -1
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
- package/lib/dist/ui-server/api/trails.js +20 -94
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.d.ts +10 -2
- package/lib/dist/ui-server/api/when.d.ts.map +1 -1
- package/lib/dist/ui-server/api/when.js +32 -44
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/api/wire.js +0 -58
- package/lib/dist/ui-server/api/wire.js.map +1 -1
- package/lib/dist/ui-server/assets.js +0 -35
- package/lib/dist/ui-server/assets.js.map +1 -1
- package/lib/dist/ui-server/constants.js +0 -26
- package/lib/dist/ui-server/constants.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +114 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +7 -133
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
- package/lib/dist/ui-server/highlight/languages.js +0 -31
- package/lib/dist/ui-server/highlight/languages.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +15 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +25 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -1
- package/lib/dist/ui-server/index.js +35 -103
- package/lib/dist/ui-server/index.js.map +1 -1
- package/lib/dist/ui-server/open-browser.js +0 -34
- package/lib/dist/ui-server/open-browser.js.map +1 -1
- package/lib/dist/ui-server/security.d.ts +5 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -1
- package/lib/dist/ui-server/security.js +11 -147
- package/lib/dist/ui-server/security.js.map +1 -1
- package/lib/dist/ui-server/static.js +0 -41
- package/lib/dist/ui-server/static.js.map +1 -1
- package/lib/dist/upgrade/index.d.ts +61 -10
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +191 -225
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/upgrade/remove-binary.js +2 -67
- package/lib/dist/upgrade/remove-binary.js.map +1 -1
- package/lib/dist/upgrade/update-check.js +1 -81
- package/lib/dist/upgrade/update-check.js.map +1 -1
- package/lib/dist/utils.d.ts +69 -1
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +224 -266
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
- package/lib/dist/viewer/index.html +1 -1
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +53 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/ignore/README.md +138 -8
- package/lib/node_modules/ignore/index.d.ts +56 -20
- package/lib/node_modules/ignore/index.js +1033 -221
- package/lib/node_modules/ignore/legacy.js +871 -178
- package/lib/node_modules/ignore/package.json +10 -4
- package/lib/package.json +14 -8
- package/node.exe +2 -2
- package/package.json +1 -1
|
@@ -34,88 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.cFnPointerDispatchEdges = cFnPointerDispatchEdges;
|
|
37
|
-
/**
|
|
38
|
-
* C/C++ function-pointer dispatch synthesis (#932).
|
|
39
|
-
*
|
|
40
|
-
* C/C++ polymorphism is the function pointer: a struct carries a fn-pointer
|
|
41
|
-
* field (`int (*fn)(int)`, or a fn-pointer-typedef field `hook_func func`),
|
|
42
|
-
* concrete functions are *registered* into it through a table
|
|
43
|
-
* (`static struct cmd cmds[] = {{"add", cmd_add}, …}`, a designated
|
|
44
|
-
* `.fn = cmd_add`, or `x->fn = cmd_add`), and the dispatcher calls through it
|
|
45
|
-
* indirectly (`p->fn(argv)`). Static extraction captures neither the
|
|
46
|
-
* registration→field binding nor the indirect call, so the dispatcher→handler
|
|
47
|
-
* edge is missing and `git`'s `run_builtin` looks like it calls nothing, the
|
|
48
|
-
* hooks in `hook_demo.c` are unreachable, etc.
|
|
49
|
-
*
|
|
50
|
-
* This bridges it, keyed by **(struct type, fn-pointer field)**:
|
|
51
|
-
* • registrations — a function bound to `S.field` via a positional
|
|
52
|
-
* initializer (matched by field index), a designated `.field = fn`, or a
|
|
53
|
-
* direct `x.field = fn` / `x->field = fn` assignment;
|
|
54
|
-
* • dispatch — `recv->field(…)` / `recv.field(…)` where `recv` resolves to a
|
|
55
|
-
* value of struct type `S` (from the enclosing function's params / locals,
|
|
56
|
-
* or by walking a chained/array receiver `c->cmd->proc` across field types),
|
|
57
|
-
* falling back to the field name when it is unique to one struct;
|
|
58
|
-
* • field←field propagation — `a->f = b->g` merges `B.g`'s handlers into
|
|
59
|
-
* `A.f`, so a generic single-slot hook that is reassigned from a registry
|
|
60
|
-
* (the `hook_demo.c` shape: `h->func = found->fn`) still resolves.
|
|
61
|
-
*
|
|
62
|
-
* Also handles **macro-built tables** (#991) — the dominant real-world shape,
|
|
63
|
-
* e.g. redis' command table, sqlite's builtin functions, and vim's `:ex` /
|
|
64
|
-
* normal-mode commands. The fn-pointer arg lives inside a macro call
|
|
65
|
-
* (`MAKE_CMD(…,proc,…)` / `FUNCTION(…,xFunc)` / `EXCMD(…,fn,…)`) in a generated
|
|
66
|
-
* or `#include`-d file; the table's struct type may itself be an object-macro
|
|
67
|
-
* alias; the field may use a function-TYPE typedef; the struct may be defined
|
|
68
|
-
* INLINE with the array; and the whole thing may sit behind `#ifdef` switched on
|
|
69
|
-
* by the includer. The registration pass reads each `#include`-d file as a unit
|
|
70
|
-
* with the includer's effective macro env (own + headers) in scope, evaluates
|
|
71
|
-
* its `#ifdef`s against the includer's defined set, expands object/function
|
|
72
|
-
* macros, peels a brace-wrapped element, and parses an inline struct in place —
|
|
73
|
-
* then reads the positional/designated bindings. Dispatch additionally resolves
|
|
74
|
-
* an array subscript through a file-scope table (`(cmdnames[i].cmd_func)(…)`).
|
|
75
|
-
*
|
|
76
|
-
* Also bridges **bare arrays of function pointers** (no struct, no field) —
|
|
77
|
-
* `opcode_t *opcodes[256] = {nop,…}` dispatched `opcodes[op](…)` (SameBoy's CPU),
|
|
78
|
-
* `zend_rc_dtor_func_t t[] = {[IS_STRING]=(cast)fn,…}` dispatched `t[GC_TYPE(p)](…)`
|
|
79
|
-
* (php's Zend) — keyed by the array VARIABLE name. The element type must be a
|
|
80
|
-
* function typedef (the precision gate), entries are literal function names, and
|
|
81
|
-
* the same-file table wins on a name collision (two file-local `opcodes[256]`).
|
|
82
|
-
*
|
|
83
|
-
* Whole-graph pass after base resolution; all edges are `provenance:'heuristic'`
|
|
84
|
-
* (`synthesizedBy:'fn-pointer-dispatch'`). High precision via the (type, field)
|
|
85
|
-
* key + a real-function gate; a project with no fn-pointer dispatch is a no-op.
|
|
86
|
-
*
|
|
87
|
-
* ## Fuse-then-link architecture (§7a.8, task #5 step 1)
|
|
88
|
-
*
|
|
89
|
-
* The pass used to sweep every file's text FOUR times (typedefs, registrations,
|
|
90
|
-
* propagation, dispatch), and on the Linux kernel the all-or-nothing source
|
|
91
|
-
* cache declines, so each sweep re-read + re-stripped the whole corpus — 4.4
|
|
92
|
-
* strips/file, ~78s of the ~230s kernel-scale wall (§7a.8 calibration). It now
|
|
93
|
-
* runs as ONE extraction sweep plus filtered linking stages:
|
|
94
|
-
*
|
|
95
|
-
* 1. **Extraction sweep** — reads + strips each file ONCE and collects, per
|
|
96
|
-
* file: typedef names, each struct node's field declarations (parsed
|
|
97
|
-
* structurally, fn-pointer classification deferred — the typedef sets
|
|
98
|
-
* aren't complete mid-sweep), the resolved local includes, and cheap
|
|
99
|
-
* SURVIVAL FILTERS for the later stages (distinct initializer type
|
|
100
|
-
* tokens, array element types, inline-struct summaries, field-assignment
|
|
101
|
-
* field pairs, dispatch field / array names — all interned, a few MB even
|
|
102
|
-
* on the kernel).
|
|
103
|
-
* 2. **Struct-layout linking** — classifies the deferred fields against the
|
|
104
|
-
* now-complete typedef sets and registers layouts by replaying the struct
|
|
105
|
-
* kind-scan, so registration order (which decides same-name layout
|
|
106
|
-
* precedence) is byte-identical to the old dedicated pass.
|
|
107
|
-
* 3. **Registration / propagation / dispatch** — the original pass bodies,
|
|
108
|
-
* UNCHANGED, but each file is first checked against its survival filter
|
|
109
|
-
* and only surviving files are re-stripped (LRU-served). The filters only
|
|
110
|
-
* ever over-approximate: a filtered-out file is one where every match
|
|
111
|
-
* would have failed the pass's own gates before any side effect, so
|
|
112
|
-
* skipping it cannot change the edge set. On the kernel only ~16% of
|
|
113
|
-
* files have any dispatch-shaped match at all, so the lazy re-strips are
|
|
114
|
-
* a fraction of a sweep and total strip work drops ~4.4× → ~1.5×.
|
|
115
|
-
*
|
|
116
|
-
* The extraction sweep is also the step-2 boundary: a native per-file extractor
|
|
117
|
-
* can replace the sweep's scans without touching the linking stages.
|
|
118
|
-
*/
|
|
119
37
|
const path = __importStar(require("node:path"));
|
|
120
38
|
const memory_budget_1 = require("./memory-budget");
|
|
121
39
|
const lru_cache_1 = require("./lru-cache");
|
|
@@ -123,17 +41,12 @@ const strip_comments_1 = require("./strip-comments");
|
|
|
123
41
|
const loader_1 = require("../extraction/kernel/loader");
|
|
124
42
|
const C_CPP_EXT = /\.(c|h|cc|cpp|cxx|hpp|hh|hxx|cppm|ipp|inl|tcc)$/i;
|
|
125
43
|
const FN_KINDS = new Set(['function', 'method']);
|
|
126
|
-
const FANOUT_CAP = 300;
|
|
127
|
-
/** Slice a node's body from a pre-split line array — the per-file sweeps
|
|
128
|
-
* call this once per NODE, and splitting the whole file per node was an
|
|
129
|
-
* O(nodes × file-size) term (~1.6M full-file splits on the Linux tree,
|
|
130
|
-
* §7a.3 cFnPtr round). Split once per file, slice many times. */
|
|
44
|
+
const FANOUT_CAP = 300;
|
|
131
45
|
function sliceLinesPre(lines, startLine, endLine) {
|
|
132
46
|
if (!startLine)
|
|
133
47
|
return '';
|
|
134
48
|
return lines.slice(startLine - 1, endLine ?? startLine).join('\n');
|
|
135
49
|
}
|
|
136
|
-
/** Index of the `}` matching the `{` at `open` (which must point at a `{`). -1 if unbalanced. */
|
|
137
50
|
function matchBrace(src, open) {
|
|
138
51
|
let depth = 0;
|
|
139
52
|
for (let i = open; i < src.length; i++) {
|
|
@@ -148,7 +61,6 @@ function matchBrace(src, open) {
|
|
|
148
61
|
}
|
|
149
62
|
return -1;
|
|
150
63
|
}
|
|
151
|
-
/** Split `body` on `sep` at brace/paren/bracket depth 0 (commas inside `{…}` / `(…)` stay together). */
|
|
152
64
|
function splitTopLevel(body, sep) {
|
|
153
65
|
const out = [];
|
|
154
66
|
let depth = 0;
|
|
@@ -167,7 +79,6 @@ function splitTopLevel(body, sep) {
|
|
|
167
79
|
out.push(body.slice(start));
|
|
168
80
|
return out;
|
|
169
81
|
}
|
|
170
|
-
/** Index of the `)` matching the `(` at `open` (which must point at a `(`). -1 if unbalanced. */
|
|
171
82
|
function matchParen(src, open) {
|
|
172
83
|
let depth = 0;
|
|
173
84
|
for (let i = open; i < src.length; i++) {
|
|
@@ -182,12 +93,6 @@ function matchParen(src, open) {
|
|
|
182
93
|
}
|
|
183
94
|
return -1;
|
|
184
95
|
}
|
|
185
|
-
/**
|
|
186
|
-
* Collect function-like macros from (comment-stripped) source, joining
|
|
187
|
-
* `\`-continuations first. Only object/positional table macros matter here, so
|
|
188
|
-
* variadic macros are skipped. Used to expand registration tables built through
|
|
189
|
-
* a macro (redis' `MAKE_CMD(…)`) before reading the struct-field bindings.
|
|
190
|
-
*/
|
|
191
96
|
function parseFunctionMacros(stripped) {
|
|
192
97
|
const out = new Map();
|
|
193
98
|
if (!stripped.includes('#define') && !stripped.includes('# define'))
|
|
@@ -198,16 +103,11 @@ function parseFunctionMacros(stripped) {
|
|
|
198
103
|
while ((m = RE.exec(joined))) {
|
|
199
104
|
const params = m[2].split(',').map((p) => p.trim()).filter(Boolean);
|
|
200
105
|
if (params.some((p) => p === '...' || p.endsWith('...')))
|
|
201
|
-
continue;
|
|
106
|
+
continue;
|
|
202
107
|
out.set(m[1], { params, expansion: m[3].trim() });
|
|
203
108
|
}
|
|
204
109
|
return out;
|
|
205
110
|
}
|
|
206
|
-
/**
|
|
207
|
-
* Collect object-like macros `#define NAME value` (NAME not immediately followed
|
|
208
|
-
* by `(`). redis aliases the table's struct type this way:
|
|
209
|
-
* `#define COMMAND_STRUCT redisCommand`, used as `struct COMMAND_STRUCT table[]`.
|
|
210
|
-
*/
|
|
211
111
|
function parseObjectMacros(stripped) {
|
|
212
112
|
const out = new Map();
|
|
213
113
|
if (!stripped.includes('#define') && !stripped.includes('# define'))
|
|
@@ -219,7 +119,6 @@ function parseObjectMacros(stripped) {
|
|
|
219
119
|
out.set(m[1], m[2].trim());
|
|
220
120
|
return out;
|
|
221
121
|
}
|
|
222
|
-
/** All macro names a file `#define`s (value-ful or not) — the "defined" set for #ifdef. */
|
|
223
122
|
function parseDefinedNames(stripped) {
|
|
224
123
|
const out = new Set();
|
|
225
124
|
if (!stripped.includes('#define') && !stripped.includes('# define'))
|
|
@@ -230,19 +129,10 @@ function parseDefinedNames(stripped) {
|
|
|
230
129
|
out.add(m[1]);
|
|
231
130
|
return out;
|
|
232
131
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Drop the inactive arms of `#ifdef`/`#ifndef`/`#if defined(X)`/`#else`/`#elif`/
|
|
235
|
-
* `#endif` given a set of defined macro names, keeping line offsets (inactive
|
|
236
|
-
* lines are blanked, not removed). A conditional whose expression we can't
|
|
237
|
-
* evaluate (`#if SOME_EXPR`) keeps its body — better to over-keep than to drop
|
|
238
|
-
* live code. This is what makes a header included with a switch macro defined
|
|
239
|
-
* (vim's `ex_cmds.h` under `DO_DECLARE_EXCMD`) expose only its active table.
|
|
240
|
-
*/
|
|
241
132
|
function evalConditionals(text, defined) {
|
|
242
133
|
if (!/#\s*if/.test(text))
|
|
243
134
|
return text;
|
|
244
135
|
const lines = text.split('\n');
|
|
245
|
-
// stack frame: parentActive = enclosing kept?; active = this arm kept?; taken = any arm taken yet
|
|
246
136
|
const stack = [];
|
|
247
137
|
const activeNow = () => (stack.length === 0 ? true : stack[stack.length - 1].active);
|
|
248
138
|
const condDefined = (expr) => {
|
|
@@ -252,7 +142,7 @@ function evalConditionals(text, defined) {
|
|
|
252
142
|
mm = expr.match(/^!\s*defined\s*\(?\s*(\w+)\s*\)?$/);
|
|
253
143
|
if (mm)
|
|
254
144
|
return !defined.has(mm[1]);
|
|
255
|
-
return null;
|
|
145
|
+
return null;
|
|
256
146
|
};
|
|
257
147
|
for (let i = 0; i < lines.length; i++) {
|
|
258
148
|
const t = lines[i].trim();
|
|
@@ -274,7 +164,7 @@ function evalConditionals(text, defined) {
|
|
|
274
164
|
if ((mm = t.match(/^#\s*if\s+(.+)$/))) {
|
|
275
165
|
const pa = activeNow();
|
|
276
166
|
const c = condDefined(mm[1].trim());
|
|
277
|
-
const cond = c === null ? true : c;
|
|
167
|
+
const cond = c === null ? true : c;
|
|
278
168
|
stack.push({ parentActive: pa, active: pa && cond, taken: cond });
|
|
279
169
|
lines[i] = '';
|
|
280
170
|
continue;
|
|
@@ -303,11 +193,10 @@ function evalConditionals(text, defined) {
|
|
|
303
193
|
continue;
|
|
304
194
|
}
|
|
305
195
|
if (!activeNow())
|
|
306
|
-
lines[i] = '';
|
|
196
|
+
lines[i] = '';
|
|
307
197
|
}
|
|
308
198
|
return lines.join('\n');
|
|
309
199
|
}
|
|
310
|
-
/** Resolve a type token through object-like macro aliases (transitive, capped). */
|
|
311
200
|
function resolveTypeName(name, objEnv) {
|
|
312
201
|
let n = name;
|
|
313
202
|
for (let i = 0; objEnv && i < 5; i++) {
|
|
@@ -319,18 +208,11 @@ function resolveTypeName(name, objEnv) {
|
|
|
319
208
|
}
|
|
320
209
|
return n;
|
|
321
210
|
}
|
|
322
|
-
/** Substitute call args for the macro's params (whole-token) in its expansion. */
|
|
323
211
|
function substituteMacro(def, args) {
|
|
324
212
|
const map = new Map();
|
|
325
213
|
def.params.forEach((p, i) => map.set(p, args[i] ?? ''));
|
|
326
214
|
return def.expansion.replace(/\b\w+\b/g, (tok) => (map.has(tok) ? map.get(tok) : tok));
|
|
327
215
|
}
|
|
328
|
-
/**
|
|
329
|
-
* Expand known function-like macro calls in `text` to a fixpoint (depth-capped).
|
|
330
|
-
* `MAKE_CMD("get",…,getCommand,…)` → the positional value list whose slots line
|
|
331
|
-
* up with the struct's fields, so the existing positional registration can read
|
|
332
|
-
* `getCommand` straight out of the `proc` slot.
|
|
333
|
-
*/
|
|
334
216
|
function expandMacroCalls(text, env) {
|
|
335
217
|
if (env.size === 0)
|
|
336
218
|
return text;
|
|
@@ -343,79 +225,35 @@ function expandMacroCalls(text, env) {
|
|
|
343
225
|
const def = env.get(m[1]);
|
|
344
226
|
if (!def)
|
|
345
227
|
continue;
|
|
346
|
-
const open = m.index + m[0].length - 1;
|
|
228
|
+
const open = m.index + m[0].length - 1;
|
|
347
229
|
const close = matchParen(out, open);
|
|
348
230
|
if (close < 0)
|
|
349
231
|
continue;
|
|
350
232
|
const args = splitTopLevel(out.slice(open + 1, close), ',').map((a) => a.trim());
|
|
351
233
|
out = out.slice(0, m.index) + substituteMacro(def, args) + out.slice(close + 1);
|
|
352
234
|
changed = true;
|
|
353
|
-
break;
|
|
235
|
+
break;
|
|
354
236
|
}
|
|
355
237
|
if (!changed)
|
|
356
238
|
break;
|
|
357
239
|
}
|
|
358
240
|
return out;
|
|
359
241
|
}
|
|
360
|
-
/** A fn-pointer field looks like `… (*name)(…)` — capture `name`. A
|
|
361
|
-
* calling-convention / attribute macro may precede the `*`
|
|
362
|
-
* (`(ZEND_FASTCALL *name)`), so allow leading word tokens. */
|
|
363
242
|
const FNPTR_DECL_RE = /\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/;
|
|
364
|
-
/** `typedef RET (*NAME)(…)` — a function-pointer typedef (CC/attr macro before
|
|
365
|
-
* the `*` allowed, as in php's `typedef void (ZEND_FASTCALL *fn_t)(…)`). */
|
|
366
243
|
const FNPTR_TYPEDEF_RE = /\btypedef\b[^;{}]*?\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/g;
|
|
367
|
-
/** A whole brace-free `typedef … ;` statement — capture the guts to spot the
|
|
368
|
-
* function-TYPE form `typedef RET NAME(params)` (no `(*name)` pointer form). */
|
|
369
244
|
const FNTYPE_TYPEDEF_STMT_RE = /\btypedef\b([^;{}]*);/g;
|
|
370
|
-
/** Return-type keywords that must never be mistaken for the typedef's name. */
|
|
371
245
|
const C_TYPE_KEYWORDS = new Set([
|
|
372
246
|
'void', 'int', 'char', 'short', 'long', 'unsigned', 'signed', 'float', 'double',
|
|
373
247
|
'const', 'struct', 'union', 'enum', 'static', 'volatile', 'register', 'inline',
|
|
374
248
|
]);
|
|
375
|
-
/** `#include "local/header"` — captured from RAW source (string contents survive). */
|
|
376
249
|
const INCLUDE_RE = /#[ \t]*include[ \t]+"([^"\n]+)"/g;
|
|
377
|
-
/** Included files worth scanning for registration tables (e.g. a generated `.def`). */
|
|
378
250
|
const INCLUDABLE_EXT = /\.(def|inc|h|hh|hpp|hxx|c|cc|cpp|cxx|ipp|tcc|tbl)$/i;
|
|
379
|
-
/** `#define NAME single_identifier` (possibly `struct`-prefixed) — an
|
|
380
|
-
* object-macro that COULD alias a struct type name (`resolveTypeName`'s exact
|
|
381
|
-
* value shape). The extraction sweep collects every such NAME into a global
|
|
382
|
-
* set: an initializer type token that direct-misses the struct layouts still
|
|
383
|
-
* survives the registration filter when it is alias-SHAPED anywhere, so the
|
|
384
|
-
* per-file macro-env alias resolution (redis' `COMMAND_STRUCT`) keeps working
|
|
385
|
-
* without retaining per-file object-macro tables (6.1M `#define`s on the
|
|
386
|
-
* Linux tree — the amdgpu register headers — rule that out). Numeric values
|
|
387
|
-
* are excluded: `resolveTypeName` would rewrite to a dead-end token that can
|
|
388
|
-
* never name a struct, so skipping them is exact, and it drops the register
|
|
389
|
-
* flood. */
|
|
390
251
|
const OBJ_ALIAS_RE = /^[ \t]*#[ \t]*define[ \t]+(\w+)[ \t]+(?:(?:struct|union)[ \t]+)*[A-Za-z_]\w*[ \t\r]*$/gm;
|
|
391
|
-
/** `(?:struct )?TYPE name[opt] = {` initializers, where TYPE is a struct that
|
|
392
|
-
* has ≥1 fn-pointer field. Handles both single (`= {…}`) and array
|
|
393
|
-
* (`[] = { {…}, {…} }`) forms. Macro calls inside an element are expanded first. */
|
|
394
252
|
const INIT_RE = /(?:^|[;{}])\s*(?:(?:static|const|extern|register|volatile)\s+)*(?:(?:struct|union)\s+)?(\w+)\s+(\w+)\s*(\[[^\]]*\])?\s*=\s*\{/g;
|
|
395
|
-
/** `struct TAG { … } var[opt] [= {…}]` — the struct is defined INLINE with the
|
|
396
|
-
* table (vim's `cmdname`/`nv_cmd`); its layout never became a node, so parse it
|
|
397
|
-
* here and register it before reading the entries. No leading anchor: a
|
|
398
|
-
* `struct TAG {` with a brace body is always a definition (it may be preceded
|
|
399
|
-
* by a `#define …` line ending in a digit, as in vim), and the trailing
|
|
400
|
-
* `var … = {` check below is what distinguishes a TABLE from a plain type. */
|
|
401
253
|
const INLINE_STRUCT_RE = /\b(?:struct|union)\s+(\w+)\s*\{/g;
|
|
402
|
-
/** `(?:static …)* ELEMTYPE [*] name[…] = { … }` — a bare array of function
|
|
403
|
-
* pointers (no struct wrapper). The optional `*` covers a function-TYPE
|
|
404
|
-
* typedef element (`opcode_t *opcodes[]`); a function-pointer typedef element
|
|
405
|
-
* (`zend_rc_dtor_func_t t[]`) needs none. The typedef-set membership gate
|
|
406
|
-
* is what separates this from a plain data/struct array. */
|
|
407
254
|
const ARRAY_TABLE_RE = /(?:^|[;{}])\s*(?:(?:static|const|extern|register|volatile)\s+)*(\w+)\s+(\*\s*)?(\w+)\s*\[[^\]]*\]\s*=\s*\{/g;
|
|
408
|
-
/** Dispatch sites: `base->…->field(` or `base.…field(` where `field` is a known
|
|
409
|
-
* fn-pointer field. The base may be a chain (`c->cmd->proc`) or carry array
|
|
410
|
-
* subscripts (`cmdnames[i].cmd_func`). An optional `)` before the call covers
|
|
411
|
-
* the parenthesized form `(cmdnames[i].cmd_func)(&ea)` vim uses. */
|
|
412
255
|
const DISPATCH_RE = /((?:\w+(?:\s*\[[^\][]*\])?\s*(?:->|\.)\s*)+)(\w+)\s*\)?\s*\(/g;
|
|
413
|
-
/** Bare-array dispatch: `tbl[i](…)` or the explicit-deref `(*tbl[i])(…)`. The
|
|
414
|
-
* subscript may itself contain a call (`tbl[GC_TYPE(p)](…)`), so the index
|
|
415
|
-
* class excludes only brackets. Precision comes from the `arrayReg` gate —
|
|
416
|
-
* this fires only when `tbl` is a known fn-pointer array. */
|
|
417
256
|
const ARRAY_DISPATCH_RE = /(?:\(\s*\*\s*)?\b(\w+)\s*\[[^\][]*\]\s*\)?\s*\(/g;
|
|
418
|
-
/** Field←field propagation sites: `a->f = b->g`. */
|
|
419
257
|
const FIELD_ASSIGN_RE = /(\w+)\s*(?:->|\.)\s*(\w+)\s*=\s*(\w+)\s*(?:->|\.)\s*(\w+)/g;
|
|
420
258
|
const NO_INCLUDES = [];
|
|
421
259
|
async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
@@ -423,19 +261,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
423
261
|
const files = ctx.getAllFiles().filter((f) => C_CPP_EXT.test(f));
|
|
424
262
|
if (files.length === 0)
|
|
425
263
|
return [];
|
|
426
|
-
// CODEGRAPH_SYNTH_TIMINGS sub-attribution: this pass is 86% of kernel-scale
|
|
427
|
-
// synthesis (306s, §7a.2/§7a.3) — per-stage walls + read/strip accounting
|
|
428
|
-
// name which stage and which cost class owns it. Post-refactor mapping:
|
|
429
|
-
// A = extraction sweep, B = struct-layout linking, C = registration,
|
|
430
|
-
// D = propagation, E = dispatch.
|
|
431
264
|
const prof = process.env.CODEGRAPH_SYNTH_TIMINGS
|
|
432
265
|
? { A: 0, B: 0, C: 0, D: 0, E: 0, readMs: 0, readN: 0, stripMs: 0, stripN: 0, nodesMs: 0, nodesN: 0 }
|
|
433
266
|
: null;
|
|
434
|
-
// Within-pass progress: this is the pass that parks the "Linking dynamic
|
|
435
|
-
// dispatch" bar on C-heavy repos, so it reports a real fraction of its
|
|
436
|
-
// dominant work. `files` is swept once per stage loop below (extraction,
|
|
437
|
-
// registration, propagation, dispatch), reported at the same per-16-files
|
|
438
|
-
// cadence as the cooperative yield.
|
|
439
267
|
const FILE_SWEEPS = 4;
|
|
440
268
|
const tick = async () => {
|
|
441
269
|
if ((++scannedFiles & 15) === 0) {
|
|
@@ -443,22 +271,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
443
271
|
await onYield();
|
|
444
272
|
}
|
|
445
273
|
};
|
|
446
|
-
// Cache raw + stripped source per file, LRU-BOUNDED. The old unbounded Maps
|
|
447
|
-
// retained every C/C++ file's raw AND stripped text for the whole pass —
|
|
448
|
-
// multiple GB on the Linux kernel, one of the two OOM culprits in #1212.
|
|
449
|
-
// The extraction sweep reads sequentially; the linking stages re-request
|
|
450
|
-
// only surviving files (plus include units), so access is near-sequential
|
|
451
|
-
// and a small LRU hits; a miss just re-reads + re-strips.
|
|
452
|
-
// Cache sizing is memory-budget-aware AND all-or-nothing (§7a.3 cFnPtr
|
|
453
|
-
// round): a partial LRU is WORSE than useless for cyclic sweeps (a first
|
|
454
|
-
// attempt sized ~61k against 63.8k files thrashed to a ~0% cross-sweep hit
|
|
455
|
-
// rate). Hold every stripped file (~24KB each measured on the Linux tree)
|
|
456
|
-
// only when 40% of the live memory budget covers it; otherwise keep the
|
|
457
|
-
// within-stage-locality 128. When the big cache declines (the kernel), the
|
|
458
|
-
// survival filters keep the linking stages' re-strips to a fraction of a
|
|
459
|
-
// sweep. Slack over files.length: non-indexed includes (.def/.inc, generated
|
|
460
|
-
// headers) join the working set mid-pass. Pass-scoped transient, freed on
|
|
461
|
-
// return.
|
|
462
274
|
const fullCacheCap = Math.ceil(files.length * 1.05) + 512;
|
|
463
275
|
const cacheCap = (0, memory_budget_1.memoryBudgetBytes)() * 0.5 >= fullCacheCap * 24_576 ? fullCacheCap : 128;
|
|
464
276
|
const rawCache = new lru_cache_1.LRUCache(Math.min(cacheCap, 4096));
|
|
@@ -476,9 +288,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
476
288
|
};
|
|
477
289
|
const srcCache = new lru_cache_1.LRUCache(cacheCap);
|
|
478
290
|
const src = (file) => {
|
|
479
|
-
// A cached '' (empty or unreadable file) returns '' where the miss path
|
|
480
|
-
// returns null for unreadable — every caller falsy-checks, so the two are
|
|
481
|
-
// interchangeable.
|
|
482
291
|
const hit = srcCache.get(file);
|
|
483
292
|
if (hit !== undefined)
|
|
484
293
|
return hit;
|
|
@@ -492,9 +301,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
492
301
|
srcCache.set(file, s);
|
|
493
302
|
return r == null ? null : s;
|
|
494
303
|
};
|
|
495
|
-
// Resolve a quoted include relative to the includer's directory, then the
|
|
496
|
-
// project root. Returns a project-root-relative path that exists on disk
|
|
497
|
-
// (even if it was never indexed — e.g. redis' generated `commands.def`).
|
|
498
304
|
const resolveInclude = (includer, inc) => {
|
|
499
305
|
const dir = path.posix.dirname(includer.replace(/\\/g, '/'));
|
|
500
306
|
const cand = path.posix.normalize(path.posix.join(dir, inc));
|
|
@@ -504,11 +310,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
504
310
|
return inc;
|
|
505
311
|
return null;
|
|
506
312
|
};
|
|
507
|
-
// Retained strings are interned through here. Regex captures off a big file
|
|
508
|
-
// string are V8 sliced strings — retaining one pins the whole parent file
|
|
509
|
-
// text, and the facts tables retain captures from EVERY file for the whole
|
|
510
|
-
// pass. The Buffer round-trip forces a flat copy on first sight; repeats
|
|
511
|
-
// (field names recur heavily) then share the one flat instance.
|
|
512
313
|
const interned = new Map();
|
|
513
314
|
const intern = (x) => {
|
|
514
315
|
let f = interned.get(x);
|
|
@@ -518,25 +319,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
518
319
|
}
|
|
519
320
|
return f;
|
|
520
321
|
};
|
|
521
|
-
// ---- Global tables the extraction sweep fills ----
|
|
522
|
-
// fn-pointer: typedef RET (*NAME)(…) → a field `NAME f` is a fn ptr
|
|
523
|
-
// fn-type: typedef RET NAME(params) → a field `NAME *f` is a fn ptr
|
|
524
|
-
// The fn-type form is redis' command idiom: `typedef void redisCommandProc(client*)`
|
|
525
|
-
// declared as `redisCommandProc *proc;`. Without this, `proc` reads as data.
|
|
526
322
|
const fnPtrTypedefs = new Set();
|
|
527
323
|
const fnTypeTypedefs = new Set();
|
|
528
|
-
/** Struct node id → its structurally-parsed fields (classified + registered
|
|
529
|
-
* in the linking stage, in kind-scan order). */
|
|
530
324
|
const rawFieldsByNode = new Map();
|
|
531
325
|
const factsByFile = new Map();
|
|
532
|
-
/** Every inline-struct candidate tag anywhere — an over-approximation of the
|
|
533
|
-
* tags the registration stage can add to `structLayout` mid-stage, folded
|
|
534
|
-
* into the registration filter's layout check. */
|
|
535
326
|
const inlineTags = new Set();
|
|
536
|
-
/** Object-macro names with an alias-shaped value anywhere (see OBJ_ALIAS_RE). */
|
|
537
327
|
const aliasNames = new Set();
|
|
538
|
-
// Parse a struct body (the text between its `{` and `}`) into ordered fields,
|
|
539
|
-
// structure only — see RawFieldDecl for why classification is deferred.
|
|
540
328
|
const parseStructFieldsRaw = (inner) => {
|
|
541
329
|
const fields = [];
|
|
542
330
|
let idx = 0;
|
|
@@ -544,9 +332,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
544
332
|
const decl = rawDecl.trim();
|
|
545
333
|
if (!decl)
|
|
546
334
|
continue;
|
|
547
|
-
// A field decl can declare several names sharing a leading type:
|
|
548
|
-
// `struct redisCommand *cmd, *lastcmd;`. Each declarator is its own
|
|
549
|
-
// positional slot and carries that type (so `client.cmd → redisCommand`).
|
|
550
335
|
const parts = splitTopLevel(decl, ',');
|
|
551
336
|
const firstTyped = parts[0].match(/(\w+)\s+\**\s*(\w+)\s*$/);
|
|
552
337
|
const sharedType = firstTyped ? firstTyped[1] : '';
|
|
@@ -557,7 +342,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
557
342
|
let ptr = false;
|
|
558
343
|
const pm = p.match(FNPTR_DECL_RE);
|
|
559
344
|
if (pm) {
|
|
560
|
-
name = pm[1];
|
|
345
|
+
name = pm[1];
|
|
561
346
|
ptr = true;
|
|
562
347
|
}
|
|
563
348
|
else if (pi === 0) {
|
|
@@ -567,23 +352,18 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
567
352
|
}
|
|
568
353
|
}
|
|
569
354
|
else {
|
|
570
|
-
// a subsequent declarator: `*name` / `**name` / `name`
|
|
571
355
|
const dm = p.match(/^\**\s*(\w+)/);
|
|
572
356
|
if (dm) {
|
|
573
357
|
name = dm[1];
|
|
574
358
|
type = sharedType;
|
|
575
359
|
}
|
|
576
360
|
}
|
|
577
|
-
// Always advance the positional index. An unparsed field (anonymous
|
|
578
|
-
// union, exotic declarator) still occupies one slot, and macro-expanded
|
|
579
|
-
// positional tables (redis' MAKE_CMD) only align if every field counts.
|
|
580
361
|
fields.push({ name, index: idx, ptr, type });
|
|
581
362
|
idx++;
|
|
582
363
|
}
|
|
583
364
|
}
|
|
584
365
|
return fields;
|
|
585
366
|
};
|
|
586
|
-
// Classify deferred fields against the (now-complete) typedef sets.
|
|
587
367
|
const classifyFields = (rawFields) => rawFields.map((f) => ({
|
|
588
368
|
name: f.name ?? '',
|
|
589
369
|
index: f.index,
|
|
@@ -592,7 +372,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
592
372
|
type: f.type,
|
|
593
373
|
}));
|
|
594
374
|
const parseStructFields = (inner) => classifyFields(parseStructFieldsRaw(inner));
|
|
595
|
-
// Exact per-file include resolution (from RAW source — string contents survive).
|
|
596
375
|
const scanIncludes = (file) => {
|
|
597
376
|
const rawText = raw(file);
|
|
598
377
|
if (!rawText || !rawText.includes('include'))
|
|
@@ -609,8 +388,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
609
388
|
}
|
|
610
389
|
return out.length ? out : NO_INCLUDES;
|
|
611
390
|
};
|
|
612
|
-
// Indexed files answer from their facts; non-indexed includes (reached by
|
|
613
|
-
// buildEnv's depth-2 recursion) fall back to a bounded lazy scan.
|
|
614
391
|
const includeCache = new lru_cache_1.LRUCache(1024);
|
|
615
392
|
const localIncludesOf = (file) => {
|
|
616
393
|
const f = factsByFile.get(file);
|
|
@@ -623,18 +400,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
623
400
|
includeCache.set(file, out);
|
|
624
401
|
return out;
|
|
625
402
|
};
|
|
626
|
-
// ---- Stage A: the extraction sweep — ONE read + strip per file ----
|
|
627
|
-
//
|
|
628
|
-
// Two implementations, record-identical by the differential suite:
|
|
629
|
-
// • native (task #5 step 2): the kernel's `cfnptrScanFiles` strips and
|
|
630
|
-
// scans a BATCH of files per NAPI call (codegraph-kernel/src/cfnptr.rs —
|
|
631
|
-
// hand-rolled byte machines replicating the JS regex semantics), and the
|
|
632
|
-
// TS side only reads files, ships batches, and interns the returned
|
|
633
|
-
// facts. Include-path resolution stays here (it needs the filesystem).
|
|
634
|
-
// • JS: the original sweep, kept verbatim — the fallback for platforms
|
|
635
|
-
// without a kernel binary, older binaries (feature detection), the
|
|
636
|
-
// CODEGRAPH_KERNEL=0 kill switch, and CODEGRAPH_KERNEL_CFNPTR=0 (this
|
|
637
|
-
// scanner's own switch).
|
|
638
403
|
const kernel = process.env.CODEGRAPH_KERNEL === '0' || process.env.CODEGRAPH_KERNEL_CFNPTR === '0'
|
|
639
404
|
? null
|
|
640
405
|
: (0, loader_1.getKernel)();
|
|
@@ -646,7 +411,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
646
411
|
fnTypeTypedefs.add(intern(t));
|
|
647
412
|
for (const so of out.structs) {
|
|
648
413
|
if (!so.parsed)
|
|
649
|
-
continue;
|
|
414
|
+
continue;
|
|
650
415
|
rawFieldsByNode.set(so.id, so.fields.map((f) => ({ name: f.name || null, index: f.index, ptr: f.ptr, type: f.type })));
|
|
651
416
|
}
|
|
652
417
|
for (const t of out.inlineTags)
|
|
@@ -677,8 +442,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
677
442
|
};
|
|
678
443
|
let tPass = Date.now();
|
|
679
444
|
if (nativeSweep) {
|
|
680
|
-
// Batch of 16 = the tick/onFraction cadence, so yielding and progress
|
|
681
|
-
// reporting keep their shape while the boundary crossing amortizes.
|
|
682
445
|
const BATCH = 16;
|
|
683
446
|
let batch = [];
|
|
684
447
|
const flush = () => {
|
|
@@ -693,7 +456,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
693
456
|
await tick();
|
|
694
457
|
const rawText = raw(file);
|
|
695
458
|
if (!rawText)
|
|
696
|
-
continue;
|
|
459
|
+
continue;
|
|
697
460
|
const tN = prof ? Date.now() : 0;
|
|
698
461
|
const fileNodes = ctx.getNodesInFile(file);
|
|
699
462
|
if (prof) {
|
|
@@ -704,9 +467,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
704
467
|
for (const st of fileNodes) {
|
|
705
468
|
if (st.kind !== 'struct' && st.kind !== 'union')
|
|
706
469
|
continue;
|
|
707
|
-
// sliceLinesPre semantics ride along: falsy startLine never parses,
|
|
708
|
-
// and `endLine ?? startLine` is applied here so the kernel sees the
|
|
709
|
-
// exact slice bounds the JS sweep would use.
|
|
710
470
|
structs.push({ id: st.id, startLine: st.startLine ?? 0, endLine: st.endLine ?? st.startLine ?? 0 });
|
|
711
471
|
}
|
|
712
472
|
batch.push({ file, input: { text: rawText, structs } });
|
|
@@ -715,14 +475,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
715
475
|
}
|
|
716
476
|
flush();
|
|
717
477
|
}
|
|
718
|
-
// JS sweep (fallback path — see the stage comment above).
|
|
719
478
|
if (!nativeSweep)
|
|
720
479
|
for (const file of files) {
|
|
721
480
|
await tick();
|
|
722
481
|
const s = src(file);
|
|
723
482
|
if (!s)
|
|
724
483
|
continue;
|
|
725
|
-
// Typedefs (cross-file).
|
|
726
484
|
if (s.includes('typedef')) {
|
|
727
485
|
FNPTR_TYPEDEF_RE.lastIndex = 0;
|
|
728
486
|
let m;
|
|
@@ -732,13 +490,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
732
490
|
while ((m = FNTYPE_TYPEDEF_STMT_RE.exec(s))) {
|
|
733
491
|
const guts = m[1];
|
|
734
492
|
if (guts.includes('(*') || guts.includes('( *'))
|
|
735
|
-
continue;
|
|
736
|
-
const fm = guts.match(/\b(\w+)\s*\(/);
|
|
493
|
+
continue;
|
|
494
|
+
const fm = guts.match(/\b(\w+)\s*\(/);
|
|
737
495
|
if (fm && !C_TYPE_KEYWORDS.has(fm[1]))
|
|
738
496
|
fnTypeTypedefs.add(intern(fm[1]));
|
|
739
497
|
}
|
|
740
498
|
}
|
|
741
|
-
// Struct-node field declarations (registered later in kind-scan order).
|
|
742
499
|
const tN = prof ? Date.now() : 0;
|
|
743
500
|
const fileNodes = ctx.getNodesInFile(file);
|
|
744
501
|
if (prof) {
|
|
@@ -757,10 +514,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
757
514
|
continue;
|
|
758
515
|
rawFieldsByNode.set(st.id, parseStructFieldsRaw(body.slice(open + 1, close)));
|
|
759
516
|
}
|
|
760
|
-
// Registration filters. These are full-file, NO-SKIP scans: the original
|
|
761
|
-
// registration pass jumps its scan cursor past a processed initializer
|
|
762
|
-
// body, so a no-skip scan finds a SUPERSET of its matches — exactly the
|
|
763
|
-
// over-approximation the filter needs.
|
|
764
517
|
const initTokens = new Set();
|
|
765
518
|
const arrayElems = new Set();
|
|
766
519
|
const inlineTypes = new Set();
|
|
@@ -773,7 +526,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
773
526
|
const sClose = matchBrace(s, sOpen);
|
|
774
527
|
if (sClose < 0)
|
|
775
528
|
continue;
|
|
776
|
-
// After `}`, expect `var [opt] [= {…}]` to be a table candidate.
|
|
777
529
|
const vm = s.slice(sClose + 1).match(/^\s*(\w+)\s*(\[[^\]]*\])?\s*(=\s*\{)?/);
|
|
778
530
|
if (!vm || !vm[1])
|
|
779
531
|
continue;
|
|
@@ -797,7 +549,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
797
549
|
arrayElems.add(intern((m[2] ? '*' : '') + m[1]));
|
|
798
550
|
}
|
|
799
551
|
}
|
|
800
|
-
// Alias-shaped object macros (registration filter support).
|
|
801
552
|
if (s.includes('#define') || s.includes('# define')) {
|
|
802
553
|
const joined = s.replace(/\\\r?\n/g, ' ');
|
|
803
554
|
OBJ_ALIAS_RE.lastIndex = 0;
|
|
@@ -805,8 +556,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
805
556
|
while ((m = OBJ_ALIAS_RE.exec(joined)))
|
|
806
557
|
aliasNames.add(intern(m[1]));
|
|
807
558
|
}
|
|
808
|
-
// Propagation + dispatch filters (full-file scans ⊇ the per-function-body
|
|
809
|
-
// scans the pass bodies run — a body slice is a substring of the file).
|
|
810
559
|
const dPairs = new Set();
|
|
811
560
|
if (s.includes('=')) {
|
|
812
561
|
FIELD_ASSIGN_RE.lastIndex = 0;
|
|
@@ -842,21 +591,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
842
591
|
prof.A = Date.now() - tPass;
|
|
843
592
|
tPass = Date.now();
|
|
844
593
|
}
|
|
845
|
-
// ---- Stage B: struct field layouts (linking — text-free) ----
|
|
846
|
-
// structLayout: struct name → ordered fields, for structs with ≥1 fn-pointer
|
|
847
|
-
// field (drives positional registration + dispatch).
|
|
848
|
-
// allStructFields: EVERY struct name → ALL its field layouts (a name can be
|
|
849
|
-
// reused across files — e.g. redis has two unrelated `client` structs), used
|
|
850
|
-
// to walk a chained receiver's field types (`c->cmd->proc`: client.cmd →
|
|
851
|
-
// redisCommand). The walk searches every same-named layout for the field.
|
|
852
|
-
// fieldToStructs: fn-pointer field name → set of struct names that declare it.
|
|
853
|
-
// Registration REPLAYS the struct kind-scan (rowid order, ≠ the extraction
|
|
854
|
-
// sweep's path order): same-name layout precedence — `structLayout.set`
|
|
855
|
-
// last-wins, `allStructFields` first-match in the chain walk — depends on it.
|
|
856
594
|
const structLayout = new Map();
|
|
857
595
|
const allStructFields = new Map();
|
|
858
596
|
const fieldToStructs = new Map();
|
|
859
|
-
// Register a parsed struct under `name` into the three indexes.
|
|
860
597
|
const registerStructLayout = (name, fields) => {
|
|
861
598
|
if (!allStructFields.has(name))
|
|
862
599
|
allStructFields.set(name, []);
|
|
@@ -879,7 +616,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
879
616
|
continue;
|
|
880
617
|
const rawFields = rawFieldsByNode.get(st.id);
|
|
881
618
|
if (!rawFields)
|
|
882
|
-
continue;
|
|
619
|
+
continue;
|
|
883
620
|
registerStructLayout(st.name, classifyFields(rawFields));
|
|
884
621
|
}
|
|
885
622
|
}
|
|
@@ -888,17 +625,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
888
625
|
prof.B = Date.now() - tPass;
|
|
889
626
|
tPass = Date.now();
|
|
890
627
|
}
|
|
891
|
-
// NB: no early return on an empty structLayout here — an inline `struct TAG
|
|
892
|
-
// { … } var[]` table whose struct never became a node (vim's `cmdname`, broken
|
|
893
|
-
// up by `#ifdef`) is discovered later during the unit scan. The `reg.size === 0`
|
|
894
|
-
// guard after registration still short-circuits when nothing bridges.
|
|
895
628
|
const fnPtrFieldOf = (struct, field) => !!structLayout.get(struct)?.some((f) => f.name === field && f.isFnPtr);
|
|
896
|
-
// C/C++ function + method nodes are STREAMED per stage (see D/E) —
|
|
897
|
-
// the old materialized `cFns` array held every function node on the repo
|
|
898
|
-
// (O(nodes) memory, part of the #1212 kernel OOM).
|
|
899
|
-
// ---- function-name → node resolution (prefer a function in the same file) ----
|
|
900
629
|
const resolveFn = (name, preferFile) => {
|
|
901
|
-
const cands = ctx.getNodesByName(name).filter((n) => FN_KINDS.has(n.kind));
|
|
630
|
+
const cands = ctx.getNodesByName(name).filter((n) => FN_KINDS.has(n.kind) && C_CPP_EXT.test(n.filePath));
|
|
902
631
|
if (cands.length === 0)
|
|
903
632
|
return null;
|
|
904
633
|
if (cands.length === 1)
|
|
@@ -910,9 +639,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
910
639
|
}
|
|
911
640
|
return cands[0];
|
|
912
641
|
};
|
|
913
|
-
// ---- Stage C: registrations — Map<"struct.field", Set<funcNodeId>> ----
|
|
914
|
-
// Ids only — retaining the full Node per registration (the old `idToNode`)
|
|
915
|
-
// was write-only dead weight at O(registrations) memory.
|
|
916
642
|
const reg = new Map();
|
|
917
643
|
const addReg = (struct, field, fn) => {
|
|
918
644
|
const key = `${struct}.${field}`;
|
|
@@ -920,10 +646,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
920
646
|
reg.set(key, new Set());
|
|
921
647
|
reg.get(key).add(fn.id);
|
|
922
648
|
};
|
|
923
|
-
// Bare arrays-of-fn-pointers (no struct): array VARIABLE name → per-file sets
|
|
924
|
-
// of registered function ids. Multi-entry because a file-scope `static` table
|
|
925
|
-
// name can recur across files (SameBoy declares `static opcode_t *opcodes[256]`
|
|
926
|
-
// in BOTH sm83_cpu.c and sm83_disassembler.c), so dispatch resolves same-file.
|
|
927
649
|
const arrayReg = new Map();
|
|
928
650
|
const addArrayReg = (name, file, fn) => {
|
|
929
651
|
let entries = arrayReg.get(name);
|
|
@@ -938,17 +660,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
938
660
|
}
|
|
939
661
|
e.ids.add(fn.id);
|
|
940
662
|
};
|
|
941
|
-
// A struct value `{ … }` (one element) — register its function entries to the
|
|
942
|
-
// struct's fields, by `.field = fn` designators or by positional slot.
|
|
943
663
|
const registerStructValue = (struct, valueBody, file, env) => {
|
|
944
664
|
const layout = structLayout.get(struct);
|
|
945
665
|
if (!layout)
|
|
946
666
|
return;
|
|
947
667
|
if (env && env.size)
|
|
948
668
|
valueBody = expandMacroCalls(valueBody, env);
|
|
949
|
-
// A macro can expand to a whole brace-wrapped element (sqlite's
|
|
950
|
-
// `FUNCTION(…)` → `{nArg, …, xFunc, …}`); peel one outer layer so the
|
|
951
|
-
// positional slots are visible.
|
|
952
669
|
valueBody = valueBody.trim();
|
|
953
670
|
if (valueBody.startsWith('{')) {
|
|
954
671
|
const e = matchBrace(valueBody, 0);
|
|
@@ -969,7 +686,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
969
686
|
if (fn)
|
|
970
687
|
addReg(struct, field, fn);
|
|
971
688
|
}
|
|
972
|
-
// a designated item does not advance positional counting
|
|
973
689
|
continue;
|
|
974
690
|
}
|
|
975
691
|
const field = layout.find((f) => f.index === pos);
|
|
@@ -984,13 +700,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
984
700
|
pos++;
|
|
985
701
|
}
|
|
986
702
|
};
|
|
987
|
-
// Collect the literal function entries of an array-of-fn-pointers initializer
|
|
988
|
-
// and register them under the array's variable name. Entries may be positional
|
|
989
|
-
// (`fn`, `&fn`), designated by index (`[OP] = fn`), or cast-wrapped
|
|
990
|
-
// (`(handler_t)fn`, as in php's Zend dtor table). Non-identifier entries
|
|
991
|
-
// (`NULL`, `0`, a nested expression) are skipped — a miss, never a wrong edge.
|
|
992
|
-
// No index tracking: a runtime subscript fans the dispatch out to the whole
|
|
993
|
-
// set, exactly like a command table reaches every command.
|
|
994
703
|
const registerArrayValue = (name, body, file, env) => {
|
|
995
704
|
if (env && env.size)
|
|
996
705
|
body = expandMacroCalls(body, env);
|
|
@@ -998,10 +707,10 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
998
707
|
let item = rawItem.trim();
|
|
999
708
|
if (!item)
|
|
1000
709
|
continue;
|
|
1001
|
-
const des = item.match(/^\[[^\]]*\]\s*=\s*([\s\S]*)$/);
|
|
710
|
+
const des = item.match(/^\[[^\]]*\]\s*=\s*([\s\S]*)$/);
|
|
1002
711
|
if (des)
|
|
1003
712
|
item = des[1].trim();
|
|
1004
|
-
item = item.replace(/^\((?:[\w\s*]+)\)\s*/, '').replace(/^&\s*/, '').trim();
|
|
713
|
+
item = item.replace(/^\((?:[\w\s*]+)\)\s*/, '').replace(/^&\s*/, '').trim();
|
|
1005
714
|
const id = item.match(/^(\w+)$/);
|
|
1006
715
|
if (!id)
|
|
1007
716
|
continue;
|
|
@@ -1010,12 +719,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1010
719
|
addArrayReg(name, file, fn);
|
|
1011
720
|
}
|
|
1012
721
|
};
|
|
1013
|
-
// Per-file macro + include parsing (any file, indexed or not), cached.
|
|
1014
|
-
// Derived per-file caches, LRU-bounded like the content caches (#1212).
|
|
1015
|
-
// These stay LAZY (recompute-on-miss through `src`): retaining every file's
|
|
1016
|
-
// parsed tables is ruled out by the kernel's 6.1M `#define`s, and the
|
|
1017
|
-
// registration stage below only builds an env for files that survive its
|
|
1018
|
-
// filter or carry local includes, so most files never need one.
|
|
1019
722
|
const fnMacroCache = new lru_cache_1.LRUCache(256);
|
|
1020
723
|
const fileFnMacros = (file) => {
|
|
1021
724
|
let m = fnMacroCache.get(file);
|
|
@@ -1043,11 +746,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1043
746
|
}
|
|
1044
747
|
return d;
|
|
1045
748
|
};
|
|
1046
|
-
// A file's effective macro environment = its own #defines PLUS those of the
|
|
1047
|
-
// headers it #includes (redis' `MAKE_CMD` sits beside the table; sqlite's
|
|
1048
|
-
// `FUNCTION` lives in `sqliteInt.h`, included by the file with the table).
|
|
1049
|
-
// First writer wins, so the file's own defs override included ones; depth-2
|
|
1050
|
-
// covers a macro defined in a header-of-a-header.
|
|
1051
749
|
const buildEnv = (file, depth, seen, fn, obj, def) => {
|
|
1052
750
|
if (depth < 0 || seen.has(file))
|
|
1053
751
|
return;
|
|
@@ -1065,10 +763,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1065
763
|
};
|
|
1066
764
|
const indexedSet = new Set(files);
|
|
1067
765
|
const seenInclude = new Set();
|
|
1068
|
-
// Global variable → struct type, for resolving a dispatch through a file-scope
|
|
1069
|
-
// table by subscript (`cmdnames[i].cmd_func(…)`).
|
|
1070
766
|
const globalVarType = new Map();
|
|
1071
|
-
// Process a `{ … }` initializer body (array of elements or a single struct).
|
|
1072
767
|
const processInit = (struct, body, isArray, file, env) => {
|
|
1073
768
|
if (isArray) {
|
|
1074
769
|
for (const el of splitTopLevel(body, ',')) {
|
|
@@ -1079,7 +774,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1079
774
|
registerStructValue(struct, t.slice(1, e), file, env);
|
|
1080
775
|
}
|
|
1081
776
|
else if (t) {
|
|
1082
|
-
// an element built by a macro (`MAKE_CMD(…)`/`FUNCTION(…)`) or a bare value
|
|
1083
777
|
registerStructValue(struct, t, file, env);
|
|
1084
778
|
}
|
|
1085
779
|
}
|
|
@@ -1088,9 +782,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1088
782
|
registerStructValue(struct, body, file, env);
|
|
1089
783
|
}
|
|
1090
784
|
};
|
|
1091
|
-
// Process ONE unit's text and discard it. The old shape built every unit up
|
|
1092
|
-
// front (`const units: Unit[]`) — the full text of every C file plus its
|
|
1093
|
-
// expanded includes held simultaneously, gigabytes on the kernel (#1212).
|
|
1094
785
|
const processUnit = (unit) => {
|
|
1095
786
|
const s = unit.text;
|
|
1096
787
|
if (!s || !s.includes('{'))
|
|
@@ -1099,18 +790,17 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1099
790
|
let im;
|
|
1100
791
|
while ((im = INLINE_STRUCT_RE.exec(s))) {
|
|
1101
792
|
const tag = im[1];
|
|
1102
|
-
const sOpen = im.index + im[0].length - 1;
|
|
793
|
+
const sOpen = im.index + im[0].length - 1;
|
|
1103
794
|
const sClose = matchBrace(s, sOpen);
|
|
1104
795
|
if (sClose < 0)
|
|
1105
796
|
continue;
|
|
1106
|
-
// After `}`, expect `var [opt] [= {…}]` to be a table; else it's a plain type.
|
|
1107
797
|
const after = s.slice(sClose + 1);
|
|
1108
798
|
const vm = after.match(/^\s*(\w+)\s*(\[[^\]]*\])?\s*(=\s*\{)?/);
|
|
1109
799
|
if (!vm || !vm[1])
|
|
1110
800
|
continue;
|
|
1111
801
|
const fields = parseStructFields(s.slice(sOpen + 1, sClose));
|
|
1112
802
|
if (!fields.some((f) => f.isFnPtr))
|
|
1113
|
-
continue;
|
|
803
|
+
continue;
|
|
1114
804
|
if (!structLayout.has(tag))
|
|
1115
805
|
registerStructLayout(tag, fields);
|
|
1116
806
|
globalVarType.set(vm[1], tag);
|
|
@@ -1134,7 +824,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1134
824
|
if (!structLayout.has(struct))
|
|
1135
825
|
continue;
|
|
1136
826
|
const isArray = !!m[3];
|
|
1137
|
-
const open = m.index + m[0].length - 1;
|
|
827
|
+
const open = m.index + m[0].length - 1;
|
|
1138
828
|
const close = matchBrace(s, open);
|
|
1139
829
|
if (close < 0)
|
|
1140
830
|
continue;
|
|
@@ -1142,10 +832,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1142
832
|
processInit(struct, s.slice(open + 1, close), isArray, unit.file, unit.env);
|
|
1143
833
|
INIT_RE.lastIndex = close;
|
|
1144
834
|
}
|
|
1145
|
-
// Bare arrays-of-function-pointers (no struct, no field). Gated on the
|
|
1146
|
-
// element type being a function typedef — a fn-TYPE typedef needs the `*`
|
|
1147
|
-
// (array of pointers to it), a fn-pointer typedef does not. A data or
|
|
1148
|
-
// struct array's element type is never in these sets, so it never fires.
|
|
1149
835
|
ARRAY_TABLE_RE.lastIndex = 0;
|
|
1150
836
|
let am;
|
|
1151
837
|
while ((am = ARRAY_TABLE_RE.exec(s))) {
|
|
@@ -1153,7 +839,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1153
839
|
const hasStar = !!am[2];
|
|
1154
840
|
if (!((fnTypeTypedefs.has(elemType) && hasStar) || fnPtrTypedefs.has(elemType)))
|
|
1155
841
|
continue;
|
|
1156
|
-
const open = am.index + am[0].length - 1;
|
|
842
|
+
const open = am.index + am[0].length - 1;
|
|
1157
843
|
const close = matchBrace(s, open);
|
|
1158
844
|
if (close < 0)
|
|
1159
845
|
continue;
|
|
@@ -1161,29 +847,16 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1161
847
|
ARRAY_TABLE_RE.lastIndex = close;
|
|
1162
848
|
}
|
|
1163
849
|
};
|
|
1164
|
-
// Can this file's OWN unit have any side effect? Every check mirrors a gate
|
|
1165
|
-
// in processUnit, over-approximated to the filter's coarser knowledge:
|
|
1166
|
-
// • inline structs — the fn-ptr-field gate, with per-candidate field types
|
|
1167
|
-
// unioned per file;
|
|
1168
|
-
// • initializers — `structLayout.has` against the layouts' SUPERSET
|
|
1169
|
-
// (kind-scan layouts ∪ every inline tag — structLayout only grows during
|
|
1170
|
-
// this stage), with alias-shaped tokens surviving in place of the
|
|
1171
|
-
// per-file `resolveTypeName` walk;
|
|
1172
|
-
// • bare arrays — the exact typedef-set gate.
|
|
1173
|
-
// A filtered-out file is one where every match fails its gate before any
|
|
1174
|
-
// side effect, so skipping the unit cannot change the outcome.
|
|
1175
850
|
const typedefHit = (t) => fnPtrTypedefs.has(t) || fnTypeTypedefs.has(t);
|
|
1176
851
|
const regSurvives = (f) => f.inlinePtr ||
|
|
1177
852
|
(f.inlineTypes?.some(typedefHit) ?? false) ||
|
|
1178
853
|
(f.initTokens?.some((t) => structLayout.has(t) || inlineTags.has(t) || aliasNames.has(t)) ?? false) ||
|
|
1179
|
-
(f.arrayElems?.some((e) => e.charCodeAt(0) === 42
|
|
1180
|
-
// ---- Stage C: registrations — stream each surviving file (and every file's
|
|
1181
|
-
// qualifying local includes) through processUnit, one at a time.
|
|
854
|
+
(f.arrayElems?.some((e) => e.charCodeAt(0) === 42 ? typedefHit(e.slice(1)) : fnPtrTypedefs.has(e)) ?? false);
|
|
1182
855
|
for (const file of files) {
|
|
1183
856
|
await tick();
|
|
1184
857
|
const facts = factsByFile.get(file);
|
|
1185
858
|
if (!facts)
|
|
1186
|
-
continue;
|
|
859
|
+
continue;
|
|
1187
860
|
const survives = regSurvives(facts);
|
|
1188
861
|
if (!survives && facts.includes.length === 0)
|
|
1189
862
|
continue;
|
|
@@ -1203,18 +876,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1203
876
|
if (!incSrc)
|
|
1204
877
|
continue;
|
|
1205
878
|
if (indexedSet.has(target)) {
|
|
1206
|
-
// Re-scan an indexed header only when this includer unlocks guarded code.
|
|
1207
879
|
const ownDef = fileDefinedNames(target);
|
|
1208
880
|
const adds = [...defined].some((n) => !ownDef.has(n));
|
|
1209
881
|
if (!adds || !/#\s*if/.test(incSrc))
|
|
1210
882
|
continue;
|
|
1211
883
|
}
|
|
1212
884
|
seenInclude.add(`${file}>${target}`);
|
|
1213
|
-
// The include is pasted into the includer — evaluate its conditionals in
|
|
1214
|
-
// the includer's defined set (a no-op when it has none). Re-parse the
|
|
1215
|
-
// included file's OWN macros from that resolved text so a macro it defines
|
|
1216
|
-
// conditionally (vim's `EXCMD`, whose plain last-wins parse picks the enum
|
|
1217
|
-
// arm) overrides with the ARM THAT IS ACTUALLY ACTIVE here.
|
|
1218
885
|
const text = evalConditionals(incSrc, defined);
|
|
1219
886
|
const incEnv = new Map(env);
|
|
1220
887
|
for (const [k, v] of parseFunctionMacros(text))
|
|
@@ -1229,9 +896,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1229
896
|
prof.C = Date.now() - tPass;
|
|
1230
897
|
tPass = Date.now();
|
|
1231
898
|
}
|
|
1232
|
-
// ---- receiver-type resolution within a function's source ----
|
|
1233
|
-
// `(?:struct )?TYPE [*]recv` declared in the params or body → TYPE (if a known
|
|
1234
|
-
// fn-pointer-bearing struct).
|
|
1235
899
|
const recvReCache = new lru_cache_1.LRUCache(4096);
|
|
1236
900
|
const recvTypeIn = (fnSrc, recv) => {
|
|
1237
901
|
let re = recvReCache.get(recv);
|
|
@@ -1247,9 +911,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1247
911
|
}
|
|
1248
912
|
return null;
|
|
1249
913
|
};
|
|
1250
|
-
// Declared type of a local/param `v` — ANY type token, not just fn-pointer
|
|
1251
|
-
// structs (the base of a chained receiver needn't carry a fn pointer itself).
|
|
1252
|
-
// Falls back to a file-scope table variable (`cmdnames` in `cmdnames[i].fn()`).
|
|
1253
914
|
const escapeRe = (x) => x.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1254
915
|
const varReCache = new lru_cache_1.LRUCache(4096);
|
|
1255
916
|
const varTypeIn = (fnSrc, v) => {
|
|
@@ -1266,10 +927,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1266
927
|
}
|
|
1267
928
|
return globalVarType.get(v) ?? null;
|
|
1268
929
|
};
|
|
1269
|
-
// Resolve a member-access chain (`c->cmd`, or just `p`) to a struct type,
|
|
1270
|
-
// walking each segment's declared field type. `c->cmd->proc` dispatch:
|
|
1271
|
-
// base chain `c->cmd` → client.cmd's type `redisCommand`, the proc owner.
|
|
1272
|
-
// Array subscripts (`cmdnames[i]`) are stripped — an index yields one element.
|
|
1273
930
|
const resolveChainType = (fnSrc, chain) => {
|
|
1274
931
|
const segs = chain.replace(/\s*\[[^\]]*\]/g, '').split(/\s*(?:->|\.)\s*/).filter(Boolean);
|
|
1275
932
|
if (segs.length === 0)
|
|
@@ -1288,12 +945,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1288
945
|
}
|
|
1289
946
|
return t;
|
|
1290
947
|
};
|
|
1291
|
-
// ---- Stage D: field←field propagation (`a->f = b->g`) ----
|
|
1292
|
-
// Collected as (targetStruct.field ← sourceStruct.field) pairs, then merged to
|
|
1293
|
-
// a fixpoint so a hook slot inherits a registry field's handlers.
|
|
1294
|
-
// Filter: a file matters only if SOME collected pair has BOTH fields known as
|
|
1295
|
-
// fn-pointer fields — the loop body's own pre-gate. A skipped file's matches
|
|
1296
|
-
// would all `continue` there, so skipping is side-effect-free.
|
|
1297
948
|
const propagations = [];
|
|
1298
949
|
for (const file of files) {
|
|
1299
950
|
await tick();
|
|
@@ -1323,10 +974,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1323
974
|
let m;
|
|
1324
975
|
while ((m = FIELD_ASSIGN_RE.exec(body))) {
|
|
1325
976
|
const [, lrecv, lfield, rrecv, rfield] = m;
|
|
1326
|
-
// Pre-gate on field NAMES: `a->f = b->g` matches every struct-field
|
|
1327
|
-
// assignment in the tree (millions on the kernel), but only fields
|
|
1328
|
-
// that are fn-pointer fields of SOME struct can pass fnPtrFieldOf —
|
|
1329
|
-
// skip the two regex type resolutions for the ~99% that can't.
|
|
1330
977
|
if (!fieldToStructs.has(lfield) || !fieldToStructs.has(rfield))
|
|
1331
978
|
continue;
|
|
1332
979
|
const lt = recvTypeIn(body, lrecv);
|
|
@@ -1362,11 +1009,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1362
1009
|
}
|
|
1363
1010
|
if (reg.size === 0 && arrayReg.size === 0)
|
|
1364
1011
|
return [];
|
|
1365
|
-
// ---- Stage E: dispatch sites → edges ----
|
|
1366
|
-
// Filter: a file matters only if some dispatch field is a known fn-pointer
|
|
1367
|
-
// field, or some subscripted name is a registered fn-pointer array — the loop
|
|
1368
|
-
// body's own first gates (`owners` / `entries`), which a skipped file's
|
|
1369
|
-
// matches would all fail before touching `seen`/`added`/`edges`.
|
|
1370
1012
|
const edges = [];
|
|
1371
1013
|
const seen = new Set();
|
|
1372
1014
|
for (const file of files) {
|
|
@@ -1395,9 +1037,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1395
1037
|
DISPATCH_RE.lastIndex = 0;
|
|
1396
1038
|
let m;
|
|
1397
1039
|
let added = 0;
|
|
1398
|
-
// Incremental line counting: matches arrive in ascending index order, so
|
|
1399
|
-
// count newlines since the previous match instead of re-splitting the
|
|
1400
|
-
// whole body prefix per match (O(body) each — real time on god-files).
|
|
1401
1040
|
let lcIdx = 0;
|
|
1402
1041
|
let lcLine = fn.startLine;
|
|
1403
1042
|
const lineAt = (idx) => {
|
|
@@ -1408,14 +1047,11 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1408
1047
|
return lcLine;
|
|
1409
1048
|
};
|
|
1410
1049
|
while ((m = DISPATCH_RE.exec(body)) && added < FANOUT_CAP) {
|
|
1411
|
-
const baseChain = m[1].replace(/\s*(?:->|\.)\s*$/, '').trim();
|
|
1050
|
+
const baseChain = m[1].replace(/\s*(?:->|\.)\s*$/, '').trim();
|
|
1412
1051
|
const field = m[2];
|
|
1413
1052
|
const owners = fieldToStructs.get(field);
|
|
1414
1053
|
if (!owners || owners.size === 0)
|
|
1415
1054
|
continue;
|
|
1416
|
-
// 1) resolve the receiver chain's struct type precisely (handles c->cmd->proc);
|
|
1417
|
-
// 2) else the last segment as a simple local/param of a fn-pointer-bearing struct;
|
|
1418
|
-
// 3) else fall back to a field name that belongs to exactly one struct.
|
|
1419
1055
|
let struct = resolveChainType(body, baseChain);
|
|
1420
1056
|
if (!struct || !owners.has(struct)) {
|
|
1421
1057
|
const lastSeg = baseChain.replace(/\s*\[[^\]]*\]/g, '').split(/\s*(?:->|\.)\s*/).pop();
|
|
@@ -1453,9 +1089,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1453
1089
|
break;
|
|
1454
1090
|
}
|
|
1455
1091
|
}
|
|
1456
|
-
// ---- bare array-of-fn-pointers dispatch (`tbl[i](…)`) ----
|
|
1457
1092
|
if (arrayReg.size && added < FANOUT_CAP) {
|
|
1458
|
-
// Fresh scan from the body's start — rewind the line-count cursor too.
|
|
1459
1093
|
lcIdx = 0;
|
|
1460
1094
|
lcLine = fn.startLine;
|
|
1461
1095
|
ARRAY_DISPATCH_RE.lastIndex = 0;
|
|
@@ -1463,8 +1097,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
|
|
|
1463
1097
|
const entries = arrayReg.get(m[1]);
|
|
1464
1098
|
if (!entries)
|
|
1465
1099
|
continue;
|
|
1466
|
-
// Same-file table wins on a name collision (two file-local `opcodes`);
|
|
1467
|
-
// a unique name resolves cross-file; otherwise ambiguous — bail.
|
|
1468
1100
|
const ids = entries.length === 1
|
|
1469
1101
|
? entries[0].ids
|
|
1470
1102
|
: (entries.find((e) => e.file === fn.filePath)?.ids ?? null);
|