1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! jdc-core — machine-neutral decompiler core.
//!
//! A decompiler is a pipeline: `machine code → CFG → per-block expressions →
//! control-flow structuring → statement tree → refinement passes → source`.
//! Only the first two steps know anything about the source machine (JVM `.class`
//! operand stack, DEX registers, ...). Everything after them operates on the
//! machine-neutral IR defined here, and that is what this crate provides.
//!
//! ```text
//! front-end (machine-specific) jdc-core (machine-neutral)
//! ─────────────────────────── ──────────────────────────
//! parse bytes cfg::Cfg (blocks + edges)
//! decode instructions ───────────────► ir::BlockResult (stmts + term)
//! build expressions per block structure::Structurer / sese
//! synthesize a VarTable convert::Converter
//! machine idioms (javac / d8 / ...) ────────► passes::* (shared refinements)
//! emit::Printer (source text)
//! ```
//!
//! The front-end implements [`ctx::Ctx`] (naming, type queries, nested method
//! bodies) and fills [`cfg::Cfg`] + [`ir::BlockResult`]. See `docs/CONTRACT.md`
//! for the exact obligations, and `tests/toy_frontend.rs` for a complete
//! non-JVM example.
pub use ;
pub use ;