Differences From Artifact [33f7be3a9f]:
- File
src/runtime/exception.m
— part of check-in
[c5ef582958]
at
2013-03-04 17:20:15
on branch trunk
— Replace BOOL with bool.
The only places where BOOL is left are those where they are required by
the ABI. (user: js, size: 14384) [annotate] [blame] [check-ins using]
To Artifact [337aac59db]:
- File src/runtime/exception.m — part of check-in [5eb22639e4] at 2013-04-09 18:08:43 on branch trunk — Add support for SjLj exceptions. (user: js, size: 15195) [annotate] [blame] [check-ins using]
︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | + + + + + | uint8_t typestable_enc; const uint8_t *typestable; uintptr_t typestable_base; uint8_t callsites_enc; const uint8_t *callsites, *actiontable; }; #ifndef HAVE_SJLJ_EXCEPTIONS extern _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception*); #else extern _Unwind_Reason_Code _Unwind_SjLj_RaiseException( struct _Unwind_Exception*); #endif extern void* _Unwind_GetLanguageSpecificData(struct _Unwind_Context*); extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context*); extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context*); extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context*); #if defined(__arm__) || defined(__ARM__) extern _Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception*, |
︙ | |||
164 165 166 167 168 169 170 171 172 173 174 175 176 177 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | + + + + + + + + + + | #else # define CONTINUE_UNWIND return _URC_CONTINUE_UNWIND extern uintptr_t _Unwind_GetIP(struct _Unwind_Context*); extern void _Unwind_SetIP(struct _Unwind_Context*, uintptr_t); extern void _Unwind_SetGR(struct _Unwind_Context*, int, uintptr_t); #endif #if defined(HAVE_DWARF_EXCEPTIONS) # define PERSONALITY __gnu_objc_personality_v0 # define RAISE_EXCEPTION _Unwind_RaiseException #elif defined(HAVE_SJLJ_EXCEPTIONS) # define PERSONALITY __gnu_objc_personality_sj0 # define RAISE_EXCEPTION _Unwind_SjLj_RaiseException #else # error Unknown exception type! #endif static objc_uncaught_exception_handler uncaught_exception_handler; static uint64_t read_uleb128(const uint8_t **ptr) { uint64_t value = 0; |
︙ | |||
335 336 337 338 339 340 341 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | - + - + | } static bool find_callsite(struct _Unwind_Context *ctx, struct lsda *lsda, uintptr_t *landingpad, const uint8_t **actionrecords) { uintptr_t ip = _Unwind_GetIP(ctx); |
︙ | |||
369 370 371 372 373 374 375 376 377 378 379 380 381 382 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | + + + + + + + + + + + + + + + + + | callsite_action - 1; return true; } } return false; #else uintptr_t callsite_landingpad, callsite_action; if ((uintptr_t)ip < 1) return false; do { callsite_landingpad = (uintptr_t)read_uleb128(&ptr); callsite_action = (uintptr_t)read_uleb128(&ptr); } while (--ip > 1); *landingpad = callsite_landingpad + 1; if (callsite_action != 0) *actionrecords = lsda->actiontable + callsite_action - 1; return true; #endif } static bool class_matches(Class class, id object) { Class iter; |
︙ | |||
456 457 458 459 460 461 462 | 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | - + | } while (displacement != 0); return 0; } #if defined(__arm__) || defined(__ARM__) _Unwind_Reason_Code |
︙ | |||
481 482 483 484 485 486 487 | 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | - + | default: return _URC_FAILURE; } _Unwind_SetGR(ctx, 12, (uintptr_t)ex); #else _Unwind_Reason_Code |
︙ | |||
592 593 594 595 596 597 598 | 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | - + | abort(); memset(e, 0, sizeof(*e)); e->exception.class = objc_exception_class; e->exception.cleanup = cleanup; e->object = object; |
︙ |