doc/misc.tex: Clarify that `augment-options' is in `sod-frontend'.
[sod] / doc / clang.tex
index 7399258..0047efb 100644 (file)
@@ -501,6 +501,16 @@ In Sod, the leaf types are
   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.
@@ -636,6 +646,7 @@ In Sod, the leaf types are
   interned) enumerated type with the given @<tag> and @<qualifier>s (all
   evaluated).
 \end{describe}
+
 \begin{describe}{fun}
     {make-enum-type @<tag> \&optional @<qualifiers> @> @<c-enum-type>}
   Return the (unique interned) C type object for the enumerated C type whose
@@ -651,6 +662,7 @@ In Sod, the leaf types are
   interned) structured type with the given @<tag> and @<qualifier>s (all
   evaluated).
 \end{describe}
+
 \begin{describe}{fun}
     {make-struct-type @<tag> \&optional @<qualifiers> @> @<c-struct-type>}
   Return the (unique interned) C type object for the structured C type whose
@@ -954,9 +966,9 @@ function type is the type of the function's return value.
 
   Keyword functions are never considered to be the same as ordinary
   functions.  Two keyword function types are considered to be the same if
-  their return types are the same, and their positional argument lists consist of
-  arguments with the same type, in the same order: the keyword arguments
-  accepted by the functions is not significant.
+  their return types are the same, and their positional argument lists
+  consist of arguments with the same type, in the same order: the keyword
+  arguments accepted by the functions is not significant.
 
   Keyword functions are constructed using an extended version of the @|fun|
   specifier used for ordinary C function types.  The extended syntax is as
@@ -1001,7 +1013,7 @@ function type is the type of the function's return value.
 
 \begin{describe}{gf}
     {c-function-arguments @<c-function-type> @> @<arguments>}
-  Return the arguments list of the @<c-function-type>.
+  Return the (non-keyword) argument list of the @<c-function-type>.
 \end{describe}
 
 \begin{describe}{fun}
@@ -1199,6 +1211,8 @@ Temporary names are represented by objects which implement a simple protocol.
 \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                       \\
@@ -1284,6 +1298,33 @@ Temporary names are represented by objects which implement a simple protocol.
   \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}