4 ms·
Show HN: Jssembly – Native x86/x64/ARM Assembly via JNI Bridge in Java
- pjmlp 12y agoNice project. Reminds me of how Squeak makes use of Assembly http://www.squeaksource.com/@us0cp9R3z2kMAiPd/FB3wRHMZ http://www.squeaksource.com/@us0cp9R3z2kMAiPd/FB3wRHMZ
- ww520 12y agoLooks good. I imagine it can switch assembly code on the fly based on runtime check.
- dvt 12y agoYep! It's in the works and not pushed yet, but depending on the architecture you're running on, you should be able to execute different blocks of assembly (or fall back to a Java-implemented method if nothing matches your architecture).
- aardvark179 12y agoHow large a chunk of assembly is needed to balance out the JNI overhead? And are you keeping an eye on Panama so you can do this insane thing faster? :-)
- dvt 12y agoI'm not sure yet and I'm very interested in this problem, although it may be JVM-specific. I have not read much on Panama, but will definitely check it out.
- stuaxo 12y agoDo individual instructions need to be passed one at a time, you may as well accept multi line programmes..
- dvt 12y agoAn entire block is passed to the JNI bridge at one time; specifically, when invoke() is called. It essentially is a function (and must follow the calling conventions of the platform).
- exabrial 12y agoWhat's something really cool you could do with this?