Changeset 35ea4f3 for doc/theses/andrew_beach_MMath/future.tex
- Timestamp:
- Jan 16, 2021, 4:48:06 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b57db73
- Parents:
- 0edd11a (diff), 02b73ea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/future.tex
r0edd11a r35ea4f3 8 8 parts of the exception system that use the current version. 9 9 10 For instance a full virtual system would probably allow for several 11 improvements to the exception traits. Although they do currently work they 12 could be made easier to use by making the virtual table type implitate in the 13 trait (which would remove the need for those wrapper marcos) or allowing 14 for assertions that give the layout of a virtual table for safety. 10 There are several improvements to the virtual system that would improve 11 the exception traits. The biggest one is an assertion that checks that one 12 virtual type is a child of another virtual type. This would capture many of 13 the requirements much more precisely. 14 15 The full virtual system might also include other improvement like associated 16 types. This is a proposed feature that would allow traits to refer to types 17 not listed in their header. This would allow the exception traits to not 18 refer to the virtual table type explicatly which would remove the need for 19 the interface macros. 15 20 16 21 \section{Additional Throws} … … 65 70 66 71 Also new techniques to skip previously searched parts of the stack will have 67 to be developed. 72 to be developed. The recursive resume problem still remains and ideally the 73 same pattern of ignoring sections of the stack. 68 74 69 \section{Support for More Platforms} 70 Termination is not portable because it is implemented with inline assembly. 71 Those sections will have to be rewritten to support different architectures 75 \section{Signal Exceptions} 76 Exception Handling: Issues and a Proposed Notation suggests there are three 77 types of exceptions: escape, notify and signal. 78 Escape exceptions are our termination exceptions, notify exceptions are 79 resumption exceptions and that leaves signal exception unimplemented. 72 80 73 \section{Quality-of-Life Improvements} 74 Finally come various improvements to the usability of \CFA. Most of these 75 would just require time. Time that would not lead to interesting research so 76 it has been left aside for now. A few examples are included here but there 77 are more: 81 Signal exceptions allow either behaviour, that is after the exception is 82 handled control can either return to the throw or from where the handler is 83 defined. 84 85 The design should be rexamined and be updated for \CFA. A very direct 86 translation would perhaps have a new throw and catch pair and a statement 87 (or statements) could be used to decide if the handler returns to the throw 88 or continues where it is, but there are other options. 89 90 For instance resumption could be extended to cover this use by allowing 91 local control flow out of it. This would require an unwind as part of the 92 transition as there are stack frames that have to be removed. 93 This would mean there is no notify like throw but because \CFA does not have 94 exception signatures a termination can be thrown from any resumption handler 95 already so there are already ways one could try to do this in existing \CFA. 96 97 % Maybe talk about the escape; and escape CONTROL_STMT; statements or how 98 % if we could choose if _Unwind_Resume proceeded to the clean-up stage this 99 % would be much easier to implement. 100 101 \section{Language Improvements} 102 There is also a lot of work that are not follow ups to this work in terms of 103 research, some have no interesting research to be done at all, but would 104 improve \CFA as a programming language. The full list of these would 105 naturally be quite extensive but here are a few examples that involve 106 exceptions: 78 107 79 108 \begin{itemize} 109 \item The implementation of termination is not portable because it includes 110 some assembly statements. These sections will have to be re-written to so 111 \CFA has full support on more machines. 80 112 \item Allowing exception handler to bind the exception to a reference instead 81 113 of a pointer. This should actually result in no change in behaviour so there … … 88 120 much easier. (To do the same for try blocks would probably wait for zero-cost 89 121 exceptions, which would allow the try block to be inlined as well.) 90 \item Enabling local control flow out of a resumption handler. This would be91 a weighty operation, causing a stack unwind like a termination, so there might92 be a different statement or a statement modifier to make sure the user does93 this purposefully.94 95 However this would require the more complex system as they cannot be inlined96 into the original function as they can be run at a different place on the97 stack. So instead the unwinding will have to carry with it information on98 which one of these points to continue at and possibly also the return value99 for the function if a \codeCFA{return} statement was used.100 122 \end{itemize}
Note: See TracChangeset
for help on using the changeset viewer.