@@ -70,7 +70,7 @@ extern "C" EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD,
7070+------------------+--+-----+-----+------------------------+--------------------------+
7171| callSiteTableLength | (ULEB128) | Call Site Table length, used to find Action table |
7272+---------------------+-----------+---------------------------------------------------+
73- #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__ )
73+ #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__ )
7474+---------------------+-----------+------------------------------------------------+
7575| Beginning of Call Site Table The current ip lies within the |
7676| ... (start, length) range of one of these |
@@ -84,7 +84,7 @@ extern "C" EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD,
8484| +-------------+---------------------------------+------------------------------+ |
8585| ... |
8686+----------------------------------------------------------------------------------+
87- #else // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
87+ #else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
8888+---------------------+-----------+------------------------------------------------+
8989| Beginning of Call Site Table The current ip is a 1-based index into |
9090| ... this table. Or it is -1 meaning no |
@@ -97,7 +97,7 @@ extern "C" EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD,
9797| +-------------+---------------------------------+------------------------------+ |
9898| ... |
9999+----------------------------------------------------------------------------------+
100- #endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
100+ #endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
101101+---------------------------------------------------------------------+
102102| Beginning of Action Table ttypeIndex == 0 : cleanup |
103103| ... ttypeIndex > 0 : catch |
547547set_registers (_Unwind_Exception* unwind_exception, _Unwind_Context* context,
548548 const scan_results& results)
549549{
550- #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__ )
550+ #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__ )
551551#define __builtin_eh_return_data_regno (regno ) regno
552552#elif defined(__ibmxl__)
553553// IBM xlclang++ compiler does not support __builtin_eh_return_data_regno.
@@ -642,7 +642,7 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
642642 // Get beginning current frame's code (as defined by the
643643 // emitted dwarf code)
644644 uintptr_t funcStart = _Unwind_GetRegionStart (context);
645- #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__ )
645+ #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__ )
646646 if (ip == uintptr_t (-1 ))
647647 {
648648 // no action
@@ -652,9 +652,9 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
652652 else if (ip == 0 )
653653 call_terminate (native_exception, unwind_exception);
654654 // ip is 1-based index into call site table
655- #else // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
655+ #else // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
656656 uintptr_t ipOffset = ip - funcStart;
657- #endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
657+ #endif // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
658658 const uint8_t * classInfo = NULL ;
659659 // Note: See JITDwarfEmitter::EmitExceptionTable(...) for corresponding
660660 // dwarf emission
@@ -676,7 +676,7 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
676676 // Walk call-site table looking for range that
677677 // includes current PC.
678678 uint8_t callSiteEncoding = *lsda++;
679- #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__USING_WASM_EXCEPTIONS__ )
679+ #if defined(__USING_SJLJ_EXCEPTIONS__) || defined(__WASM_EXCEPTIONS__ )
680680 (void )callSiteEncoding; // Unused when using SjLj/Wasm exceptions
681681#endif
682682 uint32_t callSiteTableLength = static_cast <uint32_t >(readULEB128 (&lsda));
@@ -687,33 +687,33 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
687687 while (callSitePtr < callSiteTableEnd)
688688 {
689689 // There is one entry per call site.
690- #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__ )
690+ #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__ )
691691 // The call sites are non-overlapping in [start, start+length)
692692 // The call sites are ordered in increasing value of start
693693 uintptr_t start = readEncodedPointer (&callSitePtr, callSiteEncoding);
694694 uintptr_t length = readEncodedPointer (&callSitePtr, callSiteEncoding);
695695 uintptr_t landingPad = readEncodedPointer (&callSitePtr, callSiteEncoding);
696696 uintptr_t actionEntry = readULEB128 (&callSitePtr);
697697 if ((start <= ipOffset) && (ipOffset < (start + length)))
698- #else // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
698+ #else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
699699 // ip is 1-based index into this table
700700 uintptr_t landingPad = readULEB128 (&callSitePtr);
701701 uintptr_t actionEntry = readULEB128 (&callSitePtr);
702702 if (--ip == 0 )
703- #endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
703+ #endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
704704 {
705705 // Found the call site containing ip.
706- #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__ )
706+ #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__ )
707707 if (landingPad == 0 )
708708 {
709709 // No handler here
710710 results.reason = _URC_CONTINUE_UNWIND;
711711 return ;
712712 }
713713 landingPad = (uintptr_t )lpStart + landingPad;
714- #else // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
714+ #else // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
715715 ++landingPad;
716- #endif // __USING_SJLJ_EXCEPTIONS__ || __USING_WASM_EXCEPTIONS__
716+ #endif // __USING_SJLJ_EXCEPTIONS__ || __WASM_EXCEPTIONS__
717717 results.landingPad = landingPad;
718718 if (actionEntry == 0 )
719719 {
@@ -841,15 +841,15 @@ static void scan_eh_tab(scan_results &results, _Unwind_Action actions,
841841 action += actionOffset;
842842 } // there is no break out of this loop, only return
843843 }
844- #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__USING_WASM_EXCEPTIONS__ )
844+ #if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__WASM_EXCEPTIONS__ )
845845 else if (ipOffset < start)
846846 {
847847 // There is no call site for this ip
848848 // Something bad has happened. We should never get here.
849849 // Possible stack corruption.
850850 call_terminate (native_exception, unwind_exception);
851851 }
852- #endif // !__USING_SJLJ_EXCEPTIONS__ && !__USING_WASM_EXCEPTIONS__
852+ #endif // !__USING_SJLJ_EXCEPTIONS__ && !__WASM_EXCEPTIONS__
853853 } // there might be some tricky cases which break out of this loop
854854
855855 // It is possible that no eh table entry specify how to handle
@@ -906,7 +906,7 @@ _UA_CLEANUP_PHASE
906906*/
907907
908908#if !defined(_LIBCXXABI_ARM_EHABI)
909- #ifdef __USING_WASM_EXCEPTIONS__
909+ #ifdef __WASM_EXCEPTIONS__
910910_Unwind_Reason_Code __gxx_personality_wasm0
911911#elif defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
912912static _Unwind_Reason_Code __gxx_personality_imp
@@ -975,7 +975,7 @@ __gxx_personality_v0
975975 exc->languageSpecificData = results.languageSpecificData ;
976976 exc->catchTemp = reinterpret_cast <void *>(results.landingPad );
977977 exc->adjustedPtr = results.adjustedPtr ;
978- #ifdef __USING_WASM_EXCEPTIONS__
978+ #ifdef __WASM_EXCEPTIONS__
979979 // Wasm only uses a single phase (_UA_SEARCH_PHASE), so save the
980980 // results here.
981981 set_registers (unwind_exception, context, results);
0 commit comments