Changeset 9b0bb79 for doc/theses/andrew_beach_MMath
- Timestamp:
- May 23, 2021, 4:55:15 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 887fc79
- Parents:
- b38b22f
- Location:
- doc/theses/andrew_beach_MMath
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/existing.tex
rb38b22f r9b0bb79 199 199 forall(dtype T) 200 200 struct node { 201 node(T) * next; // generic linked node201 node(T) * next; 202 202 T * data; 203 203 } … … 238 238 \begin{cfa} 239 239 coroutine CountUp { 240 unsigned int next; // communication variable240 unsigned int next; 241 241 } 242 242 CountUp countup; … … 308 308 { 309 309 StringWorker stringworker; // fork thread running in "main" 310 } // implicitly join with thread $\(\Rightarrow\)$wait for completion310 } // <- implicitly join with thread / wait for completion 311 311 \end{cfa} 312 312 The thread main is where a new thread starts execution after a fork operation -
doc/theses/andrew_beach_MMath/implement.tex
rb38b22f r9b0bb79 124 124 125 125 \begin{figure} 126 \begin{cfa} 127 type_id 128 parent_field0 129 ... 130 parent_fieldN 131 child_field0 132 ... 133 child_fieldN 134 \end{cfa} 126 \input{vtable-layout} 135 127 \caption{Virtual Table Layout} 136 128 \label{f:VirtualTableLayout} … … 171 163 coroutine Example { 172 164 // fields 173 } 165 }; 174 166 \end{cfa} 175 167 … … 337 329 A personality function can preform different actions depending on how it is 338 330 called. 339 \begin{lstlisting}[language=C,{moredelim=**[is][\color{red}]{@}{@}}] 340 typedef _Unwind_Reason_Code (*@_Unwind_Personality_Fn@) ( 341 _Unwind_Action @action@, 342 _Unwind_Exception_Class @exception_class@, 343 _Unwind_Exception * @exception@, 344 struct _Unwind_Context * @context@ 345 ); 331 \begin{lstlisting} 332 typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn) ( 333 _Unwind_Action action, 334 _Unwind_Exception_Class exception_class, 335 _Unwind_Exception * exception, 336 struct _Unwind_Context * context); 346 337 \end{lstlisting} 347 338 The @action@ argument is a bitmask of possible actions: … … 427 418 function and the stop parameter. The stop function has a similar interface as a 428 419 personality function, except it is also passed the stop parameter. 429 \begin{lstlisting} [language=C,{moredelim=**[is][\color{red}]{@}{@}}]430 typedef _Unwind_Reason_Code (* @_Unwind_Stop_Fn@)(431 _Unwind_Action @action@,432 _Unwind_Exception_Class @exception_class@,433 _Unwind_Exception * @exception@,434 struct _Unwind_Context * @context@,435 void * @stop_parameter@);420 \begin{lstlisting} 421 typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)( 422 _Unwind_Action action, 423 _Unwind_Exception_Class exception_class, 424 _Unwind_Exception * exception, 425 struct _Unwind_Context * context, 426 void * stop_parameter); 436 427 \end{lstlisting} 437 428 … … 493 484 494 485 \begin{figure} 495 \begin{verbatim} 496 Fixed Header | _Unwind_Exception <- pointer target 497 | 498 | Cforall storage 499 | 500 Variable Body | the exception <- fixed offset 501 V ... 502 \end{verbatim} 486 \input{exception-layout} 503 487 \caption{Exception Layout} 504 488 \label{f:ExceptionLayout} … … 525 509 \begin{figure} 526 510 \centering 527 % Andrew: Figure out what these do and give them better names. 528 \newsavebox{\myboxA} 529 \newsavebox{\myboxB} 530 \begin{lrbox}{\myboxA} 511 \newsavebox{\codeBox} 512 \newsavebox{\stackBox} 513 \begin{lrbox}{\codeBox} 531 514 \begin{lstlisting}[language=CFA,{moredelim=**[is][\color{red}]{@}{@}}] 532 515 unsigned num_exceptions = 0; … … 551 534 \end{lrbox} 552 535 553 \begin{lrbox}{\ myboxB}536 \begin{lrbox}{\stackBox} 554 537 \begin{lstlisting} 538 | try-finally 539 | try-catch (Example) 540 throws() 541 | try-finally 542 | try-catch (Example) 543 throws() 544 | try-finally 545 | try-catch (Example) 546 throws() 547 main() 555 548 \end{lstlisting} 556 549 \end{lrbox} 557 550 558 {\usebox\ myboxA}551 {\usebox\codeBox} 559 552 \hspace{25pt} 560 {\usebox\ myboxB}553 {\usebox\stackBox} 561 554 562 555 \caption{Multiple Exceptions} … … 775 768 776 769 \begin{figure} 777 \begin{minipage}[l][][b]{0,2\textwidth} 778 \begin{verbatim} 779 780 781 X <- 782 | 783 V 784 X 785 | 786 V 787 X 788 \end{verbatim} 789 Initial State 790 \end{minipage} 791 \begin{minipage}[l][][b]{0,2\textwidth} 792 \begin{verbatim} 793 794 795 X 796 | 797 V 798 X <- 799 | 800 V 801 X 802 \end{verbatim} 803 Handler Found 804 \end{minipage} 805 \begin{minipage}[l][][b]{0,2\textwidth} 806 \begin{verbatim} 807 X <- 808 / 809 / X 810 | | 811 \ V 812 X 813 | 814 V 815 X 816 \end{verbatim} 817 Try Block Added 818 \end{minipage} 819 \begin{minipage}[l][][b]{0,2\textwidth} 820 \begin{verbatim} 821 822 823 X <- 824 | 825 V 826 X 827 | 828 V 829 X 830 \end{verbatim} 831 Handler Done 832 \end{minipage} 770 \input{resumption-marking} 833 771 \caption{Resumption Marking} 834 772 \label{f:ResumptionMarking}
Note: See TracChangeset
for help on using the changeset viewer.