next up previous contents
Next: 3.3 BOOTLIST file Up: 3.2 Init library Previous: 3.2 Init library   Contents

3.2.1 Linkage to runtime system

The ML source file dummy.sml (located in directory src/system/smlnj/init) contains a carefully constructed module whose signature matches that of the runtime system's binary API. This file is being compiled as part of constructing the init library, but it has been marked specially as runtime system placeholder. During compilation, this file pretends to be the runtime system; other modules that use the runtime system ``think'' they are using dummy.sml.

At link time (i.e., bootstrap time--when makeml is run), the boot loader will ignore dummy.sml and use the actual runtime system in its place. This trick makes it possible that (from the point of view of all other modules) using services from the runtime system appears to be no different than using services from an ordinary ML compilation unit.

Matthias Blume