Changeset 887fc79


Ignore:
Timestamp:
May 25, 2021, 3:43:25 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
c65b930
Parents:
9b0bb79
Message:

Andrew MMath: Handled some too long lines caused by code snipits. Added a new command: \snake.

Location:
doc/theses/andrew_beach_MMath
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/cfalab.sty

    r9b0bb79 r887fc79  
    126126}
    127127
     128% \snake{<identifier>}
     129% Improves writing of snake case (or any convention that uses _) by allowing
     130% line breaks after _. Disables commands inside the block and formats the
     131% identifier to look like code.
     132\newcommand*\snake[1]{\snakefont{\expandafter\snake@next\detokenize{#1}\@nil}}
     133
     134% \snakefont{<text>}
     135% Command used by \snake, you may renew the command to change its formating.
     136\newcommand*\snakefont[1]{\texttt{#1}}
     137
     138% Thanks Manuel of TeX Stack exchange. (I got the base pattern from one of
     139% their answers.) Note: \@nil should never be defined.
     140\newcommand*\snake@next[1]{\ifx\@nil#1\else
     141  \expandafter\ifx\string_#1\string_\allowbreak\else#1\fi
     142  \expandafter\snake@next\fi
     143}
     144
    128145% common.tex Compatablity ===================================================
    129146% Below this line is for compatability with the old common.tex file.
  • doc/theses/andrew_beach_MMath/features.tex

    r9b0bb79 r887fc79  
    115115
    116116\paragraph{Communication}
    117 For effective exception handling, additional information is usually passed
     117For effective exception handling, additional information is often passed
    118118from the raise to the handler.
    119119So far only communication of the exceptions' identity has been covered.
     
    327327\end{cfa}
    328328When viewed on its own, a try statement will simply execute the statements
    329 in @GUARDED_BLOCK@ and when those are finished the try statement finishes.
     329in \snake{GUARDED_BLOCK} and when those are finished the try statement finishes.
    330330
    331331However, while the guarded statements are being executed, including any
     
    343343
    344344If no termination handler is found during the search then the default handler
    345 (@defaultTerminationHandler@) is run.
     345(\defaultTerminationHandler) is run.
    346346Through \CFA's trait system the best match at the throw sight will be used.
    347347This function is run and is passed the copied exception. After the default
     
    421421execution continues after the raise statement.
    422422
    423 There is a global @defaultResumptionHandler@ is polymorphic over all
     423There is a global \defaultResumptionHandler{} is polymorphic over all
    424424termination exceptions and preforms a termination throw on the exception.
    425 The @defaultTerminationHandler@ for that raise is matched at the original
    426 raise statement (the resumption @throwResume@) and it can be customized by
    427 introducing a new or better match as well.
     425The \defaultTerminationHandler{} for that raise is matched at the
     426original raise statement (the resumption @throw@\-@Resume@) and it can be
     427customized by introducing a new or better match as well.
    428428
    429429\subsubsection{Resumption Marking}
     
    681681@CoroutineCancelled@ exception, which contains a references to the cancelled
    682682coroutine and the exception used to cancel it.
    683 The resume function also takes the @defaultResumptionHandler@ from the
     683The resume function also takes the \defaultResumptionHandler{} from the
    684684caller's context and passes it to the internal report.
    685685
  • doc/theses/andrew_beach_MMath/implement.tex

    r9b0bb79 r887fc79  
    1616Virtual types only have one change to their structure: the addition of a
    1717pointer to the virtual table, which is called the \emph{virtual-table pointer}.
    18 Internally, the field is called @virtual_table@.
     18Internally, the field is called \snake{virtual_table}.
    1919The field is fixed after construction. It is always the first field in the
    2020structure so that its location is always known.
     
    321321To get full unwinding support all of this has to be done directly with
    322322assembly and assembler directives. Partiularly the cfi directives
    323 \texttt{.cfi\_lsda} and \texttt{.cfi\_personality}.
     323\snake{.cfi_lsda} and \snake{.cfi_personality}.
    324324
    325325\subsection{Personality Functions}
     
    437437\begin{sloppypar}
    438438Its arguments are the same as the paired personality function. The actions
    439 @_UA_CLEANUP_PHASE@ and @_UA_FORCE_UNWIND@ are always set when it is
     439\snake{_UA_CLEANUP_PHASE} and \snake{_UA_FORCE_UNWIND} are always set when it is
    440440called. Beyond the libunwind standard, both GCC and Clang add an extra action
    441 on the last call at the end of the stack: @_UA_END_OF_STACK@.
     441on the last call at the end of the stack: \snake{_UA_END_OF_STACK}.
    442442\end{sloppypar}
    443443
     
    456456
    457457The exception context should be retrieved by calling the function
    458 @this_exception_context@. For sequential execution, this function is defined as
     458\snake{this_exception_context}.
     459For sequential execution, this function is defined as
    459460a weak symbol in the \CFA system-library, @libcfa@. When a \CFA program is
    460461concurrent, it links with @libcfathread@, where this function is defined with a
     
    640641        {
    641642                Exception1 * name1;
    642                 if (name1 = (virtual Exception1 *)__exception_inst && check(name1)) {
     643                if (name1 = (virtual Exception1 *)__exception_inst
     644                                && check(name1)) {
    643645                        return 1;
    644646                }
     
    725727        {
    726728                Exception1 * name1;
    727                 if (name1 = (virtual Exception1 *)__exception_inst && check(name1)) {
     729                if (name1 = (virtual Exception1 *)__exception_inst
     730                                && check(name1)) {
    728731                        // CATCH BLOCK 1
    729732                        return 1;
  • doc/theses/andrew_beach_MMath/uw-ethesis.tex

    r9b0bb79 r887fc79  
    202202\makeglossaries
    203203
     204% New commands/options for this document alone:
     205% Code snipits with formating and line-breaks.
     206\newcommand\defaultResumptionHandler{\texttt{default\-Resumption\-Handler}}
     207\newcommand\defaultTerminationHandler{\texttt{default\-Termination\-Handler}}
     208
    204209% listings package configuation:
    205210\lstMakeShortInline@
Note: See TracChangeset for help on using the changeset viewer.