Changeset 11160


Ignore:
Timestamp:
Oct 18, 2008, 6:20:20 PM (11 years ago)
Author:
gz
Message:

Add compiler macro for streamp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/optimizers.lisp

    r11088 r11160  
    23902390
    23912391
     2392;;; In practice, things that're STREAMP are almost always
     2393;;; BASIC-STREAMs or FUNDAMENTAL-STREAMs, but STREAMP is a generic
     2394;;; function.
     2395(define-compiler-macro streamp (arg)
     2396  (let* ((s (gensym)))
     2397    `(let* ((,s ,arg))
     2398      (or (typep ,s 'basic-stream)
     2399       (typep ,s 'fundamental-stream)
     2400       ;; Don't recurse
     2401       (funcall 'streamp ,s)))))
     2402
    23922403
    23932404(define-compiler-macro %char-code-case-fold (&whole w code vector &environment env)
Note: See TracChangeset for help on using the changeset viewer.