Files
sx/src/ir
agra 7ea7ad778e ffi #jni_main slice 1: Java source emitter (pure fn + unit tests)
`src/ir/jni_java_emit.zig`'s `emitJavaSource` takes a
`ForeignClassDecl` with `is_main = true` and returns the `.java`
source text. AOT pipeline integration (javac + d8 + APK bundling +
manifest synthesis + RegisterNatives) lands in subsequent slices.

Emission shape per bodied method:

    @Override
    public <ret> <name>(<params>) {
        super.<name>(<args>);
        sx_<name>(<args>);
    }
    private native <ret> sx_<name>(<params>);

Declaration-only methods (no body — references inherited Java
methods that sx wants to *call*) are skipped — no override, no
native delegate.

`#extends Alias` resolves through the supplied class registry to
the parent's foreign Java path. Default parent is
`android.app.NativeActivity` when `#extends` is absent.

Type matrix: primitives (void/bool/s8..s64/u8/u16/f32/f64), `*Self`
elided as the receiver (Java's implicit `this`), `*void` as
`Object`, `*Foo` cross-class refs resolved through the class
registry.

Six unit tests cover: non-main rejection, full void onCreate(Bundle)
shape with @Override delegate, primitive params, declaration-only
skipping, `#extends Alias` resolution, default-package classes.

130/130 examples still green; zig test clean.
2026-05-20 14:16:40 +03:00
..
2026-05-17 13:19:08 +03:00
2026-03-01 22:38:41 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00
ir
2026-02-26 02:25:02 +02:00