How This Book Is Structured

The CLI provides a number of services to programming languages and tools that wish to produce managed code, and the runtime mechanisms needed to create and run managed components are the focus of this book. After introducing the CLI, its core concepts, and the Rotor implementation, the following topics are covered:

The CLI type system

Unlike some virtual execution environments, the type system is the heart of the CLI. Chapter 3 examines what constitutes a type, how types map into internal data structures and processor-specific values, and how Rotor implements the features found in the ECMA CLI specification.

Component packaging

Assemblies are the construct that the CLI uses to package executable code safely. Chapter 4 covers what assemblies are, how they are built and loaded, and what design goals they were intended to meet.

Type loading and JIT compilation

The ECMA CLI specification specifically states that CIL was designed to be transformed into native CPU instructions before being directly executed. Chapter 5 focuses on the details of how Rotor converts types, expressed as CIL and metadata, into native code, and what triggers this process.

Managed code

Running native code safely under the control of a virtual execution environment is not simple. Chapter 6 details the execution engine and how it uses mechanisms such as threads and exceptions to maintain control while also allowing extensive access to the underlying platform.

Garbage collection

The CLI provides a memory management model that frees programmers from the details and concerns of manually allocating and freeing memory. Chapter 7 explains how Rotor tracks the liveness of object references, how memory is allocated and released, and how finalization is implemented.

The Platform Adaptation Layer (PAL)

The PAL is what makes the Shared Source CLI easy to port, as demonstrated by running Win32, Mac OS X, and FreeBSD implementations. Chapter 9, which discusses the implementation of the PAL, will be especially interesting to anyone interested in porting Rotor to other platforms. It is also of general interest, however, since the PAL enumerates the systems constructs that are assumed to exist within the CLI specification.

In addition, this book contains four appendixes that discusses:

  • The contents of the CD

  • Where to obtain the Rotor source tree and how to build, install, and troubleshoot it

  • How to port Rotor to other platforms

  • Rotor macrology

Get Shared Source CLI Essentials 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.