Rename compiled-scode->procedure to compiler-output->procedure
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 29 Nov 1993 18:38:35 +0000 (18:38 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 29 Nov 1993 18:38:35 +0000 (18:38 +0000)
Add compiler-output->compiled-expression and
compile-scode/internal/hook to make compile-procedure and
compile-scode work in the C back end.

v7/src/compiler/base/asstop.scm
v7/src/compiler/base/toplev.scm

index bdd64299c79193236da4a2d6f70a84bd3054d188..608f5a7eb0755031d753e5eac55bca216fbb59f8 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: asstop.scm,v 1.8 1993/11/13 19:34:48 gjr Exp $
+$Id: asstop.scm,v 1.9 1993/11/29 18:38:12 gjr Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -44,9 +44,15 @@ MIT in each case. |#
 (define (compiler-file-output object pathname)
   (fasdump object pathname))
 
-(define (compiled-scode->procedure scode environment)
+(define (compiler-output->procedure scode environment)
   (scode-eval scode environment))
 
+(define (compiler-output->compiled-expression cexp)
+  cexp)
+
+(define (compile-scode/internal/hook action)
+  (action))
+
 ;;; Global variables for the assembler and linker
 
 (define *recursive-compilation-results*)
index 4bb1c1881ae197244e38a8209caa4de1d46ab1fa..e7a70447173699dd7520cbd26cf87f55b3b658c7 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: toplev.scm,v 4.48 1993/11/09 04:14:01 gjr Exp $
+$Id: toplev.scm,v 4.49 1993/11/29 18:38:35 gjr Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -139,27 +139,30 @@ MIT in each case. |#
 ;;;; Alternate Entry Points
 
 (define (compile-scode scode #!optional keep-debugging-info?)
-  (let ((keep-debugging-info?
-        (and (or (default-object? keep-debugging-info?)
-                 keep-debugging-info?)
-             'KEEP)))
-    (fluid-let ((compiler:noisy? false)
-               (*info-output-filename* keep-debugging-info?))
-      (compile-scode/internal scode
-                             keep-debugging-info?))))
+  (compiler-output->compiled-expression
+   (compile-scode/no-file
+    scode
+    (and (or (default-object? keep-debugging-info?)
+            keep-debugging-info?)
+        'KEEP))))
 
 (define (compile-procedure procedure #!optional keep-debugging-info?)
-  (compiled-scode->procedure
-   (let ((keep-debugging-info?
-         (and (or (default-object? keep-debugging-info?)
-                  keep-debugging-info?)
-              'KEEP)))
-     (fluid-let ((compiler:noisy? false)
-                (*info-output-filename* keep-debugging-info?))
-       (compile-scode/internal (procedure-lambda procedure)
-                              keep-debugging-info?)))
+  (compiler-output->procedure
+   (compile-scode/no-file
+    scode
+    (and (or (default-object? keep-debugging-info?)
+            keep-debugging-info?)
+        'KEEP))
    (procedure-environment procedure)))
 
+(define (compile-scode/no-file scode keep-debugging-info?)
+  (fluid-let ((compiler:noisy? false)
+             (*info-output-filename* keep-debugging-info?))
+    (compile-scode/internal/hook
+     (lambda ()
+       (compile-scode/internal scode
+                              keep-debugging-info?)))))
+
 (define (compiler:batch-compile input #!optional output)
   (fluid-let ((compiler:batch-mode? true))
     (bind-condition-handler (list condition-type:error)