Changeset 14417
- Timestamp:
- Nov 7, 2010, 1:00:06 PM (14 years ago)
- Location:
- trunk/source/compiler
- Files:
-
- 7 edited
-
ARM/arm2.lisp (modified) (2 diffs)
-
PPC/ppc2.lisp (modified) (3 diffs)
-
X86/x862.lisp (modified) (1 diff)
-
nx-basic.lisp (modified) (4 diffs)
-
nx0.lisp (modified) (5 diffs)
-
nx1.lisp (modified) (5 diffs)
-
nxenv.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/compiler/ARM/arm2.lisp
r14355 r14417 7439 7439 j 7440 7440 (if *arm2-reckless* 7441 *nx-nil*7441 (make-nx-nil) 7442 7442 (nx-lookup-target-uvector-subtag keyword )) 7443 7443 keyword ;(make-acode (%nx1-operator immediate) ) … … 7494 7494 k 7495 7495 (if *arm2-reckless* 7496 *nx-nil*7496 (make-nx-nil) 7497 7497 (nx-lookup-target-uvector-subtag keyword )) 7498 7498 keyword ;(make-acode (%nx1-operator immediate) ) -
trunk/source/compiler/PPC/ppc2.lisp
r14357 r14417 7634 7634 (defppc2 ppc2-fixnum-overflow fixnum-overflow (seg vreg xfer form) 7635 7635 (destructuring-bind (op n0 n1) (acode-unwrapped-form form) 7636 (ppc2-use-operator op seg vreg xfer n0 n1 *nx-t*)))7636 (ppc2-use-operator op seg vreg xfer n0 n1 (make-nx-t)))) 7637 7637 7638 7638 … … 7678 7678 j 7679 7679 (if *ppc2-reckless* 7680 *nx-nil*7680 (make-nx-nil) 7681 7681 (nx-lookup-target-uvector-subtag keyword )) 7682 7682 keyword ;(make-acode (%nx1-operator immediate) ) … … 7733 7733 k 7734 7734 (if *ppc2-reckless* 7735 *nx-nil*7735 (make-nx-nil) 7736 7736 (nx-lookup-target-uvector-subtag keyword )) 7737 7737 keyword ;(make-acode (%nx1-operator immediate) ) -
trunk/source/compiler/X86/x862.lisp
r14406 r14417 8699 8699 (defx862 x862-fixnum-overflow fixnum-overflow (seg vreg xfer form) 8700 8700 (destructuring-bind (op n0 n1) (acode-unwrapped-form form) 8701 (x862-use-operator op seg vreg xfer n0 n1 *nx-t*)))8701 (x862-use-operator op seg vreg xfer n0 n1 (make-nx-t)))) 8702 8702 8703 8703 (defx862 x862-%aref2 simple-typed-aref2 (seg vreg xfer typename arr i j &optional dim0 dim1) -
trunk/source/compiler/nx-basic.lisp
r14369 r14417 838 838 839 839 (defun decomp-form (acode) 840 (cond (( eq acode *nx-t*) t)841 (( eq acode *nx-nil*) nil)840 (cond ((nx-null acode) t) 841 ((nx-t acode) nil) 842 842 (t (let* ((op (car acode)) 843 843 (num (length *next-nx-operators*)) … … 888 888 (opts (when opt (cons '&optional (apply #'mapcar 889 889 (lambda (var init supp) 890 (if (and (not supp) ( eq init *nx-nil*))890 (if (and (not supp) (nx-null init)) 891 891 (decomp-arg var) 892 892 (list* (decomp-arg var) … … 904 904 sym 905 905 (list key sym)))) 906 (if (and (not supp) ( eq init *nx-nil*) (eq arg sym))906 (if (and (not supp) (nx-null init) (eq arg sym)) 907 907 sym 908 908 (list* arg … … 914 914 (cons '&aux (apply #'mapcar 915 915 (lambda (var init) 916 (if ( eq init *nx-nil*)916 (if (nx-null init) 917 917 (decomp-arg var) 918 918 (list (decomp-arg var) (decomp-form init)))) -
trunk/source/compiler/nx0.lisp
r14406 r14417 66 66 67 67 (defvar *nx-lambdalist* (make-symbol "lambdalist")) 68 (defvar *nx-nil* (make-acode (%nx1-operator nil))) 69 (defvar *nx-t* (make-acode (%nx1-operator t))) 68 69 (defmacro make-nx-nil () `(make-acode ,(%nx1-operator nil))) 70 (defmacro make-nx-t () `(make-acode `(%nx1-operator t))) 70 71 71 72 (defun %nx-null (x) 72 ( or (eq x *nx-nil*)73 (if (acode-p x)74 (eql (acode-operator x)75 (%nx1-operator nil)))))73 (let* ((x (acode-unwrapped-form x))) 74 (if (acode-p x) 75 (eql (acode-operator x) 76 (%nx1-operator nil))))) 76 77 77 78 (defun %nx-t (x) 78 ( or (eq x *nx-t*)79 (if (acode-p x)80 (eql (acode-operator x)81 (%nx1-operator t)))))79 (let* ((x (acode-unwrapped-form x))) 80 (if (acode-p x) 81 (eql (acode-operator x) 82 (%nx1-operator t))))) 82 83 83 84 (defparameter *nx-current-compiler-policy* (%default-compiler-policy)) … … 449 450 (if (nx-null form) 450 451 'null 451 (if ( eq form *nx-t*)452 (if (nx-t form) 452 453 'boolean 453 454 (nx-target-type … … 1587 1588 (until (eq keytail auxtail) 1588 1589 (unless (eq (setq sym (pop keytail)) '&allow-other-keys) 1589 (setq kinit *nx-nil*ksupp nil)1590 (setq kinit (make-nx-nil) ksupp nil) 1590 1591 (if (atom sym) 1591 1592 (setq kvar sym kkey (make-keyword sym)) … … 1683 1684 (until (eq keytail auxtail) 1684 1685 (unless (eq (setq sym (pop keytail)) '&allow-other-keys) 1685 (setq kinit *nx-nil*ksupp nil)1686 (setq kinit (make-nx-nil) ksupp nil) 1686 1687 (if (atom sym) 1687 1688 (setq kvar sym kkey (make-keyword sym)) … … 1781 1782 1782 1783 (defun nx1-immediate (form) 1783 #+notyet1784 1784 (cond ((eq form t) (make-acode (%nx1-operator t))) 1785 1785 ((null form) (make-acode (%nx1-operator nil))) 1786 1786 ((nx1-target-fixnump form) 1787 1787 (make-acode (%nx1-operator fixnum) form)) 1788 (t (make-acode (%nx1-operator immediate) form))) 1789 #-notyet 1790 (if (or (eq form t) (null form)) 1791 (nx1-sysnode form) 1792 (make-acode 1793 (if (nx1-target-fixnump form) 1794 (%nx1-operator fixnum) 1795 (%nx1-operator immediate)) ; Screw: chars 1796 form))) 1788 (t (make-acode (%nx1-operator immediate) form)))) 1797 1789 1798 1790 (defun nx2-constant-form-value (form) -
trunk/source/compiler/nx1.lisp
r14375 r14417 1422 1422 (%nx1-operator let*) 1423 1423 (list catchvar indexvar) 1424 (list (make-acode (%nx1-operator cons) *nx-nil* *nx-nil*) *nx-nil*)1424 (list (make-acode (%nx1-operator cons) (make-nx-nil) (make-nx-nil)) (make-nx-nil)) 1425 1425 (make-acode 1426 1426 (%nx1-operator local-tagbody) … … 1441 1441 body))) 1442 1442 (make-acode (%nx1-operator local-go) looplabel) 1443 *nx-nil*)))1443 (make-nx-nil)))) 1444 1444 0)))))) 1445 1445 … … 2012 2012 (progn 2013 2013 (push (%car optvars) vars) (push (%car arglist) vals) 2014 (when (%car spvars) (push (%car spvars) vars) (push *nx-t*vals)))2014 (when (%car spvars) (push (%car spvars) vars) (push (make-nx-t) vals))) 2015 2015 (progn 2016 2016 (push (%car optvars) vars*) (push (%car inits) vals*) 2017 (when (%car spvars) (push (%car spvars) vars*) (push *nx-nil*vals*))))2017 (when (%car spvars) (push (%car spvars) vars*) (push (make-nx-nil) vals*)))) 2018 2018 (setq optvars (%cdr optvars) spvars (%cdr spvars) inits (%cdr inits) 2019 2019 arglist (%cdr arglist)))) … … 2022 2022 (nx-error "Extra args ~s for (LAMBDA ~s ...)" args lambda-list)) 2023 2023 (when rest 2024 (push rest vars*) (push *nx-nil*vals*)2025 (nx1-punt-bindings (cons rest nil) (cons *nx-nil*nil))2024 (push rest vars*) (push (make-nx-nil) vals*) 2025 (nx1-punt-bindings (cons rest nil) (cons (make-nx-nil) nil)) 2026 2026 (setq rest nil))) 2027 2027 (when keys … … 2050 2050 (when (%car spvars) 2051 2051 (push (%car spvars) vars*) 2052 (push (if (%svref keyargs i) *nx-t* *nx-nil*) vals*))2052 (push (if (%svref keyargs i) (make-nx-t) (make-nx-nil)) vals*)) 2053 2053 (setq keyvars (%cdr keyvars) inits (%cdr inits) spvars (%cdr spvars))) 2054 2054 (setq keys hit)) -
trunk/source/compiler/nxenv.lisp
r14406 r14417 506 506 nx-adjust-setq-count 507 507 nx-init-var 508 nx1-sysnode509 508 )) 510 509 … … 558 557 559 558 560 (defun nx1-sysnode (form) 561 (if form 562 (if (eq form t) 563 *nx-t*) 564 *nx-nil*)) 559 565 560 ) 566 561
Note:
See TracChangeset
for help on using the changeset viewer.
