从中间代码到Java字节码(龙书) [英] From intermediate code to Java bytecode (dragon book)
问题描述
我参加了编译器课程,使用龙书作为教科书。它提供了有关如何将其编译器生成的中间代码转换为目标语言,汇编语言的说明。
I'm enrolled in a compilers course, using the "dragon book" as textbook. It gives instructions on how to convert the intermediate code generated by its compiler to an object language, assembly.
我的问题是:在哪里可以找到转换中间代码的指令
My question is: where can I find instructions to convert an intermediate code in the 3-address format to java bytecode, for the same grammar used in the book?
教科书站点: http://dragonbook.stanford.edu/index.html#courses
推荐答案
如果您想知道如何自己创建二进制Java类文件,没有比官方 JVM规范。
If you want to know how to create a binary Java classfile yourself, there's no better resource than the official JVM specification.
如果要以人类可读的文本格式编写类文件,有各种可用的汇编器:克拉科陶,茉莉花 ,以及丁香等。请注意,Jasmin很老,几乎没有维护,尽管Sable Research Group保留了它的一个分支以供自己使用。
If you want to write a classfile in a human readable textual format, there are various assemblers available: Krakatau, Jasmin, and Lilac among others. Note that Jasmin is old and largely unmaintained, though the Sable Research Group maintains a fork of it for use with their own tools.
这篇关于从中间代码到Java字节码(龙书)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!