flâneur — a map of the web's best reading

5.3 Abstract Locations

students.cs.ubc.ca · 6,255 words · saved by 1 readers

In the last chapter, we designed our first language, Paren-x64 v1, and wrote our first compiler to implement it. This language introduces the barest, although still very useful, abstraction—freedom from boilerplate. Paren-x64 v1 abstracts away from the boilerplate of x64, and details of exactly how to pass a value to the operating system. While Paren-x64 v1 is an improvement of x64, it has a significant limitation for writing programs that we address in this chapter. The language requires the programmer to manually manage a small number of variables, namely the registers, while programming. Human memory is much less reliable than computer memory, so we should design languages that make the computer remember more and free the human to remember less. This will prevent the human from causing run-time errors when they inevitably make a mistake and overwrite a register that was still in use. To address this, we will introduce abstract locations, of which there are an arbitrary number and th

5.3 Abstract Locations ► CPSC 411 2022w2 - Introduction to Compiler Construction 1 Syllabus 2 COVID Syllabus Addendum 3 Course Calendar 4 Course Project Logistics 5 Book 6 Project Milestones 7 CPSC 411 Infrastructure Package 8 Credits ▼ 5 Book 5.1 A Compiler Begins with a Language 5.2 Abstracting Boilerplate ( v1 ) 5.3 Abstract Locations 5.4 Value Orientation 5.5 Register Allocation 5.6 Structured Control Flow 5.7 Procedural Abstraction: Call 5.8 Procedural Abstraction: Return 5.9 Algebraic Expressions 5.10 Data types: Immediates 5.11 Data types: Structured Data and Heap Allocation

Explore this link on the map →

related reading