Skip to content

Commit

Permalink
Merge pull request #1 from NickBarnes/handler-typo
Browse files Browse the repository at this point in the history
Fix typo hanlder -> handler
  • Loading branch information
fabbing authored Oct 2, 2023
2 parents 47a815d + f3bbce8 commit 7ac91b3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions presentation/catching.tex
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ \subsection{Installing a trap}
\begin{itemize}
\item<1-> \typename{caml\_domain\_state} is a C structure part of the runtime
\item<1-> It holds information useful to the runtime to manage a domain (each domain has its \typename{caml\_domain\_state})
\item<3-> \localname{exn\_hanlder} is a pointer to the \emph{last} installed \typename{trap}
\item<3-> \localname{exn\_handler} is a pointer to the \emph{last} installed \typename{trap}
\end{itemize}
}
\onslide*<2>{\mintc[lastline=32]{src/ocaml/domain\_state.h}}
Expand Down Expand Up @@ -287,7 +287,7 @@ \subsection{Installing a trap}
\item The address of the handler's code is pushed onto the stack
\item The value of \localname{exn\_handler} from \typename{caml\_domain\_state} is pushed onto the stack
% TODO /grey color
\item \localname{domain\_state->exn\_hanlder} has to point to the last installed trap
\item \localname{domain\_state->exn\_handler} has to point to the last installed trap
\item Its value is updated to the just-constructed trap's address
\end{itemize}
}
Expand Down Expand Up @@ -386,7 +386,7 @@ \subsection{Removing a trap}
\begin{column}{0.5\textwidth}
\only<1>{
\begin{itemize}
\item \localname{domain\_state->exn\_hanlder} is restored to its previous value from the trap
\item \localname{domain\_state->exn\_handler} is restored to its previous value from the trap
\end{itemize}
}%
\only<2>{
Expand All @@ -410,7 +410,7 @@ \subsection{Removing a trap}
\only<1>{
\begin{itemize}
% TODO grey
\item \localname{domain\_state->exn\_hanlder} is restored to its previous value from the trap
\item \localname{domain\_state->exn\_handler} is restored to its previous value from the trap
% TODO /grey
\item Discards the exception handler code address
\end{itemize}
Expand Down
2 changes: 1 addition & 1 deletion presentation/default.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ \subsection*{Runtime's default exception handler}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item \localname{domain\_state->exn\_hanlder} points to a trap located before \funcname{entry}!
\item \localname{domain\_state->exn\_handler} points to a trap located before \funcname{entry}!
\item What installed this very first trap there?
\end{itemize}
\bigskip
Expand Down
24 changes: 12 additions & 12 deletions presentation/nested.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ \subsection{Multiple handlers, multiple traps}
\item<1-> \funcname{main} installs the trap for \typename{ExnC}
\begin{itemize}
\item<2-> Pushes address of \typename{ExnC} handler
\item<2-> Saves the current value of \localname{domain\_state->exn\_hanlder} into the trap
\item<2-> Updates \localname{domain\_state->exn\_hanlder} to point to \typename{ExnC} trap
\item<2-> Saves the current value of \localname{domain\_state->exn\_handler} into the trap
\item<2-> Updates \localname{domain\_state->exn\_handler} to point to \typename{ExnC} trap
\end{itemize}
\end{itemize}
}%
Expand All @@ -56,8 +56,8 @@ \subsection{Multiple handlers, multiple traps}
\item<1-> \funcname{main} now installs the trap for \typename{ExnB}
\begin{itemize}
\item<2-> Pushes address of \typename{ExnB} handler
\item<2-> Saves the current value of \localname{domain\_state->exn\_hanlder}, which is pointing to \typename{ExnC} into the trap
\item<4-> Updates \localname{domain\_state->exn\_hanlder} to point to \typename{ExnB} trap
\item<2-> Saves the current value of \localname{domain\_state->exn\_handler}, which is pointing to \typename{ExnC} into the trap
\item<4-> Updates \localname{domain\_state->exn\_handler} to point to \typename{ExnB} trap
\end{itemize}
\end{itemize}
}
Expand All @@ -79,7 +79,7 @@ \subsection{Multiple handlers, multiple traps}

\begin{frame}{OCaml exception trap}
\begin{itemize}
\item Traps form a linked list of exception handlers whose head is \localname{domain\_state->exn\_hanlder}
\item Traps form a linked list of exception handlers whose head is \localname{domain\_state->exn\_handler}
\item On amd64, an exception trap could be represented with this C structure
\end{itemize}
\bigskip
Expand Down Expand Up @@ -129,7 +129,7 @@ \subsection{Raise and reraise}
\item \funcname{definitely\_raise} raises \typename{ExnC}
\begin{itemize}
\item Loads the \typename{ExnC} exception value into \regname{RAX} % FIXME phrasing
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_hanlder}
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_handler}
\end{itemize}
\end{itemize}
}%
Expand All @@ -155,9 +155,9 @@ \subsection{Raise and reraise}
\item \funcname{definitely\_raise} raises \typename{ExnC}
\begin{itemize}
\item Loads the \typename{ExnC} exception value into \regname{RAX} % FIXME phrasing
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_hanlder}
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_handler}
% TODO /gray
\item Updates \localname{domain\_state->exn\_hanlder} to the next handler: \typename{ExnB} handler
\item Updates \localname{domain\_state->exn\_handler} to the next handler: \typename{ExnB} handler
\end{itemize}
\end{itemize}
}%
Expand All @@ -183,8 +183,8 @@ \subsection{Raise and reraise}
\item \funcname{definitely\_raise} raises \typename{ExnC}
\begin{itemize}
\item Loads the \typename{ExnC} exception value into \regname{RAX} % FIXME phrasing
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_hanlder}
\item Updates \localname{domain\_state->exn\_hanlder} to the next handler: \typename{ExnB} handler
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_handler}
\item Updates \localname{domain\_state->exn\_handler} to the next handler: \typename{ExnB} handler
% TODO /gray
\item Loads the address of \typename{ExnA} handler and jumps to it
\end{itemize}
Expand Down Expand Up @@ -216,8 +216,8 @@ \subsection{Raise and reraise}
\item \funcname{definitely\_raise} raises \typename{ExnC}
\begin{itemize}
\item Loads the \typename{ExnC} exception value into \regname{RAX} % FIXME phrasing
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_hanlder}
\item Updates \localname{domain\_state->exn\_hanlder} to the next handler: \typename{ExnB} handler
\item Restores \regname{RSP} to the value of \localname{domain\_state->exn\_handler}
\item Updates \localname{domain\_state->exn\_handler} to the next handler: \typename{ExnB} handler
\item Loads the address of \typename{ExnA} handler and jumps to it
% TODO /gray
\item \typename{ExnA} handler is executed
Expand Down

0 comments on commit 7ac91b3

Please sign in to comment.