Use new MAP-RESTARTS in FIND-RESTART, COMPUTE-RESTARTS; fix FIND-RESTART
[sbcl.git] / src / compiler / sparc / vm.lisp
index bcf7f6d..f50443b 100644 (file)
 ;;; and seems to be working so far    -dan
 ;;;
 ;;; arbitrarily taken for alpha, too. - Christophe
-(def!constant kludge-nondeterministic-catch-block-size 7)
+(def!constant kludge-nondeterministic-catch-block-size 6)
 
 (!define-storage-classes
 
   ;; The control stack.  (Scanned by GC)
   (control-stack control-stack)
 
+  ;; We put ANY-REG and DESCRIPTOR-REG early so that their SC-NUMBER
+  ;; is small and therefore the error trap information is smaller.
+  ;; Moving them up here from their previous place down below saves
+  ;; ~250K in core file size.  --njf, 2006-01-27
+
+  ;; Immediate descriptor objects.  Don't have to be seen by GC, but nothing
+  ;; bad will happen if they are.  (fixnums, characters, header values, etc).
+  (any-reg
+   registers
+   :locations #.(append non-descriptor-regs descriptor-regs)
+   :constant-scs (zero immediate)
+   :save-p t
+   :alternate-scs (control-stack))
+
+  ;; Pointer descriptor objects.  Must be seen by GC.
+  (descriptor-reg registers
+   :locations #.descriptor-regs
+   :constant-scs (constant null immediate)
+   :save-p t
+   :alternate-scs (control-stack))
+
   ;; The non-descriptor stacks.
   (signed-stack non-descriptor-stack) ; (signed-byte 32)
   (unsigned-stack non-descriptor-stack) ; (unsigned-byte 32)
 
   ;; **** Things that can go in the integer registers.
 
-  ;; Immediate descriptor objects.  Don't have to be seen by GC, but nothing
-  ;; bad will happen if they are.  (fixnums, characters, header values, etc).
-  (any-reg
-   registers
-   :locations #.(append non-descriptor-regs descriptor-regs)
-   :constant-scs (zero immediate)
-   :save-p t
-   :alternate-scs (control-stack))
-
-  ;; Pointer descriptor objects.  Must be seen by GC.
-  (descriptor-reg registers
-   :locations #.descriptor-regs
-   :constant-scs (constant null immediate)
-   :save-p t
-   :alternate-scs (control-stack))
-
   ;; Non-Descriptor characters
   (character-reg registers
    :locations #.non-descriptor-regs
   (defregtn zero any-reg)
   (defregtn null descriptor-reg)
   (defregtn code descriptor-reg)
+  (defregtn lip descriptor-reg)
   (defregtn alloc any-reg)
 
   (defregtn nargs any-reg)
 \f
 ;;; If VALUE can be represented as an immediate constant, then return the
 ;;; appropriate SC number, otherwise return NIL.
-(!def-vm-support-routine immediate-constant-sc (value)
+(defun immediate-constant-sc (value)
   (typecase value
     ((integer 0 0)
      (sc-number-or-lose 'zero))
     (null
      (sc-number-or-lose 'null))
     ((or (integer #.sb!xc:most-negative-fixnum #.sb!xc:most-positive-fixnum)
-         system-area-pointer character)
+         character)
      (sc-number-or-lose 'immediate))
     (symbol
      (if (static-symbol-p value)
          (sc-number-or-lose 'immediate)
          nil))))
+
+(defun boxed-immediate-sc-p (sc)
+  (or (eql sc (sc-number-or-lose 'zero))
+      (eql sc (sc-number-or-lose 'null))
+      (eql sc (sc-number-or-lose 'immediate))))
 \f
 ;;;; function call parameters
 
 ;;; This function is called by debug output routines that want a
 ;;; pretty name for a TN's location. It returns a thing that can be
 ;;; printed with PRINC.
-(!def-vm-support-routine location-print-name (tn)
+(defun location-print-name (tn)
   (declare (type tn tn)) ; FIXME: commented out on alpha
   (let ((sb (sb-name (sc-sb (tn-sc tn))))
         (offset (tn-offset tn)))
       (constant (format nil "Const~D" offset))
       (immediate-constant "Immed"))))
 
+(defun combination-implementation-style (node)
+  (declare (type sb!c::combination node) (ignore node))
+  (values :default nil))
+
+(defun primitive-type-indirect-cell-type (ptype)
+  (declare (ignore ptype))
+  nil)