Skip to content

Commit

Permalink
Describe form.spec partition (#98)
Browse files Browse the repository at this point in the history
Fix 89.
  • Loading branch information
GabrielDosReis committed Aug 3, 2023
1 parent 1fa5119 commit 598167b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
47 changes: 43 additions & 4 deletions ltx/decls.tex
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ \subsection{\valueTag{DeclSort::PartialSpecialization}}
\DeclareMember{home\_scope}{DeclIndex} \\
\DeclareMember{chart}{ChartIndex} \\
\DeclareMember{entity}{ParameterizedEntity} \\
\DeclareMember{form}{Index} \\
\DeclareMember{form}{SpecFormIndex} \\
\DeclareMember{specifiers}{BasicSpecifiers} \\
\DeclareMember{access}{Access} \\
\DeclareMember{properties}{ReachableProperties} \\
Expand All @@ -689,7 +689,7 @@ \subsection{\valueTag{DeclSort::PartialSpecialization}}
The \field{home\_scope} field denotes the parent declaration of this partial specialization.
The \field{chart} field denotes the set of template-parameter lists of this partial specialization.
The \field{entity} field describes the current instantiation of this partial specialization.
The \field{form} field is an index into the partition of specialization form (template and template-argument list) named \code{"form.spec"}.
The \field{form} field is an index into the partition of specialization form (template and template-argument list) named \code{"form.spec"} (\secref{sec:ifc-specialization-forms}).
The \field{specifiers} field denotes the declaration specifiers of this partial specialization.
The \field{access} field denotes the access level of this partial specialization.
The \field{properties} field denotes the set of reachable semantic properties.
Expand All @@ -709,7 +709,7 @@ \subsection{\valueTag{DeclSort::Specialization}}
\begin{figure}[H]
\centering
\structure[text width = 14em]{
\DeclareMember{form}{Index} \\
\DeclareMember{form}{SpecFormIndex} \\
\DeclareMember{decl}{DeclIndex} \\
\DeclareMember{sort}{SpecializationSort} \\
}
Expand All @@ -719,7 +719,7 @@ \subsection{\valueTag{DeclSort::Specialization}}
%
and meanings of the fields
\begin{itemize}
\item The value of \field{form} is an index into the specialization form partition (named "form.spec").
\item The value of \field{form} is an index into the specialization form partition (named "form.spec") (\secref{sec:ifc-specialization-forms}).
\item \field{decl}, when non null, denotes the declaration produced by the specialization.
\item \field{sort} designates how the specialization is obtained (\secref{sec:ifc-SpecializationSort}).
\end{itemize}
Expand Down Expand Up @@ -1451,3 +1451,42 @@ \subsubsection{Code segment type}
\partition{decl.segment}

\note{This is a vendor extension, the meta description of which is subject to change}


\section{Specialization forms}
\label{sec:ifc-specialization-forms}

An explicit specialization or a partial specialization of a primary template declaration
provides an alternate implementation for a specialization request.
The semantic pattern for the \grammar{template-id} of such a specialization declaration is
stored in the specialization form partition.
Each entry in that partition is a structure with the following layout
%
\begin{figure}[H]
\centering
\structure{
\DeclareMember{primary}{DeclIndex} \\
\DeclareMember{arguments}{ExprIndex} \\
}
\end{figure}
%
with the following meanings
\begin{itemize}
\item \field{primary} is an abstract reference designating the primary template declaration for which a specialization is provided
\item \field{arguments} designates the template-argument list to the \field{primary} declaration
\end{itemize}

\partition{form.spec}

\note{This representation is subject to change}.

\subsection{Abstract reference for specialization forms}
\label{sec:ifc-spec-form-index}

Specialization forms are referenced via abstract references of type \type{SpecForm},
a $32$-bit value type defined as
%
\begin{typedef}{SpecFormIndex}{}
enum class SpecFormIndex : uint32_t { };
\end{typedef}
%
3 changes: 2 additions & 1 deletion ltx/ifc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
%% Turn off indentation of paragraph
\setlength{\parindent}{0pt}

\addtocounter{secnumdepth}{1}
\setcounter{secnumdepth}{3}
%\addtocounter{secnumdepth}{1}


\title{
Expand Down

0 comments on commit 598167b

Please sign in to comment.