Changeset 13165


Ignore:
Timestamp:
Nov 3, 2009, 11:15:50 PM (10 years ago)
Author:
gz
Message:

merge r13143, r13164 (fixes to compiler type handling)

Location:
branches/working-0711/ccl/compiler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/X86/x862.lisp

    r13086 r13165  
    6363         ,@body)))))
    6464
    65  
    66 (defun x862-immediate-operand (x)
    67   (if (eq (acode-operator x) (%nx1-operator immediate))
    68     (cadr x)
    69     (compiler-bug "not an immediate: ~s" x)))
     65
    7066
    7167(defmacro with-x86-p2-declarations (declsform &body body)
     
    37033699             (if (nx-t constant)
    37043700               (! compare-to-t ireg)
    3705                (let* ((imm (x862-immediate-operand constant))
     3701               (let* ((imm (acode-immediate-operand constant))
    37063702                      (reg (x862-register-constant-p imm)))
    37073703                 (if reg
     
    85288524      (x862-form seg nil nil i)
    85298525      (x862-form seg nil xfer j)))
    8530   (let* ((type-keyword (x862-immediate-operand typename))
     8526  (let* ((type-keyword (acode-immediate-operand typename))
    85318527         (fixtype (nx-lookup-target-uvector-subtag type-keyword ))
    85328528         (safe (unless *x862-reckless* fixtype))
     
    85838579      (x862-form seg nil nil j)
    85848580      (x862-form seg nil xfer k)))
    8585   (let* ((type-keyword (x862-immediate-operand typename))
     8581  (let* ((type-keyword (acode-immediate-operand typename))
    85868582         (fixtype (nx-lookup-target-uvector-subtag type-keyword ))
    85878583         (safe (unless *x862-reckless* fixtype))
     
    87258721
    87268722(defx862 x862-%aset2 simple-typed-aset2 (seg vreg xfer typename arr i j new &optional dim0 dim1)
    8727   (let* ((type-keyword (x862-immediate-operand typename))
     8723  (let* ((type-keyword (acode-immediate-operand typename))
    87288724         (fixtype (nx-lookup-target-uvector-subtag type-keyword))
    87298725         (safe (unless *x862-reckless* fixtype))
     
    87348730
    87358731(defx862 x862-%aset3 simple-typed-aset3 (seg vreg xfer typename arr i j k new &optional dim0 dim1 dim2)
    8736   (let* ((type-keyword (x862-immediate-operand typename))
     8732  (let* ((type-keyword (acode-immediate-operand typename))
    87378733         (fixtype (nx-lookup-target-uvector-subtag type-keyword))
    87388734         (safe (unless *x862-reckless* fixtype))
     
    87478743            (if fixtype
    87488744              (nx-target-uvector-subtag-name fixtype)
    8749               (x862-immediate-operand subtag)))))
     8745              (acode-immediate-operand subtag)))))
    87508746    (if type-keyword
    87518747      (x862-vref seg vreg xfer type-keyword uvector index (unless *x862-reckless* (nx-lookup-target-uvector-subtag type-keyword)))
     
    87668762            (if fixtype
    87678763              (nx-target-uvector-subtag-name fixtype)
    8768               (x862-immediate-operand subtag)))))
     8764              (acode-immediate-operand subtag)))))
    87698765    (if type-keyword
    87708766      (x862-vset seg vreg xfer type-keyword uvector index newval (unless *x862-reckless* (nx-lookup-target-uvector-subtag type-keyword)))
  • branches/working-0711/ccl/compiler/nx.lisp

    r13070 r13165  
    155155(defparameter *nx-discard-xref-info-hook* nil)
    156156
     157(defparameter *nx-in-frontend* nil)
     158
    157159(defun compile-named-function (def &key name env policy load-time-eval-token target
    158160                                function-note keep-lambda keep-symbols source-notes
     
    180182     (setf (lexenv.variables env) 'barrier)
    181183     (let* ((*target-backend* (or (if target (find-backend target)) *host-backend*))
     184            (*nx-in-frontend* t)
    182185            (afunc (nx1-compile-lambda
    183186                    name
     
    188191                    (or policy *default-compiler-policy*)
    189192                    *load-time-eval-token*)))
     193       (setq *nx-in-frontend* nil)
    190194       (if (afunc-lfun afunc)
    191195         afunc
  • branches/working-0711/ccl/compiler/nx0.lisp

    r13146 r13165  
    466466                                    (%cadr form)))
    467467                                (if (eq op (%nx1-operator lexical-reference))
    468                                   (let* ((var (cadr form))
    469                                          (bits (nx-var-bits var))
    470                                          (punted (logbitp $vbitpunted bits)))
    471                                     (if (or punted
    472                                             (eql 0 (%ilogand $vsetqmask bits)))
    473                                       (var-inittype var)))
     468                                  (locally (declare (special *nx-in-frontend*))
     469                                    (unless *nx-in-frontend*
     470                                      (let* ((var (cadr form))
     471                                             (bits (nx-var-bits var))
     472                                             (punted (logbitp $vbitpunted bits)))
     473                                        (if (or punted
     474                                                (eql 0 (%ilogand $vsetqmask bits)))
     475                                          (var-inittype var)))))
    474476                                  (if (or (eq op (%nx1-operator %aref1))
    475477                                          (eq op (%nx1-operator simple-typed-aref2))
  • branches/working-0711/ccl/compiler/nx2.lisp

    r13070 r13165  
    236236            (setf (acode-operator ref) op
    237237                  (acode-operands ref) operands)))))))
     238
     239(defun acode-immediate-operand (x)
     240  (let* ((x (acode-unwrapped-form x)))
     241    (if (eq (acode-operator x) (%nx1-operator immediate))
     242      (cadr x)
     243      (compiler-bug "not an immediate: ~s" x))))
Note: See TracChangeset for help on using the changeset viewer.