Two simple type objects are equal if and only if they have @|string=| names
and matching qualifiers.
+ \def\x#1{\desclabel{const}{#1}}
+ \x{c-type-bool} \x{c-type-char} \x{c-type-wchar-t} \x{c-type-signed-char}
+ \x{c-type-unsigned-char} \x{c-type-short} \x{c-type-unsigned-short}
+ \x{c-type-int} \x{c-type-unsigned} \x{c-type-long} \x{c-type-unsigned-long}
+ \x{c-type-long-long} \x{c-type-unsigned-long-long} \x{c-type-size-t}
+ \x{c-type-ptrdiff-t} \x{c-type-float} \x{c-type-double}
+ \x{c-type-long-double} \x{c-type-float-imaginary}
+ \x{c-type-double-imaginary} \x{c-type-long-double-imaginary}
+ \x{c-type-float-complex} \x{c-type-double-complex}
+ \x{c-type-long-double-complex} \x{c-type-va-list} \x{c-type-void}
A number of symbolic type specifiers for builtin types are predefined as
shown in \xref{tab:codegen.c-types.simple}. These are all defined as if by
@|define-simple-c-type|, so can be used to construct qualified types.
\subsubsection{Well-known `temporary' names}
\begin{table}
+ \def\x#1{\desclabel{var}{#1}}
+ \x{*sod-ap*} \x{*sod-master-ap*} \x{*null-pointer*}
\begin{tabular}[C]{*2{>{\codeface}l}} \hlx*{hv}
\thd{\textbf{Variable}} & \thd{\textbf{Name format}} \\ \hlx{vhv}
{}*sod-ap* & sod__ap \\
\label{tab:codegen.codegen.insts}
\end{table}
+\begin{describe*}
+ {\dhead*{cls}{@<code>-inst (inst) \&key \dots}
+ \dhead*{fn}{make-@<code>-inst \dots}
+ \dhead*{gf}{inst-@<slot> @<inst> @> @<value>}}
+ \def\instclass#1#2#3{%
+ #1{cls}{#3-inst}[#2]%
+ #1{fun}{make-#3-inst}[#2]%
+ }
+ \def\instslot#1#2#3{#1{gf}{inst-#3}[#2]}
+ \def\makelabels#1#2{%
+ \def\x{\instclass{#1}{#2}}
+ \x{var} \x{set} \x{update} \x{cond} \x{return} \x{break} \x{continue}
+ \x{expr} \x{call} \x{banner} \x{block} \x{if} \x{for} \x{while}
+ \x{do-while} \x{function}
+ \def\x{\instslot{#1}{#2}}
+ \x{name} \x{type} \x{init} \x{var} \x{expr} \x{op} \x{cond} \x{conseq}
+ \x{alt} \x{func} \x{args} \x{control} \x{decls} \x{body} \x{update}
+ \x{banner} \x{banner-args}
+ }
+ \makelabels{\desclabel}{|(}
+
+ Sod provides a number of built-in instruction types generated by
+ \descref{mac}{definst}: see \xref{tab:codegen.codegen.insts}.
+
+ \makelabels{\descindex}{|)}
+\end{describe*}
+
\subsection{Code generation} \label{sec:clang.codegen.codegen}
{\dhead{cls}{convert-to-ilayout-inst (inst)}
\dhead{fun}
{make-convert-to-ilayout-inst @<class> @<chain-head> @<expr>}}
+ \def\makelabels#1#2{%
+ #1{gf}{inst-class}[#2]#1{gf}{inst-chain-head}[#2]%
+ \descindex{gf}{inst-expr}[#2]%
+ }
+ \makelabels{\desclabel}{|(}
+
\begin{prog}
SOD_ILAYOUT(@<class>, @<chain-head-nick>, @<expr>)
\end{prog}
+
+ \makelabels{\descindex}{|)}
\end{describe*}