0.pre7.13:
authorWilliam Harold Newman <william.newman@airmail.net>
Thu, 16 Aug 2001 19:40:49 +0000 (19:40 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Thu, 16 Aug 2001 19:40:49 +0000 (19:40 +0000)
preparing to delete IR1 interpreter..
..defined #!-SB-INTERPRETER implementation of INTERNAL-EVAL
..(Now the system builds and runs and builds itself even
when :SB-INTERPRETER is suppressed in
customize-target-features.lisp.)

src/code/target-eval.lisp
src/compiler/eval.lisp
version.lisp-expr

index 51f445e..00a0200 100644 (file)
@@ -82,7 +82,7 @@
 ;;; EVAL-WHEN.
 (defun eval (original-exp)
   #!+sb-doc
-  "Evaluates its single argument in a null lexical environment, returns the
+  "Evaluate the argument in a null lexical environment, returning the
   result or results."
   (declare (optimize (safety 1)))
   (let ((exp (macroexpand original-exp)))
       (t
        exp))))
 
+;;; general case of EVAL (except in that it can't handle toplevel
+;;; EVAL-WHEN magic properly): Delegate to the byte compiler.
+#!-sb-interpreter
+(defun internal-eval (expr)
+  (let ((name (gensym "EVAL-TMPFUN-")))
+    (multiple-value-bind (fun warnings-p failure-p)
+        (compile name
+                 `(lambda ()
+                    (declare (optimize (speed 0) (debug 1))) ; to byte-compile
+                    (declare (optimize (space 1) (safety 1)))
+                   (declare (optimize (compilation-speed 3)))
+                    ,expr))
+      (declare (ignore warnings-p))
+      (if failure-p
+          (error 'simple-program-error
+                 :format-control
+                 "~@<failure when precompiling ~2I~_~S ~I~_ for ~S"
+                 :format-arguments (list expr 'eval))
+          (funcall fun)))))
+
 ;;; Given a function, return three values:
 ;;; 1] A lambda expression that could be used to define the function,
 ;;;    or NIL if the definition isn't available.
index e8cfdef..d3ab8b9 100644 (file)
 ;;; APPLY on it. If *ALREADY-EVALED-THIS* is true, then we bind it to
 ;;; NIL around the apply to limit the inhibition to the lexical scope
 ;;; of the EVAL-WHEN.
+#!+sb-interpreter
 (defun internal-eval (form)
   (let ((res (sb!c:compile-for-eval form)))
     (if *already-evaled-this*
index 7a49182..62be2c1 100644 (file)
@@ -16,4 +16,4 @@
 ;;; four numeric fields, is used for versions which aren't released
 ;;; but correspond only to CVS tags or snapshots.
 
-"0.pre7.12"
+"0.pre7.13"