Would it be possible to create a compiler with ByteBuddy? #1853
Closed
ajafri2001
started this conversation in
General
Replies: 1 comment 1 reply
-
It is possible, but I would not do it myself. ASM is for fine grained byte code generation, and a compiler normally needs fine grained emission. All compilers I wrote used ASM and not Byte Buddy, to be open about this. Possibly: check out the class file API in Java 24+ if that is open for a base line. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to compile a language down to JVM bytecode. Most examples I’ve seen use ByteBuddy for runtime code generation and aren’t intended for static code generation. The docs mention that I would need ASM to handle stack frames. ASM’s APIs are too low-level/ugly for me, but I don’t mind deviating from the happy path with ByteBuddy. Has anyone gone down this path before?
I might have some misconceptions, but I was hoping someone could offer guidance.
Beta Was this translation helpful? Give feedback.
All reactions