Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions ltx/exprs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2681,6 +2681,7 @@ \subsection{Triadic operators}
\enumerator{Choice}
\enumerator{ConstructAt}
\enumerator{Initialize}
\enumerator{NewArray}

\setcounter{enumi}{1023}
\enumerator{Msvc}
Expand Down Expand Up @@ -2715,6 +2716,20 @@ \subsection{Triadic operators}

C++ abstract machine operation.

\ifcSortSection{NewArray}{TriadicOperator}
Abstract machine operation corresponding to allocating appropriate storage for an array and initializing its elements
if an initializer is present.

When used as the value for the \field{assoc} field of a \sortref{Triad}{ExprSort} structure, that structure
represents the semantic operation for an array \grammar{new-expression}, where
\begin{itemize}
\item the first operand designates the array object type
\item the second operand designates the array bound
\item the third operand designates the initializer, or is null if no initializer is present
\end{itemize}

A null third operand designates absence of an initializer, as in \code{new T[n]}, and is distinct from an empty initializer list.
Comment on lines +2719 to +2731

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually think DyadicOperator::NewArray is used?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be soon. I'll update the spec accordingly.


\ifcSortSection{Msvc}{TriadicOperator}
This is a marker, not an actual operator. Triadic operators with
value greater that this are MSVC extensions.
Expand Down