ffi 1.24: verify inverse OS gate for #jni_call on iOS-sim

Adds `ios-sim|examples/ffi-jni-call-02-void.sx` to the cross-compile
tuple list. The `inline if OS == .android { #jni_call(...) }` arm in
that example must strip its body before sema/lower runs on iOS,
otherwise emit_llvm would attempt to load libjvm vtable slots that
don't exist in the iOS SDK and the link step would fail.

This is the JNI mirror of step 1.14, which did the same for
`#objc_call` against Android. Phase 1C is functionally complete:
- Parser accepts all three FFI intrinsics (1.1–1.2)
- `#objc_call` full return-type matrix + selector interning (1.3–1.10)
- `#objc_call` enclosing-construct coverage (1.11–1.13)
- `#objc_call` cross-Android gate (1.14)
- `#jni_call(void)` codegen with vtable indirection (1.15)
- `#jni_call` literal-keyed slot interning (1.16–1.17)
- `#jni_call` return-type matrix s32/s64/f64/bool/*void (1.18–1.22)
- `#jni_static_call` lowering (1.23)
- `#jni_call` cross-iOS gate (1.24, this commit)

3/3 cross-compile tuples pass; 118/119 host tests pass (one
unrelated regression in working tree). Next: Phase 1D for
`library/vendors/sx_android_jni/sx_android_jni.c` — migrate the C
JNI helpers to sx via `#jni_call`. Requires on-device chess
verification per the FFI plan.
This commit is contained in:
agra
2026-05-19 22:44:41 +03:00
parent 7b566bfb83
commit f10daa384a

View File

@@ -28,6 +28,10 @@ mkdir -p "$TMP_DIR"
TUPLES=(
"android|examples/ffi-objc-call-10-os-gate.sx"
"android|examples/ffi-jni-call-02-void.sx"
# Step 1.24: verify the inverse OS gate — `inline if OS == .android
# { #jni_call(...) }` must strip its body before lowering on iOS so
# emit_llvm doesn't try to use libjvm symbols the iOS SDK lacks.
"ios-sim|examples/ffi-jni-call-02-void.sx"
)
PASS=0