Skip to content

Commit

Permalink
Add some basic language for program start (#297)
Browse files Browse the repository at this point in the history
This section is pretty bare bones, but it defines some of the basics for how program start is represented.
  • Loading branch information
llvm-beanz authored Aug 7, 2024
1 parent d9cea8e commit ab86443
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions specs/language/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,28 @@
function scope that such as typedefs, enumerations, and enumerators
\end{itemize}

\Sec{Start}{Basic.Start}

\p A fully linked program shall contain one or more global functions, which are
the designated starting points for the program. These global functions are
called \textit{entry points}, because they denote the location where execution
inside the program begins.

\p Entry point functions have different requirements based on the target runtime
and execution mode (\ref{Basic.Start.Mode}).

\p Parameters to entry functions and entry function return types must be of
scalar, vector, or non-intangible class type (\ref{Basic.types}). Scalar and
vector parameters and return types must be annotated with semantic annotations
(\ref{Decl.Attr.Semantic}). Class type input and output parameters must have all
fields annotated with semantic annotations.

\Sub{Execution Mode}{Basic.Start.Mode}

\p A runtime may define a set of execution modes in an implementation defined
way. Each execution mode will have a set of implementation defined rules which
restrict available language functionality as appropriate for the execution mode.

\Sec{Types}{Basic.types}

\p The \textit{object representation} of an object of type \texttt{T} is the
Expand Down
1 change: 1 addition & 0 deletions specs/language/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
\Sec{Initializers}{Decl.Init}
\Sec{Function Definitions}{Decl.Function}
\Sec{Attributes}{Decl.Attr}
\Sub{Semantic Annotations}{Decl.Attr.Semantic}
\Sub{Entry Attributes}{Decl.Attr.Entry}

\Sec{Export Declarations}{Decl.Export}
Expand Down

0 comments on commit ab86443

Please sign in to comment.