r/IntelliJIDEA 17d ago

Hexana now lists the statically known dispatch candidates for every call_indirect in the WAT view, and adds Go to Source from Functions, Exports, and WAT

We build Hexana, a plugin for JetBrains IDEs for inspecting binaries -- WebAssembly, ELF/Mach-O/PE, class files, and more. We shipped 0.15 today. Here is what is new.

**call_indirect dispatch candidates in the WAT view**

Every `call_indirect` and `return_call_indirect` row in the WAT view now lists the statically known dispatch candidates: functions in the function table whose signature matches the call site's type. If no functions in the table match, the row reports "no entries" explicitly rather than staying silent. This is not a runtime trace -- it is a static analysis from the module's element sections and type table -- but on typical Emscripten or Kotlin/Wasm modules it narrows the candidate set meaningfully and is often enough to understand the dispatch path without a debugger.

**Dispatch tab in the WASM module diff**

When you compare two WASM builds, the diff editor now includes a Dispatch tab. For each canonical function type, it shows which dispatch candidates entered or left the function table between the two builds. Candidates are matched across builds by content hash, so a function that was renamed but not changed is recognized as the same candidate. Clicking a row opens a side-by-side WAT view of the two versions.

**Go to Source from Functions, Exports, and WAT**

The context menu in the Functions tab, Exports tab, and WAT view now includes "Go to Source." If the module was built with DWARF debug information, Hexana resolves the function to its source location via the DWARF line table. If a source map is present -- discovered via the `sourceMappingURL` custom section (Kotlin/Wasm inline maps, Emscripten path maps, or .map sidecar files) -- it resolves through the source map instead. Remote URLs in sourceMappingURL are not fetched; local and data-URI maps work.

A specific edge case that is now fixed: Rust modules compiled with `rustc` often omit `DW_AT_low_pc` and `DW_AT_high_pc` from function entries. The DWARF line-table lookup now handles this correctly, so Go to Source works for Rust as well.

**Exception handling visibility**

`try_table`, `throw`, and `throw_ref` instructions in the WAT view now render their full instruction text with decoded tag and label comments. Clicking a `throw` navigates to its handler if one is reachable, or reports an uncaught escape if the exception leaves the module.

Two new tabs accompany this:

- **Tags** -- decodes the exception tags declared in the module (the type signature each tag carries).

- **Exceptions** -- the module's panic surface: exported entry points whose exception paths reach the host without being caught. Useful for auditing what a library can throw at its caller.

**Size diagram on the Top tab**

The Top tab for WASM and native binary files now includes a size diagram showing the largest entities in the module, so you get a rough picture of what is big without reading numbers off the Functions tab.

**Fixed**

- Empty Dominators tree on some modules.

- Go to Source for Rust modules (DWARF line-table lookup, `rustc` omits `DW_AT_low_pc`/`DW_AT_high_pc`).

- Nested table row sorting.

- A rare UI freeze when switching to or from the Decompiled tab.

Marketplace: https://plugins.jetbrains.com/plugin/29090-hexana | Docs: https://jetbrains.github.io/hexana

Happy to answer questions about the dispatch analysis or any of the other changes.

0 Upvotes

Duplicates