| 89 | } |
| 90 | |
| 91 | vec4f WIN_EH_NO_ASAN Context::evalWithCatch ( SimNode * node ) { |
| 92 | auto aa = abiArg; |
| 93 | auto acm = abiCMRES; |
| 94 | auto atba = abiThisBlockArg; |
| 95 | char * EP, * SP; |
| 96 | stack.watermark(EP,SP); |
| 97 | vec4f vres = v_zero(); |
| 98 | #if DAS_ENABLE_EXCEPTIONS |
| 99 | try { |
| 100 | vres = node->eval(*this); |
| 101 | } catch ( const dasException & ex ) { |
| 102 | abiArg = aa; |
| 103 | abiCMRES = acm; |
| 104 | abiThisBlockArg = atba; |
| 105 | stack.pop(EP,SP); |
| 106 | exceptionMessage = ex.what(); |
| 107 | exception = exceptionMessage.c_str(); |
| 108 | exceptionAt = ex.exceptionAt; |
| 109 | } |
| 110 | #else |
| 111 | jmp_buf ev; |
| 112 | jmp_buf * JB = throwBuf; |
| 113 | throwBuf = &ev; |
| 114 | if ( !setjmp(ev) ) { |
| 115 | vres = node->eval(*this); |
| 116 | } else { |
| 117 | abiArg = aa; |
| 118 | abiCMRES = acm; |
| 119 | abiThisBlockArg = atba; |
| 120 | stack.pop(EP,SP); |
| 121 | } |
| 122 | throwBuf = JB; |
| 123 | #endif |
| 124 | return vres; |
| 125 | } |
| 126 | |
| 127 | bool WIN_EH_NO_ASAN Context::runWithCatch ( const callable<void()> & subexpr ) { |
| 128 | auto aa = abiArg; |
no test coverage detected