ObjFW  Check-in [3c71107e06]

Overview
Comment:runtime/exception.m: Small fix for SjLj and SEH
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3c71107e060bfc59e29abcab09bfc904841f95284ea6a689fd76b0b02d60fc54
User & Date: js on 2016-07-30 17:09:01
Other Links: manifest | tags
Context
2016-07-30
21:18
atomic.h: Improve memory barrier check-in: 96a128f954 user: js tags: trunk
17:09
runtime/exception.m: Small fix for SjLj and SEH check-in: 3c71107e06 user: js tags: trunk
2016-07-25
22:51
Add missing files to Xcode project check-in: a5c7babba2 user: js tags: trunk
Changes

Modified src/runtime/exception.m from [be0c13750d] to [a28b850e42].

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#elif defined(HAVE_SJLJ_EXCEPTIONS)
# define PERSONALITY	 __gnu_objc_personality_sj0
# define CXX_PERSONALITY __gxx_personality_sj0
# define _Unwind_RaiseException _Unwind_SjLj_RaiseException
# define __builtin_eh_return_data_regno(i) (i)
#elif defined(HAVE_SEH_EXCEPTIONS)
# define PERSONALITY	 gnu_objc_personality
# define CXX_PERSONALITY __gxx_personality_seh0
#else
# error Unknown exception type!
#endif

#if defined(OF_ARM) && !defined(__ARM_DWARF_EH__)
# define HAVE_ARM_EHABI_EXCEPTIONS
#endif







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#elif defined(HAVE_SJLJ_EXCEPTIONS)
# define PERSONALITY	 __gnu_objc_personality_sj0
# define CXX_PERSONALITY __gxx_personality_sj0
# define _Unwind_RaiseException _Unwind_SjLj_RaiseException
# define __builtin_eh_return_data_regno(i) (i)
#elif defined(HAVE_SEH_EXCEPTIONS)
# define PERSONALITY	 gnu_objc_personality
# define CXX_PERSONALITY __gxx_personality_v0
#else
# error Unknown exception type!
#endif

#if defined(OF_ARM) && !defined(__ARM_DWARF_EH__)
# define HAVE_ARM_EHABI_EXCEPTIONS
#endif
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
	uint8_t found = 0;
	intptr_t filter = 0;

	if (foreign) {
		switch (ex_class) {
		case GNUCCXX0_EXCEPTION_CLASS:
		case CLNGCXX0_EXCEPTION_CLASS:
			if (__gxx_personality_v0 != NULL)
				return CALL_PERSONALITY(CXX_PERSONALITY);
			break;
		}

		/*
		 * None matched or none available - we'll try to handle it
		 * anyway, but will most likely fail.







|







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
	uint8_t found = 0;
	intptr_t filter = 0;

	if (foreign) {
		switch (ex_class) {
		case GNUCCXX0_EXCEPTION_CLASS:
		case CLNGCXX0_EXCEPTION_CLASS:
			if (CXX_PERSONALITY != NULL)
				return CALL_PERSONALITY(CXX_PERSONALITY);
			break;
		}

		/*
		 * None matched or none available - we'll try to handle it
		 * anyway, but will most likely fail.