From f2f2d0a5593e9939eff3a603019a8f78ee4aab1c Mon Sep 17 00:00:00 2001 From: Justin Conklin Date: Sun, 22 Oct 2023 09:44:23 -0700 Subject: [PATCH] next version --- .github/workflows/test.yml | 2 +- CHANGELOG.md | 4 ++++ README.md | 4 ++-- deps.edn | 2 +- project.clj | 2 +- src/insn/core.clj | 6 +++--- src/insn/util.clj | 5 ++++- 7 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5559dd..da048d8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-18.04, ubuntu-20.04] - jdk: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18] + jdk: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21] name: Test on ${{ matrix.os }} with JDK ${{ matrix.jdk }} diff --git a/CHANGELOG.md b/CHANGELOG.md index a3f27b1..e59cd98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.5-SNAPSHOT (20XX-XX-XX) + +* Upgrade to [ASM 9.6][asm] + ## 0.5.4 (2022-04-14) * BUGFIX: default `iface` value for method instructions should be false *except* for `invokeinterface` ([#12][issue12]) diff --git a/README.md b/README.md index 77b860a..6f2a63a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ ``` -JDK versions 8 to 18 and Clojure versions 1.7 to 1.11 are currently [tested against][ci]. +JDK versions 8 to 21 and Clojure versions 1.7 to 1.11 are currently [tested against][ci]. ### What is it? @@ -77,7 +77,7 @@ Now to write the bytecode. (def result (insn/visit class-data)) ``` -The `result` is a map containing the generated classes' packaged-prefixed `:name` and `:bytes`, the latter being a byte array. This information is all you need to give to a ClassLoader to define your class. +The `result` is a map containing the generated class's packaged-prefixed `:name` and `:bytes`, the latter being a byte array. This information is all you need to give to a ClassLoader to define your class. For convenience, we can use `insn.core/define` to define the class for us. diff --git a/deps.edn b/deps.edn index 5724871..1ab37bb 100644 --- a/deps.edn +++ b/deps.edn @@ -1,2 +1,2 @@ {:deps - {org.ow2.asm/asm {:mvn/version "9.3"}}} + {org.ow2.asm/asm {:mvn/version "9.6"}}} diff --git a/project.clj b/project.clj index 4171993..87f56c7 100644 --- a/project.clj +++ b/project.clj @@ -3,7 +3,7 @@ :deps (mapv #(vector (% 0) (:mvn/version (% 1)))) (into '[[org.clojure/clojure "1.8.0"]]))) -(defproject insn "0.5.4" +(defproject insn "0.5.5-SNAPSHOT" :description "Functional JVM bytecode generation for Clojure." :url "https://github.com/jgpc42/insn" :license {:name "Eclipse Public License" diff --git a/src/insn/core.clj b/src/insn/core.clj index 40a8dde..001d78c 100644 --- a/src/insn/core.clj +++ b/src/insn/core.clj @@ -41,7 +41,7 @@ (defn visit "Generate the class bytecode from the provided type map. Returns a map - of the classes' :name and :bytes. Options: + of the class's :name and :bytes. Options: :name of the class. Optional, but see below. @@ -139,7 +139,7 @@ a map of {parameter-index annotations}. If the class name is not package prefixed, the current namespace is - used as the resulting classes' package. If a name is not given, a + used as the resulting class's package. If a name is not given, a generated (gensym) class name is used, qualified by the current namespace. @@ -312,7 +312,7 @@ (.newInstance ^Constructor ctor (object-array args))))) (defn write - "Takes a map specifying a classes' :name and :bytes. Writes the class + "Takes a map specifying a class's :name and :bytes. Writes the class bytes to a .class file. The file's directory is taken from its package, its filename from its name, rooted at `root`. diff --git a/src/insn/util.clj b/src/insn/util.clj index 92458b3..efd65b9 100644 --- a/src/insn/util.clj +++ b/src/insn/util.clj @@ -195,7 +195,10 @@ 16 (get-opcode "V16") 17 (get-opcode "V17") 18 (get-opcode "V18") - 19 (get-opcode "V19")}) + 19 (get-opcode "V19") + 20 (get-opcode "V20") + 21 (get-opcode "V21") + 22 (get-opcode "V22")}) (defmacro ^:no-doc check-valid "Get the value at `k` in map `m` or throw exception."