Chapter 7. Code Shape
To translate an application program, the compiler must map each source-language statement into a sequence of one or more operations in the target machine's instruction set. The compiler must chose among many alternative ways to implement each construct. Those choices have a strong and direct impact on the quality of the code that the compiler eventually produces.
This chapter explores some of the implementation strategies that the compiler can employ for a variety of common programming-language constructs.
Keywords: Code Generation, Control Structures, Expression Evaluation

7.1. Introduction

When the compiler translates application code into executable form, it faces myriad choices about specifc details, such as the organization ...

Get Engineering a Compiler, 2nd Edition 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.