Changeset 12107


Ignore:
Timestamp:
08/19/09 21:17:28 (12 years ago)
Author:
ehuelsmann
Message:

Check simple (symbolp) types in compiled code
when *safety* is 1 or 2.

Note: *safety* 3 checks full types; 0 skips checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r12104 r12107  
    856856                               ,sym)))
    857857             (p1 new-expr)))
     858          ((and (<= 1 *safety* 2) ;; at safety 1 or 2 check relatively
     859                (symbolp type))   ;; simple types (those specified by a single symbol)
     860           (let* ((sym (gensym))
     861                  (new-expr `(let ((,sym ,expr))
     862                               (require-type ,sym ',type)
     863                               ,sym)))
     864             (p1 new-expr)))
    858865          (t
    859866           (list 'THE type (p1 expr))))))
Note: See TracChangeset for help on using the changeset viewer.