#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.22 1991/08/06 22:13:25 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.23 1991/08/11 15:24:22 jinx Exp $
-Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-1991 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(define (make-intermediate-state state length stream)
(let ((previous-history-control-point
- (parser-state/previous-history-control-point state)))
+ (parser-state/previous-history-control-point state))
+ (new-length
+ (- (parser-state/n-elements state) length)))
(make-parser-state
(parser-state/dynamic-state state)
(parser-state/fluid-bindings state)
(parser-state/interrupt-mask state)
(parser-state/history state)
- (if previous-history-control-point
- (parser-state/previous-history-offset state)
- (max 0 (- (parser-state/previous-history-offset state) (-1+ length))))
+ (let ((previous (parser-state/previous-history-offset state)))
+ (if (or previous-history-control-point
+ (>= new-length previous))
+ previous
+ 0))
previous-history-control-point
stream
- (- (parser-state/n-elements state) length)
+ new-length
(parser-state/next-control-point state)
(parser-state/previous-type state))))
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/cpoint.scm,v 14.3 1988/12/30 06:42:23 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/cpoint.scm,v 14.4 1991/08/11 15:24:05 jinx Exp $
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988-1991 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(define-integrable (control-point/first-element-index control-point)
(control-point-index control-point 6))
+#|
+
+;; Disabled because some procedures in conpar.scm and uenvir.scm
+;; depend on the actual length for finding compiled code variables,
+;; etc.
+
+(define (control-point/n-elements control-point)
+ (let ((real-length (- (system-vector-length control-point)
+ (control-point/first-element-index control-point))))
+ (if (control-point/next-control-point? control-point)
+ (- real-length 2)
+ real-length)))
+|#
+
(define (control-point/n-elements control-point)
(- (system-vector-length control-point)
(control-point/first-element-index control-point)))
(define (control-point/element-stream control-point)
- (let ((end (system-vector-length control-point)))
+ (let ((end (let ((end (system-vector-length control-point)))
+ (if (control-point/next-control-point? control-point)
+ (- end 2)
+ end))))
(let loop ((index (control-point/first-element-index control-point)))
(cond ((= index end) '())
(((ucode-primitive primitive-object-type? 2)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.129 1991/08/08 19:54:33 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.130 1991/08/11 15:24:37 jinx Exp $
Copyright (c) 1988-91 Massachusetts Institute of Technology
'()))
(add-system! microcode-system)
(add-event-receiver! event:after-restore snarf-microcode-version!)
- (add-identification! "Runtime" 14 129))
+ (add-identification! "Runtime" 14 130))
(define microcode-system)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.22 1991/08/06 22:13:25 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.23 1991/08/11 15:24:22 jinx Exp $
-Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-1991 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(define (make-intermediate-state state length stream)
(let ((previous-history-control-point
- (parser-state/previous-history-control-point state)))
+ (parser-state/previous-history-control-point state))
+ (new-length
+ (- (parser-state/n-elements state) length)))
(make-parser-state
(parser-state/dynamic-state state)
(parser-state/fluid-bindings state)
(parser-state/interrupt-mask state)
(parser-state/history state)
- (if previous-history-control-point
- (parser-state/previous-history-offset state)
- (max 0 (- (parser-state/previous-history-offset state) (-1+ length))))
+ (let ((previous (parser-state/previous-history-offset state)))
+ (if (or previous-history-control-point
+ (>= new-length previous))
+ previous
+ 0))
previous-history-control-point
stream
- (- (parser-state/n-elements state) length)
+ new-length
(parser-state/next-control-point state)
(parser-state/previous-type state))))