Skip to content

Commit e4d0d0c

Browse files
committed
clarify register allocation pass vs. function for python, issue #165
1 parent 28d3ca6 commit e4d0d0c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

book.tex

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6681,7 +6681,7 @@ \section{Graph Coloring via Sudoku}
66816681
\end{center}
66826682

66836683
\begin{exercise}\normalfont\normalsize
6684-
Implement the \code{allocate\_registers} pass.
6684+
Implement the \code{allocate\_registers} \racket{pass}\python{function}.
66856685
Create five programs that exercise all aspects of the register
66866686
allocation algorithm, including spilling variables to the stack.
66876687
%
@@ -6695,8 +6695,14 @@ \section{Graph Coloring via Sudoku}
66956695
\fi}
66966696
%
66976697
{\if\edition\pythonEd\pythonColor
6698-
Run the \code{run-tests.py} script to check whether the
6699-
output programs produce the same result as the input programs.
6698+
Update the \code{assign\_homes} pass to make use of
6699+
the functions you have created to perform register allocation:
6700+
\code{uncover\_live}, \code{build\_interference}, and
6701+
\code{allocate\_registers}.
6702+
Run the \code{run-tests.py} script to check whether the
6703+
output programs produce the same result as the input programs.
6704+
Inspect the generated x86 programs to make sure that some variables
6705+
are assigned to registers.
67006706
\fi}
67016707
\end{exercise}
67026708

0 commit comments

Comments
 (0)