65 \end{frame} |
65 \end{frame} |
66 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
66 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
67 |
67 |
68 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
68 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
69 \begin{frame}[t,fragile] |
69 \begin{frame}[t,fragile] |
70 %%\frametitle{CW2} |
70 \mbox{}\\[-20mm]\mbox{} |
|
71 |
|
72 \footnotesize |
|
73 \begin{textblock}{13}(-0.5,0.2) |
|
74 \begin{lstlisting}[language=JVMIS2,numbers=none] |
|
75 .method public static main([Ljava/lang/String;)V |
|
76 .limit locals 200 |
|
77 .limit stack 200 |
|
78 invokestatic foo/foo/read()I |
|
79 istore 0 |
|
80 ldc 1 |
|
81 istore 1 |
|
82 Loop_begin_4: |
|
83 iload 0 |
|
84 ldc 0 |
|
85 if_icmple Loop_end_5 |
|
86 iload 0 |
|
87 iload 1 |
|
88 imul |
|
89 istore 1 |
|
90 iload 0 |
|
91 ldc 1 |
|
92 isub |
|
93 istore 0 |
|
94 goto Loop_begin_4 |
|
95 \end{lstlisting} |
|
96 \end{textblock} |
|
97 |
|
98 \begin{textblock}{13}(7,8) |
|
99 \begin{lstlisting}[language=JVMIS2,numbers=none] |
|
100 Loop_end_5: |
|
101 iload 1 |
|
102 invokestatic foo/foo/write(I)V |
|
103 return |
|
104 .end method |
|
105 \end{lstlisting} |
|
106 \end{textblock} |
|
107 |
|
108 \end{frame} |
|
109 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
110 |
|
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
112 \begin{frame}[t,fragile] |
|
113 \mbox{}\\[-20mm]\mbox{} |
|
114 |
|
115 \footnotesize |
|
116 \begin{textblock}{13}(-0.5,0.2) |
|
117 \begin{lstlisting}[language=JVMIS2,numbers=none] |
|
118 .method public static main([Ljava/lang/String;)V |
|
119 .limit locals 200 |
|
120 .limit stack 200 |
|
121 invokestatic foo/foo/read()I |
|
122 istore 0 ; n |
|
123 ldc 1 |
|
124 istore 1 ; res |
|
125 Loop_begin_4: |
|
126 iload 0 ; n |
|
127 ldc 0 |
|
128 if_icmple Loop_end_5 |
|
129 iload 0 ; n |
|
130 iload 1 ; res |
|
131 imul |
|
132 istore 1 ; res |
|
133 iload 0 ; n |
|
134 ldc 1 |
|
135 isub |
|
136 istore 0 ; n |
|
137 goto Loop_begin_4 |
|
138 \end{lstlisting} |
|
139 \end{textblock} |
|
140 |
|
141 \begin{textblock}{13}(7,8) |
|
142 \begin{lstlisting}[language=JVMIS2,numbers=none] |
|
143 Loop_end_5: |
|
144 iload 1 ; res |
|
145 invokestatic foo/foo/write(I)V |
|
146 return |
|
147 .end method |
|
148 \end{lstlisting} |
|
149 \end{textblock} |
|
150 |
|
151 \end{frame} |
|
152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
153 |
|
154 |
|
155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
156 \begin{frame}[t,fragile] |
71 |
157 |
72 \small |
158 \small |
73 \begin{textblock}{13}(-0.5,1) |
159 \begin{textblock}{13}(-0.5,1) |
74 \begin{lstlisting}[numbers=none] |
160 \begin{lstlisting}[numbers=none] |
75 def mkeps(r: Rexp) : Val = r match { |
161 def mkeps(r: Rexp) : Val = r match { |