ffi 1.19: #jni_call(s64) → CallLongMethod (slot 52) — make-green

One-line addition to the `call_method_offset` switch: `.s64 =>
Jni.CallLongMethod`. The 1.17 caching infrastructure and the named-
constants struct from c1877fc handle the rest.

IR snapshot at `tests/expected/ffi-jni-call-05-jlong-return.ir`
updated: `ret i64 undef` replaced by the full lazy-cache +
CallLongMethod (vtable slot 52) sequence keyed on
`("currentTimeMillis", "()J")`.
This commit is contained in:
agra
2026-05-19 22:30:49 +03:00
parent da5b6351e2
commit 5945a8c176
2 changed files with 28 additions and 1 deletions

View File

@@ -1242,6 +1242,7 @@ pub const LLVMEmitter = struct {
const call_method_offset: u32 = switch (ret_ty_id) {
.void => Jni.CallVoidMethod,
.s32 => Jni.CallIntMethod,
.s64 => Jni.CallLongMethod,
else => {
self.mapRef(c.LLVMGetUndef(self.toLLVMType(instruction.ty)));
return;