Changeset 5972


Ignore:
Timestamp:
Mar 2, 2007, 4:05:02 AM (18 years ago)
Author:
Gary Byers
Message:

(the <type> <constant>) transforms to <constant> if constant is of type
<type>.)

Do we need an ignore-errors here ? Or does <type> need to be defined ?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/nx0.lisp

    r5656 r5972  
    19991999       (when (eq sym 'the)
    20002000         (destructuring-bind (typespec thing) (cdr form)
    2001            (multiple-value-bind (newform win) (nx-transform thing environment)
    2002              (when win
    2003                (setq changed t)
    2004                (if (and (self-evaluating-p newform)
    2005                         (typep newform typespec))
    2006                  (setq form newform)
    2007                  (setq form `(the ,typespec ,newform)))
    2008                (go DONE)))))
     2001           (if (constantp thing)
     2002             (progn
     2003               (setq form thing form thing)
     2004               (go LOOP))
     2005             (multiple-value-bind (newform win) (nx-transform thing environment)
     2006               (when win
     2007                 (setq changed t)
     2008                 (if (and (self-evaluating-p newform)
     2009                          (typep newform typespec))
     2010                   (setq form newform)
     2011                   (setq form `(the ,typespec ,newform)))
     2012                 (go DONE))))))
    20092013       (when (nx-quoted-form-p form)
    20102014         (when (self-evaluating-p (%cadr form))
Note: See TracChangeset for help on using the changeset viewer.