From: | apalanis@students.uwf.edu (Anand Palaniswamy) |
Newsgroups: | comp.compilers |
Date: | 3 Feb 1997 13:37:50 -0500 |
Organization: | The University of West Florida |
References: | <01bbfca0$a284a6f0$041b6682@tecel> 97-01-094 97-01-120 97-01-139 97-01-207 |
Keywords: | Java |
{Stuff about bytecodes and intermediate reps elided}
moderator> [I was under the impression that the JVM was designed to
moderator> make it easy to generate efficient code at or just before
moderator> runtime. -John]
Yes, Java byte codes are designed to take advantage of on-the-fly
instruction rewrite. An illustrative example of this is in the section
"Translation to Machine Code" in:
@Article{Gosling:1995:JIB,
author = "James Gosling",
title = "{Java} Intermediate Bytecodes",
journal = "ACM SIG{\-}PLAN Notices",
volume = "30", number = "3", pages = "111--118",
month = mar, year = "1995",
}
BTW, in the Sun interpreter, there is a bytecode-to-bytecode rewrite
optimization called the "quick" instructions. You can read more on
this in "Section 4.1: Use Lossless Quick Opcodes" in the document "The
JIT Compiler Interface Specification" available at:
ftp://ftp.javasoft.com/docs/jit_interface.ps
The JIT interface spec also shows how the JVM can "accomodate"
on-the-fly compilation.
Anand.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.