From: Chris Hanson Date: Sat, 20 Aug 2005 01:57:37 +0000 (+0000) Subject: Eliminate some remnants of the "stacklet" design. X-Git-Tag: 20090517-FFI~1229 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=301b6002b09ab0a9d53919b69fb75cd20f90f78e;p=mit-scheme.git Eliminate some remnants of the "stacklet" design. --- diff --git a/v7/src/runtime/conpar.scm b/v7/src/runtime/conpar.scm index c0940f090..63762477c 100644 --- a/v7/src/runtime/conpar.scm +++ b/v7/src/runtime/conpar.scm @@ -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) diff --git a/v7/src/runtime/cpoint.scm b/v7/src/runtime/cpoint.scm index 8ee9c857d..514a32c60 100644 --- a/v7/src/runtime/cpoint.scm +++ b/v7/src/runtime/cpoint.scm @@ -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)))) -(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) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index f0c646562..b441aa25f 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -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))