Skip to content

v0.1.27 — honest Java method resolution + parallel build-resolutions

Choose a tag to compare

@fiveapplesonthetable fiveapplesonthetable released this 17 May 00:27
· 162 commits to master since this release

v0.1.26 shipped --def-in PATH to narrow xrefs by def-site location, but it returned 0 hits on the live AOSP+Linux index because the Layer 2 resolver was over-confidently pinning every ambiguous Java method call (e.g. all 65,503 close() calls) to one arbitrary `pool[0]` candidate, hiding the real call graph.

Resolver (cmd_build_resolutions)

Same-file preference (all langs). A call to `foo()` inside file F that has a unique `foo` def in F resolves there first. Catches self-calls and inner-class refs without needing receiver-type inference.

Truthful unresolved for ambiguous method calls. When a Call/Ctor/FieldAccess ref remains ambiguous after all narrowing rules, the resolver returns 0 (None) instead of the misleading `pool[0]`. `--def-in PATH`'s permissive branch then includes these refs (over-include rather than mis-include). Other ref kinds (TypeUse, Import, InheritFrom) keep the `pool[0]` fallback — types are far less ambiguous.

Parallel `build-resolutions` pass 3

Refs are batched into 64K-record chunks, dispatched to a rayon worker pool, written back in iteration order.

Live measurement on 63.3M refs:

  • pass 3 single-threaded: 11+ min
  • pass 3 parallel: 61 s (~11× on 16 cores)

Live AOSP+Linux numbers after the rebuild

  • 25.6M refs resolved (down from ~60M previously; expected and correct — false-confidence resolutions purged).
  • 7.5M refs narrowed via Java context.
  • `scry callers close --def-in PerfettoTrace.java` before: 0 hits, after: 57,890 candidate hits.

Upgrading

Run `scry build-resolutions --index DIR` to rewrite the resolutions sidecar. No symbols/refs rebuild needed.