فهرست منبع

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

Jeremy G. Siek 1 سال پیش
والد
کامیت
e4d0d0c534
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      book.tex

+ 9 - 3
book.tex

@@ -6681,7 +6681,7 @@ callq print_int
 \end{center}
 \end{center}
 
 
 \begin{exercise}\normalfont\normalsize
 \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
 Create five programs that exercise all aspects of the register
 allocation algorithm, including spilling variables to the stack.
 allocation algorithm, including spilling variables to the stack.
 %
 %
@@ -6695,8 +6695,14 @@ Run the script to test the register allocator.
 \fi}
 \fi}
 %
 %
 {\if\edition\pythonEd\pythonColor      
 {\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}
 \fi}
 \end{exercise}
 \end{exercise}