Java Reference
In-Depth Information
For example, the storage model described in the JVM specification has
been refined and improved based on common implementations of the
specification. The Descriptive Intermediate Attributed Notation for
Ada (DIANA) was developed as a formal specification of information
that should be communicated between the front- and back-end of anAda
compiler.
Interpreterswritten for a well defined ILs are helpful in testing compilers
and porting a compiler among platforms.
An ILs enables the crafting of a retargetable code generator ,which
greatly enhances the compiler's portability . Numerous compilers have
been developed using ILss for this reason [CG83, Ott84]:
Source Language
Intermediate Language
Pascal
P-code
Java
JVM
Ada
DIANA
The most popular and widely ported compiler suite is the GCC, which
o
ff
ers multiple levels of ILss.
In summary, ILss play an important role in reducing the cost and complexity
of compilers. Some are designed to support a specific language. For exam-
ple, the JVM is intended to support interpretation of Java, and DIANA was
designed specifically for Ada. However, other ILss are formulated to support
diverse front- and back-ends. The GCC includes two ILss, one that represents
source programs at a relatively high level and another that represents machine
instructions abstractly. The Microsoft R
compiler suite uses Common Inter-
mediateLanguage (CIL) as an ILs and the Common LanguageRuntime (CLR)
as a generic interpreter of CIL.
We next examine several IRs, with the goal of understanding their struc-
ture before proceeding to the code generation and optimization material of
Chapters 11, 13, and 14.
10.2 Java Virtual Machine
We next describe some specifics of an ILs that has served as the reference
platform for interpreting Java programs. The JVM interprets Java class files,
which represent the code and data of a Java class. Although the Java language
continues to evolve, the JVM has been relatively stable and serves well as a
target for intermediate code generation in Chapter 11.
 
 
Search WWH ::




Custom Search