Comments (2)
Hi! Thanks for the question. Unlike Java, method descriptors (via :desc
) specify the return value as the last element. Your method descriptor vectors are missing the return value:
(require '[insn.core :as core])
(def a (into-array Character/TYPE "foo"))
(core/new-instance
{:name "test.Klass"
:flags #{:public}
:methods [{:flags #{:public :static}, :name "asetLiteral", :desc [chars :int :char :char] ;; <-- here
:emit [[:aload 0]
[:iload 1]
[:iload 2]
[:castore]
[:iload 2]
[:ireturn]]}]})
[(test.Klass/asetLiteral a 0 \b)
(seq a)]
;; => [\b (\b \o \o)]
from insn.
Awesome! thanks
from insn.
Related Issues (13)
- Clojure AOT compilation bug HOT 1
- Default constructor for Record? HOT 4
- Question: how to express call to default method of interface HOT 6
- Upgrading to 0.5.3 causes `Constant pool index 75 is invalid` HOT 3
- Static invocation inside if branch, possible issue or just doing wrong? HOT 4
- Can insn output signatures? HOT 5
- I love this library HOT 4
- How to use labels? HOT 2
- saving out .class files HOT 3
- try finally HOT 4
- static initializer section HOT 2
- Support for setting the SourceFile attribute of the class HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from insn.