Changeset 8632


Ignore:
Timestamp:
Mar 1, 2008, 6:20:33 PM (12 years ago)
Author:
rme
Message:

compiler-macro consp: punt if cons-tag and null-tag are the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/optimizers.lisp

    r6473 r8632  
    15861586      `(eql (lisptag ,n) ,cons-tag))))
    15871587
    1588 (define-compiler-macro consp (n)
    1589   (let* ((cons-tag (arch::target-cons-tag (backend-target-arch *target-backend*))))
    1590   `(eql (fulltag ,n) ,cons-tag)))
     1588(define-compiler-macro consp (&whole call n)
     1589  (let* ((arch (backend-target-arch *target-backend*))
     1590         (cons-tag (arch::target-cons-tag arch))
     1591         (nil-tag (arch::target-null-tag arch)))
     1592    (if (= nil-tag cons-tag)
     1593      call
     1594      `(eql (fulltag ,n) ,cons-tag))))
    15911595
    15921596(define-compiler-macro bignump (n)
Note: See TracChangeset for help on using the changeset viewer.