diff --git a/CHANGELOG.md b/CHANGELOG.md index d0e6c2f..24d3311 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. This change ### Fixed - Long and double arguments to upcalls failed to compile in some cases - Void return types on upcalls would crash on serialization +- Non-primitive types on upcalls was unsupported and would generate invalid bytecode with `nil` instructions ## [0.1.251] - 2021-10-14 ### Fixed 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)