Summary

This chapter discussed code generation in a runtime environment. The topic was introduced as a general problem, comparing adaptive compilation to static compilation. We also explained special situations that apply to code generation in a Java Virtual Machine.

We have discussed some aspects of the Java bytecode format, its pros and cons, and the challenges of making Java code run fast, using different techniques from interpretation to total JIT compilation.

Furthermore, we have discussed the challenges of an adaptive runtime, where new code can enter the system at any time, and how to overcome them by "educated guesses", or "gambling". This means that JVM takes the optimistic approach when optimizing that made assumptions rarely change. We ...

Get Oracle JRockit now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.