From 3bc8291f6b0254460382d1c3b5af38b424fef8f3 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Sun, 17 Oct 2021 14:54:28 -0500 Subject: [PATCH 1/6] Update changelog for unreleased section --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f8b328..d0e6c2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Change Log All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). +## [Unreleased] + ## [0.2.259] - 2021-10-16 ### Fixed - Long and double arguments to upcalls failed to compile in some cases @@ -68,6 +70,7 @@ All notable changes to this project will be documented in this file. This change - Support for serializing and deserializing arbitrary Clojure functions - Support for serializing and deserializing arbitrary Clojure data structures +[Unreleased]: https://github.com/IGJoshua/coffi/compare/v0.2.259...HEAD [0.2.259]: https://github.com/IGJoshua/coffi/compare/v0.1.251...v0.2.259 [0.1.251]: https://github.com/IGJoshua/coffi/compare/v0.1.246...v0.1.251 [0.1.246]: https://github.com/IGJoshua/coffi/compare/v0.1.241...v0.1.246 From b21a5db27e6d7612092a451d9f82c4fb90198c6a Mon Sep 17 00:00:00 2001 From: blak3mill3r Date: Mon, 25 Oct 2021 03:05:14 +0000 Subject: [PATCH 2/6] 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) From 9254f7d6f7d5ec4f46405d56465971796c56613f Mon Sep 17 00:00:00 2001 From: blak3mill3r Date: Mon, 25 Oct 2021 03:10:02 +0000 Subject: [PATCH 3/6] update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f8b328..dc208a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,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 From 2eec1b11a7d706c8567ada7ed185ff03ee287f34 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 25 Oct 2021 09:34:26 -0500 Subject: [PATCH 4/6] Fixup changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d3311..27e58f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,14 @@ All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). ## [Unreleased] +### Fixed +- Non-primitive arguments on upcalls would generate invalid bytecode with `nil` instructions + ## [0.2.259] - 2021-10-16 ### 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 From 2765d5db847cf37152c18f8039c183f27ad334e4 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 25 Oct 2021 09:44:03 -0500 Subject: [PATCH 5/6] Update changelog for release --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27e58f3..baa009d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). -## [Unreleased] +## [0.2.277] - 2021-10-25 ### Fixed - Non-primitive arguments on upcalls would generate invalid bytecode with `nil` instructions @@ -73,7 +73,7 @@ All notable changes to this project will be documented in this file. This change - Support for serializing and deserializing arbitrary Clojure functions - Support for serializing and deserializing arbitrary Clojure data structures -[Unreleased]: https://github.com/IGJoshua/coffi/compare/v0.2.259...HEAD +[0.2.277]: https://github.com/IGJoshua/coffi/compare/v0.2.259...v0.2.277 [0.2.259]: https://github.com/IGJoshua/coffi/compare/v0.1.251...v0.2.259 [0.1.251]: https://github.com/IGJoshua/coffi/compare/v0.1.246...v0.1.251 [0.1.246]: https://github.com/IGJoshua/coffi/compare/v0.1.241...v0.1.246 From 65aaa8f2ccd3a8ce286028fa8d917c052236dc85 Mon Sep 17 00:00:00 2001 From: Joshua Suskalo Date: Mon, 25 Oct 2021 09:44:56 -0500 Subject: [PATCH 6/6] Update readme for release --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 356e991..64afce1 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ This library is available on Clojars. Add one of the following entries to the `:deps` key of your `deps.edn`: ```clojure -org.suskalo/coffi {:mvn/version "0.2.259"} -io.github.IGJoshua/coffi {:git/tag "v0.2.259" :git/sha "ee5805c"} +org.suskalo/coffi {:mvn/version "0.2.277"} +io.github.IGJoshua/coffi {:git/tag "v0.2.277" :git/sha "2eec1b1"} ``` If you use this library as a git dependency, you will need to prepare the