Changeset 14727


Ignore:
Timestamp:
Apr 22, 2011, 9:45:32 PM (8 years ago)
Author:
gb
Message:

Move ACODE-CONSTANT-P from acode-rewrite.lisp to nx2.lisp, since the
former file isn't loaded in trunk images.

Location:
trunk/source/compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/acode-rewrite.lisp

    r14705 r14727  
    8282            (t t)))))
    8383
    84 (defun acode-constant-p (form)
    85   ;; This returns (values constant-value constantp); some code
    86   ;; may need to check constantp if constant-value is nil.
    87   (let* ((form (acode-unwrapped-form-value form))
    88          (op (if (acode-p form) (acode-operator form))))
    89     (cond ((eql op (%nx1-operator nil))
    90            (values nil t))
    91           ((eql op (%nx1-operator t))
    92            (values t t))
    93           ((or (eql op (%nx1-operator fixnum))
    94                (eql op (%nx1-operator immediate)))
    95            (values (cadr form) t))
    96           (t (values nil nil)))))
     84
    9785
    9886
  • trunk/source/compiler/nx2.lisp

    r14726 r14727  
    285285
    286286
     287(defun acode-constant-p (form)
     288  ;; This returns (values constant-value constantp); some code
     289  ;; may need to check constantp if constant-value is nil.
     290  (let* ((form (acode-unwrapped-form-value form))
     291         (op (if (acode-p form) (acode-operator form))))
     292    (cond ((eql op (%nx1-operator nil))
     293           (values nil t))
     294          ((eql op (%nx1-operator t))
     295           (values t t))
     296          ((or (eql op (%nx1-operator fixnum))
     297               (eql op (%nx1-operator immediate)))
     298           (values (cadr form) t))
     299          (t (values nil nil)))))
    287300
    288301(defun acode-constant-fold-binop (seg vreg xfer x y function)
Note: See TracChangeset for help on using the changeset viewer.