From b21a5db27e6d7612092a451d9f82c4fb90198c6a Mon Sep 17 00:00:00 2001 From: blak3mill3r Date: Mon, 25 Oct 2021 03:05:14 +0000 Subject: [PATCH] fix: default to an `aload` instruction for upcall this allows non-primitive types prior to this commit the library would generate invalid bytecode with a `nil` instruction --- src/clj/coffi/ffi.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clj/coffi/ffi.clj b/src/clj/coffi/ffi.clj index 87fe7c2..3862ce4 100644 --- a/src/clj/coffi/ffi.clj +++ b/src/clj/coffi/ffi.clj @@ -490,7 +490,7 @@ (if (seq types) (let [prim (mem/primitive-type (first types))] (recur (rest types) - (conj acc [[(load-instructions prim) idx] + (conj acc [[(load-instructions prim :aload) idx] (to-object-asm (first types))]) (cond-> (inc idx) (double-sized? prim)