The last compiled-return-address frame before an interpreter frame has
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 6 Aug 1991 22:13:25 +0000 (22:13 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 6 Aug 1991 22:13:25 +0000 (22:13 +0000)
valid history.

v7/src/runtime/conpar.scm
v8/src/runtime/conpar.scm

index acee7b58159c003f86921a18f9f9533653bac1c2..6da76abea333cffd718c633b386bb4e93f32796f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.21 1990/12/28 01:34:25 hal Exp $
+$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 $
 
 Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -227,7 +227,7 @@ MIT in each case. |#
 ;;; before calling `parser/standard' -- for example,
 ;;; RESTORE-TO-STATE-POINT changes the `dynamic-state' component.
 
-(define (parser/standard type elements state)
+(define (parse/standard-next type elements state history?)
   (let ((n-elements (parser-state/n-elements state))
        (history-subproblem?
         (stack-frame-type/history-subproblem? type))
@@ -241,7 +241,7 @@ MIT in each case. |#
      (parser-state/dynamic-state state)
      (parser-state/fluid-bindings state)
      (parser-state/interrupt-mask state)
-     (if (and history-subproblem? (stack-frame-type/subproblem? type))
+     (if history?
         history
         undefined-history)
      previous-history-offset
@@ -260,6 +260,21 @@ MIT in each case. |#
                        n-elements
                        (parser-state/next-control-point state)
                        type))))
+
+(define (parser/standard type elements state)
+  (parse/standard-next type elements state
+                      (and (stack-frame-type/history-subproblem? type)
+                           (stack-frame-type/subproblem? type))))
+
+(define (parser/standard-compiled type elements state)
+  (parse/standard-next
+   type elements state
+   (let ((stream (parser-state/element-stream state)))
+     (and (stream-pair? stream)
+         (eq? (return-address->stack-frame-type
+               (element-stream/head stream)
+               true)
+              stack-frame-type/return-to-interpreter)))))
 \f
 (define (parser/restore-dynamic-state type elements state)
   ;; Possible problem: the dynamic state really consists of all of the
@@ -494,7 +509,7 @@ MIT in each case. |#
   (set! stack-frame-type/compiled-return-address
        (make-stack-frame-type false true false
                               length/compiled-return-address
-                              parser/standard))
+                              parser/standard-compiled))
   (set! stack-frame-type/return-to-interpreter
        (make-stack-frame-type false false true
                               1
index 36f360c1356466a29487f74c38cc8176d5f9adf1..f979a42230a26bcf5c2e48d4422e29a2726a438b 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.21 1990/12/28 01:34:25 hal Exp $
+$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 $
 
 Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -227,7 +227,7 @@ MIT in each case. |#
 ;;; before calling `parser/standard' -- for example,
 ;;; RESTORE-TO-STATE-POINT changes the `dynamic-state' component.
 
-(define (parser/standard type elements state)
+(define (parse/standard-next type elements state history?)
   (let ((n-elements (parser-state/n-elements state))
        (history-subproblem?
         (stack-frame-type/history-subproblem? type))
@@ -241,7 +241,7 @@ MIT in each case. |#
      (parser-state/dynamic-state state)
      (parser-state/fluid-bindings state)
      (parser-state/interrupt-mask state)
-     (if (and history-subproblem? (stack-frame-type/subproblem? type))
+     (if history?
         history
         undefined-history)
      previous-history-offset
@@ -260,6 +260,21 @@ MIT in each case. |#
                        n-elements
                        (parser-state/next-control-point state)
                        type))))
+
+(define (parser/standard type elements state)
+  (parse/standard-next type elements state
+                      (and (stack-frame-type/history-subproblem? type)
+                           (stack-frame-type/subproblem? type))))
+
+(define (parser/standard-compiled type elements state)
+  (parse/standard-next
+   type elements state
+   (let ((stream (parser-state/element-stream state)))
+     (and (stream-pair? stream)
+         (eq? (return-address->stack-frame-type
+               (element-stream/head stream)
+               true)
+              stack-frame-type/return-to-interpreter)))))
 \f
 (define (parser/restore-dynamic-state type elements state)
   ;; Possible problem: the dynamic state really consists of all of the
@@ -494,7 +509,7 @@ MIT in each case. |#
   (set! stack-frame-type/compiled-return-address
        (make-stack-frame-type false true false
                               length/compiled-return-address
-                              parser/standard))
+                              parser/standard-compiled))
   (set! stack-frame-type/return-to-interpreter
        (make-stack-frame-type false false true
                               1