- Timestamp:
- Jun 29, 2007, 1:01:56 AM (17 years ago)
- File:
-
- 1 edited
-
branches/ide-1.0/ccl/examples/objc-support.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ide-1.0/ccl/examples/objc-support.lisp
r6669 r6781 226 226 #+apple-objc 227 227 (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 234 229 235 230 #+ppc-target … … 269 264 ;; The callback glue reserves space for %rax at return-value-pointer-8, 270 265 ;; for %rdx at -16, for %xmm0 at -24. Store NS-EXCEPTION in the 271 ;; %rax slot, the address of #_ _NSRaiseErrorin the %rdx slot, the266 ;; %rax slot, the address of #_objc_exception_throw in the %rdx slot, the 272 267 ;; original return address in the %xmm0 slot, and force a return to 273 268 ;; the trampoline code above. … … 277 272 (%get-ptr return-address-pointer 0) *x8664-objc-callback-error-return-trampoline*) 278 273 ;; 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"))))) 280 275 (if (< addr 0) ;unlikely 281 276 (setf (%%get-signed-longlong return-value-pointer -24) addr) 282 277 (setf (%%get-unsigned-longlong return-value-pointer -24) addr))) 283 278 nil) 284 285 279 286 280
Note:
See TracChangeset
for help on using the changeset viewer.
