ffi 1.21: #jni_call(bool) → CallBooleanMethod (slot 37) — make-green

One-line addition: `.bool => Jni.CallBooleanMethod`. The lazy-cache
+ dispatch from 1.17 handles the rest. JNI's `jboolean` is i8 in the
C ABI but always carries 0 or 1; LLVM's call boundary truncates the
return byte to i1 and the sx-level bool reads the low bit
canonically.

IR snapshot updated: `ret i1 undef` replaced by the full sequence
through vtable slot 37 keyed on `("isShown", "()Z")`.
This commit is contained in:
agra
2026-05-19 22:35:20 +03:00
parent 1ee4017426
commit b0e8659c2f
2 changed files with 28 additions and 1 deletions

View File

@@ -1244,6 +1244,7 @@ pub const LLVMEmitter = struct {
.s32 => Jni.CallIntMethod,
.s64 => Jni.CallLongMethod,
.f64 => Jni.CallDoubleMethod,
.bool => Jni.CallBooleanMethod,
else => {
self.mapRef(c.LLVMGetUndef(self.toLLVMType(instruction.ty)));
return;