Procházet zdrojové kódy

clarify register allocation pass vs. function for python, issue #165

Jeremy G. Siek před 1 rokem
rodič
revize
e4d0d0c534
1 změnil soubory, kde provedl 9 přidání a 3 odebrání
  1. 9 3
      book.tex

+ 9 - 3
book.tex

@@ -6681,7 +6681,7 @@ callq print_int
 \end{center}
 
 \begin{exercise}\normalfont\normalsize
-Implement the \code{allocate\_registers} pass.
+Implement the \code{allocate\_registers} \racket{pass}\python{function}.
 Create five programs that exercise all aspects of the register
 allocation algorithm, including spilling variables to the stack.
 %
@@ -6695,8 +6695,14 @@ Run the script to test the register allocator.
 \fi}
 %
 {\if\edition\pythonEd\pythonColor      
-Run the \code{run-tests.py} script to check whether the
-output programs produce the same result as the input programs.
+  Update the \code{assign\_homes} pass to make use of
+  the functions you have created to perform register allocation:
+  \code{uncover\_live}, \code{build\_interference}, and
+  \code{allocate\_registers}.
+  Run the \code{run-tests.py} script to check whether the
+  output programs produce the same result as the input programs.
+  Inspect the generated x86 programs to make sure that some variables
+  are assigned to registers.
 \fi}
 \end{exercise}