Eliminate some remnants of the "stacklet" design.
authorChris Hanson <org/chris-hanson/cph>
Sat, 20 Aug 2005 01:57:37 +0000 (01:57 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 20 Aug 2005 01:57:37 +0000 (01:57 +0000)
v7/src/runtime/conpar.scm
v7/src/runtime/cpoint.scm
v7/src/runtime/runtime.pkg

index c0940f090a40556acbbdf8a41f1127867e9d3461..63762477c792cef271129546acccfd3cf1518ba9 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: conpar.scm,v 14.48 2005/07/16 03:44:04 cph Exp $
+$Id: conpar.scm,v 14.49 2005/08/20 01:57:26 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1999,2001,2003,2004,2005 Massachusetts Institute of Technology
@@ -473,8 +473,6 @@ USA.
   (with-values (lambda () (unparse/stack-frame stack-frame))
     (lambda (element-stream next-control-point)
       (make-control-point
-       #f
-       0
        (stack-frame/interrupt-mask stack-frame)
        (let ((history (stack-frame/history stack-frame)))
         (if (eq? history undefined-history)
index 8ee9c857daed4b14228acc18ec5c96e9b24705a2..514a32c60b91a1e3ef7724fbaef97d0693c66b09 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: cpoint.scm,v 14.9 2005/02/08 04:17:06 cph Exp $
+$Id: cpoint.scm,v 14.10 2005/08/20 01:57:30 cph Exp $
 
 Copyright 1988,1991,2005 Massachusetts Institute of Technology
 
@@ -31,12 +31,6 @@ USA.
 (define-integrable (control-point? object)
   (object-type? (ucode-type control-point) object))
 
-(define-integrable (control-point/reusable? control-point)
-  (system-vector-ref control-point 0))
-
-(define-integrable (control-point/unused-length control-point)
-  (object-datum (system-vector-ref control-point 1)))
-
 (define-integrable (control-point/interrupt-mask control-point)
   (control-point-ref control-point 1))
 
@@ -50,13 +44,13 @@ USA.
   (control-point-ref control-point 5))
 
 (define-integrable (control-point-ref control-point index)
-  (system-vector-ref control-point (control-point-index control-point index)))
+  (system-vector-ref control-point (control-point-index index)))
 
-(define-integrable (control-point-index control-point index)
-  (+ (control-point/unused-length control-point) (fix:+ 2 index)))
+(define-integrable (control-point-index index)
+  (fix:+ 2 index))
 
-(define-integrable (control-point/first-element-index control-point)
-  (control-point-index control-point 6))
+(define-integrable first-element-index
+  (control-point-index 6))
 
 #|
 
@@ -66,16 +60,14 @@ USA.
 
 (define (control-point/n-elements control-point)
   (let ((real-length
-        (fix:- (system-vector-length control-point)
-               (control-point/first-element-index control-point))))
+        (fix:- (system-vector-length control-point) first-element-index)))
     (if (control-point/next-control-point? control-point)
        (fix:- real-length 2)
        real-length)))
 |#
 
 (define (control-point/n-elements control-point)
-  (fix:- (system-vector-length control-point)
-        (control-point/first-element-index control-point)))
+  (fix:- (system-vector-length control-point) first-element-index))
 
 (define (control-point/element-stream control-point)
   (let ((end
@@ -83,7 +75,7 @@ USA.
           (if (control-point/next-control-point? control-point)
               (fix:- end 2)
               end))))
-    (let loop ((index (control-point/first-element-index control-point)))
+    (let loop ((index first-element-index))
       (if (fix:< index end)
          (if ((ucode-primitive primitive-object-type? 2)
               (ucode-type manifest-nm-vector)
@@ -107,46 +99,40 @@ USA.
        (system-vector-ref control-point
                          (fix:- (system-vector-length control-point) 1))))
 \f
-(define (make-control-point reusable?
-                           unused-length
-                           interrupt-mask
+(define (make-control-point interrupt-mask
                            history
                            previous-history-offset
                            previous-history-control-point
                            element-stream
                            next-control-point)
-  (let ((unused-length
-        (if (eq? microcode-id/stack-type 'STACKLETS)
-            (fix:max unused-length 7)
-            unused-length)))
-    (let ((result
-          (make-vector (+ 8
-                          unused-length
-                          (stream-length element-stream)
-                          (if next-control-point 2 0))))
-         (index 0))
-      (let ((assign
-            (lambda (value)
-              (vector-set! result index value)
-              (set! index (fix:+ index 1))
-              unspecific)))
-       (assign reusable?)
-       (assign (make-non-pointer-object unused-length))
-       (set! index (fix:+ index unused-length))
-       (assign (ucode-return-address restore-interrupt-mask))
-       (assign interrupt-mask)
-       (assign (ucode-return-address restore-history))
-       (assign history)
-       (assign previous-history-offset)
-       (assign previous-history-control-point)
-       (stream-for-each (lambda (element)
-                          (assign (unmap-reference-trap element)))
-                        element-stream)
-       (if next-control-point
-           (begin
-             (assign (ucode-return-address join-stacklets))
-             (assign next-control-point))))
-      (object-new-type (ucode-type control-point) result))))
+  (let ((result
+        (make-vector (+ first-element-index
+                        (stream-length element-stream)
+                        (if next-control-point 2 0))))
+       (index 0))
+    (let ((assign
+          (lambda (value)
+            (vector-set! result index value)
+            (set! index (fix:+ index 1))
+            unspecific)))
+      ;; The first two elements are unused artifacts from the old days
+      ;; when "stacklets" were used.
+      (assign #f)
+      (assign (make-non-pointer-object 0))
+      (assign (ucode-return-address restore-interrupt-mask))
+      (assign interrupt-mask)
+      (assign (ucode-return-address restore-history))
+      (assign history)
+      (assign previous-history-offset)
+      (assign previous-history-control-point)
+      (stream-for-each (lambda (element)
+                        (assign (unmap-reference-trap element)))
+                      element-stream)
+      (if next-control-point
+         (begin
+           (assign (ucode-return-address join-stacklets))
+           (assign next-control-point))))
+    (object-new-type (ucode-type control-point) result)))
 
 (define (control-point/next-control-point? control-point)
   ((ucode-primitive primitive-object-eq? 2)
index f0c64656292ebc6fc5ff4741bf79a85b7333e75d..b441aa25f708989088790b46a9b1004fb2133117 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.560 2005/07/31 02:54:50 cph Exp $
+$Id: runtime.pkg,v 14.561 2005/08/20 01:57:37 cph Exp $
 
 Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
 Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
@@ -1202,8 +1202,6 @@ USA.
          control-point/next-control-point
          control-point/previous-history-control-point
          control-point/previous-history-offset
-         control-point/reusable?
-         control-point/unused-length
          control-point?
          make-control-point))