Changeset 6781 for branches


Ignore:
Timestamp:
Jun 29, 2007, 1:01:56 AM (17 years ago)
Author:
Gary Byers
Message:

Use #_objc_exception_throw on x86-64. (Should really do this for
ppc64 as well.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ide-1.0/ccl/examples/objc-support.lisp

    r6669 r6781  
    226226#+apple-objc
    227227(progn
    228 ;;; (#__NSRaiseError nsexception) is entirely equivalent to
    229 ;;; -[NSException raise].  If we get nervous about passing the former
    230 ;;; around, we can always look up the method imp of the latter.
    231 (defmacro raising-ns-exception-on-error (&body body)
    232   `(handler-case (progn ,@body)
    233     (error (c) (external-call "__NSRaiseError" :address (ns-exception c) :void))))
     228
    234229
    235230#+ppc-target
     
    269264  ;; The callback glue reserves space for %rax at return-value-pointer-8,
    270265  ;; for %rdx at -16, for %xmm0 at -24.  Store NS-EXCEPTION in the
    271   ;; %rax slot, the address of #__NSRaiseError in the %rdx slot, the
     266  ;; %rax slot, the address of #_objc_exception_throw in the %rdx slot, the
    272267  ;; original return address in the %xmm0 slot, and force a return to
    273268  ;; the trampoline code above.
     
    277272        (%get-ptr return-address-pointer 0) *x8664-objc-callback-error-return-trampoline*)
    278273  ;; A foreign entry point is always an integer on x8664.
    279   (let* ((addr (%reference-external-entry-point (load-time-value (external "__NSRaiseError")))))
     274  (let* ((addr (%reference-external-entry-point (load-time-value (external "_objc_exception_throw")))))
    280275    (if (< addr 0)                      ;unlikely
    281276      (setf (%%get-signed-longlong return-value-pointer -24) addr)
    282277      (setf (%%get-unsigned-longlong return-value-pointer -24) addr)))
    283278  nil)
    284 
    285279
    286280
Note: See TracChangeset for help on using the changeset viewer.