Changeset 057298e
- Timestamp:
- Apr 6, 2020, 1:30:10 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7030dab, ed12051, f1b6671
- Parents:
- ebe0f0d (diff), 73530d9 (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
-
libcfa/src/exception.c
rebe0f0d r057298e 10 10 // Created On : Mon Jun 26 15:13:00 2017 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Apr 02 14:47:00 202013 // Update Count : 1 312 // Last Modified On : Fri Apr 03 11:57:00 2020 13 // Update Count : 14 14 14 // 15 15 … … 31 31 // FIX ME: temporary hack to keep ARM build working 32 32 #ifndef _URC_FATAL_PHASE1_ERROR 33 #define _URC_FATAL_PHASE1_ERROR 233 #define _URC_FATAL_PHASE1_ERROR 3 34 34 #endif // ! _URC_FATAL_PHASE1_ERROR 35 35 #ifndef _URC_FATAL_PHASE2_ERROR … … 39 39 #include "lsda.h" 40 40 41 /* The exception class for our exceptions. Because of the vendor component 42 * its value would not be standard. 43 * Vendor: UWPL 44 * Language: CFA\0 45 */ 46 const _Unwind_Exception_Class __cfaehm_exception_class = 0x4c50575500414643; 41 47 42 48 // Base exception vtable is abstract, you should not have base exceptions. … … 116 122 // May have to move to cfa for constructors and destructors (references). 117 123 124 // How to clean up an exception in various situations. 125 static void __cfaehm_exception_cleanup( 126 _Unwind_Reason_Code reason, 127 struct _Unwind_Exception * exception) { 128 switch (reason) { 129 case _URC_FOREIGN_EXCEPTION_CAUGHT: 130 // This one we could clean-up to allow cross-language exceptions. 131 case _URC_FATAL_PHASE1_ERROR: 132 case _URC_FATAL_PHASE2_ERROR: 133 default: 134 abort(); 135 } 136 } 137 138 // We need a piece of storage to raise the exception, for now its a single 139 // piece. 140 static struct _Unwind_Exception this_exception_storage; 141 118 142 struct __cfaehm_node { 119 143 struct __cfaehm_node * next; … … 142 166 // Copy the exception to storage. 143 167 except->virtual_table->copy( context->current_exception, except ); 168 169 // Set up the exception storage. 170 this_exception_storage.exception_class = __cfaehm_exception_class; 171 this_exception_storage.exception_cleanup = __cfaehm_exception_cleanup; 144 172 } 145 173 … … 175 203 if ( *(void**)except ) __cfaehm_delete_exception( *(exception_t **)except ); 176 204 } 177 178 179 // We need a piece of storage to raise the exception180 struct _Unwind_Exception this_exception_storage;181 205 182 206 // Function needed by force unwind … … 201 225 abort(); 202 226 } 203 204 227 205 228 // Call stdlibc to raise the exception
Note: See TracChangeset
for help on using the changeset viewer.