handouts/ho07.tex
changeset 369 43c0ed473720
parent 327 9470cd124667
child 370 a65767fe5d71
equal deleted inserted replaced
368:a9911966c0df 369:43c0ed473720
     3 \usepackage{../langs}
     3 \usepackage{../langs}
     4 
     4 
     5 
     5 
     6 \begin{document}
     6 \begin{document}
     7 
     7 
     8 \section*{Handout 7 (Compiling)}
     8 \section*{Handout 7 (Compilation)}
     9 
     9 
       
    10 The purpose of a compiler is to transform a program, a human
       
    11 can write, into code the machine can run as fast as possible.
       
    12 The fastest code would be machine code the CPU can run
       
    13 directly, but it is often enough to improve the speed of a
       
    14 program by just targeting a virtual machine. This produces not
       
    15 the fastest possible code, but code that is fast enough and
       
    16 has the advantage that the virtual machine care of things a
       
    17 compiler would normally need to take care of (like explicit
       
    18 memory management).
    10 
    19 
       
    20 We will be generating code for the Java Virtual Machine. This
       
    21 is a stack-based virtual machine which will make it easy to
       
    22 generate code for arithmetic expressions. Recall
       
    23 that our
    11 
    24 
    12 \end{document}
    25 \end{document}
    13 
    26 
    14 %%% Local Variables: 
    27 %%% Local Variables: 
    15 %%% mode: latex  
    28 %%% mode: latex