Skip to main content

Module ctx

Module ctx 

Source
Expand description

What the core needs to ask the front-end.

Everything in this crate works on machine-neutral IR; the few questions that depend on the machine’s class metadata — how nested classes are related, what a method’s signature says, how a nested method body looks — go through Ctx. A front-end implements it once (JVM: over its class pool; DEX: over its class definitions) and every shared pass/emitter works.

The trait is deliberately semantic, not a raw pool: the core never sees a constant pool, a Signature attribute, or an InnerClasses table.

Structs§

Family
The nested-class family of one top-level class.
MethodBody
A decompiled nested method body (lambda body, anonymous-class method, …).
NestedClass
One nested class of a family.
NullCtx
A Ctx with no metadata: every query answers “unknown”.

Enums§

NestedKind
How a nested class was classified.

Traits§

Ctx
Front-end services used by the shared passes and the emitter.

Functions§

ctx_method_body
Assemble a MethodBody (front-ends return these from Ctx::nested_method).