Add hook/extended-scode-eval so that expressions can be integrated or
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 15 Apr 1991 20:48:03 +0000 (20:48 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 15 Apr 1991 20:48:03 +0000 (20:48 +0000)
compiled before they are evaluated.

Change compiled-code-block/dbg-info to correctly handle compiled code
blocks whose debugging slot holds a dbg-info structure.

v7/src/runtime/infutl.scm
v7/src/runtime/load.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/syntax.scm
v7/src/runtime/version.scm
v7/src/runtime/xeval.scm
v8/src/runtime/infutl.scm
v8/src/runtime/load.scm
v8/src/runtime/runtime.pkg

index a0305baaee1b162c96271a79bac54fe23ff61f09..3544618aabdef0c8dac567a1beb25d545b46f4a0 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.20 1991/02/15 18:05:49 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/infutl.scm,v 1.21 1991/04/15 20:47:29 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -51,12 +51,16 @@ MIT in each case. |#
 
 (define (compiled-code-block/dbg-info block demand-load?)
   (let ((old-info (compiled-code-block/debugging-info block)))
-    (if (and (pair? old-info) (dbg-info? (car old-info)))
-       (car old-info)
-       (and demand-load?
-            (let ((dbg-info (read-debugging-info old-info)))
-              (if dbg-info (memoize-debugging-info! block dbg-info))
-              dbg-info)))))
+    (cond ((dbg-info? old-info)
+          old-info)
+         ((and (pair? old-info) (dbg-info? (car old-info)))
+          (car old-info))
+         (demand-load?
+          (let ((dbg-info (read-debugging-info old-info)))
+            (if dbg-info (memoize-debugging-info! block dbg-info))
+            dbg-info))
+         (else
+          false))))
 
 (define (discard-debugging-info!)
   (without-interrupts
index 5d3d058f08366a5dec28baa3e129db03403c22cb..301dacde20902c55427a1e10ace9d2966e207147 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.20 1991/02/15 18:06:13 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/load.scm,v 14.21 1991/04/15 20:47:37 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -221,7 +221,7 @@ MIT in each case. |#
             (= 250 (char->ascii fasl-marker)))
        (begin
          (close-input-port port)
-         (scode-eval
+         (extended-scode-eval
           (let ((scode
                  (fasload/internal true-pathname
                                    load/suppress-loading-message?)))
index c5f1a9e2c0ba2ed81ef6fd83de882315aee0eccb..9d3409f8d498712ca76cca6b64669d8ce53f865e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.100 1991/04/11 03:24:25 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.101 1991/04/15 20:47:45 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -638,7 +638,8 @@ MIT in each case. |#
   (files "xeval")
   (parent ())
   (export ()
-         extended-scode-eval)
+         extended-scode-eval
+         hook/extended-scode-eval)
   (initialization (initialize-package!)))
 
 (define-package (runtime file-input)
index 8293472311ff1dad8169e341e313f0a2efb0d829..f773a859fc87ca70c6613dce422f791e489ee408 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 14.14 1991/02/15 18:07:07 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 14.15 1991/04/15 20:47:52 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -442,7 +442,7 @@ MIT in each case. |#
     keyword))
 
 (define-integrable (syntax-eval scode)
-  (scode-eval scode syntaxer/default-environment))
+  (extended-scode-eval scode syntaxer/default-environment))
 \f
 ;;;; FLUID-LET
 
index e90e17c43b7011e55acac2ed450b0e612be45e1b..65bf14a4531150792046c4f0c5f24c1c48e2b589 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.115 1991/04/11 03:24:32 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.116 1991/04/15 20:47:59 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -45,7 +45,7 @@ MIT in each case. |#
                     '()))
   (add-system! microcode-system)
   (add-event-receiver! event:after-restore snarf-microcode-version!)
-  (add-identification! "Runtime" 14 115))
+  (add-identification! "Runtime" 14 116))
 
 (define microcode-system)
 
index 445fe3ec30e7cee85f943c677bc0b7f62a640b8b..736485be0fe9d2e9a6fe534a49065804cb2434d9 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/xeval.scm,v 1.3 1991/02/15 18:08:01 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/xeval.scm,v 1.4 1991/04/15 20:48:03 jinx Exp $
 
 Copyright (c) 1989-91 Massachusetts Institute of Technology
 
@@ -37,15 +37,20 @@ MIT in each case. |#
 
 (declare (usual-integrations))
 \f
+(define hook/extended-scode-eval)
+
+(define (default/extended-scode-eval expression environment)
+  (scode-eval expression environment))
+
 (define (extended-scode-eval expression environment)
   (cond ((interpreter-environment? environment)
-        (scode-eval expression environment))
+        (hook/extended-scode-eval expression environment))
        ((scode-constant? expression)
         expression)
        (else
         (with-values (lambda () (split-environment environment))
           (lambda (bound-names interpreter-environment)
-            (scode-eval
+            (hook/extended-scode-eval
              (cond ((null? bound-names)
                     expression)
                    ((or (definition? expression)
@@ -116,6 +121,7 @@ MIT in each case. |#
           (THE-ENVIRONMENT ,rewrite/the-environment)
           (UNASSIGNED? ,rewrite/unassigned?)
           (VARIABLE ,rewrite/variable))))
+  (set! hook/extended-scode-eval default/extended-scode-eval)
   unspecific)
 \f
 (define (rewrite/variable expression environment bound-names)
index 2530078c124f6aaa9148e3276472abadf7728356..6311f81933062778688adb9ab33d7267faae5fd1 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/infutl.scm,v 1.20 1991/02/15 18:05:49 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/infutl.scm,v 1.21 1991/04/15 20:47:29 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -51,12 +51,16 @@ MIT in each case. |#
 
 (define (compiled-code-block/dbg-info block demand-load?)
   (let ((old-info (compiled-code-block/debugging-info block)))
-    (if (and (pair? old-info) (dbg-info? (car old-info)))
-       (car old-info)
-       (and demand-load?
-            (let ((dbg-info (read-debugging-info old-info)))
-              (if dbg-info (memoize-debugging-info! block dbg-info))
-              dbg-info)))))
+    (cond ((dbg-info? old-info)
+          old-info)
+         ((and (pair? old-info) (dbg-info? (car old-info)))
+          (car old-info))
+         (demand-load?
+          (let ((dbg-info (read-debugging-info old-info)))
+            (if dbg-info (memoize-debugging-info! block dbg-info))
+            dbg-info))
+         (else
+          false))))
 
 (define (discard-debugging-info!)
   (without-interrupts
index 3312b495db9e4af69485c2d1712ce19033b00d42..09c8beab4f3c15d20decc2db84b082dc6685b9a8 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.20 1991/02/15 18:06:13 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/load.scm,v 14.21 1991/04/15 20:47:37 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -221,7 +221,7 @@ MIT in each case. |#
             (= 250 (char->ascii fasl-marker)))
        (begin
          (close-input-port port)
-         (scode-eval
+         (extended-scode-eval
           (let ((scode
                  (fasload/internal true-pathname
                                    load/suppress-loading-message?)))
index 5d181200b7114993d9fb68fa32fb12f0e0be2bd1..8633e0b02e8567594b162b3f36c054eee493cfc3 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.100 1991/04/11 03:24:25 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.101 1991/04/15 20:47:45 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -638,7 +638,8 @@ MIT in each case. |#
   (files "xeval")
   (parent ())
   (export ()
-         extended-scode-eval)
+         extended-scode-eval
+         hook/extended-scode-eval)
   (initialization (initialize-package!)))
 
 (define-package (runtime file-input)