sbcl-0.8.14.11:
[sbcl.git] / src / compiler / ppc / call.lisp
index 28f9088..3e40b52 100644 (file)
 ;;; ../alpha/call.lisp
 (defun bytes-needed-for-non-descriptor-stack-frame ()
   (logandc2 (+ +stack-alignment-bytes+ number-stack-displacement
-              (* (sb-allocated-size 'non-descriptor-stack) sb!vm:n-word-bytes))
+              (* (sb-allocated-size 'non-descriptor-stack) n-word-bytes))
            +stack-alignment-bytes+))
 
 
     (emit-label start-lab)
     ;; Allocate function header.
     (inst simple-fun-header-word)
-    (dotimes (i (1- sb!vm:simple-fun-code-offset))
+    (dotimes (i (1- simple-fun-code-offset))
       (inst word 0))
     (let* ((entry-point (gen-label)))
       (emit-label entry-point)
@@ -317,9 +317,8 @@ default-value-8
                      ((null remaining))
                    (let ((def (car remaining)))
                      (emit-label (car def))
-                     (when (null (cdr remaining))
-                       (inst b defaulting-done))
                      (store-stack-tn (cdr def) null-tn)))
+                 (inst b defaulting-done)
                  (trace-table-entry trace-table-normal))))))
 
        (inst compute-code-from-lra code-tn code-tn lra-label temp)))
@@ -663,9 +662,9 @@ default-value-8
                            :from (:argument ,(if (eq return :tail) 0 1))
                            :to :eval)
                       lexenv))
-     ;; alpha code suggests that function tn is not needed for named call
-     (:temporary (:scs (descriptor-reg) :from (:argument 0) :to :eval)
-                function)
+     ,@(unless named
+        '((:temporary (:scs (descriptor-reg) :from (:argument 0) :to :eval)
+                      function)))
      (:temporary (:sc any-reg :offset nargs-offset :to :eval)
                 nargs-pass)
 
@@ -776,10 +775,10 @@ default-value-8
                      (do-next-filler))
                     (constant
                      (loadw lexenv code-tn (tn-offset arg-fun)
-                            sb!vm:other-pointer-lowtag)
+                            other-pointer-lowtag)
                      (do-next-filler)))
-                  (loadw function lexenv sb!vm:closure-fun-slot
-                   sb!vm:fun-pointer-lowtag)
+                  (loadw function lexenv closure-fun-slot
+                   fun-pointer-lowtag)
                   (do-next-filler)
                   (inst addi entry-point function
                    (- (ash simple-fun-code-offset word-shift)
@@ -1067,10 +1066,10 @@ default-value-8
 
       (emit-label loop)
       ;; *--dst = *--src, --count
-      (inst addi src src (- sb!vm:n-word-bytes))
+      (inst addi src src (- n-word-bytes))
       (inst addic. count count (- (fixnumize 1)))
       (loadw temp src)
-      (inst addi dst dst (- sb!vm:n-word-bytes))
+      (inst addi dst dst (- n-word-bytes))
       (storew temp dst)
       (inst bgt loop)
 
@@ -1101,7 +1100,7 @@ default-value-8
 (define-vop (listify-rest-args)
   (:args (context-arg :target context :scs (descriptor-reg))
         (count-arg :target count :scs (any-reg)))
-  (:arg-types * tagged-num)
+  (:arg-types * tagged-num (:constant t))
   (:temporary (:scs (any-reg) :from (:argument 0)) context)
   (:temporary (:scs (any-reg) :from (:argument 1)) count)
   (:temporary (:scs (descriptor-reg) :from :eval) temp)