# HG changeset patch # User Nobuyasu Oshiro # Date 1339472328 -32400 # Node ID a9c4eb2b29b8b7acecab1bdd82fe828f17c487e3 # Parent bcacfe595c2a2c50416081a5c73515d1f38c187d modify diff -r bcacfe595c2a -r a9c4eb2b29b8 paper/aplas2012.tex --- a/paper/aplas2012.tex Tue Jun 12 01:03:27 2012 +0900 +++ b/paper/aplas2012.tex Tue Jun 12 12:38:48 2012 +0900 @@ -39,15 +39,46 @@ \subsection{subsection} -\subsubsection{subsubsection} +\subsubsection{sub-subsection} \paragraph{paragraph} \section{Continuation based C} +\begin{figure}[htpb] + \begin{center} +\scalebox{0.35}{\includegraphics{figure/codesegment.pdf}} + \end{center} + \caption{} + \label{fig:codesegment} +\end{figure} + + + \section{recursive type syntax} -We implemeted \verb+__rectype+ syntax on GCC. +We implemented \verb+__rectype+ syntax in GCC. \verb+__rectype+ syntax is declare a recursive type. +This example is using \verb+__rectype+. + +\begin{lstlisting} +__code csA( __rectype *p) { + goto p(csB); +} +\end{lstlisting} + +*p represent pointer of csA at this example. +p's argument type is same csA that function pointer. +It is the same as the following. + +\begin{lstlisting} +void csA( void (*p)(void*)) { + p(csB); +} +\end{lstlisting} + +Type checking can be performed if this declaration. + + \subsection{What is recursive type} Recursive type is @@ -63,12 +94,6 @@ This example is rectype syntax: -\begin{lstlisting} -__code csA( __rectype *p) { - goto p(csB); -} -\end{lstlisting} - \begin{figure}[htpb] \begin{minipage}{0.5\hsize}