From 4bb696ba74f1f47333ff45995b82eb51acbee29d Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Thu, 16 Aug 2001 19:40:49 +0000 Subject: [PATCH] 0.pre7.13: 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 | 22 +++++++++++++++++++++- src/compiler/eval.lisp | 1 + version.lisp-expr | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/code/target-eval.lisp b/src/code/target-eval.lisp index 51f445e..00a0200 100644 --- a/src/code/target-eval.lisp +++ b/src/code/target-eval.lisp @@ -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))) @@ -158,6 +158,26 @@ (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 + "~@