Change the stack parser to ignore frames of type
authorChris Hanson <org/chris-hanson/cph>
Wed, 22 Jun 1988 21:25:16 +0000 (21:25 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 22 Jun 1988 21:25:16 +0000 (21:25 +0000)
RESTORE-TO-STATE-POINT unless they contain a state point whose space
is the system state space.

v7/src/runtime/conpar.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/version.scm
v7/src/runtime/wind.scm
v8/src/runtime/conpar.scm
v8/src/runtime/runtime.pkg

index 90c0b1ff0c069695ccc4f92b62ad696fd48ec717..f1d5ef2aff46903538a48031577b8e1a2cb5e681 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.3 1988/06/21 04:21:49 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/conpar.scm,v 14.4 1988/06/22 21:24:16 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -321,7 +321,15 @@ MIT in each case. |#
 
 (define (parser/restore-dynamic-state type elements state)
   (make-restore-frame type elements state
-                     (vector-ref elements 0)
+                     ;; Possible problem: the dynamic state really
+                     ;; consists of all of the state spaces in
+                     ;; existence.  Probably we should have some
+                     ;; mechanism for keeping track of them all.
+                     (let ((dynamic-state (vector-ref elements 0)))
+                       (if (eq? system-state-space
+                                (state-point/space dynamic-state))
+                           dynamic-state
+                           (parser-state/dynamic-state state)))
                      (parser-state/fluid-bindings state)
                      (parser-state/interrupt-mask state)
                      (parser-state/history state)
index 7a0aa926567635c1639d069d3518a967a3e760fe..46e1e9e152616f25d58ec4d5ff7e82bde5550289 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.6 1988/06/22 21:09:42 jrm Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.7 1988/06/22 21:23:58 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -1426,6 +1426,9 @@ MIT in each case. |#
          set-current-dynamic-state!
          set-fluid-bindings!
          translate-to-state-point)
+  (export (runtime continuation-parser)
+         state-point/space
+         system-state-space)
   (initialization (initialize-package!)))
 
 (define-package (runtime stream)
index 0fcf84cf9ff69c47875838761640aae34e180d55..cf78207f4e17e07979a3782ee814363ee86aa15a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.6 1988/06/21 05:51:30 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.7 1988/06/22 21:25:16 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -40,4 +40,4 @@ MIT in each case. |#
 (define (initialize-package!)
   (add-identification!
    "Microcode" microcode-id/version microcode-id/modification)
-  (add-identification! "Runtime" 14 6))
\ No newline at end of file
+  (add-identification! "Runtime" 14 7))
\ No newline at end of file
index ba494f3879963e98ee414522c727b69568822103..ddbc042d1ca208293e1f87941e9437d08cef2892 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/wind.scm,v 14.1 1988/06/13 12:00:51 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/wind.scm,v 14.2 1988/06/22 21:24:34 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -59,6 +59,21 @@ MIT in each case. |#
                 (current-dynamic-state))
     ((ucode-primitive set-fixed-objects-vector!) fixed-objects)))
 
+(define-structure (state-point (type vector)
+                              (initial-offset 1)
+                              (constructor false)
+                              (conc-name state-point/))
+  (before-thunk false read-only true)
+  (after-thunk false read-only true)
+  (nearer-point false read-only true)
+  (distance-to-root false read-only true))
+
+(define (state-point/space point)
+  (let ((next (state-point/nearer-point point)))
+    (if (positive? (state-point/distance-to-root point))
+       (state-point/space next)
+       next)))
+
 (define-primitives
   execute-at-new-state-point
   translate-to-state-point
index 0d2bc3d12310894e3a26815fad8c251d9a8b1039..6c574caa6dab06f23318cafe10d48a755b84327f 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.3 1988/06/21 04:21:49 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/conpar.scm,v 14.4 1988/06/22 21:24:16 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -321,7 +321,15 @@ MIT in each case. |#
 
 (define (parser/restore-dynamic-state type elements state)
   (make-restore-frame type elements state
-                     (vector-ref elements 0)
+                     ;; Possible problem: the dynamic state really
+                     ;; consists of all of the state spaces in
+                     ;; existence.  Probably we should have some
+                     ;; mechanism for keeping track of them all.
+                     (let ((dynamic-state (vector-ref elements 0)))
+                       (if (eq? system-state-space
+                                (state-point/space dynamic-state))
+                           dynamic-state
+                           (parser-state/dynamic-state state)))
                      (parser-state/fluid-bindings state)
                      (parser-state/interrupt-mask state)
                      (parser-state/history state)
index 50f80cef382c6f80c4dc3d3b96bb3a3f85320331..70f4d72a256a0f9a6b411a90fa3405d772970076 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.6 1988/06/22 21:09:42 jrm Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.7 1988/06/22 21:23:58 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -1426,6 +1426,9 @@ MIT in each case. |#
          set-current-dynamic-state!
          set-fluid-bindings!
          translate-to-state-point)
+  (export (runtime continuation-parser)
+         state-point/space
+         system-state-space)
   (initialization (initialize-package!)))
 
 (define-package (runtime stream)