You are previewing Beautiful Architecture.

Beautiful Architecture

Cover of Beautiful Architecture by Georgios Gousios... Published by O'Reilly Media, Inc.
O'Reilly logo

Bootstrapping a Self-Hosting Runtime

Compared to the bootstrap of a traditional compiler (Figure 10-1), the bootstrap of a metacircular runtime involves a few more tricks. Figure 10-2 shows a T-diagram depicting the process.

A T-Diagram showing the bootstrapping of Jikes RVM on an existing JVM written in C

Figure 10-2. A T-Diagram showing the bootstrapping of Jikes RVM on an existing JVM written in C

The boot image contains several files that represent memory when the system is hosting itself (the rightmost T in Figure 10-2). The contents of the boot image are code and data, similar to what is found in a regular compiler’s object file. An extra section in Jikes RVM’s boot image contains the root map, which is created by the garbage collector. We describe the root map later in Garbage Collection.” The boot image writer is a program that uses Jikes RVM’s compilers to create the boot image files, executing on a bootstrap JVM. A loader is responsible for loading the boot image into the correct area of memory, and in Jikes RVM, the loader is known as the boot image runner.

Object Layout

The boot image writer must lay out the objects on disk as they will be used in the running Jikes RVM. The object model in Jikes RVM is configurable, allowing different design alternatives to be evaluated while keeping the rest of the system fixed. An example of a design alternative is whether to provide more bits per object for the hashing of objects or more bits per object for implementing ...

The best content for your career. Discover unlimited learning on demand for around $1/day.